diff --git a/packages/CLI11/.appveyor.yml b/packages/CLI11/.appveyor.yml
index 2945118701113a77ea5735037baa2082899957c6..9d9394713a6bedd3d4c8cf2e9234ea51c8a93e69 100644
--- a/packages/CLI11/.appveyor.yml
+++ b/packages/CLI11/.appveyor.yml
@@ -1,3 +1,5 @@
+version: 1.8.0.{build}
+
 branches:
   only:
     - master
@@ -13,7 +15,7 @@ install:
 build_script:
   - mkdir build
   - cd build
-  - ps: cmake .. -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GENERATOR="Visual Studio 14 2015"
+  - ps: cmake .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GENERATOR="Visual Studio 14 2015"
   - ps: cmake --build .
   - cd ..
   - conan create . CLIUtils/CLI11
diff --git a/packages/CLI11/.ci/azure-build.yml b/packages/CLI11/.ci/azure-build.yml
new file mode 100644
index 0000000000000000000000000000000000000000..234e442d4aa897fa88a2cb5cc858ec85d02c5438
--- /dev/null
+++ b/packages/CLI11/.ci/azure-build.yml
@@ -0,0 +1,11 @@
+steps:
+
+- task: CMake@1
+  inputs:
+    cmakeArgs: .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE=$(cli11.single) -DCLI11_CXX_STD=$(cli11.std) -DCLI11_SINGLE_FILE_TESTS=$(cli11.single) -DCMAKE_BUILD_TYPE=$(cli11.build_type) $(cli11.options)
+  displayName: 'Configure'
+
+- script: cmake --build .
+  displayName: 'Build'
+  workingDirectory: build
+
diff --git a/packages/CLI11/.ci/azure-cmake.yml b/packages/CLI11/.ci/azure-cmake.yml
new file mode 100644
index 0000000000000000000000000000000000000000..59b6ceb321340bd31aebcd0d9ddec3c10f385c66
--- /dev/null
+++ b/packages/CLI11/.ci/azure-cmake.yml
@@ -0,0 +1,16 @@
+steps:
+
+# Note that silkeh/clang does not include ca-certificates, so check the shasum for verification
+- bash: |
+    wget --no-check-certificate "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
+    echo "29faa62fb3a0b6323caa3d9557e1a5f1205614c0d4c5c2a9917f16a74f7eff68  cmake-3.14.3-Linux-x86_64.tar.gz" | shasum -sca 256
+  displayName: Download CMake
+
+- task: ExtractFiles@1
+  inputs:
+    archiveFilePatterns: 'cmake*.tar.gz'
+    destinationFolder: 'cmake_program'
+    displayName: Extract CMake
+
+- bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
+  displayName: Add CMake to PATH
diff --git a/packages/CLI11/.ci/azure-steps.yml b/packages/CLI11/.ci/azure-steps.yml
deleted file mode 100644
index 3ac2b35c4791e5692fd082c58c2c495a77e5115d..0000000000000000000000000000000000000000
--- a/packages/CLI11/.ci/azure-steps.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-steps:
-
-- checkout: self
-  fetchDepth: 50
-  submodules: true
-
-- task: CMake@1
-  inputs:
-    cmakeArgs: .. -DCLI12_SINGLE_FILE=ON -DCLI11_CXX_STD=14 -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug
-  displayName: 'Configure'
-
-- script: cmake --build . -j
-  displayName: 'Build'
-  workingDirectory: build
-
-- script: ctest --output-on-failure -C Debug
-  displayName: 'Test'
-  workingDirectory: build
diff --git a/packages/CLI11/.ci/azure-test.yml b/packages/CLI11/.ci/azure-test.yml
new file mode 100644
index 0000000000000000000000000000000000000000..ec1d1f55633b2ee51630d1ce042f6728a74e780e
--- /dev/null
+++ b/packages/CLI11/.ci/azure-test.yml
@@ -0,0 +1,12 @@
+steps:
+
+- script: ctest --output-on-failure -C $(cli11.build_type) -T test
+  displayName: 'Test'
+  workingDirectory: build
+
+- task: PublishTestResults@2
+  inputs:
+    testResultsFormat: 'cTest'
+    testResultsFiles: '**/Test.xml'
+
+
diff --git a/packages/CLI11/.ci/build_docs.sh b/packages/CLI11/.ci/build_docs.sh
deleted file mode 100755
index d1f68335d2e14146935560b8d4cbf7deedbbf129..0000000000000000000000000000000000000000
--- a/packages/CLI11/.ci/build_docs.sh
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-################################################################################
-# Title         : generateDocumentationAndDeploy.sh
-# Date created  : 2016/02/22
-# Notes         :
-# Author        : Jeroen de Bruijn
-# Preconditions:
-# - Packages doxygen doxygen-doc doxygen-latex doxygen-gui graphviz
-#   must be installed.
-# - Doxygen configuration file must have the destination directory empty and
-#   source code directory with a $(TRAVIS_BUILD_DIR) prefix.
-# - An gh-pages branch should already exist. See below for mor info on hoe to
-#   create a gh-pages branch.
-#
-# Required global variables:
-# - TRAVIS_BUILD_NUMBER : The number of the current build.
-# - TRAVIS_COMMIT       : The commit that the current build is testing.
-# - DOXYFILE            : The Doxygen configuration file.
-# - TRAVIS_REPO_SLUG    : The username / reponame for the repository.
-# - GH_REPO_TOKEN       : Secure token to the github repository.
-#
-# For information on how to encrypt variables for Travis CI please go to
-# https://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables
-# or https://gist.github.com/vidavidorra/7ed6166a46c537d3cbd2
-# For information on how to create a clean gh-pages branch from the master
-# branch, please go to https://gist.github.com/vidavidorra/846a2fc7dd51f4fe56a0
-#
-# This script will generate Doxygen documentation and push the documentation to
-# the gh-pages branch of a repository specified by GH_REPO_REF.
-# Before this script is used there should already be a gh-pages branch in the
-# repository.
-#
-################################################################################
-
-################################################################################
-##### Setup this script and get the current gh-pages branch.               #####
-echo 'Setting up the script...'
-# Exit with nonzero exit code if anything fails
-set -e
-
-GH_REPO_ORG=$(echo $TRAVIS_REPO_SLUG | cut -d "/" -f 1)
-GH_REPO_NAME=$(echo $TRAVIS_REPO_SLUG | cut -d "/" -f 2)
-GH_REPO_REF="github.com/$GH_REPO_ORG/$GH_REPO_NAME.git"
-
-# Create a clean working directory for this script.
-# Get the current gh-pages branch
-cd docs
-git clone -b gh-pages https://git@$GH_REPO_REF html
-cd html
-
-##### Configure git.
-# Set the push default to simple i.e. push only the current branch.
-git config --global push.default simple
-# Pretend to be an user called Travis CI.
-git config user.name "Travis CI"
-git config user.email "travis@travis-ci.org"
-
-# Remove everything currently in the gh-pages branch.
-# GitHub is smart enough to know which files have changed and which files have
-# stayed the same and will only update the changed files. So the gh-pages branch
-# can be safely cleaned, and it is sure that everything pushed later is the new
-# documentation.
-rm -rf *
-
-# Need to create a .nojekyll file to allow filenames starting with an underscore
-# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
-# Presumably this is only needed when the SHORT_NAMES option in Doxygen is set
-# to NO, which it is by default. So creating the file just in case.
-echo "" > .nojekyll
-
-################################################################################
-##### Generate the Doxygen code documentation and log the output.          #####
-echo 'Generating Doxygen code documentation...'
-# Redirect both stderr and stdout to the log file AND the console.
-cd ..
-doxygen $DOXYFILE 2>&1 | tee doxygen.log
-
-################################################################################
-##### Upload the documentation to the gh-pages branch of the repository.   #####
-# Only upload if Doxygen successfully created the documentation.
-# Check this by verifying that the html directory and the file html/index.html
-# both exist. This is a good indication that Doxygen did it's work.
-if [ -d "html" ] && [ -f "html/index.html" ]; then
-
-    cd html
-    echo 'Uploading documentation to the gh-pages branch...'
-    # Add everything in this directory (the Doxygen code documentation) to the
-    # gh-pages branch.
-    # GitHub is smart enough to know which files have changed and which files have
-    # stayed the same and will only update the changed files.
-    git add --all
-
-    # Commit the added files with a title and description containing the Travis CI
-    # build number and the GitHub commit reference that issued this build.
-    git commit -m "Deploy code docs to GitHub Pages Travis build: ${TRAVIS_BUILD_NUMBER}" -m "Commit: ${TRAVIS_COMMIT}"
-
-    # Force push to the remote gh-pages branch.
-    # The ouput is redirected to /dev/null to hide any sensitive credential data
-    # that might otherwise be exposed.
-    git push --force "https://${GH_REPO_TOKEN}@${GH_REPO_REF}" > /dev/null 2>&1
-else
-    echo '' >&2
-    echo 'Warning: No documentation (html) files have been found!' >&2
-    echo 'Warning: Not going to push the documentation to GitHub!' >&2
-    exit 1
-fi
diff --git a/packages/CLI11/.ci/check_tidy.sh b/packages/CLI11/.ci/check_tidy.sh
deleted file mode 100755
index 505b68eb9d47229b991e9c24a22d10b8ad6273c5..0000000000000000000000000000000000000000
--- a/packages/CLI11/.ci/check_tidy.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-echo -en "travis_fold:start:script.build\\r"
-echo "Building with tidy on..."
-set -evx
-
-mkdir -p build-tidy
-cd build-tidy
-CXX_FLAGS="-Werror -Wcast-align -Wfloat-equal -Wimplicit-atomic-properties -Wmissing-declarations -Woverlength-strings -Wshadow -Wstrict-selector-match -Wundeclared-selector -Wunreachable-code -std=c++11" cmake .. -DCLANG_TIDY_FIX=ON
-cmake --build .
-
-set -evx
-echo -en "travis_fold:end:script.build\\r"
-echo -en "travis_fold:start:script.compare\\r"
-echo "Checking git diff..."
-set -evx
-
-git diff --exit-code --color
-
-set +evx
-echo -en "travis_fold:end:script.compare\\r"
diff --git a/packages/CLI11/.ci/make_and_test.sh b/packages/CLI11/.ci/make_and_test.sh
index 6aec305ed97680457fc4c16e5b41fb96b64a902c..e326aa4d3cfb24648792bf20c7d38ea21d8b24a5 100755
--- a/packages/CLI11/.ci/make_and_test.sh
+++ b/packages/CLI11/.ci/make_and_test.sh
@@ -8,7 +8,7 @@ set -evx
 
 mkdir -p build
 cd build
-cmake .. -DCLI11_SINGLE_FILE=ON -DCLI11_CXX_STD=$STD -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=ccache $@
+cmake .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE=ON -DCLI11_CXX_STD=$STD -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=ccache $@
 cmake --build . -- -j2
 
 set +evx
diff --git a/packages/CLI11/.editorconfig b/packages/CLI11/.editorconfig
index 35463abd02d6d19bfbe93b22416c7c1684890cef..979b049507328cba4c21879adf35ff4c2f206593 100644
--- a/packages/CLI11/.editorconfig
+++ b/packages/CLI11/.editorconfig
@@ -7,3 +7,5 @@ insert_final_newline = true
 end_of_line = lf
 trim_trailing_whitespace = true
 
+[*.yml]
+indent_size = 2
diff --git a/packages/CLI11/.gitignore b/packages/CLI11/.gitignore
index 66ead1a57dcdaa5361a5d8711abca84af3e3070b..b667eef1d9b140503a1fb2a800e32b62520da902 100644
--- a/packages/CLI11/.gitignore
+++ b/packages/CLI11/.gitignore
@@ -5,3 +5,6 @@ a.out*
 /Makefile
 /CMakeFiles/*
 /cmake_install.cmake
+/*.kdev4
+/html/*
+!/meson.build
diff --git a/packages/CLI11/.gitrepo b/packages/CLI11/.gitrepo
index 71fccd41bb14185d4f411bb0d0556f08779d2c92..f47496a8e90c246c228d8424405bcd7f367433b4 100644
--- a/packages/CLI11/.gitrepo
+++ b/packages/CLI11/.gitrepo
@@ -6,7 +6,7 @@
 [subrepo]
 	remote = git@github.com:CLIUtils/CLI11.git
 	branch = master
-	commit = 76d2cde6568c9c8870b728aa9bc64b70b29127fd
-	parent = ead793c351e37e34227121e50abdce709aeb81af
+	commit = 8ecce8fd2c49f64c80e5757cb12d2fd1fa62f242
+	parent = 7de34a384b9d2e24dbbf3707aa01fad53b7df4e6
 	cmdver = 0.4.0
 	method = merge
diff --git a/packages/CLI11/.travis.yml b/packages/CLI11/.travis.yml
index b3956ed801c149b232b4e4adfcbeaa6d2a16e7d6..abf69084389972ab39346dc4e98bf64bcada5bf0 100644
--- a/packages/CLI11/.travis.yml
+++ b/packages/CLI11/.travis.yml
@@ -23,17 +23,10 @@ matrix:
     - .ci/make_and_test.sh 14
     - .ci/make_and_test.sh 17
 
-    # Check style/tidy
-  - compiler: clang
-    env:
-    - CHECK_STYLE=yes
-    script:
-    - cd "${TRAVIS_BUILD_DIR}"
-    - scripts/check_style.sh
-    - .ci/check_tidy.sh
-
     # Docs and clang 3.5
   - compiler: clang
+    language: node_js
+    node_js: "7.4.0"
     env:
     - DEPLOY_MAT=yes
     addons:
@@ -43,17 +36,16 @@ matrix:
     install:
     - export CC=clang-3.5
     - export CXX=clang++-3.5
+    - npm install gitbook-cli -g
+    - gitbook fetch 3.2.3
+    - gitbook install book
     script:
     - .ci/make_and_test.sh 11
     after_success:
-    - export DOXYFILE=$TRAVIS_BUILD_DIR/docs/Doxyfile
     - export DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
-    - |
-      if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]
-      then
-        . .ci/build_doxygen.sh
-        .ci/build_docs.sh
-      fi
+    - . .ci/build_doxygen.sh
+    - doxygen docs/Doxyfile
+    - gitbook build book html/book
 
     # GCC 7 and coverage (8 does not support lcov, wait till 9 and new lcov)
   - compiler: gcc
@@ -79,17 +71,17 @@ matrix:
     - .ci/make_and_test.sh 14 -DCLI11_EXAMPLE_JSON=ON
     - .ci/make_and_test.sh 17 -DCLI11_EXAMPLE_JSON=ON
 
-    # GCC 4.7 and Conan
+    # GCC 4.8 and Conan
   - compiler: gcc
     env:
-    - GCC_VER=4.7
+    - GCC_VER=4.8
     addons:
       apt:
         packages:
-        - g++-4.7
+        - g++-4.8
     install:
-    - export CC=gcc-4.7
-    - export CXX=g++-4.7
+    - export CC=gcc-4.8
+    - export CXX=g++-4.8
     - python -m pip install --user conan
     - conan user
     script:
@@ -104,29 +96,6 @@ matrix:
         conan upload "*" -c -r origin --all
       fi
 
-    # GCC 4.8
-  - compiler: gcc
-    env:
-    - GCC_VER=4.8
-    addons:
-      apt:
-        packages:
-        - g++-4.8
-    install:
-    - export CC=gcc-4.8
-    - export CXX=g++-4.8
-    script:
-    - .ci/make_and_test.sh 11
-
-    # macOS and clang
-  - os: osx
-    compiler: clang
-    install:
-    - brew update
-    - echo 'brew "python"' > Brewfile
-    - echo 'brew "ccache"' >> Brewfile
-    - brew bundle
-    - python -m ensurepip --user
 
 install: skip
 
@@ -136,7 +105,15 @@ script:
 
 
 deploy:
-  provider: releases
+- provider: pages
+  skip_cleanup: true
+  github_token: ${GH_REPO_TOKEN}
+  keep_history: false
+  local_dir: ${TRAVIS_BUILD_DIR}/html
+  on:
+    branch: master
+    condition: "$DEPLOY_MAT = yes"
+- provider: releases
   api_key:
     secure: L1svZ5J+RiR67dj1fNk/XiZRvYfGJC4c5/dKSvDH+yuKSzZ6ODaTiVmYF8NtMJ7/3AQenEa0OuRBVQ0YpngFz3ugIcRsGCDUHtCMK/Bti0+6ZFdICbqcv6W3BlRIM8s7EOBPhjfbCV+ae7xep9B24HmwBPKukMFjDIj4nwBsmwCHZK9iNFtfaW2J2cr2TJo7QPY01J0W1k/boaj91KzHf9UuhEH8KYqp7szv+6kV00W8bRBtugw419dIm25eXFXgXDT9s/OA7qXV7o5FXWWpkyJ5AINVbY9DerkYag5TStrdOyKk+S1FexRG6TMG4L4Jyu/QxQGhMdu0m1yRCLvIekGtWLDnjNrI2SZrd5HbKprQ0O8j1770Is4q5blVPqAZ6O9jVMJRtVEaYbsJwItz1BJWkPT4S9GFbDL1dq2Z5jR2f5gd/cz2yYH56b47iYHWtzSqEfVhsXiN+atD+tWyQFA4Q/av0bGHwJ6LX0A1q0OCHruUMoxcw1QKfYtV1bkf/folL4Z4Hx3CL+NB0Lkqs8LFsQHxODP4a26I5DS/kaDHofotho8wsWlKFDtonZa+CExORGFFMPnGRz2qX5tMgGoo84wcqrprfoQv2llqeUr3gISPl2qxrljAhj3/Dcl7iI7k0Er7Ji8ENpgjSec4aqnBx8Ke2yaDEmBvwbouFCM=
   skip_cleanup: true
@@ -145,6 +122,7 @@ deploy:
     repo: CLIUtils/CLI11
     tags: true
     condition: "$DEPLOY_MAT = yes"
+
 notifications:
   webhooks:
     urls:
@@ -152,6 +130,7 @@ notifications:
     on_success: change
     on_failure: always
     on_start: never
+
 env:
   global:
   - secure: cY0OI609iTAxLRYuYQnNMi+H6n0dBwioTAoFXGGRTnngw2V9om3UmY5eUu4HQEQsQZovHdYpNhlSgRmdwQ4UqSp3FGyrwobf0kzacV4bVnMDeXDmHt8RzE5wP/LwDd8elNF6RRYjElY99f0k0FyXVd0fIvuVkGKQECNLOtEk0jQo+4YTh7dhuCxRhBYgTbNiRL6UJynfrcK0YN+DQ+8CJNupu2VxgaEpCSngTfvDHLcddcrXwpvn3MPc3FsDUbtN389ZCIe41qqIL0ATv46DQaTw4FOevyVfRyrBOznONoGCVeAYKL6VBdrk01Fh6aytF5zgI3hKaKobgEn+QFfzR6l68c6APvqA0Qv39iLjuh6KbdIV2YsqXfyt6FBgqP2xZuNEZW1jZ8LxUOLl2I40UEh87nFutvnSbfIzN+FcLrajm2H2jV2kZGNKAMx+4qxkZuXSre4JPkENfJm2WNFAKlqPt4ZSEQarkDYzZPcEr2I9fbGjQYVJICoN4LikCv9K5z7ujpTxCTNbVpQWZcEOT6QQBc6Vml/N/NKAIl9o2OeTLiXCmT31+KQMeO492KYNQ6VmkeqrVhGExOUcJdNyDJV9C+3mSekb3Sq78SneYRKDechkWbMl0ol07wGTdBwQQwgaorjRyn07x1rDxpPr3z19/+eubnpPUW4UQ5MYsjs=
diff --git a/packages/CLI11/CHANGELOG.md b/packages/CLI11/CHANGELOG.md
index c2e3e9a7000b12a85807d49b1ccb8169a9c23e15..67840e96b5fab8073628b4b4dff4345c34a84666 100644
--- a/packages/CLI11/CHANGELOG.md
+++ b/packages/CLI11/CHANGELOG.md
@@ -1,22 +1,52 @@
-## Version 1.8: Sets and Flags (IN PROGRESS)
-
-Set handling has been completely replaced by a new backend that works as a Validator. This provides a single interface instead of the 16 different functions in App. It also allows ordered collections to be used, custom functions for filtering, and better help and error messages. You can also use a collection of pairs (like `std::map`) to transform the match into an output. Also new are inverted flags, which can cancel or reduce the count of flags, and can also support general flag types. A new `add_option_fn` lets you more easily program CLI11 options with the types you choose. Vector options now support a custom separator. Apps can now be composed with unnamed subcommand support.
-
+## Version 1.9: IN PROGRESS
+
+* The meson build system supported [#299][]
+* Added two template parameter form of `add_option`, allowing `std::optional` to be supported without a special import [#285][]
+* `string_view` now supported in reasonable places [#300][], [#285][]
+* `app.immediate_callback()` allows the main app to run before subcommand callbacks. [#292][]
+* GCC 4.7 is no longer supported, due mostly to GoogleTest. GCC 4.8+ is now required. [#160][]
+* Backend: Cleaner type traits [#286][]
+* Bugfix: Fixed undefined behavior in `checked_multiply` [#290][]
+* Bugfix: Resetting config option works properly [#301][]
+
+[#160]: https://github.com/CLIUtils/CLI11/pull/160
+[#285]: https://github.com/CLIUtils/CLI11/pull/285
+[#286]: https://github.com/CLIUtils/CLI11/pull/286
+[#290]: https://github.com/CLIUtils/CLI11/pull/290
+[#292]: https://github.com/CLIUtils/CLI11/pull/292
+[#299]: https://github.com/CLIUtils/CLI11/pull/299
+[#300]: https://github.com/CLIUtils/CLI11/pull/300
+
+## Version 1.8: Transformers, default strings, and flags
+
+Set handling has been completely replaced by a new backend that works as a Validator or Transformer. This provides a single interface instead of the 16 different functions in App. It also allows ordered collections to be used, custom functions for filtering, and better help and error messages. You can also use a collection of pairs (like `std::map`) to transform the match into an output. Also new are inverted flags, which can cancel or reduce the count of flags, and can also support general flag types. A new `add_option_fn` lets you more easily program CLI11 options with the types you choose. Vector options now support a custom separator. Apps can now be composed with unnamed subcommand support. The final bool "defaults" flag when creating options has been replaced by `->capture_default_str()` (ending an old limitation in construction made this possible); the old method is still available but may be removed in future versions.
+
+* Replaced default help capture: `.add_option("name", value, "", True)` becomes `.add_option("name", value)->capture_default_str()` [#242]
+* Added `.always_capture_default()` [#242]
 * New `CLI::IsMember` validator replaces set validation [#222]
 * IsMember also supports container of pairs, transform allows modification of result [#228]
+* Added new Transformers, `CLI::AsNumberWithUnit` and `CLI::AsSizeValue` [#253]
 * Much more powerful flags with different values [#211], general types [#235]
 * `add_option` now supports bool due to unified bool handling [#211]
 * Support for composable unnamed subcommands [#216]
+* Reparsing is better supported with `.remaining_for_passthrough()` [#265]
 * Custom vector separator using `->delimiter(char)` [#209], [#221], [#240]
-* Validators added for IP4 addresses and positive numbers [#210]
+* Validators added for IP4 addresses and positive numbers [#210] and numbers [#262]
 * Minimum required Boost for optional Optionals has been corrected to 1.61 [#226]
 * Positionals can stop options from being parsed with `app.positionals_at_end()` [#223]
+* Added `validate_positionals` [#262]
+* Positional parsing is much more powerful [#251], duplicates supported []#247]
 * Validators can be negated with `!` [#230], and now handle tname functions [#228]
 * Better enum support and streaming helper [#233] and [#228]
 * Cleanup for shadow warnings [#232]
+* Better alignment on multiline descriptions [#269]
+* Better support for aarch64 [#266]
+* Respect `BUILD_TESTING` only if CLI11 is the main project; otherwise, `CLI11_TESTING` must be used [#277]
+* Drop auto-detection of experimental optional and boost::optional; must be enabled explicitly (too fragile) [#277] [#279]
 
 > ### Converting from CLI11 1.7:
 >
+> * `.add_option(..., true)` should be replaced by `.add_option(...)->capture_default_str()` or `app.option_defaults()->always_capture_default()` can be used
 > * `app.add_set("--name", value, {"choice1", "choice2"})` should become `app.add_option("--name", value)->check(CLI::IsMember({"choice1", "choice2"}))`
 > * The `_ignore_case` version of this can be replaced by adding `CLI::ignore_case` to the argument list in `IsMember`
 > * The `_ignore_underscore` version of this can be replaced by adding `CLI::ignore_underscore` to the argument list in `IsMember`
@@ -39,6 +69,16 @@ Set handling has been completely replaced by a new backend that works as a Valid
 [#233]: https://github.com/CLIUtils/CLI11/pull/233
 [#235]: https://github.com/CLIUtils/CLI11/pull/235
 [#240]: https://github.com/CLIUtils/CLI11/pull/240
+[#242]: https://github.com/CLIUtils/CLI11/pull/242
+[#247]: https://github.com/CLIUtils/CLI11/pull/247
+[#251]: https://github.com/CLIUtils/CLI11/pull/251
+[#253]: https://github.com/CLIUtils/CLI11/pull/253
+[#262]: https://github.com/CLIUtils/CLI11/pull/262
+[#265]: https://github.com/CLIUtils/CLI11/pull/265
+[#266]: https://github.com/CLIUtils/CLI11/pull/266
+[#269]: https://github.com/CLIUtils/CLI11/pull/269
+[#277]: https://github.com/CLIUtils/CLI11/pull/277
+[#279]: https://github.com/CLIUtils/CLI11/pull/279
 
 
 ## Version 1.7.1: Quick patch
@@ -70,7 +110,7 @@ Passing the same subcommand multiple times is better supported. Several new feat
 * Parsing is now done in phases: `shortcurcuits`, `ini`, `env`, `callbacks`, and `requirements`; all subcommands complete a phase before moving on. [#179]
 * Calling parse multiple times is now officially supported without `clear` (automatic). [#179]
 * Dropped the mostly undocumented `short_circuit` property, as help flag parsing is a bit more complex, and the default callback behavior of options now works properly. [#179]
-* Use the standard `BUILD_TESTING` over `CLI11_TESTING` if defined (`CLI11_TESTING` may eventually be removed) [#183]
+* Use the standard `BUILD_TESTING` over `CLI11_TESTING` if defined [#183]
 * Cleanup warnings [#191]
 * Remove deprecated names: `set_footer`, `set_name`, `set_callback`, and `set_type_name`. Use without the `set_` instead. [#192]
 
diff --git a/packages/CLI11/CMakeLists.txt b/packages/CLI11/CMakeLists.txt
index 6dc6df55811c7f3174493573b2450edaa5c1bbd2..ad574a2108bfdada67e6f424657c61faa4ba8dbe 100644
--- a/packages/CLI11/CMakeLists.txt
+++ b/packages/CLI11/CMakeLists.txt
@@ -2,12 +2,13 @@ cmake_minimum_required(VERSION 3.4)
 # Note: this is a header only library. If you have an older CMake than 3.4,
 # just add the CLI11/include directory and that's all you need to do.
 
-# Make sure users don't get warnings on a tested (3.4 to 3.13) version
+# Make sure users don't get warnings on a tested (3.4 to 3.14) version
 # of CMake. For most of the policies, the new version is better (hence the change).
-if(${CMAKE_VERSION} VERSION_LESS 3.13)
+# We don't use the 3.4...3.14 syntax because of a bug in a version of MSVC
+if(${CMAKE_VERSION} VERSION_LESS 3.14)
     cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
 else()
-    cmake_policy(VERSION 3.13)
+    cmake_policy(VERSION 3.14)
 endif()
 
 set(VERSION_REGEX "#define CLI11_VERSION[ \t]+\"(.+)\"")
@@ -22,24 +23,44 @@ string(REGEX REPLACE ${VERSION_REGEX} "\\1" VERSION_STRING "${VERSION_STRING}")
 # Add the project
 project(CLI11 LANGUAGES CXX VERSION ${VERSION_STRING})
 
+# Special target that adds warnings. Is not exported.
+add_library(CLI11_warnings INTERFACE)
+
 # Only if built as the main project
 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
     # User settable
     set(CLI11_CXX_STD "11"  CACHE STRING "The CMake standard to require")
 
+    # Special override for Clang on Linux (useful with an old stdlibc++ and a newer clang)
+    if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+        option(CLI11_FORCE_LIBCXX "Force Clang to use libc++ instead of libstdc++ (Linux only)" OFF)
+        if(CLI11_FORCE_LIBCXX)
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+            set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
+        endif()
+    endif()
+
     set(CUR_PROJ ON)
     set(CMAKE_CXX_STANDARD ${CLI11_CXX_STD})
     set(CMAKE_CXX_EXTENSIONS OFF)
     set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
+    option(CLI11_WARNINGS_AS_ERRORS "Turn all warnings into errors (for CI)")
+
     # Be moderately paranoid with flags
     if(MSVC)
-        add_definitions("/W4")
+        target_compile_options(CLI11_warnings INTERFACE "/W4")
+        if(CLI11_WARNINGS_AS_ERRORS)
+            target_compile_options(CLI11_warnings INTERFACE "/WX")
+        endif()
     else()
-        add_definitions(-Wall -Wextra -pedantic -Wshadow)
+        target_compile_options(CLI11_warnings INTERFACE -Wall -Wextra -pedantic -Wshadow)
+        if(CLI11_WARNINGS_AS_ERRORS)
+            target_compile_options(CLI11_warnings INTERFACE -Werror)
+        endif()
     endif()
 
-    if(CMAKE_VERSION VERSION_GREATER 3.6)
+    if(NOT CMAKE_VERSION VERSION_LESS 3.6)
         # Add clang-tidy if available
         option(CLANG_TIDY_FIX "Perform fixes for Clang-Tidy" OFF)
         find_program(
@@ -56,6 +77,17 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
             endif()
         endif()
     endif()
+
+    if(NOT CMAKE_VERSION VERSION_LESS 3.9)
+        find_package(Doxygen)
+        if(Doxygen_FOUND)
+            add_subdirectory(docs)
+        else()
+            message(STATUS "Doxygen not found, not building docs")
+        endif()
+    else()
+        message(STATUS "Newer CMake adds Doxygen support, update CMake for docs")
+    endif()
 else()
     set(CUR_PROJ OFF)
 endif()
@@ -149,14 +181,23 @@ if(CLI11_SINGLE_FILE)
     target_include_directories(CLI11_SINGLE INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/include/")
 endif()
 
-cmake_dependent_option(CLI11_SINGLE_FILE_TESTS "Duplicate all the tests for a single file build" OFF "CLI11_SINGLE_FILE" OFF)
+cmake_dependent_option(CLI11_SINGLE_FILE_TESTS
+    "Duplicate all the tests for a single file build"
+    OFF
+    "CLI11_SINGLE_FILE"
+    OFF)
 
-cmake_dependent_option(CLI11_TESTING "Build the tests and add them" ON "CUR_PROJ" OFF)
-if(DEFINED BUILD_TESTING)
-    cmake_dependent_option(CLI11_TESTING "" ON "BUILD_TESTING" OFF)
-    message(STATUS "BUILD_TESTING is defined and it supersedes CLI11_TESTING. Has forced to ${CLI11_TESTING}")
+
+if(DEFINED CLI11_TESTING)
+    set(CLI11_TESTING_INTERNAL "${CLI11_TESTING}")
+elseif(CUR_PROJ)
+    option(BUILD_TESTING "Build the tests" ON)
+    set(CLI11_TESTING_INTERNAL "${BUILD_TESTING}")
+else()
+    set(CLI11_TESTING_INTERNAL OFF)
 endif()
-if(CLI11_TESTING)
+
+if(CLI11_TESTING_INTERNAL)
     enable_testing()
     add_subdirectory(tests)
 endif()
diff --git a/packages/CLI11/LICENSE b/packages/CLI11/LICENSE
index 2221b918fd36d038700268e08294bab2cd5451aa..17739d11c50b5a51574549ef1cf2534a7dcd0bc0 100644
--- a/packages/CLI11/LICENSE
+++ b/packages/CLI11/LICENSE
@@ -1,11 +1,11 @@
-CLI11 1.7 Copyright (c) 2017-2019 University of Cincinnati, developed by Henry
+CLI11 1.8 Copyright (c) 2017-2019 University of Cincinnati, developed by Henry
 Schreiner under NSF AWARD 1414736. All rights reserved.
 
 Redistribution and use in source and binary forms of CLI11, with or without
 modification, are permitted provided that the following conditions are met:
 
 1. Redistributions of source code must retain the above copyright notice, this
-   list of conditions and the following disclaimer. 
+   list of conditions and the following disclaimer.
 2. Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.
diff --git a/packages/CLI11/README.md b/packages/CLI11/README.md
index 36eb4fffb1c0c00772805389ca737d6993802de1..4f0b1c7641a3d76bd98de1a2cac6a870a0a7e90d 100644
--- a/packages/CLI11/README.md
+++ b/packages/CLI11/README.md
@@ -12,7 +12,7 @@
 [![Latest release][releases-badge]][github releases]
 [![DOI][doi-badge]][doi-link]
 [![Conan.io][conan-badge]][conan-link]
-[![Try CLI11 1.7 online][wandbox-badge]][wandbox-link]
+[![Try CLI11 1.8 online][wandbox-badge]][wandbox-link]
 
 [What's new](./CHANGELOG.md) β€’
 [Documentation][gitbook] β€’
@@ -33,15 +33,15 @@ CLI11 is a command line parser for C++11 and beyond that provides a rich feature
         -   [Option types](#option-types)
         -   [Example](#example)
         -   [Option options](#option-options)
-        -   [Validators](#validators)  🚧
-            -   [Transforming Validators](#transforming-validators)🚧
-            -   [Validator operations](#validator-operations)🚧
-            -   [Custom Validators](#custom-validators)🚧
-            -   [Querying Validators](#querying-validators)🚧
-        -   [Getting Results](#getting-results) 🚧
+        -   [Validators](#validators) πŸ†•
+            -   [Transforming Validators](#transforming-validators) πŸ†•
+            -   [Validator operations](#validator-operations) πŸ†•
+            -   [Custom Validators](#custom-validators) πŸ†•
+            -   [Querying Validators](#querying-validators) πŸ†•
+        -   [Getting Results](#getting-results) πŸ†•
     -   [Subcommands](#subcommands)
         -   [Subcommand options](#subcommand-options)
-        -   [Option groups](#option-groups) 🚧
+        -   [Option groups](#option-groups) πŸ†•
         -   [Callbacks](#callbacks)
     -   [Configuration file](#configuration-file)
     -   [Inheriting defaults](#inheriting-defaults)
@@ -51,6 +51,7 @@ CLI11 is a command line parser for C++11 and beyond that provides a rich feature
     -   [Utilities](#utilities)
     -   [Other libraries](#other-libraries)
 -   [API](#api)
+-   [Examples](#Examples)
 -   [Contribute](#contribute)
 -   [License](#license)
 
@@ -64,7 +65,7 @@ CLI11 provides all the features you expect in a powerful command line parser, wi
 It is tested on [Travis][], [AppVeyor][], and [Azure][], and is being included in the [GooFit GPU fitting framework][goofit]. It was inspired by [`plumbum.cli`][plumbum] for Python. CLI11 has a user friendly introduction in this README, a more in-depth tutorial [GitBook][], as well as [API documentation][api-docs] generated by Travis.
 See the [changelog](./CHANGELOG.md) or [GitHub Releases][] for details for current and past releases. Also see the [Version 1.0 post][], [Version 1.3 post][], or [Version 1.6 post][] for more information.
 
-You can be notified when new releases are made by subscribing to <https://github.com/CLIUtils/CLI11/releases.atom> on an RSS reader, like Feedly, or use the releases mode of the github watching tool.  
+You can be notified when new releases are made by subscribing to <https://github.com/CLIUtils/CLI11/releases.atom> on an RSS reader, like Feedly, or use the releases mode of the github watching tool.
 
 ### Why write another CLI parser?
 
@@ -72,9 +73,9 @@ An acceptable CLI parser library should be all of the following:
 
 -   Easy to include (i.e., header only, one file if possible, **no external requirements**).
 -   Short, simple syntax: This is one of the main reasons to use a CLI parser, it should make variables from the command line nearly as easy to define as any other variables. If most of your program is hidden in CLI parsing, this is a problem for readability.
--   C++11 or better: Should work with GCC 4.8+ (default on CentOS/RHEL 7), Clang 3.5+, AppleClang 7+, NVCC 7.0+, or MSVC 2015+.
+-   C++11 or better: Should work with GCC 4.8+ (default on CentOS/RHEL 7), Clang 3.4+, AppleClang 7+, NVCC 7.0+, or MSVC 2015+.
 -   Work on Linux, macOS, and Windows.
--   Well tested using [Travis][] (Linux and macOS) and [AppVeyor][] (Windows) or [Azure][] (all three). "Well" is defined as having good coverage measured by [CodeCov][].
+-   Well tested using [Travis][] (Linux) and [AppVeyor][] (Windows) or [Azure][] (all three). "Well" is defined as having good coverage measured by [CodeCov][].
 -   Clear help printing.
 -   Nice error messages.
 -   Standard shell idioms supported naturally, like grouping flags, a positional separator, etc.
@@ -109,7 +110,8 @@ After I wrote this, I also found the following libraries:
 | [Argument Aggregator][] | I'm a big fan of the [fmt][] library, and the try-catch statement looks familiar.  :thumbsup: Doesn't seem to support subcommands.                                                   |
 | [Clara][]               | Simple library built for the excellent [Catch][] testing framework. Unique syntax, limited scope.                                                                                    |
 | [Argh!][]               | Very minimalistic C++11 parser, single header. Don't have many features. No help generation?!?! At least it's exception-free.                                                        |
-| [CLI][]                 | Custom language and parser. Huge build-system overkill for very little benefit. Last release in 2009, but still occasionally active.                                                 |
+| [CLI][]                 | Custom language and parser. Huge build-system overkill for very little benefit. Last release in 2009, but still occasionally active.  |
+| [argparse][] | C++17 single file argument parser. Design seems similar to CLI11 in some ways. |
 
 See [Awesome C++][] for a less-biased list of parsers. You can also find other single file libraries at [Single file libs][].
 
@@ -155,7 +157,7 @@ GTEST_COLOR=1 CTEST_OUTPUT_ON_FAILURE=1 make test
 To set up, add options, and run, your main function will look something like this:
 
 ```cpp
-int main(int charc, char** argv) {
+int main(int argc, char** argv) {
     CLI::App app{"App description"};
 
     std::string filename = "default";
@@ -189,61 +191,89 @@ While all options internally are the same type, there are several ways to add an
 
 ```cpp
 // Add options
-app.add_option(option_name, help_str="") // 🚧
+app.add_option(option_name, help_str="") // πŸ†•
 
 app.add_option(option_name,
-               variable_to_bind_to, // bool, int, float, vector, 🚧 enum, or string-like, or anything with a defined conversion from a string
-               help_string="",
-               default=false)
+               variable_to_bind_to, // bool, int, float, vector, πŸ†• enum, or string-like, or anything with a defined conversion from a string or that takes an int🚧, double🚧, or string in a constructor. Also allowed are tuples🚧,std::array🚧 or std::pair🚧.
+               help_string="")
 
 app.add_option_function<type>(option_name,
-               function <void(const type &value)>, // 🚧 int, bool, float, enum, vector, or string-like, or anything with a defined conversion from a string
+               function <void(const type &value)>, // πŸ†• type can be any type supported by add_option
                help_string="")
 
 app.add_complex(... // Special case: support for complex numbers
+//🚧There is a template overload which takes two template parameters the first is the type of object to assign the value to, the second is the conversion type.  The conversion type should have a known way to convert from a string, such as any of the types that work in the non-template version.  If XC is a std::pair and T is some non pair type.  Then a two argument constructor for T is called to assign the value.  For tuples or other multi element types, XC must be a single type or a tuple like object of the same size as the assignment type
+app.add_option<typename T, typename XC>(option_name,
+               T &output, // output must be assignable or constructible from a value of type XC
+               help_string="")
 
 // Add flags
 app.add_flag(option_name,
              help_string="")
 
 app.add_flag(option_name,
-             variable_to_bind_to, // bool, int, 🚧 float, 🚧 vector, 🚧 enum, or 🚧 string-like, or 🚧 anything with a defined conversion from a string
+             variable_to_bind_to, // bool, int, πŸ†• float, πŸ†• vector, πŸ†• enum, or πŸ†• string-like, or πŸ†• any singular object with a defined conversion from a string like add_option
              help_string="")
 
-app.add_flag_function(option_name, // 🚧
+app.add_flag_function(option_name, // πŸ†•
              function <void(int64_t count)>,
              help_string="")
 
-app.add_flag_callback(option_name,function<void(void)>,help_string="") // 🚧
+app.add_flag_callback(option_name,function<void(void)>,help_string="") // πŸ†•
 
 // Add subcommands
 App* subcom = app.add_subcommand(name, description);
 
-Option_group *app.add_option_group(name,description); // 🚧
+Option_group *app.add_option_group(name,description); // πŸ†•
 
-// 🚧 All add_*set* methods deprecated in CLI11 1.8 - use ->transform(CLI::IsMember) instead
+// ⚠️  All add_*set* methods deprecated in CLI11 1.8 - use ->transform(CLI::IsMember) instead
 -app.add_set(option_name,
 -            variable_to_bind_to,     // Same type as stored by set
 -            set_of_possible_options, // Set will be copied, ignores changes
--            help_string="",
--            default=false)
--app.add_mutable_set(... // πŸ†• Set can change later, keeps reference
+-            help_string="")
+-app.add_mutable_set(... // Set can change later, keeps reference
 -app.add_set_ignore_case(...                    // String only
--app.add_mutable_set_ignore_case(...            // πŸ†• String only
--app.add_set_ignore_underscore(...              // πŸ†• String only
--app.add_mutable_set_ignore_underscore(...      // πŸ†• String only
--app.add_set_ignore_case_underscore(...         // πŸ†• String only
--app.add_mutable_set_ignore_case_underscore(... // πŸ†• String only
+-app.add_mutable_set_ignore_case(...            // String only
+-app.add_set_ignore_underscore(...              // String only
+-app.add_mutable_set_ignore_underscore(...      // String only
+-app.add_set_ignore_case_underscore(...         // String only
+-app.add_mutable_set_ignore_case_underscore(... // String only
+```
+
+An option name must start with a alphabetic character, underscore, a number πŸ†•, '?' πŸ†•, or '@' πŸ†•. For long options, after the first character '.', and '-' are also valid characters. For the `add_flag*` functions '{' has special meaning. Names are given as a comma separated string, with the dash or dashes. An option or flag can have as many names as you want, and afterward, using `count`, you can use any of the names, with dashes as needed, to count the options. One of the names is allowed to be given without proceeding dash(es); if present the option is a positional option, and that name will be used on the help line for its positional form.
+
+The `add_option_function<type>(...` function will typically require the template parameter be given unless a `std::function` object with an exact match is passed.  The type can be any type supported by the `add_option` function. The function should throw an error (`CLI::ConversionError` or `CLI::ValidationError` possibly) if the value is not valid.
+
+🚧 The two parameter template overload can be used in cases where you want to restrict the input such as
+```
+double val
+app.add_option<double,unsigned int>("-v",val);
+```
+which would first verify the input is convertible to an `unsigned int` before assigning it.  Or using some variant type
 ```
+using vtype=std::variant<int, double, std::string>;
+ vtype v1;
+app.add_option<vtype,std:string>("--vs",v1);
+app.add_option<vtype,int>("--vi",v1);
+app.add_option<vtype,double>("--vf",v1);
+```
+otherwise the output would default to a string.  The add_option can be used with any integral or floating point types, enumerations, or strings.  Or any type that takes an int, double, or std::string in an assignment operator or constructor.  If an object can take multiple varieties of those,  std::string takes precedence, then double then int.    To better control which one is used or to use another type for the underlying conversions use the two parameter template to directly specify the conversion type.
+
+Type such as optional<int>, optional<double>, and optional<string> are supported directly, other optional types can be added using the two parameter template.  See [CLI11 Internals][] for information on how this could done and how you can add your own converters for additional  types.
 
-An option name must start with a alphabetic character, underscore, a number 🚧, '?'🚧, or '@'🚧. For long options, after the first character '.', and '-' are also valid characters. For the `add_flag*` functions '{' has special meaning. Names are given as a comma separated string, with the dash or dashes. An option or flag can have as many names as you want, and afterward, using `count`, you can use any of the names, with dashes as needed, to count the options. One of the names is allowed to be given without proceeding dash(es); if present the option is a positional option, and that name will be used on the help line for its positional form. If you want the default value to print in the help description, pass in `true` for the final parameter for `add_option`.
+Vector types can also be used in the two parameter template overload
+```
+std::vector<double> v1;
+app.add_option<std::vector<double>,int>("--vs",v1);
+```
+would load a vector of doubles but ensure all values can be represented as integers.
 
-The `add_option_function<type>(...` function will typically require the template parameter be given unless a `std::function` object with an exact match is passed.  The type can be any type supported by the `add_option` function. The function should throw an error (`CLI::ConversionError` or `CLI::ValidationError` possibly) if the value is not valid.  
+Automatic direct capture of the default string is disabled when using the two parameter template.  Use `set_default_str(...)` or `->default_function(std::string())` to set the default string or capture function directly for these cases.
 
-🚧 Flag options specified through the `add_flag*` functions allow a syntax for the option names to default particular options to a false value or any other value if some flags are passed.  For example:
+πŸ†• Flag options specified through the `add_flag*` functions allow a syntax for the option names to default particular options to a false value or any other value if some flags are passed.  For example:
 
 ```cpp
-app.add_flag("--flag,!--no-flag,result,"help for flag"); // 🚧
+app.add_flag("--flag,!--no-flag",result,"help for flag"); // πŸ†•
 ```
 
 specifies that if `--flag` is passed on the command line result will be true or contain a value of 1. If `--no-flag` is
@@ -252,24 +282,26 @@ alternative form of the syntax is more explicit: `"--flag,--no-flag{false}"`; th
 example.  This also works for short form options `"-f,!-n"` or `"-f,-n{false}"`. If `variable_to_bind_to` is anything but an integer value the
 default behavior is to take the last value given, while if `variable_to_bind_to` is an integer type the behavior will be to sum
 all the given arguments and return the result.  This can be modified if needed by changing the `multi_option_policy` on each flag (this is not inherited).
-The default value can be any value. For example if you wished to define a numerical flag
+The default value can be any value. For example if you wished to define a numerical flag:
+
 ```cpp
-app.add_flag("-1{1},-2{2},-3{3}",result,"numerical flag") // 🚧
+app.add_flag("-1{1},-2{2},-3{3}",result,"numerical flag") // πŸ†•
 ```
+
 using any of those flags on the command line will result in the specified number in the output.  Similar things can be done for string values, and enumerations, as long as the default value can be converted to the given type.
 
 
 On a `C++14` compiler, you can pass a callback function directly to `.add_flag`, while in C++11 mode you'll need to use `.add_flag_function` if you want a callback function. The function will be given the number of times the flag was passed. You can throw a relevant `CLI::ParseError` to signal a failure.
 
-On a compiler that supports C++17's `__has_include`, you can also use `std::optional`, `std::experimental::optional`, and `boost::optional` directly in an `add_option` call. If you don't have `__has_include`, you can define `CLI11_BOOST_OPTIONAL 1` before including CLI11 to manually add support (or 0 to remove) for `boost::optional`. See [CLI11 Internals][] for information on how this was done and how you can add your own converters.  Optional values are only supported for types that support the `>>` operator.
-
 #### Example
 
 -   `"one,-o,--one"`: Valid as long as not a flag, would create an option that can be specified positionally, or with `-o` or `--one`
 -   `"this"` Can only be passed positionally
 -   `"-a,-b,-c"` No limit to the number of non-positional option names
 
-The add commands return a pointer to an internally stored `Option`. If you set the final argument to true, the default value is captured and printed on the command line with the help flag. This option can be used directly to check for the count (`->count()`) after parsing to avoid a string based lookup.
+The add commands return a pointer to an internally stored `Option`.
+This option can be used directly to check for the count (`->count()`) after parsing to avoid a string based lookup.
+⚠️  Deprecated: The `add_*` commands have a final argument than can be set to true, which causes the default value to be captured and printed on the command line with the help flag. Since CLI11 1.8, you can simply add `->capture_default_str()`.
 
 #### Option options
 
@@ -284,17 +316,20 @@ Before parsing, you can set the following options:
 -   `->envname(name)`: Gets the value from the environment if present and not passed on the command line.
 -   `->group(name)`: The help group to put the option in. No effect for positional options. Defaults to `"Options"`. `""` will not show up in the help print (hidden).
 -   `->ignore_case()`: Ignore the case on the command line (also works on subcommands, does not affect arguments).
--   `->ignore_underscore()`: πŸ†• Ignore any underscores in the options names (also works on subcommands, does not affect arguments). For example "option_one" will match with "optionone".  This does not apply to short form options since they only have one character
--   `->disable_flag_override()`: 🚧 from the command line long form flag options can be assigned a value on the command line using the `=` notation `--flag=value`. If this behavior is not desired, the `disable_flag_override()` disables it and will generate an exception if it is done on the command line.  The `=` does not work with short form flag options.
--    `->delimiter(char)`: 🚧 allows specification of a custom delimiter for separating single arguments into vector arguments, for example specifying `->delimiter(',')` on an option would result in `--opt=1,2,3` producing 3 elements of a vector and the equivalent of --opt 1 2 3 assuming opt is a vector value.
--   `->description(str)`: πŸ†• Set/change the description.
+-   `->ignore_underscore()`: Ignore any underscores in the options names (also works on subcommands, does not affect arguments). For example "option_one" will match with "optionone".  This does not apply to short form options since they only have one character
+-   `->disable_flag_override()`: πŸ†• From the command line long form flag options can be assigned a value on the command line using the `=` notation `--flag=value`. If this behavior is not desired, the `disable_flag_override()` disables it and will generate an exception if it is done on the command line.  The `=` does not work with short form flag options.
+-   `->delimiter(char)`: πŸ†• allows specification of a custom delimiter for separating single arguments into vector arguments, for example specifying `->delimiter(',')` on an option would result in `--opt=1,2,3` producing 3 elements of a vector and the equivalent of --opt 1 2 3 assuming opt is a vector value.
+-   `->description(str)`: Set/change the description.
 -   `->multi_option_policy(CLI::MultiOptionPolicy::Throw)`: Set the multi-option policy. Shortcuts available: `->take_last()`, `->take_first()`, and `->join()`. This will only affect options expecting 1 argument or bool flags (which do not inherit their default but always start with a specific policy).
--   `->check(std::string(const std::string &), validator_name="",validator_description="")`: 🚧 define a check function.  The function should return a non empty string with the error message if the check fails
--   `->check(Validator)`:🚧 Use a Validator object to do the check see [Validators](#validators) for a description of available Validators and how to create new ones.
+-   `->check(std::string(const std::string &), validator_name="",validator_description="")`: πŸ†• Define a check function.  The function should return a non empty string with the error message if the check fails
+-   `->check(Validator)`:πŸ†• Use a Validator object to do the check see [Validators](#validators) for a description of available Validators and how to create new ones.
 -   `->transform(std::string(std::string &), validator_name="",validator_description=")`: Converts the input string into the output string, in-place in the parsed options.
 -   `->transform(Validator)`: uses a Validator object to do the transformation see [Validators](#validators) for a description of available Validators and how to create new ones.
 -   `->each(void(const std::string &)>`: Run this function on each value received, as it is received. It should throw a `ValidationError` if an error is encountered.
 -   `->configurable(false)`: Disable this option from being in a configuration file.
+    `->capture_default_str()`: πŸ†• Store the current value attached and display it in the help string.
+-   `->default_function(std::string())`: πŸ†• Advanced: Change the function that `capture_default_str()` uses.
+-   `->always_capture_default()`: πŸ†• Always run `capture_default_str()` when creating new options. Only useful on an App's `option_defaults`.
 
 
 These options return the `Option` pointer, so you can chain them together, and even skip storing the pointer entirely. The `each` function takes any function that has the signature `void(const std::string&)`; it should throw a `ValidationError` when validation fails. The help message will have the name of the parent option prepended. Since `each`, `check` and `transform` use the same underlying mechanism, you can chain as many as you want, and they will be executed in order. Operations added through `transform` are executed first in reverse order of addition, and `check` and `each` are run following the transform functions in order of addition. If you just want to see the unconverted values, use `.results()` to get the `std::vector<std::string>` of results.
@@ -307,23 +342,24 @@ On the command line, options can be given as:
 -   `-ffilename` (no space required)
 -   `-abcf filename` (flags and option can be combined)
 -   `--long` (long flag)
--   `--long_flag=true` (long flag with equals to override default value) 🚧
+-   `--long_flag=true` (long flag with equals to override default value) πŸ†•
 -   `--file filename` (space)
 -   `--file=filename` (equals)
 
-πŸ†• If `allow_windows_style_options()` is specified in the application or subcommand options can also be given as:
+If `allow_windows_style_options()` is specified in the application or subcommand options can also be given as:
 -   `/a` (flag)
 -   `/f filename` (option)
 -   `/long` (long flag)
 -   `/file filename` (space)
 -   `/file:filename` (colon)
--   `/long_flag:false` (long flag with : to override the default value) 🚧
+-   `/long_flag:false` (long flag with : to override the default value) πŸ†•
 =  Windows style options do not allow combining short options or values not separated from the short option like with `-` options
 
-🚧 Long flag options may be given with an `=<value>` to allow specifying a false value, or some other value to the flag. See [config files](#configuration-file) for details on the values supported.  NOTE: only the `=` or `:` for windows-style options may be used for this, using a space will result in the argument being interpreted as a positional argument.  This syntax can override the default values, and can be disabled by using `disable_flag_override()`.
+πŸ†• Long flag options may be given with an `=<value>` to allow specifying a false value, or some other value to the flag. See [config files](#configuration-file) for details on the values supported.  NOTE: only the `=` or `:` for windows-style options may be used for this, using a space will result in the argument being interpreted as a positional argument.  This syntax can override the default values, and can be disabled by using `disable_flag_override()`.
 
 Extra positional arguments will cause the program to exit, so at least one positional option with a vector is recommended if you want to allow extraneous arguments.
 If you set `.allow_extras()` on the main `App`, you will not get an error. You can access the missing options using `remaining` (if you have subcommands, `app.remaining(true)` will get all remaining options, subcommands included).
+If the remaining arguments are to processed by another `App` then the function `remaining_for_passthrough()` πŸ†• can be used to get the remaining arguments in reverse order such that `app.parse(vector)` works directly and could even be used inside a subcommand callback.
 
 You can access a vector of pointers to the parsed options in the original order using `parse_order()`.
 If `--` is present in the command line that does not end an unlimited option, then
@@ -334,113 +370,142 @@ Validators are structures to check or modify inputs, they can be used to verify
 
 CLI11 has several Validators built-in that perform some common checks
 
--   `CLI::IsMember(...)`: 🚧 Require an option be a member of a given set.  See [Transforming Validators](#transforming-validators) for more details.
--   `CLI::Transformer(...)`: 🚧 Modify the input using a map.  See [Transforming Validators](#transforming-validators) for more details.
--   `CLI::CheckedTransformer(...)`: 🚧 Modify the input using a map, and require that the input is either in the set or already one of the outputs of the set. See [Transforming Validators](#transforming-validators) for more details.
+-   `CLI::IsMember(...)`: πŸ†• Require an option be a member of a given set.  See [Transforming Validators](#transforming-validators) for more details.
+-   `CLI::Transformer(...)`: πŸ†• Modify the input using a map.  See [Transforming Validators](#transforming-validators) for more details.
+-   `CLI::CheckedTransformer(...)`: πŸ†• Modify the input using a map, and require that the input is either in the set or already one of the outputs of the set. See [Transforming Validators](#transforming-validators) for more details.
+-   `CLI::AsNumberWithUnit(...)`:πŸ†• Modify the `<NUMBER> <UNIT>` pair by matching the unit and multiplying the number by the corresponding factor. It can be used as a base for transformers, that accept things like size values (`1 KB`) or durations (`0.33 ms`).
+-   `CLI::AsSizeValue(...)`: πŸ†• Convert inputs like `100b`, `42 KB`, `101 Mb`, `11 Mib` to absolute values. `KB` can be configured to be interpreted as 10^3 or 2^10.
 -   `CLI::ExistingFile`: Requires that the file exists if given.
 -   `CLI::ExistingDirectory`: Requires that the directory exists.
 -   `CLI::ExistingPath`: Requires that the path (file or directory) exists.
 -   `CLI::NonexistentPath`: Requires that the path does not exist.
 -   `CLI::Range(min,max)`: Requires that the option be between min and max (make sure to use floating point if needed). Min defaults to 0.
--   `CLI::Bounded(min,max)`: 🚧 Modify the input such that it is always between min and max (make sure to use floating point if needed). Min defaults to 0.  Will produce an error if conversion is not possible.
--   `CLI::PositiveNumber`: 🚧 Requires the number be greater or equal to 0
--   `CLI::Number`: 🚧 Requires the input be a number.
--   `CLI::ValidIPV4`: 🚧 Requires that the option be a valid IPv4 string e.g. `'255.255.255.255'`, `'10.1.1.7'`.
+-   `CLI::Bounded(min,max)`: πŸ†• Modify the input such that it is always between min and max (make sure to use floating point if needed). Min defaults to 0.  Will produce an error if conversion is not possible.
+-   `CLI::PositiveNumber`: πŸ†• Requires the number be greater or equal to 0
+-   `CLI::Number`: πŸ†• Requires the input be a number.
+-   `CLI::ValidIPV4`: πŸ†• Requires that the option be a valid IPv4 string e.g. `'255.255.255.255'`, `'10.1.1.7'`.
 
 These Validators can be used by simply passing the name into the `check` or `transform` methods on an option
+
 ```cpp
 ->check(CLI::ExistingFile);
 ->check(CLI::Range(0,10));
 ```
 
-Validators can be merged using `&` and `|` and inverted using `!`🚧.  For example
+Validators can be merged using `&` and `|` and inverted using `!` πŸ†•. For example:
+
 ```cpp
 ->check(CLI::Range(0,10)|CLI::Range(20,30));
 ```
+
 will produce a check to ensure a value is between 0 and 10 or 20 and 30.
+
 ```cpp
 ->check(!CLI::PositiveNumber);
 ```
-will produce a check for a number less than 0;
+
+will produce a check for a number less than 0.
 
 ##### Transforming Validators
 There are a few built in Validators that let you transform values if used with the `transform` function.  If they also do some checks then they can be used `check` but some may do nothing in that case.
- * 🚧 `CLI::Bounded(min,max)` will bound values between min and max and values outside of that range are limited to min or max,  it will fail if the value cannot be converted and produce a `ValidationError`
- * 🚧 The `IsMember` Validator lets you specify a set of predefined options. You can pass any container or copyable pointer (including `std::shared_ptr`) to a container to this validator; the container just needs to be iterable and have a `::value_type`. The key type should be convertible from a string,  You can use an initializer list directly if you like. If you need to modify the set later, the pointer form lets you do that; the type message and check will correctly refer to the current version of the set.  The container passed in can be a set, vector, or a map like structure. If used in the `transform` method the output value will be the matching key as it could be modified by filters.
+-   πŸ†• `CLI::Bounded(min,max)` will bound values between min and max and values outside of that range are limited to min or max,  it will fail if the value cannot be converted and produce a `ValidationError`
+-   πŸ†• The `IsMember` Validator lets you specify a set of predefined options. You can pass any container or copyable pointer (including `std::shared_ptr`) to a container to this validator; the container just needs to be iterable and have a `::value_type`. The key type should be convertible from a string,  You can use an initializer list directly if you like. If you need to modify the set later, the pointer form lets you do that; the type message and check will correctly refer to the current version of the set.  The container passed in can be a set, vector, or a map like structure. If used in the `transform` method the output value will be the matching key as it could be modified by filters.
 After specifying a set of options, you can also specify "filter" functions of the form `T(T)`, where `T` is the type of the values. The most common choices probably will be `CLI::ignore_case` an `CLI::ignore_underscore`, and `CLI::ignore_space`.  These all work on strings but it is possible to define functions that work on other types.
 Here are some examples
 of `IsMember`:
 
-     *   `CLI::IsMember({"choice1", "choice2"})`: Select from exact match to choices.
-     *   `CLI::IsMember({"choice1", "choice2"}, CLI::ignore_case, CLI::ignore_underscore)`: Match things like `Choice_1`, too.
-     *  `CLI::IsMember(std::set<int>({2,3,4}))`: Most containers and types work; you just need `std::begin`, `std::end`, and `::value_type`.
-     *   `CLI::IsMember(std::map<std::string, TYPE>({{"one", 1}, {"two", 2}}))`: You can use maps; in `->transform()` these replace the matched value with the matched key.  The value member of the map is not used in `IsMember`, so it can be any type.
-     *   `auto p = std::make_shared<std::vector<std::string>>(std::initializer_list<std::string>("one", "two")); CLI::IsMember(p)`: You can modify `p` later.
-* 🚧 The `Transformer` and `CheckedTransformer` Validators transform one value into another. Any container or copyable pointer (including `std::shared_ptr`) to a container that generates pairs of values can be passed to these `Validator's`; the container just needs to be iterable and have a `::value_type` that consists of pairs. The key type should be convertible from a string, and the value type should be convertible to a string  You can use an initializer list directly if you like. If you need to modify the map later, the pointer form lets you do that; the description message will correctly refer to the current version of the map.  `Transformer` does not do any checking so values not in the map are ignored.  `CheckedTransformer` takes an extra step of verifying that the value is either one of the map key values, in which case it is transformed, or one of the expected output values, and if not will generate a `ValidationError`.  A Transformer placed using `check` will not do anything.  
+     -   `CLI::IsMember({"choice1", "choice2"})`: Select from exact match to choices.
+     -   `CLI::IsMember({"choice1", "choice2"}, CLI::ignore_case, CLI::ignore_underscore)`: Match things like `Choice_1`, too.
+     -  `CLI::IsMember(std::set<int>({2,3,4}))`: Most containers and types work; you just need `std::begin`, `std::end`, and `::value_type`.
+     -   `CLI::IsMember(std::map<std::string, TYPE>({{"one", 1}, {"two", 2}}))`: You can use maps; in `->transform()` these replace the matched value with the matched key.  The value member of the map is not used in `IsMember`, so it can be any type.
+     -   `auto p = std::make_shared<std::vector<std::string>>(std::initializer_list<std::string>("one", "two")); CLI::IsMember(p)`: You can modify `p` later.
+- πŸ†• The `Transformer` and `CheckedTransformer` Validators transform one value into another. Any container or copyable pointer (including `std::shared_ptr`) to a container that generates pairs of values can be passed to these `Validator's`; the container just needs to be iterable and have a `::value_type` that consists of pairs. The key type should be convertible from a string, and the value type should be convertible to a string  You can use an initializer list directly if you like. If you need to modify the map later, the pointer form lets you do that; the description message will correctly refer to the current version of the map.  `Transformer` does not do any checking so values not in the map are ignored.  `CheckedTransformer` takes an extra step of verifying that the value is either one of the map key values, in which case it is transformed, or one of the expected output values, and if not will generate a `ValidationError`.  A Transformer placed using `check` will not do anything.
 After specifying a map of options, you can also specify "filter" just like in `CLI::IsMember`.
 Here are some examples (`Transformer` and `CheckedTransformer` are interchangeable in the examples)
 of `Transformer`:
 
-     *   `CLI::Transformer({{"key1", "map1"},{"key2","map2"}})`: Select from key values and produce map values.
+     -   `CLI::Transformer({{"key1", "map1"},{"key2","map2"}})`: Select from key values and produce map values.
 
-     *  `CLI::Transformer(std::map<std::string,int>({"two",2},{"three",3},{"four",4}}))`: most maplike containers work,  the `::value_type` needs to produce a pair of some kind.
-     *   `CLI::CheckedTransformer(std::map<std::string, int>({{"one", 1}, {"two", 2}}))`: You can use maps; in `->transform()` these replace the matched key with the value.  `CheckedTransformer` also requires that the value either match one of the keys or match one of known outputs.  
-     *   `auto p = std::make_shared<CLI::TransformPairs<std::string>>(std::initializer_list<std::pair<std::string,std::string>>({"key1", "map1"},{"key2","map2"})); CLI::Transformer(p)`: You can modify `p` later. `TransformPairs<T>` is an alias for `std::vector<std::pair<<std::string,T>>`
+     -  `CLI::Transformer(std::map<std::string,int>({"two",2},{"three",3},{"four",4}}))`: most maplike containers work,  the `::value_type` needs to produce a pair of some kind.
+     -   `CLI::CheckedTransformer(std::map<std::string, int>({{"one", 1}, {"two", 2}}))`: You can use maps; in `->transform()` these replace the matched key with the value.  `CheckedTransformer` also requires that the value either match one of the keys or match one of known outputs.
+     -   `auto p = std::make_shared<CLI::TransformPairs<std::string>>(std::initializer_list<std::pair<std::string,std::string>>({"key1", "map1"},{"key2","map2"})); CLI::Transformer(p)`: You can modify `p` later. `TransformPairs<T>` is an alias for `std::vector<std::pair<<std::string,T>>`
 
 NOTES:  If the container used in `IsMember`, `Transformer`, or `CheckedTransformer` has a `find` function like `std::unordered_map`  or `std::map` then that function is used to do the searching. If it does not have a `find` function a linear search is performed.  If there are filters present, the fast search is performed first, and if that fails a linear search with the filters on the key values is performed.
 
-##### Validator operations🚧
+##### Validator operations πŸ†•
 Validators are copyable and have a few operations that can be performed on them to alter settings.  Most of the built in Validators have a default description that is displayed in the help.  This can be altered via `.description(validator_description)`.
 The name of a Validator, which is useful for later reference from the `get_validator(name)` method of an `Option` can be set via `.name(validator_name)`
 The operation function of a Validator can be set via
-`.operation(std::function<std::string(std::string &>)`.  The `.active()` function can activate or deactivate a Validator from the operation.
-All the functions return a Validator reference allowing them to be chained.  For example
+`.operation(std::function<std::string(std::string &>)`.  The `.active()` function can activate or deactivate a Validator from the operation.  A validator can be set to apply only to a specific element of the output.  For example in a pair option `std::pair<int, std::string>` the first element may need to be a positive integer while the second may need to be a valid file.  The `.application_index(int)` 🚧function can specify this.  It is zero based and negative indices apply to all values.
+```cpp
+opt->check(CLI::Validator(CLI::PositiveNumber).application_index(0));
+opt->check(CLI::Validator(CLI::ExistingFile).application_index(1));
+```
+
+All the validator operation functions return a Validator reference allowing them to be chained.  For example
 
 ```cpp
 opt->check(CLI::Range(10,20).description("range is limited to sensible values").active(false).name("range"));
 ```
+
 will specify a check on an option with a name "range", but deactivate it for the time being.
 The check can later be activated through
+
 ```cpp
 opt->get_validator("range")->active();
 ```
 
-##### Custom Validators🚧
+##### Custom Validators πŸ†•
 
 A validator object with a custom function can be created via
+
 ```cpp
 CLI::Validator(std::function<std::string(std::string &)>,validator_description,validator_name="");
 ```
+
 or if the operation function is set later they can be created with
+
 ```cpp
 CLI::Validator(validator_description);
 ```
 
  It is also possible to create a subclass of `CLI::Validator`, in which case it can also set a custom description function, and operation function.
 
-##### Querying Validators 🚧
+##### Querying Validators πŸ†•
+
 Once loaded into an Option, a pointer to a named Validator can be retrieved via
+
 ```cpp
 opt->get_validator(name);
 ```
+
 This will retrieve a Validator with the given name or throw a `CLI::OptionNotFound` error.  If no name is given or name is empty the first unnamed Validator will be returned or the first Validator if there is only one.
 
+or 🚧
+
+```cpp
+opt->get_validator(index);
+```
+
+Which will return a validator in the index it is applied which isn't necessarily the order in which was defined.  The pointer can be `nullptr` if an invalid index is given.
 Validators have a few functions to query the current values
- * `get_description()`:🚧 Will return a description string
- * `get_name()`:🚧 Will return the Validator name
- * `get_active()`:🚧 Will return the current active state, true if the Validator is active.
- * `get_modifying()`: 🚧 Will return true if the Validator is allowed to modify the input, this can be controlled via the `non_modifying()`🚧 method, though it is recommended to let `check` and `transform` option methods manipulate it if needed.
+-   `get_description()`: πŸ†• Will return a description string
+-   `get_name()`: πŸ†• Will return the Validator name
+-   `get_active()`: πŸ†• Will return the current active state, true if the Validator is active.
+-   `get_application_index()`: 🚧 Will return the current application index.
+-   `get_modifying()`: πŸ†• Will return true if the Validator is allowed to modify the input, this can be controlled via the `non_modifying()` πŸ†• method, though it is recommended to let `check` and `transform` option methods manipulate it if needed.
 
 #### Getting results
+
 In most cases, the fastest and easiest way is to return the results through a callback or variable specified in one of the `add_*` functions.  But there are situations where this is not possible or desired.  For these cases the results may be obtained through one of the following functions. Please note that these functions will do any type conversions and processing during the call so should not used in performance critical code:
 
-- `results()`: Retrieves a vector of strings with all the results in the order they were given.
-- `results(variable_to_bind_to)`: 🚧 Gets the results according to the MultiOptionPolicy and converts them just like the `add_option_function` with a variable.
-- `Value=as<type>()`: 🚧 Returns the result or default value directly as the specified type if possible, can be vector to return all results, and a non-vector to get the result according to the MultiOptionPolicy in place.
+-   `results()`: Retrieves a vector of strings with all the results in the order they were given.
+-   `results(variable_to_bind_to)`: πŸ†• Gets the results according to the MultiOptionPolicy and converts them just like the `add_option_function` with a variable.
+-   `Value=as<type>()`: πŸ†• Returns the result or default value directly as the specified type if possible, can be vector to return all results, and a non-vector to get the result according to the MultiOptionPolicy in place.
 
 ### Subcommands
 
-Subcommands are supported, and can be nested infinitely. To add a subcommand, call the `add_subcommand` method with a name and an optional description. This gives a pointer to an `App` that behaves just like the main app, and can take options or further subcommands. Add `->ignore_case()` to a subcommand to allow any variation of caps to also be accepted. πŸ†• `->ignore_underscore()` is similar, but for underscores. Children inherit the current setting from the parent. You cannot add multiple matching subcommand names at the same level (including `ignore_case` and πŸ†• `ignore_underscore`).
+Subcommands are supported, and can be nested infinitely. To add a subcommand, call the `add_subcommand` method with a name and an optional description. This gives a pointer to an `App` that behaves just like the main app, and can take options or further subcommands. Add `->ignore_case()` to a subcommand to allow any variation of caps to also be accepted. `->ignore_underscore()` is similar, but for underscores. Children inherit the current setting from the parent. You cannot add multiple matching subcommand names at the same level (including `ignore_case` and `ignore_underscore`).
 
 If you want to require that at least one subcommand is given, use `.require_subcommand()` on the parent app. You can optionally give an exact number of subcommands to require, as well. If you give two arguments, that sets the min and max number allowed.
 0 for the max number allowed will allow an unlimited number of subcommands. As a handy shortcut, a single negative value N will set "up to N" values. Limiting the maximum number allows you to keep arguments that match a previous
@@ -449,78 +514,81 @@ subcommand name from matching.
 If an `App` (main or subcommand) has been parsed on the command line, `->parsed` will be true (or convert directly to bool).
 All `App`s have a `get_subcommands()` method, which returns a list of pointers to the subcommands passed on the command line. A `got_subcommand(App_or_name)` method is also provided that will check to see if an `App` pointer or a string name was collected on the command line.
 
-For many cases, however, using an app's callback may be easier. Every app executes a callback function after it parses; just use a lambda function (with capture to get parsed values) to `.callback`. If you throw `CLI::Success` or `CLI::RuntimeError(return_value)`, you can
-even exit the program through the callback. The main `App` has a callback slot, as well, but it is generally not as useful.
-You are allowed to throw `CLI::Success` in the callbacks.
-Multiple subcommands are allowed, to allow [`Click`][click] like series of commands (order is preserved).  The same subcommand can be triggered multiple times but all positional arguments will take precedence over the second and future calls of the subcommand.  `->count()` on the subcommand will return the number of times the subcommand was called.  The subcommand callback will only be triggered once unless the `.immediate_callback()` flag is set.  In which case the callback executes on completion of the subcommand arguments but after the arguments for that subcommand have been parsed, and can be triggered multiple times.
+For many cases, however, using an app's callback capabilities may be easier. Every app has a set of callbacks that can be executed at various stages of parsing; a `C++` lambda function (with capture to get parsed values) can be used as input to the callback definition function. If you throw `CLI::Success` or `CLI::RuntimeError(return_value)`, you can
+even exit the program through the callback.
+
+Multiple subcommands are allowed, to allow [`Click`][click] like series of commands (order is preserved).  πŸ†• The same subcommand can be triggered multiple times but all positional arguments will take precedence over the second and future calls of the subcommand.  `->count()` on the subcommand will return the number of times the subcommand was called.  The subcommand callback will only be triggered once unless the `.immediate_callback()`  πŸ†• flag is set or the callback is specified through the `parse_complete_callback()` function. The `final_callback()` is triggered only once.  In which case the callback executes on completion of the subcommand arguments but after the arguments for that subcommand have been parsed, and can be triggered multiple times.
 
-🚧 Subcommands may also have an empty name either by calling `add_subcommand` with an empty string for the name or with no arguments.
-Nameless subcommands function a similarly to groups in the main `App`. See [Option groups](#option-groups) to see how this might work.  If an option is not defined in the main App, all nameless subcommands are checked as well.  This allows for the options to be defined in a composable group.  The `add_subcommand` function has an overload for adding a `shared_ptr<App>` so the subcommand(s) could be defined in different components and merged into a main `App`, or possibly multiple `Apps`.  Multiple nameless subcommands are allowed.  Callbacks for nameless subcommands are only triggered if any options from the subcommand were parsed.  
+πŸ†• Subcommands may also have an empty name either by calling `add_subcommand` with an empty string for the name or with no arguments.
+Nameless subcommands function a similarly to groups in the main `App`. See [Option groups](#option-groups) to see how this might work.  If an option is not defined in the main App, all nameless subcommands are checked as well.  This allows for the options to be defined in a composable group.  The `add_subcommand` function has an overload for adding a `shared_ptr<App>` so the subcommand(s) could be defined in different components and merged into a main `App`, or possibly multiple `Apps`.  Multiple nameless subcommands are allowed.  Callbacks for nameless subcommands are only triggered if any options from the subcommand were parsed.
 
 #### Subcommand options
 
 There are several options that are supported on the main app and subcommands and option_groups. These are:
 
 -   `.ignore_case()`: Ignore the case of this subcommand. Inherited by added subcommands, so is usually used on the main `App`.
--   `.ignore_underscore()`: πŸ†• Ignore any underscores in the subcommand name. Inherited by added subcommands, so is usually used on the main `App`.
--   `.allow_windows_style_options()`: πŸ†• Allow command line options to be parsed in the form of `/s /long /file:file_name.ext`  This option does not change how options are specified in the `add_option` calls or the ability to process options in the form of `-s --long --file=file_name.ext`.
+-   `.ignore_underscore()`: Ignore any underscores in the subcommand name. Inherited by added subcommands, so is usually used on the main `App`.
+-   `.allow_windows_style_options()`: Allow command line options to be parsed in the form of `/s /long /file:file_name.ext`  This option does not change how options are specified in the `add_option` calls or the ability to process options in the form of `-s --long --file=file_name.ext`.
 -   `.fallthrough()`: Allow extra unmatched options and positionals to "fall through" and be matched on a parent command. Subcommands always are allowed to fall through.
--   `.disable()`: 🚧 Specify that the subcommand is disabled, if given with a bool value it will enable or disable the subcommand or option group.
--   `.disabled_by_default()`:🚧 Specify that at the start of parsing the subcommand/option_group should be disabled. This is useful for allowing some Subcommands to trigger others.
--   `.enabled_by_default()`: 🚧 Specify that at the start of each parse the subcommand/option_group should be enabled.  This is useful for allowing some Subcommands to disable others.
--   `.validate_positionals()`:🚧 Specify that positionals should pass validation before matching.  Validation is specified through `transform`, `check`, and `each` for an option.  If an argument fails validation it is not an error and matching proceeds to the next available positional or extra arguments.  
--   `.excludes(option_or_subcommand)`: 🚧 If given an option pointer or pointer to another subcommand, these subcommands cannot be given together.  In the case of options, if the option is passed the subcommand cannot be used and will generate an error.  
--   `.require_option()`: 🚧 Require 1 or more options or option groups be used.
--   `.require_option(N)`:  🚧 Require `N` options or option groups, if `N>0`, or up to `N` if `N<0`. `N=0` resets to the default to 0 or more.
--   `.require_option(min, max)`: 🚧 Explicitly set min and max allowed options or option groups. Setting `max` to 0 implies unlimited options.
+-   `.disable()`: πŸ†• Specify that the subcommand is disabled, if given with a bool value it will enable or disable the subcommand or option group.
+-   `.disabled_by_default()`: πŸ†• Specify that at the start of parsing the subcommand/option_group should be disabled. This is useful for allowing some Subcommands to trigger others.
+-   `.enabled_by_default()`: πŸ†• Specify that at the start of each parse the subcommand/option_group should be enabled.  This is useful for allowing some Subcommands to disable others.
+-   `.validate_positionals()`: πŸ†• Specify that positionals should pass validation before matching.  Validation is specified through `transform`, `check`, and `each` for an option.  If an argument fails validation it is not an error and matching proceeds to the next available positional or extra arguments.
+-   `.excludes(option_or_subcommand)`: πŸ†• If given an option pointer or pointer to another subcommand, these subcommands cannot be given together.  In the case of options, if the option is passed the subcommand cannot be used and will generate an error.
+-   `.require_option()`: πŸ†• Require 1 or more options or option groups be used.
+-   `.require_option(N)`: πŸ†• Require `N` options or option groups, if `N>0`, or up to `N` if `N<0`. `N=0` resets to the default to 0 or more.
+-   `.require_option(min, max)`: πŸ†• Explicitly set min and max allowed options or option groups. Setting `max` to 0 implies unlimited options.
 -   `.require_subcommand()`: Require 1 or more subcommands.
 -   `.require_subcommand(N)`: Require `N` subcommands if `N>0`, or up to `N` if `N<0`. `N=0` resets to the default to 0 or more.
 -   `.require_subcommand(min, max)`: Explicitly set min and max allowed subcommands. Setting `max` to 0 is unlimited.
 -   `.add_subcommand(name="", description="")`: Add a subcommand, returns a pointer to the internally stored subcommand.
--   `.add_subcommand(shared_ptr<App>)`: 🚧 Add a subcommand by shared_ptr, returns a pointer to the internally stored subcommand.
--   `.remove_subcommand(App)`:🚧 Remove a subcommand from the app or subcommand.
+-   `.add_subcommand(shared_ptr<App>)`: πŸ†• Add a subcommand by shared_ptr, returns a pointer to the internally stored subcommand.
+-   `.remove_subcommand(App)`: πŸ†• Remove a subcommand from the app or subcommand.
 -   `.got_subcommand(App_or_name)`: Check to see if a subcommand was received on the command line.
 -   `.get_subcommands(filter)`: The list of subcommands that match a particular filter function.
--   `.add_option_group(name="", description="")`: 🚧 Add an [option group](#option-groups) to an App,  an option group is specialized subcommand intended for containing groups of options or other groups for controlling how options interact.  
+-   `.add_option_group(name="", description="")`: πŸ†• Add an [option group](#option-groups) to an App,  an option group is specialized subcommand intended for containing groups of options or other groups for controlling how options interact.
 -   `.get_parent()`: Get the parent App or `nullptr` if called on master App.
 -   `.get_option(name)`: Get an option pointer by option name will throw if the specified option is not available,  nameless subcommands are also searched
--   `.get_option_no_throw(name)`: 🚧 Get an option pointer by option name. This function will return a `nullptr` instead of throwing if the option is not available.
+-   `.get_option_no_throw(name)`: πŸ†• Get an option pointer by option name. This function will return a `nullptr` instead of throwing if the option is not available.
 -   `.get_options(filter)`: Get the list of all defined option pointers (useful for processing the app for custom output formats).
 -   `.parse_order()`: Get the list of option pointers in the order they were parsed (including duplicates).
 -   `.formatter(fmt)`: Set a formatter, with signature `std::string(const App*, std::string, AppFormatMode)`. See Formatting for more details.
--   `.description(str)`: πŸ†• Set/change the description.
+-   `.description(str)`: Set/change the description.
 -   `.get_description()`: Access the description.
 -   `.parsed()`: True if this subcommand was given on the command line.
 -   `.count()`: Returns the number of times the subcommand was called.
 -   `.count(option_name)`: Returns the number of times a particular option was called.
--   `.count_all()`: 🚧 Returns the total number of arguments a particular subcommand processed, on the master App it returns the total number of processed commands.
+-   `.count_all()`: πŸ†• Returns the total number of arguments a particular subcommand processed, on the master App it returns the total number of processed commands.
 -   `.name(name)`: Add or change the name.
--   `.callback(void() function)`: Set the callback that runs at the end of parsing. The options have already run at this point. See [Subcommand callbacks](#callbacks) for some additional details.
--   `.immediate_callback()`: 🚧 Specify that the callback for a subcommand should run immediately on completion of a subcommand vs at the completion of all parsing if this option is not used.
--    `.pre_parse_callback(void(size_t) function)`: 🚧 Set a callback that executes after the first argument of an application is processed.  See [Subcommand callbacks](#callbacks) for some additional details.
+-   `.callback(void() function)`: Set the callback for an app. 🚧 either sets the pre_parse_callback or the final_callback depending on the value of `immediate_callback`. See [Subcommand callbacks](#callbacks) for some additional details.
+-   `.parse_complete_callback(void() function)`: 🚧 Set the callback that runs at the completion of parsing. for subcommands this is executed at the completion of the single subcommand and can be executed multiple times. See [Subcommand callbacks](#callbacks) for some additional details.
+-   `.final_callback(void() function)`: 🚧 Set the callback that runs at the end of all processing. This is the last thing that is executed before returning. See [Subcommand callbacks](#callbacks) for some additional details.
+-   `.immediate_callback()`: πŸ†• Specifies whether the callback for a subcommand should be run as a `parse_complete_callback`(true) or `final_callback`(false). When used on the main app 🚧 it will execute the main app callback prior to the callbacks for a subcommand if they do not also have the `immediate_callback` flag set. 🚧 It is preferable to use the `parse_complete_callback` or `final_callback` directly instead of the `callback` and `immediate_callback` if one wishes to control the ordering and timing of callback.  Though `immediate_callback` can be used to swap them if that is needed.
+-   `.pre_parse_callback(void(size_t) function)`: πŸ†• Set a callback that executes after the first argument of an application is processed.  See [Subcommand callbacks](#callbacks) for some additional details.
 -   `.allow_extras()`: Do not throw an error if extra arguments are left over.
--   `.positionals_at_end()`: 🚧 Specify that positional arguments occur as the last arguments and throw an error if an unexpected positional is encountered.
+-   `.positionals_at_end()`: πŸ†• Specify that positional arguments occur as the last arguments and throw an error if an unexpected positional is encountered.
 -   `.prefix_command()`: Like `allow_extras`, but stop immediately on the first unrecognized item. It is ideal for allowing your app or subcommand to be a "prefix" to calling another app.
 -   `.footer(message)`: Set text to appear at the bottom of the help string.
+-   `.footer(std::string())`: 🚧 Set a callback to generate a string that will appear at the end of the help string.
 -   `.set_help_flag(name, message)`: Set the help flag name and message, returns a pointer to the created option.
 -   `.set_help_all_flag(name, message)`: Set the help all flag name and message, returns a pointer to the created option. Expands subcommands.
 -   `.failure_message(func)`: Set the failure message function. Two provided: `CLI::FailureMessage::help` and `CLI::FailureMessage::simple` (the default).
 -   `.group(name)`: Set a group name, defaults to `"Subcommands"`. Setting `""` will be hide the subcommand.
-- `[option_name]`: 🚧 retrieve a const pointer to an option given by `option_name` for Example `app["--flag1"]` will get a pointer to the option for the "--flag1" value,  `app["--flag1"]->as<bool>()` will get the results of the command line for a flag.
+-   `[option_name]`: πŸ†• retrieve a const pointer to an option given by `option_name` for Example `app["--flag1"]` will get a pointer to the option for the "--flag1" value,  `app["--flag1"]->as<bool>()` will get the results of the command line for a flag. The operation will throw an exception if the option name is not valid.
 
 > Note: if you have a fixed number of required positional options, that will match before subcommand names. `{}` is an empty filter function, and any positional argument will match before repeated subcommand names.
 
 
 #### Callbacks
-A subcommand has two optional callbacks that are executed at different stages of processing.  The `preparse_callback` 🚧 is executed once after the first argument of a subcommand or application is processed and gives an argument for the number of remaining arguments to process.  For the main app the first argument is considered the program name,  for subcommands the first argument is the subcommand name.  For Option groups and nameless subcommands the first argument is after the first argument or subcommand is processed from that group.
-The second callback is executed after parsing.  The behavior depends on the status of the `immediate_callback` flag 🚧. If true, this runs immediately after the parsing of the subcommand.  Or if the flag is false, once after parsing of all arguments.  If the `immediate_callback` is set then the callback can be executed multiple times if the subcommand list given multiple times.  If the main app or subcommand has a config file, no data from the config file will be reflected in immediate_callback. `immediate_callback()` has no effect on the main app, though it can be inherited.  For option_groups `immediate_callback` causes the callback to be run prior to other option groups and options in the main app, effectively giving the options in the group priority.  
-
+A subcommand has three optional callbacks that are executed at different stages of processing.  The `preparse_callback` πŸ†• is executed once after the first argument of a subcommand or application is processed and gives an argument for the number of remaining arguments to process.  For the main app the first argument is considered the program name,  for subcommands the first argument is the subcommand name.  For Option groups and nameless subcommands the first argument is after the first argument or subcommand is processed from that group.
+The second callback is executed after parsing.  This is known as the `parse_complete_callback`. For subcommands this is executed immediately after parsing and can be executed multiple times if a subcommand is called multiple times.    On the main app this callback is executed after all the `parse_complete_callback`s for the subcommands are executed but prior to any `final_callback` calls in the subcommand or option groups. If the main app or subcommand has a config file, no data from the config file will be reflected in `parse_complete_callback` on named subcommands 🚧.  For option_groups the `parse_complete_callback` is executed prior to the `parse_complete_callback` on the main app but after the config_file is loaded(if specified).  The 🚧 `final_callback` is executed after all processing is complete.  After the `parse_complete_callback` is executed on the main app, the used subcommand `final_callback` are executed followed by the 'final callback' for option groups.  The last thing to execute is the `final_callback` for the main_app.
 For example say an application was set up like
 
 ```cpp
-app.callback(ac);
-sub1=app.add_subcommand("sub1")->callback(c1)->preparse_callback(pc1)->immediate_callback();
-sub2=app.add_subcommand("sub2")->callback(c2)->preparse_callback(pc2);
+app.parse_complete_callback(ac1);
+app.final_callback(ac2);
+auto sub1=app.add_subcommand("sub1")->parse_complete_callback(c1)->preparse_callback(pc1);
+auto sub2=app.add_subcommand("sub2")->final_callback(c2)->preparse_callback(pc2);
 app.preparse_callback( pa);
 
 ... A bunch of other options
@@ -533,13 +601,14 @@ Then the command line is given as
 program --opt1 opt1_val  sub1 --sub1opt --sub1optb val sub2 --sub2opt sub1 --sub1opt2 sub2 --sub2opt2 val
 ```
 
-* pa will be called prior to parsing any values with an argument of 13.
-* pc1 will be called immediately after processing the sub1 command with a value of 10.
-* c1 will be called when the `sub2` command is encountered.
-* pc2 will be called with value of 6 after the sub2 command is encountered.
-* c1 will be called again after the second sub2 command is encountered.
-* c2 will be called once after processing all arguments.
-* ac will be called after completing the parse and all lower level callbacks have been executed.
+-   pa will be called prior to parsing any values with an argument of 13.
+-   pc1 will be called immediately after processing the sub1 command with a value of 10.
+-   c1 will be called when the `sub2` command is encountered.
+-   pc2 will be called with value of 6 after the sub2 command is encountered.
+-   c1 will be called again after the second sub2 command is encountered.
+-   ac1 will be called after processing of all arguments
+-   c2 will be called once after processing all arguments.
+-   ac2 will be called last after completing  all lower level callbacks have been executed.
 
 A subcommand is considered terminated when one of the following conditions are met.
 1. There are no more arguments to process
@@ -547,11 +616,11 @@ A subcommand is considered terminated when one of the following conditions are m
 3. The positional_mark(`--`) is encountered and there are no available positional slots in the subcommand.
 4. The subcommand_terminator mark(`++`) is encountered
 
-If the `immediate_callback` flag is set then all contained options are processed and the callback is triggered.  If a subcommand with an `immediate_callback` flag is called again, then the contained options are reset, and can be triggered again.  
+Prior to executed a `parse_complete_callback` all contained options are processed before the callback is triggered.  If a subcommand with a `parse_complete_callback` is called again, then the contained options are reset, and can be triggered again.
 
 
 
-#### Option groups 🚧
+#### Option groups πŸ†•
 
 The subcommand method
 
@@ -559,7 +628,7 @@ The subcommand method
 .add_option_group(name,description)
 ```
 
-Will create an option group, and return a pointer to it.  An option group allows creation of a collection of options, similar to the groups function on options, but with additional controls and requirements.  They allow specific sets of options to be composed and controlled as a collective.  For an example see [range test](./tests/ranges.cpp).  Option groups are a specialization of an App so all [functions](#subcommand-options) that work with an App or subcommand also work on option groups.  Options can be created as part of an option group using the add functions just like a subcommand, or previously created options can be added through
+Will create an option group, and return a pointer to it.  An option group allows creation of a collection of options, similar to the groups function on options, but with additional controls and requirements.  They allow specific sets of options to be composed and controlled as a collective.  For an example see [range example](https://github.com/CLIUtils/CLI11/blob/master/examples/ranges.cpp).  Option groups are a specialization of an App so all [functions](#subcommand-options) that work with an App or subcommand also work on option groups.  Options can be created as part of an option group using the add functions just like a subcommand, or previously created options can be added through
 
 ```cpp
 ogroup->add_option(option_pointer);
@@ -576,9 +645,9 @@ ogroup->add_subcommand(subcom_pointer);
 This results in the subcommand being moved from its parent into the option group.
 
 Options in an option group are searched for a command line match after any options in the main app, so any positionals in the main app would be matched first.  So care must be taken to make sure of the order when using positional arguments and option groups.
-Option groups work well with `excludes` and `require_options` methods, as an Application will treat an option group as a single option for the purpose of counting and requirements, and an option group will be considered used if any of the options or subcommands contained in it are used.  Option groups allow specifying requirements such as requiring 1 of 3 options in one group and 1 of 3 options in a different group. Option groups can contain other groups as well.   Disabling an option group will turn off all options within the group.
+Option groups work well with `excludes` and `require_options` methods, as an application will treat an option group as a single option for the purpose of counting and requirements, and an option group will be considered used if any of the options or subcommands contained in it are used.  Option groups allow specifying requirements such as requiring 1 of 3 options in one group and 1 of 3 options in a different group. Option groups can contain other groups as well.   Disabling an option group will turn off all options within the group.
 
-The `CLI::TriggerOn`🚧 and `CLI::TriggerOff`🚧 methods are helper methods to allow the use of options/subcommands from one group to trigger another group on or off.
+The `CLI::TriggerOn` πŸ†• and `CLI::TriggerOff` πŸ†• methods are helper methods to allow the use of options/subcommands from one group to trigger another group on or off.
 
 ```cpp
 CLI::TriggerOn(group1_pointer, triggered_group);
@@ -614,16 +683,16 @@ in_subcommand = Wow
 sub.subcommand = true
 ```
 
-Spaces before and after the name and argument are ignored. Multiple arguments are separated by spaces. One set of quotes will be removed, preserving spaces (the same way the command line works). Boolean options can be `true`, `on`, `1`, `yes`, 🚧 `enable`; or `false`, `off`, `0`, `no`, 🚧 `disable` (case insensitive). Sections (and `.` separated names) are treated as subcommands (note: this does not mean that subcommand was passed, it just sets the "defaults". You cannot set positional-only arguments or force subcommands to be present in the command line.
+Spaces before and after the name and argument are ignored. Multiple arguments are separated by spaces. One set of quotes will be removed, preserving spaces (the same way the command line works). Boolean options can be `true`, `on`, `1`, `yes`, πŸ†• `enable`; or `false`, `off`, `0`, `no`, πŸ†• `disable` (case insensitive). Sections (and `.` separated names) are treated as subcommands (note: this does not mean that subcommand was passed, it just sets the "defaults". You cannot set positional-only arguments or force subcommands to be present in the command line.
 
 To print a configuration file from the passed
 arguments, use `.config_to_str(default_also=false, prefix="", write_description=false)`, where `default_also` will also show any defaulted arguments, `prefix` will add a prefix, and `write_description` will include option descriptions.
 
 ### Inheriting defaults
 
-Many of the defaults for subcommands and even options are inherited from their creators. The inherited default values for subcommands are `allow_extras`, `prefix_command`, `ignore_case`, πŸ†• `ignore_underscore`, `fallthrough`, `group`, `footer`,`immediate_callback` and maximum number of required subcommands. The help flag existence, name, and description are inherited, as well.
+Many of the defaults for subcommands and even options are inherited from their creators. The inherited default values for subcommands are `allow_extras`, `prefix_command`, `ignore_case`, `ignore_underscore`, `fallthrough`, `group`, `footer`,`immediate_callback` and maximum number of required subcommands. The help flag existence, name, and description are inherited, as well.
 
-Options have defaults for `group`, `required`, `multi_option_policy`, `ignore_case`, πŸ†• `ignore_underscore`, 🚧 `delimiter`, and 🚧 `disable_flag_override`. To set these defaults, you should set the `option_defaults()` object, for example:
+Options have defaults for `group`, `required`, `multi_option_policy`, `ignore_case`, `ignore_underscore`, πŸ†• `delimiter`, and πŸ†• `disable_flag_override`. To set these defaults, you should set the `option_defaults()` object, for example:
 
 ```cpp
 app.option_defaults()->required();
@@ -647,10 +716,10 @@ The App class was designed allow toolkits to subclass it, to provide preset defa
 but before run behavior, while
 still giving the user freedom to `callback` on the main app.
 
-The most important parse function is `parse(std::vector<std::string>)`, which takes a reversed list of arguments (so that `pop_back` processes the args in the correct order). `get_help_ptr` and `get_config_ptr` give you access to the help/config option pointers. The standard `parse` manually sets the name from the first argument, so it should not be in this vector. πŸ†• You can also use `parse(string, bool)` to split up and parse a string; the optional bool should be set to true if you are
+The most important parse function is `parse(std::vector<std::string>)`, which takes a reversed list of arguments (so that `pop_back` processes the args in the correct order). `get_help_ptr` and `get_config_ptr` give you access to the help/config option pointers. The standard `parse` manually sets the name from the first argument, so it should not be in this vector. You can also use `parse(string, bool)` to split up and parse a string; the optional bool should be set to true if you are
 including the program name in the string, and false otherwise.
 
-Also, in a related note, the `App` you get a pointer to is stored in the parent `App` in a `unique_ptr`s (like `Option`s) and are deleted when the main `App` goes out of scope.
+Also, in a related note, the `App` you get a pointer to is stored in the parent `App` in a `shared_ptr`s (similar to `Option`s) and are deleted when the main `App` goes out of scope unless the object has another owner.
 
 ### How it works
 
@@ -726,6 +795,32 @@ And, in your main function:
 
 The API is [documented here][api-docs]. Also see the [CLI11 tutorial GitBook][gitbook].
 
+## Examples
+
+Several short examples of different features are included in the repository. A brief description of each is included here
+
+ - [callback_passthrough](https://github.com/CLIUtils/CLI11/blob/master/examples/callback_passthrough.cpp): Example of directly passing remaining arguments through to a callback function which generates a CLI11 application based on existing arguments.
+ - [digit_args](https://github.com/CLIUtils/CLI11/blob/master/examples/digit_args.cpp):  Based on [Issue #123](https://github.com/CLIUtils/CLI11/issues/123), uses digit flags to pass a value
+ - [enum](https://github.com/CLIUtils/CLI11/blob/master/examples/enum.cpp):  Using enumerations in an option, and the use of [CheckedTransformer](#transforming-validators)
+ - [formatter](https://github.com/CLIUtils/CLI11/blob/master/examples/formatter.cpp): Illustrating usage of a custom formatter
+ - [groups](https://github.com/CLIUtils/CLI11/blob/master/examples/groups.cpp):  Example using groups of options for help grouping and a the timer helper class
+ - [inter_argument_order](https://github.com/CLIUtils/CLI11/blob/master/examples/inter_argument_order.cpp): An app to practice mixing unlimited arguments, but still recover the original order.
+ - [json](https://github.com/CLIUtils/CLI11/blob/master/examples/json.cpp):  Using JSON as a config file parser
+ - [modhelp](https://github.com/CLIUtils/CLI11/blob/master/examples/modhelp.cpp):  How to modify the help flag to do something other than default
+ - [nested](https://github.com/CLIUtils/CLI11/blob/master/examples/nested.cpp):  Nested subcommands
+ - [option_groups](https://github.com/CLIUtils/CLI11/blob/master/examples/option_groups.cpp):  illustrating the use of option groups and a required number of options.
+ based on [Issue #88](https://github.com/CLIUtils/CLI11/issues/88) to set interacting groups of options
+ - [positional_arity](https://github.com/CLIUtils/CLI11/blob/master/examples/positional_arity.cpp): Illustrating use of `preparse_callback` to handle situations where the number of arguments can determine which should get parsed,  Based on [Issue #166](https://github.com/CLIUtils/CLI11/issues/166)
+ - [positional_validation](https://github.com/CLIUtils/CLI11/blob/master/examples/positional_validation.cpp): Example of how positional arguments are validated using the `validate_positional` flag, also based on [Issue #166](https://github.com/CLIUtils/CLI11/issues/166)
+ - [prefix_command](https://github.com/CLIUtils/CLI11/blob/master/examples/prefix_command.cpp): illustrating use of the `prefix_command` flag.
+ - [ranges](https://github.com/CLIUtils/CLI11/blob/master/examples/ranges.cpp):  App to demonstrate exclusionary option groups based on [Issue #88](https://github.com/CLIUtils/CLI11/issues/88)
+ - [shapes](https://github.com/CLIUtils/CLI11/blob/master/examples/shapes.cpp): illustrating how to set up repeated subcommands Based on [gitter discussion](https://gitter.im/CLI11gitter/Lobby?at=5c7af6b965ffa019ea788cd5)
+ - [simple](https://github.com/CLIUtils/CLI11/blob/master/examples/simple.cpp): a simple example of how to set up a CLI11 Application with different flags and options
+ - [subcom_help](https://github.com/CLIUtils/CLI11/blob/master/examples/subcom_help.cpp): configuring help for subcommands
+ - [subcom_partitioned](https://github.com/CLIUtils/CLI11/blob/master/examples/subcom_partitioned.cpp): Example with a timer and subcommands generated separately and added to the main app later.
+ - [subcommands](https://github.com/CLIUtils/CLI11/blob/master/examples/subcommands.cpp): Short example of subcommands
+ - [validators](https://github.com/CLIUtils/CLI11/blob/master/examples/validators.cpp): Example illustrating use of validators
+
 ## Contribute
 
 To contribute, open an [issue][github issues] or [pull request][github pull requests] on GitHub, or ask a question on [gitter][]. The is also a short note to contributors [here](./.github/CONTRIBUTING.md).
@@ -751,6 +846,11 @@ Significant features and/or improvements to the code were contributed by:
 -   [ncihneg](https://github.com/ncihneg) <!-- Quoting strings in INI generation -->
 -   [Fred HelmesjΓΆ](https://github.com/helmesjo) <!-- `->description()` -->
 -   [Rafi Wiener](https://github.com/rafiw) <!-- INI, +ive validators and vector separators -->
+    [elszon](https://github.com/elszon) <!-- Formatting in multiline string -->
+    [ryan4729](https://github.com/ryan4729) <!-- AArch64 support -->
+    [Andrew Hardin](https://github.com/andrew-hardin) <!-- Fixing two warnings -->
+    [Paul le Roux](https://github.com/pleroux0) <!-- Arch independent CMake Config -->
+-   [Viacheslav Kroilov](https://github.com/metopa) <!-- AsNumberWithUnit and AsSizeValue -->
 
 
 ## License
@@ -792,7 +892,7 @@ CLI11 was developed at the [University of Cincinnati][] to support of the [GooFi
 [diana/hep]: http://diana-hep.org
 [nsf award 1414736]: https://nsf.gov/awardsearch/showAward?AWD_ID=1414736
 [university of cincinnati]: http://www.uc.edu
-[gitbook]: https://cliutils.gitlab.io/CLI11Tutorial
+[gitbook]: https://cliutils.github.io/CLI11/book/
 [cli11 internals]: https://cliutils.gitlab.io/CLI11Tutorial/chapters/internals.html
 [programoptions.hxx]: https://github.com/Fytch/ProgramOptions.hxx
 [argument aggregator]: https://github.com/vietjtnguyen/argagg
@@ -804,8 +904,8 @@ CLI11 was developed at the [University of Cincinnati][] to support of the [GooFi
 [version 1.0 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-10/
 [version 1.3 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-13/
 [version 1.6 post]: https://iscinumpy.gitlab.io/post/announcing-cli11-16/
-[wandbox-badge]: https://img.shields.io/badge/try_1.7-online-blue.svg
-[wandbox-link]: https://wandbox.org/permlink/k1BzlRwOZ07ieEuD
+[wandbox-badge]: https://img.shields.io/badge/try_1.8-online-blue.svg
+[wandbox-link]: https://wandbox.org/permlink/EbI6nT3RkYKviKV2
 [releases-badge]: https://img.shields.io/github/release/CLIUtils/CLI11.svg
 [cli11-po-compare]: https://iscinumpy.gitlab.io/post/comparing-cli11-and-boostpo/
 [diana slides]: https://indico.cern.ch/event/619465/contributions/2507949/attachments/1448567/2232649/20170424-diana-2.pdf
@@ -816,3 +916,4 @@ CLI11 was developed at the [University of Cincinnati][] to support of the [GooFi
 [codacy-link]: https://www.codacy.com/app/henryiii/CLI11?utm_source=github.com&utm_medium=referral&utm_content=CLIUtils/CLI11&utm_campaign=Badge_Grade
 [hunter]: https://docs.hunter.sh/en/latest/packages/pkg/CLI11.html
 [standard readme style]: https://github.com/RichardLitt/standard-readme
+[argparse]: https://github.com/p-ranav/argparse
diff --git a/packages/CLI11/azure-pipelines.yml b/packages/CLI11/azure-pipelines.yml
index 328bbc3e3344b5c7ce5ec2d41ca950c1384806d2..d5ac217b049d6f3720577af513d3f13f84823e70 100644
--- a/packages/CLI11/azure-pipelines.yml
+++ b/packages/CLI11/azure-pipelines.yml
@@ -6,21 +6,87 @@
 trigger:
 - master
 
+variables:
+  cli11.single: ON
+  cli11.std: 14
+  cli11.build_type: Debug
+  cli11.options:
+  CMAKE_BUILD_PARALLEL_LEVEL: 4
+
 jobs:
-- job: Linux
+
+- job: ClangFormatTidy
+  variables:
+    CXX_FLAGS: "-Werror -Wcast-align -Wfloat-equal -Wimplicit-atomic-properties -Wmissing-declarations -Woverlength-strings -Wshadow -Wstrict-selector-match -Wundeclared-selector -Wunreachable-code -std=c++11"
+    cli11.options: -DCLANG_TIDY_FIX=ON
+    cli11.std: 11
+    cli11.single: OFF
+    CMAKE_BUILD_PARALLEL_LEVEL: 1
   pool:
     vmImage: 'ubuntu-16.04'
+  container: silkeh/clang:5
+  steps:
+    - script: scripts/check_style.sh
+      displayName: Check format
+    - template: .ci/azure-cmake.yml
+    - template: .ci/azure-build.yml
+    - script: git diff --exit-code --color
+      displayName: Check tidy
+
+- job: Native
+  strategy:
+    matrix:
+      Linux:
+        vmImage: 'ubuntu-latest'
+      macOS:
+        vmImage: 'macOS-latest'
+      Windows:
+        vmImage: 'vs2017-win2016'
+  pool:
+    vmImage: $(vmImage)
   steps:
-    - template: .ci/azure-steps.yml
+    - template: .ci/azure-build.yml
+    - template: .ci/azure-test.yml
 
-- job: macOS
+- job: Meson
   pool:
-    vmImage: 'macOS-10.13'
+    vmImage: 'ubuntu-latest'
   steps:
-    - template: .ci/azure-steps.yml
+    - task: UsePythonVersion@0
+      inputs:
+        versionSpec: '3.6'
+    - script: python3 -m pip install meson ninja
+    - script: meson build
+      displayName: Run meson to generate build
+      workingDirectory: tests/mesonTest
+    - script: ninja -C tests/mesonTest/build
+      displayName: Build with Ninja
+    - script: ./tests/mesonTest/build/main --help
+      displayName: Run help
 
-- job: Windows
+- job: Docker
+  variables:
+    cli11.single: OFF
   pool:
-    vmImage: 'vs2017-win2016'
+    vmImage: 'ubuntu-latest'
+  strategy:
+    matrix:
+      gcc9:
+        containerImage: gcc:9
+        cli11.std: 17
+      gcc4.8:
+        containerImage: gcc:4.8
+        cli11.std: 11
+      clang3.4:
+        containerImage: silkeh/clang:3.4
+        cli11.std: 11
+      clang8:
+        containerImage: silkeh/clang:8
+        cli11.std: 14
+        cli11.options: -DCLI11_FORCE_LIBCXX=ON
+  container: $[ variables['containerImage'] ]
   steps:
-    - template: .ci/azure-steps.yml
+    - template: .ci/azure-cmake.yml
+    - template: .ci/azure-build.yml
+    - template: .ci/azure-test.yml
+
diff --git a/packages/CLI11/book/.gitignore b/packages/CLI11/book/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..bb77454ddb3066e98ef3ae3b95e4a2ed3fe35fcb
--- /dev/null
+++ b/packages/CLI11/book/.gitignore
@@ -0,0 +1,20 @@
+# Node rules:
+## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+## Dependency directory
+## Commenting this out is preferred by some people, see
+## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git
+node_modules
+
+# Book build output
+_book
+
+# eBook build output
+*.epub
+*.mobi
+*.pdf
+
+a.out
+
+*build*
diff --git a/packages/CLI11/book/README.md b/packages/CLI11/book/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..75020fb10b70197755672d81d2200bdbd68c35f1
--- /dev/null
+++ b/packages/CLI11/book/README.md
@@ -0,0 +1,71 @@
+# CLI11: An introduction
+
+This gitbook is designed to provide an introduction to using the CLI11 library to write your own command line programs. The library is designed to be clean, intuitive, but powerful. There are no requirements beyond C++11 support (and even `<regex>` support not required). It works on Mac, Linux, and Windows, and has 100% test coverage on all three systems. You can simply drop in a single header file (`CLI11.hpp` available in [releases]) to use CLI11 in your own application. Other ways to integrate it into a build system are listed in the [README].
+
+The library was inspired the Python libraries [Plumbum] and [Click], and incorporates many of their user friendly features. The library is extensively documented, with a [friendly introduction][README], this tutorial book, and more technical [API docs].
+
+> Feel free to contribute to [this documentation here][CLI11Tutorial] if something can be improved!
+
+The syntax is simple and scales from a basic application to a massive physics analysis with multiple models and many parameters and switches. For example, this is a simple program that has an optional parameter that defaults to 1:
+
+```term
+gitbook $ ./a.out
+Parameter value: 0
+
+gitbook $ ./a.out -p 4
+Parameter value: 4
+
+gitbook $ ./a.out --help
+App description
+Usage: ./a.out [OPTIONS]
+
+Options:
+  -h,--help                   Print this help message and exit
+  -p INT                      Parameter
+```
+
+Like any good command line application, help is provided. This program can be implemented in 10 lines:
+
+[include](code/intro.cpp)
+
+[Source code](https://gitlab.com/CLIUtils/CLI11Tutorial/blob/master/code/intro.cpp)
+
+Unlike some other libraries, this is enough to exit correctly and cleanly if help is requested or if incorrect arguments are passed. You can try this example out for yourself. To compile with GCC:
+
+```term
+gitbook:examples $ c++ -std=c++11 intro.cpp
+```
+
+Much more complicated options are handled elegantly:
+
+```cpp
+std::string req_real_file;
+app.add_option("-f,--file", file, "Require an existing file")
+  ->required()
+  ->check(CLI::ExistingFile);
+```
+
+You can use any valid type; the above example could have used a `boost::file_system` file instead of a `std::string`. The value is a real value and does not require any special lookups to access. You do not have to risk typos by repeating the values after parsing like some libraries require. The library also handles positional arguments, flags, fixed or unlimited repeating options, interdependent options, flags, custom validators, help groups, and more.
+
+You can use subcommands, as well. Subcommands support callback lambda functions when parsed, or they can be checked later. You can infinitely nest subcommands, and each is a full `App` instance, supporting everything listed above.
+
+Reading/producing `.ini` files for configuration is also supported, as is using environment variables as input. The base `App` can be subclassed and customized for use in a toolkit (like [GooFit]). All the standard shell idioms, like `--`, work as well.
+
+CLI11 was developed at the [University of Cincinnati] in support of the [GooFit] library under [NSF Award 1414736][NSF 1414736]. It was featured in a [DIANA/HEP] meeting at CERN. Please give it a try! Feedback is always welcome.
+
+This guide was based on CLI11 1.7.
+
+[GooFit]: https://github.com/GooFit/GooFit
+[DIANA/HEP]: http://diana-hep.org
+[CLI11]: https://github.com/CLIUtils/CLI11
+[CLI11Tutorial]: https://gitlab.com/CLIUtils/CLI11Tutorial
+[releases]: https://github.com/CLIUtils/CLI11/releases
+[API docs]: https://cliutils.github.io/CLI11
+[README]: https://github.com/CLIUtils/CLI11/blob/master/README.md
+[NSF 1414736]: https://nsf.gov/awardsearch/showAward?AWD_ID=1414736
+[University of Cincinnati]: http://www.uc.edu
+[Plumbum]: http://plumbum.readthedocs.io/en/latest/
+[Click]: http://click.pocoo.org/5/
+
+
+
diff --git a/packages/CLI11/book/SUMMARY.md b/packages/CLI11/book/SUMMARY.md
new file mode 100644
index 0000000000000000000000000000000000000000..cdbc049f444f91b420eaa5cb163b6e3be1e19ad5
--- /dev/null
+++ b/packages/CLI11/book/SUMMARY.md
@@ -0,0 +1,16 @@
+# Summary
+
+* [Introduction](/README.md)
+* [Installation](/chapters/installation.md)
+* [Basics](/chapters/basics.md)
+* [Flags](/chapters/flags.md)
+* [Options](/chapters/options.md)
+* [Validators](/chapters/validators.md)
+* [Subcommands and the App](/chapters/subcommands.md)
+* [An advanced example](/chapters/an-advanced-example.md)
+* [Configuration files](/chapters/config.md)
+* [Formatting help output](/chapters/formatting.md)
+* [Toolkits](/chapters/toolkits.md)
+* [Advanced topics](/chapters/advanced-topics.md)
+* [Internals](/chapters/internals.md)
+
diff --git a/packages/CLI11/book/book.json b/packages/CLI11/book/book.json
new file mode 100644
index 0000000000000000000000000000000000000000..f8745d66717013f0367200464fed43db8e7fd169
--- /dev/null
+++ b/packages/CLI11/book/book.json
@@ -0,0 +1,16 @@
+{
+"title": "CLI11 Tutorial",
+"description": "A set of examples and detailed information about CLI11",
+"author": "Henry Schreiner",
+"plugins": [
+        "include-codeblock",
+        "term",
+        "hints"
+    ],
+"pluginsConfig": {
+        "include-codeblock": {
+            "unindent": true,
+            "fixlang": true
+        }
+    }
+}
diff --git a/packages/CLI11/book/chapters/advanced-topics.md b/packages/CLI11/book/chapters/advanced-topics.md
new file mode 100644
index 0000000000000000000000000000000000000000..1a7ef53790226412e0766a737d099c79a81a50ab
--- /dev/null
+++ b/packages/CLI11/book/chapters/advanced-topics.md
@@ -0,0 +1,138 @@
+# Advanced topics
+
+
+## Environment variables
+
+Environment variables can be used to fill in the value of an option:
+
+```cpp
+std::string opt;
+app.add_option("--my_option", opt)->envname("MY_OPTION");
+```
+If not given on the command line, the environment variable will be checked and read from if it exists. All the standard tools, like default and required, work as expected.
+If passed on the command line, this will ignore the environment variable.
+
+## Needs/excludes
+
+You can set a network of requirements. For example, if flag a needs flag b but cannot be given with flag c, that would be:
+
+```cpp
+auto a = app.add_flag("-a");
+auto b = app.add_flag("-b");
+auto c = app.add_flag("-c");
+
+a->needs(b);
+a->excludes(c);
+```
+
+CLI11 will make sure your network of requirements makes sense, and will throw an error immediately if it does not.
+
+## Custom option callbacks
+
+You can make a completely generic option with a custom callback. For example, if you wanted to add a complex number (already exists, so please don't actually do this):
+
+```cpp
+CLI::Option *
+add_option(CLI::App &app, std::string name, cx &variable, std::string description = "", bool defaulted = false) {
+    CLI::callback_t fun = [&variable](CLI::results_t res) {
+        double x, y;
+        bool worked = CLI::detail::lexical_cast(res[0], x) && CLI::detail::lexical_cast(res[1], y);
+        if(worked)
+            variable = cx(x, y);
+        return worked;
+    };
+
+    CLI::Option *opt = app.add_option(name, fun, description, defaulted);
+    opt->set_custom_option("COMPLEX", 2);
+    if(defaulted) {
+        std::stringstream out;
+        out << variable;
+        opt->set_default_str(out.str());
+    }
+    return opt;
+}
+```
+
+Then you could use it like this:
+
+```
+std::complex<double> comp{0, 0};
+add_option(app, "-c,--complex", comp);
+```
+
+## Custom converters
+
+You can add your own converters to allow CLI11 to accept more option types in the standard calls. These can only be used for "single" size options (so complex, vector, etc. are a separate topic). If you set up a custom `istringstream& operator <<` overload before include CLI11, you can support different conversions. If you place this in the CLI namespace, you can even keep this from affecting the rest of your code. Here's how you could add `boost::optional` for a compiler that does not have `__has_include`:
+
+```cpp
+// CLI11 already does this if __has_include is defined
+#ifndef __has_include
+
+#include <boost/optional.hpp>
+
+// Use CLI namespace to avoid the conversion leaking into your other code
+namespace CLI {
+
+template <typename T> std::istringstream &operator>>(std::istringstream &in, boost::optional<T> &val) {
+    T v;
+    in >> v;
+    val = v;
+    return in;
+}
+
+}
+
+#endif
+
+#include <CLI11.hpp>
+```
+
+This is an example of how to use the system only; if you are just looking for a way to activate `boost::optional` support on older compilers, you should define `CLI11_BOOST_OPTIONAL` before including a CLI11 file, you'll get the `boost::optional` support.
+
+
+## Custom converters and type names: std::chrono example
+
+An example of adding a custom converter and typename for `std::chrono` follows:
+
+```cpp
+namespace CLI
+{
+	template <typename T, typename R>
+	std::istringstream &operator>>(std::istringstream &in, std::chrono::duration<T,R> &val)
+	{
+		T v;
+		in >> v;
+		val = std::chrono::duration<T,R>(v);
+		return in;
+	}
+
+	template <typename T, typename R>
+	std::stringstream &operator<<(std::stringstream &in, std::chrono::duration<T,R> &val)
+	{
+		in << val.count();
+		return in;
+	}
+ }
+
+#include <CLI/CLI.hpp>
+
+namespace CLI
+{
+	namespace detail
+	{
+		template <>
+		constexpr const char *type_name<std::chrono::hours>()
+		{
+			return "TIME [H]";
+		}
+
+		template <>
+		constexpr const char *type_name<std::chrono::minutes>()
+		{
+			return "TIME [MIN]";
+		}
+        }
+}
+```
+
+Thanks to Olivier Hartmann for the example.
diff --git a/packages/CLI11/book/chapters/an-advanced-example.md b/packages/CLI11/book/chapters/an-advanced-example.md
new file mode 100644
index 0000000000000000000000000000000000000000..6a9bd265373c652e1737e579371fd9bc64426c72
--- /dev/null
+++ b/packages/CLI11/book/chapters/an-advanced-example.md
@@ -0,0 +1,33 @@
+# Making a git clone
+
+
+
+Let's try our hand at a little `git` clone, called `geet`. It will just print it's intent, rather than running actual code, since it's just a demonstration. Let's start by adding an app and requiring 1 subcommand to run:
+
+[include:"Intro"](../code/geet.cpp)
+
+Now, let's define the first subcommand, `add`, along with a few options:
+
+[include:"Add"](../code/geet.cpp)
+
+Now, let's add `commit`:
+
+[include:"Commit"](../code/geet.cpp)
+
+All that's need now is the parse call. We'll print a little message after the code runs, and then return:
+
+[include:"Parse"](../code/geet.cpp)
+
+[Source code](https://gitlab.com/CLIUtils/CLI11Tutorial/blob/master/code/flags.cpp)
+
+If you compile and run:
+
+```term
+gitbook:examples $ c++ -std=c++11 geet.cpp -o geet
+```
+
+You'll see it behaves pretty much like `git`.
+
+## Multi-file App parse code
+
+This example could be made much nicer if it was split into files, one per subcommand. If you simply use shared pointers instead of raw values in the lambda capture, you can tie the lifetime to the lambda function lifetime.  CLI11 has a multifile example in its example folder.
diff --git a/packages/CLI11/book/chapters/basics.md b/packages/CLI11/book/chapters/basics.md
new file mode 100644
index 0000000000000000000000000000000000000000..aa52cffb7be15e0a97b8fef50e081939899578c1
--- /dev/null
+++ b/packages/CLI11/book/chapters/basics.md
@@ -0,0 +1,27 @@
+# The Basics
+
+The simplest CLI11 program looks like this:
+
+[include](../code/simplest.cpp)
+
+The first line includes the library; this explicitly uses the single file edition (see [Selecting an edition](/chapters/installation)).
+
+After entering the main function, you'll see that a `CLI::App` object is created. This is the basis for all interactions with the library. You could optionally provide a description for your app here.
+
+A normal CLI11 application would define some flags and options next. This is a simplest possible example, so we'll go on.
+
+The macro `CLI11_PARSE` just runs five simple lines. This internally runs `app.parse(argc, argv)`, which takes the command line info from C++ and parses it. If there is an error, it throws a `ParseError`; if you catch it, you can use `app.exit` with  the error as an argument to print a nice message and produce the correct return code for your application.
+
+If you just use `app.parse` directly, your application will still work, but the stack will not be correctly unwound since you have an uncaught exception, and the command line output will be cluttered, especially for help.
+
+For this (and most of the examples in this book) we will assume that we have the `CLI11.hpp` file in the current directory and that we are creating an output executable `a.out` on a macOS or Linux system. The commands to compile and test this example would be:
+
+```term
+gitbook:examples $ g++ -std=c++11 simplest.cpp
+gitbook:examples $ ./a.out -h
+Usage: ./a.out [OPTIONS]
+
+Options:
+  -h,--help                   Print this help message and exit
+```
+
diff --git a/packages/CLI11/book/chapters/config.md b/packages/CLI11/book/chapters/config.md
new file mode 100644
index 0000000000000000000000000000000000000000..d83278a251e058f476ceb59b776449060278514a
--- /dev/null
+++ b/packages/CLI11/book/chapters/config.md
@@ -0,0 +1,53 @@
+# Accepting configure files
+
+## Reading a configure file
+
+You can tell your app to allow configure files with `set_config("--config")`. There are arguments: the first is the option name. If empty, it will clear the config flag. The second item is the default file name. If that is specified, the config will try to read that file. The third item is the help string, with a reasonable default, and the final argument is a boolean (default: false) that indicates that the configuration file is required and an error will be thrown if the file
+is not found and this is set to true.
+
+## Configure file format
+
+Here is an example configuration file, in INI format:
+
+```ini
+; Commments are supported, using a ;
+; The default section is [default], case insensitive
+
+value = 1
+str = "A string"
+vector = 1 2 3
+
+; Section map to subcommands
+[subcommand]
+in_subcommand = Wow
+sub.subcommand = true
+```
+
+Spaces before and after the name and argument are ignored. Multiple arguments are separated by spaces. One set of quotes will be removed, preserving spaces (the same way the command line works). Boolean options can be `true`, `on`, `1`, `yes`; or `false`, `off`, `0`, `no` (case insensitive). Sections (and `.` separated names) are treated as subcommands (note: this does not mean that subcommand was passed, it just sets the "defaults".
+
+## Writing out a configure file
+
+To print a configuration file from the passed arguments, use `.config_to_str(default_also=false, prefix="", write_description=false)`, where `default_also` will also show any defaulted arguments, `prefix` will add a prefix, and `write_description` will include option descriptions.
+
+## Custom formats
+
+{% hint style='info' %}
+New in CLI11 1.6
+{% endhint %}
+
+You can invent a custom format and set that instead of the default INI formatter. You need to inherit from `CLI::Config` and implement the following two functions:
+
+```cpp
+std::string to_config(const CLI::App *app, bool default_also, bool, std::string) const;
+std::vector<CLI::ConfigItem> from_config(std::istream &input) const;
+```
+
+The `CLI::ConfigItem`s that you return are simple structures with a name, a vector of parents, and a vector of results. A optionally customizable `to_flag` method on the formatter lets you change what happens when a ConfigItem turns into a flag.
+
+Finally, set your new class as new config formatter: 
+
+```cpp
+app.config_formatter(std::make_shared<NewConfig>());
+```
+
+See [`examples/json.cpp`](https://github.com/CLIUtils/CLI11/blob/master/examples/json.cpp) for a complete JSON config example. 
diff --git a/packages/CLI11/book/chapters/flags.md b/packages/CLI11/book/chapters/flags.md
new file mode 100644
index 0000000000000000000000000000000000000000..ef68b860a578332bc7400e91a6e571d78b769655
--- /dev/null
+++ b/packages/CLI11/book/chapters/flags.md
@@ -0,0 +1,100 @@
+# Adding Flags
+
+The most basic addition to a command line program is a flag. This is simply something that does not take any arguments. Adding a flag in CLI11 is done in one of three ways.
+
+## Boolean flags
+
+The simplest way to add a flag is probably a boolean flag:
+
+```cpp
+bool my_flag;
+app.add_flag("-f", my_flag, "Optional description");
+```
+
+This will bind the flag `-f` to the boolean `my_flag`. After the parsing step, `my_flag` will be `false` if the flag was not found on the command line, or `true` if it was. By default, it will be allowed any number of times, but if you explicitly[^1] request `->take_last(false)`, it will only be allowed once; passing something like `./my_app -f -f` or `./my_app -ff` will throw a `ParseError` with a nice help description.
+
+
+## Integer flags
+
+If you want to allow multiple flags, simply use any integer-like instead of a bool:
+
+```cpp
+int my_flag;
+app.add_flag("-f", my_flag, "Optional description");
+```
+
+After the parsing step, `my_flag` will contain the number of times this flag was found on the command line, including 0 if not found.
+
+## Pure flags
+
+Every command that starts with `add_`, such as the flag commands, return a pointer to the internally stored `CLI::Option` that describes your addition. If you prefer, you can capture this pointer and use it, and that allows you to skip adding a variable to bind to entirely:
+
+```cpp
+CLI::Option* my_flag = app.add_flag("-f", "Optional description");
+```
+
+After parsing, you can use `my_flag->count()` to count the number of times this was found. You can also directly use the value (`*my_flag`) as a bool. `CLI::Option` will be discussed in more detail later.
+
+## Callback flags
+
+If you want to define a callback that runs when you make a flag, you can use `add_flag_function` (C++11 or newer) or `add_flag` (C++14 or newer only) to add a callback function. The function should have the signature `void(size_t)`. This could be useful for a version printout, etc.
+
+```
+auto callback = [](int count){std::cout << "This was called " << count << " times";};
+app.add_flag_function("-c", callback, "Optional description");
+```
+
+
+## Aliases
+
+The name string, the first item of every `add_` method, can contain as many short and long names as you want, separated by commas. For example, `"-a,--alpha,-b,--beta"` would allow any of those to be recognized on the command line. If you use the same name twice, or if you use the same name in multiple flags, CLI11 will immediately throw a `CLI::ConstructionError` describing your problem (it will not wait until the parsing step).
+
+If you want to make an option case insensitive, you can use the `->ignore_case()` method on the `CLI::Option` to do that. For example,
+
+```cpp
+bool flag;
+app.add_flag("--flag", flag)
+    ->ignore_case();
+```
+
+would allow the following to count as passing the flag:
+
+```term
+gitbook $ ./my_app --fLaG
+```
+
+## Example
+
+The following program will take several flags:
+
+[include:"define"](../code/flags.cpp)
+
+The values would be used like this:
+
+[include:"usage"](../code/flags.cpp)
+
+[Source code](https://gitlab.com/CLIUtils/CLI11Tutorial/blob/master/code/flags.cpp) 
+
+If you compile and run:
+
+```term
+gitbook:examples $ g++ -std=c++11 flags.cpp
+gitbook:examples $ ./a.out -h
+Flag example program
+Usage: ./a.out [OPTIONS]
+
+Options:
+  -h,--help                   Print this help message and exit
+  -b,--bool                   This is a bool flag
+  -i,--int                    This is an int flag
+  -p,--plain                  This is a plain flag
+
+gitbook:examples $ ./a.out -bii --plain -i
+The flags program
+Bool flag passed
+Flag int: 3
+Flag plain: 1
+```
+
+
+[^1] It will not inherit this from the parent defaults, since this is often useful even if you don't want all options to allow multiple passed options.
diff --git a/packages/CLI11/book/chapters/formatting.md b/packages/CLI11/book/chapters/formatting.md
new file mode 100644
index 0000000000000000000000000000000000000000..8c854f6b11ec9161d8159f721a1a406aa5d7fb61
--- /dev/null
+++ b/packages/CLI11/book/chapters/formatting.md
@@ -0,0 +1,78 @@
+# Formatting help output
+
+{% hint style='info' %}
+New in CLI11 1.6
+{% endhint %}
+
+##  Customizing an existing formatter
+
+In CLI11, you can control the output of the help printout in full or in part. The default formatter was written in such a way as to be customizable. You can use `app.get_formatter()` to get the current formatter. The formatter you set will be inherited by subcommands that are created after you set the formatter.
+
+There are several configuration options that you can set:
+
+
+| Set method | Description | Availability |
+|------------|-------------|--------------|
+| `column_width(width)` | The width of the columns | Both |
+| `label(key, value)` | Set a label to a different value | Both |
+
+Labels will map the built in names and type names from key to value if present. For example, if you wanted to change the width of the columns to 40 and the `REQUIRED` label from `(REQUIRED)` to `(MUST HAVE)`:
+
+```cpp
+app.get_formatter()->column_width(40);
+app.get_formatter()->label("REQUIRED", "(MUST HAVE)");
+```
+
+## Subclassing
+
+You can further configure pieces of the code while still keeping most of the formatting intact by subclassing either formatter and replacing any of the methods with your own. The formatters use virtual functions most places, so you are free to add or change anything about them. For example, if you wanted to remove the info that shows up between the option name and the description:
+
+```cpp
+class MyFormatter : public CLI::Formatter {
+  public:
+    std::string make_opts(const CLI::Option *) const override {return "";}
+};
+app.formatter(std::make_shared<MyFormatter>());
+```
+
+Look at the class definitions in `FormatterFwd.hpp` or the method definitions in `Formatter.hpp` to see what methods you have access to and how they are put together.
+
+## Anatomy of a help message
+
+This is a normal printout, with `<>` indicating the methods used to produce each line.
+
+```
+<make_description(app)>
+<make_usage(app)>
+<make_positionals(app)>
+  <make_group(app, "Positionals", true, filter>
+<make_groups(app, mode)>
+  <make_group(app, "Option Group 1"), false, filter>
+  <make_group(app, "Option Group 2"), false, filter>
+  ...
+<make_subcommands(app)>
+  <make_subcommand(sub1, Mode::Normal)> 
+  <make_subcommand(sub2, Mode::Normal)>
+<make_footer(app)>
+```
+
+`make_usage` calls `make_option_usage(opt)` on all the positionals to build that part of the line. `make_subcommand` passes the subcommand as the app pointer.
+
+The `make_groups` print the group name then call `make_option(o)` on the options listed in that group. The normal printout for an option looks like this:
+
+```
+        make_option_opts(o) 
+            β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β”  
+ -n,--name  (REQUIRED)      This is a description 
+β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 
+make_option_name(o,p)        make_option_desc(o)
+```
+
+Notes:
+
+* `*1`: This signature depends on whether the call is from a positional or optional.
+* `o` is opt pointer, `p` is true if positional.
+
+
+
+
diff --git a/packages/CLI11/book/chapters/installation.md b/packages/CLI11/book/chapters/installation.md
new file mode 100644
index 0000000000000000000000000000000000000000..4efdfa1bb18b70c98ede2019d6a031f02079ffed
--- /dev/null
+++ b/packages/CLI11/book/chapters/installation.md
@@ -0,0 +1,91 @@
+# Installation 
+
+## Single file edition
+
+```cpp
+#include <CLI11.hpp>
+```
+
+This example uses the single file edition of CLI11. You can download `CLI11.hpp` from the latest release and put it into the same folder as your source code, then compile this with C++ enabled. For a larger project, you can just put this in an include folder and you are set.
+
+## Full edition
+
+```cpp
+#include <CLI/CLI.hpp>
+```
+
+If you want to use CLI11 in its full form, you can also use the original multiple file edition. This has an extra utility (`Timer`), and is does not require that you use a release. The only change to your code would be the include shown above.
+
+### CMake support for the full edition
+
+If you use CMake 3.4+ for your project (highly recommended), CLI11 comes with a powerful CMakeLists.txt file that was designed to also be used with `add_subproject`. You can add the repository to your code (preferably as a git submodule), then add the following line to your project (assuming your folder is called CLI11):
+
+```cmake
+add_subdirectory(CLI11)
+```
+
+Then, you will have a target `CLI11::CLI11` that you can link to with `target_link_libraries`. It will provide the include paths you need for the library. This is the way [GooFit](https://github.com/GooFit/GooFit) uses CLI11, for example.
+
+You can also configure and optionally install CLI11, and CMake will create the necessary `lib/cmake/CLI11/CLI11Config.cmake` files, so `find_package(CLI11 CONFIG REQUIRED)` also works.
+
+If you use conan.io, CLI11 supports that too.
+
+### Running tests on the full edition
+
+CLI11 has examples and tests that can be accessed using a CMake build on any platform. Simply build and run ctest to run the 200+ tests to ensure CLI11 works on your system.
+
+As an example of the build system, the following code will download and test CLI11 in a simple Alpine Linux docker container [^1]:
+
+```term
+gitbook:~ $ docker run -it alpine
+root:/ # apk add --no-cache g++ cmake make git
+fetch ...
+root:/ # git clone https://github.com/CLIUtils/CLI11.git
+Cloning into 'CLI11' ...
+root:/ # cd CLI11
+root:CLI11 # mkdir build
+root:CLI11 # cd build
+root:build # cmake ..
+-- The CXX compiler identification is GNU 6.3.0 ...
+root:build # make
+Scanning dependencies ...
+root:build # make test
+[warning]Running tests... 
+Test project /CLI11/build
+      Start  1: HelpersTest
+ 1/10 Test  #1: HelpersTest ......................   Passed    0.01 sec
+      Start  2: IniTest
+ 2/10 Test  #2: IniTest ..........................   Passed    0.01 sec
+      Start  3: SimpleTest
+ 3/10 Test  #3: SimpleTest .......................   Passed    0.01 sec
+      Start  4: AppTest
+ 4/10 Test  #4: AppTest ..........................   Passed    0.02 sec
+      Start  5: CreationTest
+ 5/10 Test  #5: CreationTest .....................   Passed    0.01 sec
+      Start  6: SubcommandTest
+ 6/10 Test  #6: SubcommandTest ...................   Passed    0.01 sec
+      Start  7: HelpTest
+ 7/10 Test  #7: HelpTest .........................   Passed    0.01 sec
+      Start  8: NewParseTest
+ 8/10 Test  #8: NewParseTest .....................   Passed    0.01 sec
+      Start  9: TimerTest
+ 9/10 Test  #9: TimerTest ........................   Passed    0.24 sec
+      Start 10: link_test_2
+10/10 Test #10: link_test_2 ......................   Passed    0.00 sec
+
+100% tests passed, 0 tests failed out of 10
+
+Total Test time (real) =   0.34 sec
+```
+
+For the curious, the CMake options and defaults are listed below. Most options default to off if CLI11 is used as a subdirectory in another project.
+
+| Option | Description |
+|--------|-------------|
+| `CLI11_SINGLE_FILE=ON` | Build the `CLI11.hpp` file from the sources. Requires Python (version 3 or 2.7). |
+| `CLI11_SINGLE_FILE_TESTS=OFF` | Run the tests on the generated single file version as well |
+| `CLI11_EXAMPLES=ON` | Build the example programs. |
+| `CLI11_TESTING=ON` | Build the tests. |
+| `CLANG_TIDY_FIX=OFF` | Run `clang-tidy` on the examples and headers and apply fixes. (Changes source code!) Requires LLVM and CMake 3.6+. |
+
+[^1]: Docker is being used to create a pristine disposable environment; there is nothing special about this container. Alpine is being used because it is small, modern, and fast. Commands are similar on any other platform.
diff --git a/packages/CLI11/book/chapters/internals.md b/packages/CLI11/book/chapters/internals.md
new file mode 100644
index 0000000000000000000000000000000000000000..17bc54aa34bebd52a14f09fca5afa306ec20554e
--- /dev/null
+++ b/packages/CLI11/book/chapters/internals.md
@@ -0,0 +1,45 @@
+# CLI11 Internals
+
+## Callbacks
+
+The library was designed to bind to existing variables without requiring typed classes or inheritance. This is accomplished through lambda functions.
+
+This looks like:
+
+```cpp
+Option* add_option(string name, T item) {
+    this->function = [&item](string value){
+        item = detail::lexical_cast<T>(value);
+    }
+}
+```
+
+Obviously, you can't access `T` after the `add_` method is over, so it stores the string representation of the default value if it receives the special `true` value as the final argument (not shown above).
+
+## Parsing
+
+Parsing follows the following procedure:
+
+1. `_validate`: Make sure the defined options are self consistent.
+2. `_parse`: Main parsing routine. See below.
+3. `_run_callback`: Run an App callback if present.
+
+The parsing phase is the most interesting:
+
+1. `_parse_single`: Run on each entry on the command line and fill the options/subcommands.
+2. `_process`: Run the procedure listed below.
+3. `_process_extra`: This throws an error if needed on extra arguments that didn't fit in the parse.
+
+The `_process` procedure runs the following steps; each step is recursive and completes all subcommands before moving to the next step (new in 1.7). This ensures that interactions between options and subcommand options is consistent.
+
+1. `_process_ini`: This reads an INI file and fills/changes options as needed.
+2. `_process_env`: Look for environment variables.
+3. `_process_callbacks`: Run the callback functions - this fills out the variables.
+4. `_process_help_flags`: Run help flags if present (and quit).
+5. `_process_requirements`: Make sure needs/excludes, required number of options present.
+
+## Exceptions
+
+The library immediately returns a C++ exception when it detects a problem, such as an incorrect construction or a malformed command line.
+
+
diff --git a/packages/CLI11/book/chapters/options.md b/packages/CLI11/book/chapters/options.md
new file mode 100644
index 0000000000000000000000000000000000000000..52483157c2558ee430a28a3f67e6c96dca76763d
--- /dev/null
+++ b/packages/CLI11/book/chapters/options.md
@@ -0,0 +1,183 @@
+# Options
+
+## Simple options
+The most versatile addition to a command line program is a option. This is like a flag, but it takes an argument. CLI11 handles all the details for many types of options for you, based on their type. To add an option:
+
+
+```cpp
+int int_option;
+app.add_option("-i", int_option, "Optional description");
+```
+
+This will bind the option `-i` to the integer `int_option`. On the command line, a single value that can be converted to an integer will be expected. Non-integer results will fail. If that option is not given, CLI11 will not touch the initial value. This allows you to set up defaults by simply setting your value beforehand. If you want CLI11 to display your default value, you can add the optional final argument `true` when you add the option. If you do not add this, you do not even need your option value to be printable[^1].
+
+```cpp
+int int_option = 0;
+app.add_option("-i", int_option, "Optional description", true);
+```
+
+You can use any C++ int-like type, not just `int`. CLI11 understands the following categories of types:
+
+| Type        | CLI11 |
+|-------------|-------|
+| int-like    | Integer conversion up to 64-bit, can be unsigned | 
+| float-like  | Floating point conversions |
+| string-like | Anything else that can be shifted into a StringStream |
+| vector-like | A vector of the above three types (see below) |
+| function | A function that takes an array of strings and returns a string that describes the conversion failure or empty for success. May be the empty function. (`{}`) |
+
+By default, CLI11 will assume that an option is optional, and one value is expected if you do not use a vector. You can change this on a specific option using option modifiers.
+
+## Positional options and aliases
+
+When you give an option on the command line without a name, that is a positional option. Positional options are accepted in the same order they are defined. So, for example:
+
+```term
+gitbook:examples $ ./a.out one --two three four
+```
+
+The string `one` would have to be the first positional option. If `--two` is a flag, then the remaining two strings are positional. If `--two` is a one-argument option, then `four` is the second positional. If `--two` accepts two or more arguments, then there are no more positionals.
+
+To make a positional option, you simply give CLI11 one name that does not start with a dash. You can have as many (non-overlapping) names as you want for an option, but only one positional name. So the following name string is valid:
+
+```cpp
+"-a,-b,--alpha,--beta,mypos"
+```
+
+This would make two short option aliases, two long option alias, and the option would be also be accepted as a positional.
+
+## Vectors of options
+
+If you use a vector instead of a plain option, you can accept more than one value on the command line. By default, a vector accepts as many options as possible, until the next value that could be a valid option name. You can specify a set number using an option modifier `->expected(N)`. (The default unlimited behavior on vectors is restore with `N=-1`) CLI11 does not differentiate between these two methods for unlimited acceptance options:[^2]
+
+| Separate names    | Combined names  |
+|-------------------|-----------------|
+| `--vec 1 --vec 2` | `--vec 1 2`     |
+
+The original version did allow the option system to access information on the grouping of options received, but was removed for simplicity. 
+
+An example of setting up a vector option:
+
+```cpp
+std::vector<int> int_vec;
+app.add_option("--vec", int_vec, "My vector option");
+```
+
+Vectors will be replaced by the parsed content if the option is given on the command line.
+
+
+## Option modifiers
+
+When you call `add_option`, you get a pointer to the added option. You can use that to add option modifiers. A full listing of the option modifiers:
+
+| Modifier | Description |
+|----------|-------------|
+| `->required()`| The program will quit if this option is not present. This is `mandatory` in Plumbum, but required options seems to be a more standard term. For compatibility, `->mandatory()` also works. |
+| `->expected(N)`| Take `N` values instead of as many as possible, only for vector args.|
+| `->needs(opt)`| This option requires another option to also be present, opt is an `Option` pointer.|
+| `->excludes(opt)`| This option cannot be given with `opt` present, opt is an `Option` pointer.|
+| `->envname(name)`| Gets the value from the environment if present and not passed on the command line.|
+| `->group(name)`| The help group to put the option in. No effect for positional options. Defaults to `"Options"`. `"Hidden"` will not show up in the help print.|
+| `->ignore_case()`| Ignore the case on the command line (also works on subcommands, does not affect arguments).|
+| `->ignore_underscore()`| Ignore any underscores on the command line (also works on subcommands, does not affect arguments, new in CLI11 1.7).|
+| `->multi_option_policy(CLI::MultiOptionPolicy::Throw)` | Sets the policy if 1 argument expected but this was received on the command line several times. `Throw`ing an error is the default, but `TakeLast`, `TakeFirst`, and `Join` are also available. See the next three lines for shortcuts to set this more easily. |
+| `->take_last()` | Only use the last option if passed several times. This is always true by default for bool options, regardless of the app default, but can be set to false explicitly with `->multi_option_policy()`.|
+| `->take_first()` | sets `->multi_option_policy(CLI::MultiOptionPolicy::TakeFirst)` |
+| `->join()` | sets `->multi_option_policy(CLI::MultiOptionPolicy::Join)`, which uses newlines to join all arguments into a single string output. |
+| `->check(CLI::ExistingFile)`| Requires that the file exists if given.|
+| `->check(CLI::ExistingDirectory)`| Requires that the directory exists.|
+| `->check(CLI::NonexistentPath)`| Requires that the path does not exist.|
+| `->check(CLI::Range(min,max))`| Requires that the option be between min and max (make sure to use floating point if needed). Min defaults to 0.|
+| `->each(void(std::string))` | Run a function on each parsed value, *in order*.|
+
+The `->check(...)` modifiers adds a callback function of the form `bool function(std::string)` that runs on every value that the option receives, and returns a value that tells CLI11 whether the check passed or failed.
+
+## Using the `CLI::Option` pointer
+
+Each of the option creation mechanisms returns a pointer to the internally stored option. If you save that pointer, you can continue to access the option, and change setting on it later. The Option object can also be converted to a bool to see if it was passed, or `->count()` can be used to see how many times the option was passed. Since flags are also options, the same methods work on them.
+
+```cpp
+CLI::Option* opt = app.add_flag("--opt");
+
+CLI11_PARSE(app, argv, argc);
+
+if(*opt)
+    std::cout << "Flag recieved " << opt->count() << " times." << std::endl;
+```
+
+## Inheritance of defaults
+
+One of CLI11's systems to allow customizability without high levels of verbosity is the inheritance system. You can set default values on the parent `App`, and all options and subcommands created from it remember the default values at the point of creation. The default value for Options, specifically, are accessible through the `option_defaults()` method. There are four settings that can be set and inherited:
+
+* `group`: The group name starts as "Options"
+* `required`: If the option must be given. Defaults to `false`. Is ignored for flags.
+* `multi_option_policy`: What to do if several copies of an option are passed and one value is expected. Defaults to `CLI::MultiOptionPolicy::Throw`. This is also used for bool flags, but they always are created with the value `CLI::MultiOptionPolicy::TakeLast` regardless of the default, so that multiple bool flags does not cause an error. But you can override that flag by flag.
+* `ignore_case`: Allow any mixture of cases for the option or flag name
+
+An example of usage:
+
+```
+app.option_defauts()->ignore_case()->group("Required");
+
+app.add_flag("--CaSeLeSs");
+app.get_group() // is "Required"
+```
+
+Groups are mostly for visual organisation, but an empty string for a group name will hide the option.
+
+
+## Listing of specialty options:
+
+Besides `add_option` and `add_flag`, there are several special ways to create options for sets and complex numbers.
+
+### Sets
+
+You can add a set with `add_set`, where you give a variable to set and a `std::set` of choices to pick from. There also is a `add_set_ignore_case` version which ignores case when set matching. If you use an existing set instead of an inline one, you can edit the set after adding it and changes will be reflected in the set checking and help message.
+
+```cpp
+int val;
+app.add_set("--even", val, {0,2,4,6,8});
+```
+
+### Complex numbers
+
+You can also add a complex number. This type just needs to support a `(T x, T y)` constructor and be printable. You can also pass one extra argument that will set the label of the type; by default it is "COMPLEX".
+
+```cpp
+std::complex<float> val;
+app.add_complex("--cplx", val);
+```
+
+### Optionals (New in CLI11 1.5)
+
+If you have a compiler with `__has_include`, you can use `std::optional`, `std::experimental::optional`, and `boost::optional` in `add_option`. You can manually enforce support for one of these by defining the corresponding macro before including CLI11 (or in your build system). For example:
+
+```cpp
+#define CLI11_BOOST_OPTIONAL
+#include <CLI/CLI.hpp>
+
+...
+
+boost::optional<int> x;
+app.add_option("-x", x);
+
+CLI11_PARSE(app, argc, argv);
+
+if(x)
+    std::cout << *x << std::endl;
+```
+
+### Windows style options (New in CLI11 1.7)
+
+You can also set the app setting `app->allow_windows_style_options()` to allow windows style options to also be recognized on the command line:
+
+* `/a` (flag)
+* `/f filename` (option)
+* `/long` (long flag)
+* `/file filename` (space)
+* `/file:filename` (colon)
+
+Windows style options do not allow combining short options or values not separated from the short option like with `-` options. You still specify option names in the same manor as on Linux with single and double dashes when you use the `add_*` functions, and the Linux style on the command line will still work. If a long and a short option share the same name, the option will match on the first one defined.
+
+[^1]: For example, enums are not printable to `std::cout`.
+[^2]: There is a small difference. An combined unlimited option will not prioritize over a positional that could still accept values.
diff --git a/packages/CLI11/book/chapters/subcommands.md b/packages/CLI11/book/chapters/subcommands.md
new file mode 100644
index 0000000000000000000000000000000000000000..ea85bed0650c2a8ca9e794312686b90ef5d5715a
--- /dev/null
+++ b/packages/CLI11/book/chapters/subcommands.md
@@ -0,0 +1,114 @@
+# Subcommands and the App
+
+Subcommands are keyword that invoke a new set of options and features. For example, the `git`
+command has a long series of subcommands, like `add` and `commit`. Each can have its own options
+and implementations. This chapter will focus on implementations that are contained in the same
+C++ application, though the system git uses to extend the main command by calling other commands
+in separate executables is supported too; that's called "Prefix commands" and is included at the
+end of this chapter.
+
+
+## The parent App
+
+We'll start by discussing the parent `App`. You've already used it quite a bit, to create
+options and set option defaults. There are several other things you can do with an `App`, however.
+
+You are given a lot of control the help output. You can set a footer with `app.footer("My Footer")`.
+You can replace the default help print when a `ParseError` is thrown with `app.set_failure_message(CLI::FailureMessage::help)`.
+The default is `CLI:::FailureMessage::simple`, and you can easily define a new one. Just make a (lambda) function that takes an App pointer
+and a reference to an error code (even if you don't use them), and returns a string.
+
+
+## Adding a subcommand
+
+Subcommands can be added just like an option:
+
+```cpp
+CLI::App* sub = app.add_subcommand("sub", "This is a subcommand");
+```
+
+The subcommand should have a name as the first argument, and a little description for the
+second argument. A pointer to the internally stored subcommand is provided; you usually will
+be capturing that pointer and using it later (though you can use callbacks if you prefer). As
+always, feel free to use `auto sub = ...` instead of naming the type.
+
+You can check to see if the subcommand was received on the command line several ways:
+
+```cpp
+if(*sub) ...
+if(sub->parsed()) ...
+if(app.got_subcommand(sub)) ...
+if(app.got_subcommand("sub")) ...
+```
+
+You can also get a list of subcommands with `get_subcommands()`, and they will be in parsing order.
+
+There are a lot of options that you can set on a subcommand; in fact,
+subcommands have exactly the same options as your main app, since they are actually
+the same class of object (as you may have guessed from the type above). This has the
+pleasant side affect of making subcommands infinitely nestable.
+
+## Required subcommands
+
+Each App has controls to set the number of subcommands you expect. This is controlled by:
+
+```cpp
+app.require_subcommand(/* min */ 0, /* max */ 1);
+```
+If you set the max to 0, CLI11 will allow an unlimited number of subcommands. After the (non-unlimited) maximum
+is reached, CLI11 will stop trying to match subcommands. So the if you pass "`one two`" to a command, and both `one`
+and `two` are subcommands, it will depend on the maximum number as to whether the "`two`" is a subcommand or an argument to the
+"`one`" subcommand.
+
+As a shortcut, you can also call the `require_subcommand` method with one argument; that will be the fixed number of subcommands if positive, it
+will be the maximum number if negative. Calling it without an argument will set the required subcommands to 1 or more.
+
+The maximum number of subcommands is inherited by subcommands. This allows you to set the maximum to 1 once at the beginning on the parent app if you only want single subcommands throughout your app. You should keep this in mind, if you are dealing with lots of nested subcommands.
+
+## Using callbacks
+
+You've already seen how to check to see what subcommands were given. It's often much easier, however, to just define the code you want to run when you are making your parser, and not run a bunch of code after `CLI11_PARSE` to analyse the state (Procedural! Yuck!). You can do that with lambda functions. A `std::function<void()>` callback `.callback()` is provided, and CLI11 ensures that all options are prepared and usable by reference capture before entering the callback. An
+example is shown below in the `geet` program.
+
+## Inheritance of defaults
+
+The following values are inherited when you add a new subcommand. This happens at the point the subcommand is created:
+
+* The name and description for the help flag
+* The footer
+* The failure message printer function
+* Option defaults
+* Allow extras
+* Prefix command
+* Ignore case
+* Ignore underscore
+* Allow Windows style options
+* Fallthrough
+* Group name
+* Max required subcommands
+
+## Special modes
+
+There are several special modes for Apps and Subcommands.
+
+### Allow extras
+
+Normally CLI11 throws an error if you don't match all items given on the command line. However, you can enable `allow_extras()`
+to instead store the extra values in `.remaining()`. You can get all remaining options including those in contained subcommands recursively in the original order with `.remaining(true)`.
+`.remaining_size()` is also provided; this counts the size but ignores the `--` special separator if present.
+
+### Fallthrough
+
+Fallthrough allows an option that does not match in a subcommand to "fall through" to the parent command; if that parent
+allows that option, it matches there instead. This was added to allow CLI11 to represent models:
+
+```term
+gitbook:code $ ./my_program my_model_1 --model_flag --shared_flag
+```
+
+Here, `--shared_option` was set on the main app, and on the command line it "falls through" `my_model_1` to match on the main app.
+
+### Prefix command
+
+This is a special mode that allows "prefix" commands, where the parsing completely stops when it gets to an unknown option. Further unknown options are ignored, even if they could match. Git is the traditional example for prefix commands; if you run git with an unknown subcommand, like "`git thing`", it then calls another command called "`git-thing`" with the remaining options intact.
+
diff --git a/packages/CLI11/book/chapters/toolkits.md b/packages/CLI11/book/chapters/toolkits.md
new file mode 100644
index 0000000000000000000000000000000000000000..c03de23285e207809f55f96f1effbed6eb806422
--- /dev/null
+++ b/packages/CLI11/book/chapters/toolkits.md
@@ -0,0 +1,30 @@
+# Using CLI11 in a Toolkit
+
+CLI11 was designed to be integrate into a toolkit, providing a native experience for users. This was used in GooFit to provide `GooFit::Application`, an class designed to make ROOT users feel at home.
+
+# Custom namespace
+
+If you want to provide CLI11 in a custom namespace, you'll want to at least put `using CLI::App` in your namespace. You can also include Option, some errors, and validators. You can also put `using namespace CLI` inside your namespace to import everything.
+
+You may also want to make your own copy of the `CLI11_PARSE` macro. Something like:
+
+```cpp
+ #define MYPACKAGE_PARSE(app, argv, argc)    \
+     try {                                   \
+         app.parse(argv, argc);              \
+     } catch(const CLI::ParseError &e) {     \
+         return app.exit(e);                 \
+     }
+```
+
+
+# Subclassing App
+
+If you subclass `App`, you'll just need to do a few things. You'll need a constructor; calling the base `App` constructor is a good idea, but not necessary (it just sets a description and adds a help flag.
+
+You can call anything you would like to configure in the constructor, like `option_defaults()->take_last()` or `fallthrough()`, and it will be set on all user instances. You can add flags and options, as well.
+
+
+# Virtual functions provided
+
+You are given a few virtual functions that you can change (only on the main App). `pre_callback` runs right before the callbacks run, letting you print out custom messages at the top of your app. 
diff --git a/packages/CLI11/book/chapters/validators.md b/packages/CLI11/book/chapters/validators.md
new file mode 100644
index 0000000000000000000000000000000000000000..4d5ebf0fc53c633b49ed54090644de3919efc67c
--- /dev/null
+++ b/packages/CLI11/book/chapters/validators.md
@@ -0,0 +1,56 @@
+# Validators
+
+{% hint style='info' %}
+Improved in CLI11 1.6
+{% endhint %}
+
+There are two forms of validators:
+
+* `transform` validators: mutating
+* `check` validators: non-mutating (recommended unless the parsed string must be mutated)
+
+A transform validator comes in one form, a function with the signature `std::string(std::string)`.
+The function will take a string and return the modified version of the string. If there is an error,
+the function should throw a `CLI::ValidationError` with the appropriate reason as a message.
+
+However, `check` validators come in two forms; either a simple function with the const version of the
+above signature, `std::string(const std::string &)`, or a subclass of `struct CLI::Validator`. This
+structure has two members that a user should set; one (`func`) is the function to add to the Option
+(exactly matching the above function signature, since it will become that function), and the other is
+`tname`, and is the type name to set on the Option (unless empty, in which case the typename will be
+left unchanged).
+
+Validators can be combined with `&` and `|`, and they have an `operator()` so that you can call them
+as if they were a function. In CLI11, const static versions of the validators are provided so that
+the user does not have to call a constructor also.
+
+An example of a custom validator:
+
+```cpp
+struct LowerCaseValidator : public Validator {
+    LowerCaseValidator() {
+        tname = "LOWER";
+        func = [](const std::string &str) {
+            if(CLI::detail::to_lower(str) != str)
+                return std::string("String is not lower case");
+            else
+                return std::string();
+        };
+    }
+};
+const static LowerCaseValidator Lowercase;
+```
+
+If you were not interested in the extra features of Validator, you could simply pass the lambda function above to the `->check()` method of `Option`.
+
+The built-in validators for CLI11 are:
+
+| Validator           | Description |
+|---------------------|-------------|
+| `ExistingFile`      | Check for existing file (returns error message if check fails) |
+| `ExistingDirectory` | Check for an existing directory (returns error message if check fails) |
+| `ExistingPath`      | Check for an existing path |
+| `NonexistentPath`   | Check for an non-existing path |
+| `Range(min=0, max)` |  Produce a range (factory). Min and max are inclusive. |
+
+
diff --git a/packages/CLI11/book/code/CMakeLists.txt b/packages/CLI11/book/code/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b91a9c7bbfc95a8515868b75bc9fe22e72027efe
--- /dev/null
+++ b/packages/CLI11/book/code/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 3.11)
+
+project(CLI11_Examples LANGUAGES CXX)
+
+# Using CMake 3.11's ability to set imported interface targets
+add_library(CLI11::CLI11 IMPORTED INTERFACE)
+target_include_directories(CLI11::CLI11 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/../../include")
+target_compile_features(CLI11::CLI11 INTERFACE cxx_std_11)
+
+# Add CTest
+enable_testing()
+
+# Quick function to add the base executable
+function(add_cli_exe NAME)
+    add_executable(${NAME} ${NAME}.cpp)
+    target_link_libraries(${NAME} CLI11::CLI11)
+endfunction()
+
+
+add_cli_exe(simplest)
+add_test(NAME simplest COMMAND simplest)
+
+
+add_cli_exe(intro)
+add_test(NAME intro COMMAND intro)
+add_test(NAME intro_p COMMAND intro -p 5)
+
+
+add_cli_exe(flags)
+add_test(NAME flags COMMAND flags)
+add_test(NAME flags_bip COMMAND flags -b -i -p)
+
+
+add_cli_exe(geet)
+add_test(NAME geet_add    COMMAND geet add)
+add_test(NAME geet_commit COMMAND geet commit -m "Test")
+
+
diff --git a/packages/CLI11/book/code/flags.cpp b/packages/CLI11/book/code/flags.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..54ac71aeaf7f274d46623cc92fe7f5a5e31583eb
--- /dev/null
+++ b/packages/CLI11/book/code/flags.cpp
@@ -0,0 +1,36 @@
+#include "CLI/CLI.hpp"
+#include <iostream>
+
+int main(int argc, char **argv) {
+    using std::cout;
+    using std::endl;
+    CLI::App app{"Flag example program"};
+
+    /// [define]
+    bool flag_bool;
+    app.add_flag("--bool,-b", flag_bool, "This is a bool flag");
+
+    int flag_int;
+    app.add_flag("-i,--int", flag_int, "This is an int flag");
+
+    CLI::Option *flag_plain = app.add_flag("--plain,-p", "This is a plain flag");
+    /// [define]
+
+    /// [parser]
+    try {
+        app.parse(argc, argv);
+    } catch(const CLI::ParseError &e) {
+        return app.exit(e);
+    }
+    /// [parser]
+
+    /// [usage]
+    cout << "The flags program" << endl;
+    if(flag_bool)
+        cout << "Bool flag passed" << endl;
+    if(flag_int > 0)
+        cout << "Flag int: " << flag_int << endl;
+    if(*flag_plain)
+        cout << "Flag plain: " << flag_plain->count() << endl;
+    /// [usage]
+}
diff --git a/packages/CLI11/book/code/geet.cpp b/packages/CLI11/book/code/geet.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a4caf26d1714818f13d671b0ee2acfe3e68375e4
--- /dev/null
+++ b/packages/CLI11/book/code/geet.cpp
@@ -0,0 +1,50 @@
+#include "CLI/CLI.hpp"
+
+#include <iostream>
+
+int main(int argc, char **argv) {
+
+    /// [Intro]
+    CLI::App app{"Geet, a command line git lookalike that does nothing"};
+    app.require_subcommand(1);
+    /// [Intro]
+
+    /// [Add]
+    auto add = app.add_subcommand("add", "Add file(s)");
+
+    bool add_update;
+    add->add_flag("-u,--update", add_update, "Add updated files only");
+
+    std::vector<std::string> add_files;
+    add->add_option("files", add_files, "Files to add");
+
+    add->callback([&]() {
+        std::cout << "Adding:";
+        if(add_files.empty()) {
+            if(add_update)
+                std::cout << " all updated files";
+            else
+                std::cout << " all files";
+        } else {
+            for(auto file : add_files)
+                std::cout << " " << file;
+        }
+    });
+    /// [Add]
+
+    /// [Commit]
+    auto commit = app.add_subcommand("commit", "Commit files");
+
+    std::string commit_message;
+    commit->add_option("-m,--message", commit_message, "A message")->required();
+
+    commit->callback([&]() { std::cout << "Commit message: " << commit_message; });
+    /// [Commit]
+
+    /// [Parse]
+    CLI11_PARSE(app, argc, argv);
+
+    std::cout << "\nThanks for using geet!\n" << std::endl;
+    return 0;
+    /// [Parse]
+}
diff --git a/packages/CLI11/book/code/intro.cpp b/packages/CLI11/book/code/intro.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2db50f1acba9a45dcad7636354c1346b6814f6ae
--- /dev/null
+++ b/packages/CLI11/book/code/intro.cpp
@@ -0,0 +1,15 @@
+#include "CLI/CLI.hpp"
+#include <iostream>
+
+int main(int argc, char **argv) {
+    CLI::App app{"App description"};
+
+    // Define options
+    int p = 0;
+    app.add_option("-p", p, "Parameter");
+
+    CLI11_PARSE(app, argc, argv);
+
+    std::cout << "Parameter value: " << p << std::endl;
+    return 0;
+}
diff --git a/packages/CLI11/book/code/simplest.cpp b/packages/CLI11/book/code/simplest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a848ff31959e9e6a4743ccc852447521f6051b55
--- /dev/null
+++ b/packages/CLI11/book/code/simplest.cpp
@@ -0,0 +1,11 @@
+#include "CLI/CLI.hpp"
+
+int main(int argc, char **argv) {
+    CLI::App app;
+
+    // Add new options/flags here
+
+    CLI11_PARSE(app, argc, argv);
+
+    return 0;
+}
diff --git a/packages/CLI11/cmake/AddGoogletest.cmake b/packages/CLI11/cmake/AddGoogletest.cmake
index 12eb621dfd23b41b5e1ad883b58292829158cbb0..cd7031a57c0d565daa5ff2bc357ee715dc37cb81 100644
--- a/packages/CLI11/cmake/AddGoogletest.cmake
+++ b/packages/CLI11/cmake/AddGoogletest.cmake
@@ -1,16 +1,12 @@
-# 
 #
-# Downloads GTest and provides a helper macro to add tests. Add make check, as well, which
+#
+# Includes GTest and provides a helper macro to add tests. Add make check, as well, which
 # gives output on failed tests without having to set an environment variable.
 #
 #
 set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
 set(BUILD_SHARED_LIBS OFF)
-# older version of google tests doesn't support MSYS so needs this flag to compile
-if (MSYS)
-	set(gtest_disable_pthreads ON CACHE BOOL "" FORCE)
-endif()
-set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE BOOL "")
+
 add_subdirectory("${CLI11_SOURCE_DIR}/extern/googletest" "${CLI11_BINARY_DIR}/extern/googletest" EXCLUDE_FROM_ALL)
 
 
@@ -25,7 +21,7 @@ endif()
 # Target must already exist
 macro(add_gtest TESTNAME)
     target_link_libraries(${TESTNAME} PUBLIC gtest gmock gtest_main)
-    
+
     if(GOOGLE_TEST_INDIVIDUAL)
         if(CMAKE_VERSION VERSION_LESS 3.10)
             gtest_add_tests(TARGET ${TESTNAME}
@@ -36,7 +32,7 @@ macro(add_gtest TESTNAME)
             gtest_discover_tests(${TESTNAME}
                 TEST_PREFIX "${TESTNAME}."
                 PROPERTIES FOLDER "Tests")
-            
+
         endif()
     else()
         add_test(${TESTNAME} ${TESTNAME})
@@ -45,25 +41,5 @@ macro(add_gtest TESTNAME)
 
 endmacro()
 
-mark_as_advanced(
-gmock_build_tests
-gtest_build_samples
-gtest_build_tests
-gtest_disable_pthreads
-gtest_force_shared_crt
-gtest_hide_internal_symbols
-BUILD_GMOCK
-BUILD_GTEST
-)
-
 set_target_properties(gtest gtest_main gmock gmock_main
     PROPERTIES FOLDER "Extern")
-
-if(MSVC)
-    if (MSVC_VERSION GREATER_EQUAL 1900)
-        target_compile_definitions(gtest PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
-        target_compile_definitions(gtest_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
-        target_compile_definitions(gmock PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
-        target_compile_definitions(gmock_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
-    endif()
-endif()
diff --git a/packages/CLI11/docs/CMakeLists.txt b/packages/CLI11/docs/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f98ff35b684697c065c18bd0b56ed64fbab462ec
--- /dev/null
+++ b/packages/CLI11/docs/CMakeLists.txt
@@ -0,0 +1,18 @@
+set(DOXYGEN_EXTRACT_ALL YES)
+set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
+set(PROJECT_BRIEF "C++11 Command Line Interface Parser")
+
+file(GLOB DOC_LIST
+    RELATIVE "${PROJECT_SOURCE_DIR}/include"
+    "${PROJECT_SOURCE_DIR}/include/CLI/*.hpp"
+    )
+
+doxygen_add_docs(docs
+    ${DOC_LIST}
+    "${CMAKE_CURRENT_SOURCE_DIR}/mainpage.md"
+    WORKING_DIRECTORY
+    "${PROJECT_SOURCE_DIR}/include"
+)
+
+
+
diff --git a/packages/CLI11/docs/Doxyfile b/packages/CLI11/docs/Doxyfile
index 5363a26e1f607228ee15e48dcf8e7f87a8d4aada..06de30493b7692cb9d11071af740a3d0f167dd41 100644
--- a/packages/CLI11/docs/Doxyfile
+++ b/packages/CLI11/docs/Doxyfile
@@ -1,5 +1,7 @@
 # Doxyfile 1.8.13
 
+# Designed to be run from the main directory with `doxygen docs/Doxygen`
+
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project.
 #
@@ -790,7 +792,7 @@ WARN_LOGFILE           =
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = ../include mainpage.md
+INPUT                  = include docs/mainpage.md
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -982,7 +984,7 @@ FILTER_SOURCE_PATTERNS =
 # (index.html). This can be useful if you have a project on for instance GitHub
 # and want to reuse the introduction page also for the doxygen output.
 
-USE_MDFILE_AS_MAINPAGE = mainpage.md
+USE_MDFILE_AS_MAINPAGE = docs/mainpage.md
 
 #---------------------------------------------------------------------------
 # Configuration options related to source browsing
diff --git a/packages/CLI11/docs/mainpage.md b/packages/CLI11/docs/mainpage.md
index 2c488eb9c0db75b72a44bd51a9d272427f169b53..b9e2d33f831c9d3754d5a0d6d5ba079a3d0fbdcb 100644
--- a/packages/CLI11/docs/mainpage.md
+++ b/packages/CLI11/docs/mainpage.md
@@ -1,6 +1,6 @@
-# Introduction
+# Introduction {#mainpage}
 
-This is the Doxygen API documentation for CLI11 parser. There is a friendly introduction to CLI11 on the [Github page](https://github.com/CLIUtils/CLI11).
+This is the Doxygen API documentation for CLI11 parser. There is a friendly introduction to CLI11 on the [Github page](https://github.com/CLIUtils/CLI11), and [a tutorial series](https://cliutils.github.io/CLI11/book/).
 
 The main classes are:
 
diff --git a/packages/CLI11/examples/CMakeLists.txt b/packages/CLI11/examples/CMakeLists.txt
index c1731f67d0d7f07290c26cf3d38af93d716ee112..07ed55a4a6cb5e3ebbd369dcb71e0711f8d10dad 100644
--- a/packages/CLI11/examples/CMakeLists.txt
+++ b/packages/CLI11/examples/CMakeLists.txt
@@ -19,8 +19,8 @@ if(CLI11_EXAMPLE_JSON)
     if(NOT EXISTS "${CLI11_SOURCE_DIR}/extern/json/single_include/nlohmann/json.hpp")
         message(ERROR "You are missing the json package for CLI11_EXAMPLE_JSON. Please update your submodules (git submodule update --init)")
     endif()
-    if(CMAKE_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
-        message(WARNING "The json example requires GCC 4.9+ (requirement on json library)")
+    if(CMAKE_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+        message(WARNING "The json example requires GCC 4.8+ (requirement on json library)")
     endif()
     add_cli_exe(json json.cpp)
     target_include_directories(json PUBLIC SYSTEM "${CLI11_SOURCE_DIR}/extern/json/single_include")
@@ -69,7 +69,7 @@ set_property(TEST subcom_partitioned_none PROPERTY PASS_REGULAR_EXPRESSION
     "This is a timer:"
     "--file is required"
     "Run with --help for more information.")
-	
+
 add_test(NAME subcom_partitioned_all COMMAND subcom_partitioned --file this --count --count -d 1.2)
 set_property(TEST subcom_partitioned_all PROPERTY PASS_REGULAR_EXPRESSION
     "This is a timer:"
@@ -93,7 +93,7 @@ set_property(TEST option_groups_extra PROPERTY PASS_REGULAR_EXPRESSION
 add_test(NAME option_groups_extra2 COMMAND option_groups --csv --address "192.168.1.1" -o "test.out")
 set_property(TEST option_groups_extra2 PROPERTY PASS_REGULAR_EXPRESSION
     "at most 1")
-	
+
 add_cli_exe(positional_arity positional_arity.cpp)
 add_test(NAME positional_arity1 COMMAND positional_arity one )
 set_property(TEST positional_arity1 PROPERTY PASS_REGULAR_EXPRESSION
@@ -132,7 +132,7 @@ set_property(TEST shapes_all PROPERTY PASS_REGULAR_EXPRESSION
     "circle4"
     "rectangle2 with edges [2.1,2.1]"
     "triangel1 with sides [4.5]")
-	
+
 add_cli_exe(ranges ranges.cpp)
 add_test(NAME ranges_range COMMAND ranges --range 1 2 3)
 set_property(TEST ranges_range PROPERTY PASS_REGULAR_EXPRESSION
@@ -189,6 +189,14 @@ set_property(TEST prefix_command PROPERTY PASS_REGULAR_EXPRESSION
     "Prefix: 3 : 2 : 1"
     "Remaining commands: other one two 3")
 
+add_cli_exe(callback_passthrough callback_passthrough.cpp)
+add_test(NAME callback_passthrough1 COMMAND callback_passthrough --argname t2 --t2 test)
+set_property(TEST callback_passthrough1 PROPERTY PASS_REGULAR_EXPRESSION
+    "the value is now test")
+add_test(NAME callback_passthrough2 COMMAND callback_passthrough --arg EEEK --argname arg)
+set_property(TEST callback_passthrough2 PROPERTY PASS_REGULAR_EXPRESSION
+    "the value is now EEEK")
+
 add_cli_exe(enum enum.cpp)
 add_test(NAME enum_pass COMMAND enum -l 1)
 add_test(NAME enum_fail COMMAND enum -l 4)
diff --git a/packages/CLI11/examples/callback_passthrough.cpp b/packages/CLI11/examples/callback_passthrough.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8d0203b1f16fe0cbd4624c2cf6fbdb822ef89d4d
--- /dev/null
+++ b/packages/CLI11/examples/callback_passthrough.cpp
@@ -0,0 +1,20 @@
+#include "CLI/CLI.hpp"
+
+int main(int argc, char **argv) {
+
+    CLI::App app("callback_passthrough");
+    app.allow_extras();
+    std::string argName;
+    std::string val;
+    app.add_option("--argname", argName, "the name of the custom command line argument");
+    app.callback([&app, &val, &argName]() {
+        if(!argName.empty()) {
+            CLI::App subApp;
+            subApp.add_option("--" + argName, val, "custom argument option");
+            subApp.parse(app.remaining_for_passthrough());
+        }
+    });
+
+    CLI11_PARSE(app, argc, argv);
+    std::cout << "the value is now " << val << '\n';
+}
diff --git a/packages/CLI11/examples/json.cpp b/packages/CLI11/examples/json.cpp
index bce5ecdabfa22d5695c583997dda4144a3cb1aaf..b4c8101ae528659152c10bd9d77ab546c49b3457 100644
--- a/packages/CLI11/examples/json.cpp
+++ b/packages/CLI11/examples/json.cpp
@@ -28,8 +28,8 @@ class ConfigJSON : public CLI::Config {
                         j[name] = opt->results();
 
                     // If the option has a default and is requested by optional argument
-                    else if(default_also && !opt->get_defaultval().empty())
-                        j[name] = opt->get_defaultval();
+                    else if(default_also && !opt->get_default_str().empty())
+                        j[name] = opt->get_default_str();
 
                     // Flag, one passed
                 } else if(opt->count() == 1) {
diff --git a/packages/CLI11/extern/googletest b/packages/CLI11/extern/googletest
index ec44c6c1675c25b9827aacd08c02433cccde7780..2fe3bd994b3189899d93f1d5a881e725e046fdc2 160000
--- a/packages/CLI11/extern/googletest
+++ b/packages/CLI11/extern/googletest
@@ -1 +1 @@
-Subproject commit ec44c6c1675c25b9827aacd08c02433cccde7780
+Subproject commit 2fe3bd994b3189899d93f1d5a881e725e046fdc2
diff --git a/packages/CLI11/extern/json b/packages/CLI11/extern/json
index db53bdac1926d1baebcb459b685dcd2e4608c355..1126c9ca74fdea22d2ce3a065ac0fcb5792cbdaf 160000
--- a/packages/CLI11/extern/json
+++ b/packages/CLI11/extern/json
@@ -1 +1 @@
-Subproject commit db53bdac1926d1baebcb459b685dcd2e4608c355
+Subproject commit 1126c9ca74fdea22d2ce3a065ac0fcb5792cbdaf
diff --git a/packages/CLI11/extern/sanitizers b/packages/CLI11/extern/sanitizers
index 6947cff3a9c9305eb9c16135dd81da3feb4bf87f..99e159ec9bc8dd362b08d18436bd40ff0648417b 160000
--- a/packages/CLI11/extern/sanitizers
+++ b/packages/CLI11/extern/sanitizers
@@ -1 +1 @@
-Subproject commit 6947cff3a9c9305eb9c16135dd81da3feb4bf87f
+Subproject commit 99e159ec9bc8dd362b08d18436bd40ff0648417b
diff --git a/packages/CLI11/include/CLI/App.hpp b/packages/CLI11/include/CLI/App.hpp
index 8443711d804c54c2fcb4c3d03819880ea684dece..3364d00d508bdaa3a6a0a353ddc4aba94691087a 100644
--- a/packages/CLI11/include/CLI/App.hpp
+++ b/packages/CLI11/include/CLI/App.hpp
@@ -4,13 +4,11 @@
 // file LICENSE or https://github.com/CLIUtils/CLI11 for details.
 
 #include <algorithm>
-#include <deque>
 #include <functional>
 #include <iostream>
 #include <iterator>
 #include <memory>
 #include <numeric>
-#include <set>
 #include <sstream>
 #include <string>
 #include <utility>
@@ -100,8 +98,10 @@ class App {
     /// This is a function that runs prior to the start of parsing
     std::function<void(size_t)> pre_parse_callback_;
 
-    /// This is a function that runs when complete. Great for subcommands. Can throw.
-    std::function<void()> callback_;
+    /// This is a function that runs when parsing has finished.
+    std::function<void()> parse_complete_callback_;
+    /// This is a function that runs when all processing has completed
+    std::function<void()> final_callback_;
 
     ///@}
     /// @name Options
@@ -120,6 +120,9 @@ class App {
     /// Footer to put after all options in the help output INHERITABLE
     std::string footer_;
 
+    /// This is a function that generates a footer to put after all other options in help output
+    std::function<std::string()> footer_callback_;
+
     /// A pointer to the help flag if there is one INHERITABLE
     Option *help_ptr_{nullptr};
 
@@ -274,14 +277,32 @@ class App {
     /// virtual destructor
     virtual ~App() = default;
 
-    /// Set a callback for the end of parsing.
+    /// Set a callback for execution when all parsing and processing has completed
     ///
     /// Due to a bug in c++11,
     /// it is not possible to overload on std::function (fixed in c++14
     /// and backported to c++11 on newer compilers). Use capture by reference
     /// to get a pointer to App if needed.
     App *callback(std::function<void()> app_callback) {
-        callback_ = std::move(app_callback);
+        if(immediate_callback_) {
+            parse_complete_callback_ = std::move(app_callback);
+        } else {
+            final_callback_ = std::move(app_callback);
+        }
+        return this;
+    }
+
+    /// Set a callback for execution when all parsing and processing has completed
+    /// aliased as callback
+    App *final_callback(std::function<void()> app_callback) {
+        final_callback_ = std::move(app_callback);
+        return this;
+    }
+
+    /// Set a callback to execute when parsing has completed for the app
+    ///
+    App *parse_complete_callback(std::function<void()> pc_callback) {
+        parse_complete_callback_ = std::move(pc_callback);
         return this;
     }
 
@@ -333,6 +354,13 @@ class App {
     /// Set the subcommand callback to be executed immediately on subcommand completion
     App *immediate_callback(bool immediate = true) {
         immediate_callback_ = immediate;
+        if(immediate_callback_) {
+            if(final_callback_ && !(parse_complete_callback_)) {
+                std::swap(final_callback_, parse_complete_callback_);
+            }
+        } else if(!(final_callback_) && parse_complete_callback_) {
+            std::swap(final_callback_, parse_complete_callback_);
+        }
         return this;
     }
 
@@ -368,7 +396,8 @@ class App {
         return this;
     }
 
-    /// Allow windows style options, such as `/opt`. First matching short or long name used. Subcommands inherit value.
+    /// Allow windows style options, such as `/opt`. First matching short or long name used. Subcommands inherit
+    /// value.
     App *allow_windows_style_options(bool value = true) {
         allow_windows_style_options_ = value;
         return this;
@@ -437,43 +466,69 @@ class App {
     Option *add_option(std::string option_name,
                        callback_t option_callback,
                        std::string option_description = "",
-                       bool defaulted = false) {
-        Option myopt{option_name, option_description, option_callback, defaulted, this};
+                       bool defaulted = false,
+                       std::function<std::string()> func = {}) {
+        Option myopt{option_name, option_description, option_callback, this};
 
         if(std::find_if(std::begin(options_), std::end(options_), [&myopt](const Option_p &v) {
                return *v == myopt;
            }) == std::end(options_)) {
             options_.emplace_back();
             Option_p &option = options_.back();
-            option.reset(new Option(option_name, option_description, option_callback, defaulted, this));
+            option.reset(new Option(option_name, option_description, option_callback, this));
+
+            // Set the default string capture function
+            option->default_function(func);
+
+            // For compatibility with CLI11 1.7 and before, capture the default string here
+            if(defaulted)
+                option->capture_default_str();
+
+            // Transfer defaults to the new option
             option_defaults_.copy_to(option.get());
+
+            // Don't bother to capture if we already did
+            if(!defaulted && option->get_always_capture_default())
+                option->capture_default_str();
+
             return option.get();
-        } else
-            throw OptionAlreadyAdded(myopt.get_name());
+        }
+        throw OptionAlreadyAdded(myopt.get_name());
     }
 
     /// Add option for non-vectors (duplicate copy needed without defaulted to avoid `iostream << value`)
-    template <typename T, enable_if_t<!is_vector<T>::value & !std::is_const<T>::value, detail::enabler> = detail::dummy>
+
+    template <typename T, typename XC = T, enable_if_t<!std::is_const<XC>::value, detail::enabler> = detail::dummy>
     Option *add_option(std::string option_name,
                        T &variable, ///< The variable to set
-                       std::string option_description = "") {
+                       std::string option_description = "",
+                       bool defaulted = false) {
 
-        CLI::callback_t fun = [&variable](CLI::results_t res) { return detail::lexical_cast(res[0], variable); };
+        auto fun = [&variable](CLI::results_t res) { // comment for spacing
+            return detail::lexical_conversion<T, XC>(res, variable);
+        };
 
-        Option *opt = add_option(option_name, fun, option_description, false);
-        opt->type_name(detail::type_name<T>());
+        Option *opt = add_option(option_name, fun, option_description, defaulted, [&variable]() {
+            return CLI::detail::checked_to_string<T, XC>(variable);
+        });
+        opt->type_name(detail::type_name<XC>());
+        // these must be actual variable since (std::max) sometimes is defined in terms of references and references
+        // to structs used in the evaluation can be temporary so that would cause issues.
+        auto Tcount = detail::type_count<T>::value;
+        auto XCcount = detail::type_count<XC>::value;
+        opt->type_size((std::max)(Tcount, XCcount));
         return opt;
     }
 
     /// Add option for a callback of a specific type
-    template <typename T, enable_if_t<!is_vector<T>::value, detail::enabler> = detail::dummy>
+    template <typename T>
     Option *add_option_function(std::string option_name,
                                 const std::function<void(const T &)> &func, ///< the callback to execute
                                 std::string option_description = "") {
 
-        CLI::callback_t fun = [func](CLI::results_t res) {
+        auto fun = [func](CLI::results_t res) {
             T variable;
-            bool result = detail::lexical_cast(res[0], variable);
+            bool result = detail::lexical_conversion<T, T>(res, variable);
             if(result) {
                 func(variable);
             }
@@ -482,8 +537,10 @@ class App {
 
         Option *opt = add_option(option_name, std::move(fun), option_description, false);
         opt->type_name(detail::type_name<T>());
+        opt->type_size(detail::type_count<T>::value);
         return opt;
     }
+
     /// Add option with no description or variable assignment
     Option *add_option(std::string option_name) {
         return add_option(option_name, CLI::callback_t(), std::string{}, false);
@@ -497,102 +554,6 @@ class App {
         return add_option(option_name, CLI::callback_t(), option_description, false);
     }
 
-    /// Add option for non-vectors with a default print, allow template to specify conversion type
-    template <typename T,
-              typename XC = T,
-              enable_if_t<!is_vector<XC>::value && !std::is_const<XC>::value, detail::enabler> = detail::dummy>
-    Option *add_option(std::string option_name,
-                       T &variable, ///< The variable to set
-                       std::string option_description,
-                       bool defaulted) {
-        static_assert(std::is_constructible<T, XC>::value, "assign type must be assignable from conversion type");
-        CLI::callback_t fun = [&variable](CLI::results_t res) { return detail::lexical_cast<XC>(res[0], variable); };
-
-        Option *opt = add_option(option_name, fun, option_description, defaulted);
-        opt->type_name(detail::type_name<XC>());
-        if(defaulted) {
-            std::stringstream out;
-            out << variable;
-            opt->default_str(out.str());
-        }
-        return opt;
-    }
-
-    /// Add option for vectors
-    template <typename T>
-    Option *add_option(std::string option_name,
-                       std::vector<T> &variable, ///< The variable vector to set
-                       std::string option_description = "") {
-
-        CLI::callback_t fun = [&variable](CLI::results_t res) {
-            bool retval = true;
-            variable.clear();
-            variable.reserve(res.size());
-            for(const auto &elem : res) {
-
-                variable.emplace_back();
-                retval &= detail::lexical_cast(elem, variable.back());
-            }
-            return (!variable.empty()) && retval;
-        };
-
-        Option *opt = add_option(option_name, fun, option_description, false);
-        opt->type_name(detail::type_name<T>())->type_size(-1);
-        return opt;
-    }
-
-    /// Add option for vectors with defaulted argument
-    template <typename T>
-    Option *add_option(std::string option_name,
-                       std::vector<T> &variable, ///< The variable vector to set
-                       std::string option_description,
-                       bool defaulted) {
-
-        CLI::callback_t fun = [&variable](CLI::results_t res) {
-            bool retval = true;
-            variable.clear();
-            variable.reserve(res.size());
-            for(const auto &elem : res) {
-
-                variable.emplace_back();
-                retval &= detail::lexical_cast(elem, variable.back());
-            }
-            return (!variable.empty()) && retval;
-        };
-
-        Option *opt = add_option(option_name, fun, option_description, defaulted);
-        opt->type_name(detail::type_name<T>())->type_size(-1);
-
-        if(defaulted)
-            opt->default_str("[" + detail::join(variable) + "]");
-        return opt;
-    }
-
-    /// Add option for a vector callback of a specific type
-    template <typename T, enable_if_t<is_vector<T>::value, detail::enabler> = detail::dummy>
-    Option *add_option_function(std::string option_name,
-                                const std::function<void(const T &)> &func, ///< the callback to execute
-                                std::string option_description = "") {
-
-        CLI::callback_t fun = [func](CLI::results_t res) {
-            T values;
-            bool retval = true;
-            values.reserve(res.size());
-            for(const auto &elem : res) {
-                values.emplace_back();
-                retval &= detail::lexical_cast(elem, values.back());
-            }
-            if(retval) {
-                func(values);
-            }
-            return retval;
-        };
-
-        Option *opt = add_option(option_name, std::move(fun), std::move(option_description), false);
-        opt->type_name(detail::type_name<T>())->type_size(-1);
-        return opt;
-    }
-
     /// Set a help flag, replace the existing one if present
     Option *set_help_flag(std::string flag_name = "", const std::string &help_description = "") {
         // take flag_description by const reference otherwise add_flag tries to assign to help_description
@@ -667,8 +628,8 @@ class App {
         return _add_flag_internal(flag_name, CLI::callback_t(), flag_description);
     }
 
-    /// Add option for flag with integer result - defaults to allowing multiple passings, but can be forced to one if
-    /// `multi_option_policy(CLI::MultiOptionPolicy::Throw)` is used.
+    /// Add option for flag with integer result - defaults to allowing multiple passings, but can be forced to one
+    /// if `multi_option_policy(CLI::MultiOptionPolicy::Throw)` is used.
     template <typename T,
               enable_if_t<std::is_integral<T>::value && !is_bool<T>::value, detail::enabler> = detail::dummy>
     Option *add_flag(std::string flag_name,
@@ -686,8 +647,8 @@ class App {
         return _add_flag_internal(flag_name, std::move(fun), std::move(flag_description));
     }
 
-    /// Other type version accepts all other types that are not vectors such as bool, enum, string or other classes that
-    /// can be converted from a string
+    /// Other type version accepts all other types that are not vectors such as bool, enum, string or other classes
+    /// that can be converted from a string
     template <typename T,
               enable_if_t<!is_vector<T>::value && !std::is_const<T>::value &&
                               (!std::is_integral<T>::value || is_bool<T>::value) &&
@@ -856,8 +817,8 @@ class App {
         return opt;
     }
 
-    /// Add set of options, string only, ignore case (default, set can be changed afterwards - do not destroy the set)
-    /// DEPRECATED
+    /// Add set of options, string only, ignore case (default, set can be changed afterwards - do not destroy the
+    /// set) DEPRECATED
     CLI11_DEPRECATED("Use ->transform(CLI::IsMember(...)) with a (shared) pointer instead")
     Option *add_mutable_set_ignore_case(std::string option_name,
                                         std::string &member,                  ///< The selected member of the set
@@ -882,8 +843,8 @@ class App {
         return opt;
     }
 
-    /// Add set of options, string only, ignore underscore (no default, set can be changed afterwards - do not destroy
-    /// the set) DEPRECATED
+    /// Add set of options, string only, ignore underscore (no default, set can be changed afterwards - do not
+    /// destroy the set) DEPRECATED
     CLI11_DEPRECATED("Use ->transform(CLI::IsMember(..., CLI::ignore_underscore)) with a (shared) pointer instead")
     Option *add_mutable_set_ignore_underscore(std::string option_name,
                                               std::string &member,                  ///< The selected member of the set
@@ -908,8 +869,8 @@ class App {
         return opt;
     }
 
-    /// Add set of options, string only, ignore underscore (default, set can be changed afterwards - do not destroy the
-    /// set) DEPRECATED
+    /// Add set of options, string only, ignore underscore (default, set can be changed afterwards - do not destroy
+    /// the set) DEPRECATED
     CLI11_DEPRECATED("Use ->transform(CLI::IsMember(..., CLI::ignore_underscore)) with a (shared) pointer instead")
     Option *add_mutable_set_ignore_underscore(std::string option_name,
                                               std::string &member,                  ///< The selected member of the set
@@ -934,10 +895,10 @@ class App {
         return opt;
     }
 
-    /// Add set of options, string only, ignore underscore and case (no default, set can be changed afterwards - do not
-    /// destroy the set) DEPRECATED
-    CLI11_DEPRECATED(
-        "Use ->transform(CLI::IsMember(..., CLI::ignore_case, CLI::ignore_underscore)) with a (shared) pointer instead")
+    /// Add set of options, string only, ignore underscore and case (no default, set can be changed afterwards - do
+    /// not destroy the set) DEPRECATED
+    CLI11_DEPRECATED("Use ->transform(CLI::IsMember(..., CLI::ignore_case, CLI::ignore_underscore)) with a "
+                     "(shared) pointer instead")
     Option *add_mutable_set_ignore_case_underscore(std::string option_name,
                                                    std::string &member, ///< The selected member of the set
                                                    const std::set<std::string> &options, ///< The set of possibilities
@@ -963,8 +924,8 @@ class App {
 
     /// Add set of options, string only, ignore underscore and case (default, set can be changed afterwards - do not
     /// destroy the set) DEPRECATED
-    CLI11_DEPRECATED(
-        "Use ->transform(CLI::IsMember(..., CLI::ignore_case, CLI::ignore_underscore)) with a (shared) pointer instead")
+    CLI11_DEPRECATED("Use ->transform(CLI::IsMember(..., CLI::ignore_case, CLI::ignore_underscore)) with a "
+                     "(shared) pointer instead")
     Option *add_mutable_set_ignore_case_underscore(std::string option_name,
                                                    std::string &member, ///< The selected member of the set
                                                    const std::set<std::string> &options, ///< The set of possibilities
@@ -995,13 +956,16 @@ class App {
             return worked;
         };
 
-        CLI::Option *opt = add_option(option_name, std::move(fun), std::move(option_description), defaulted);
-        opt->type_name(label)->type_size(2);
-        if(defaulted) {
+        auto default_function = [&variable]() {
             std::stringstream out;
             out << variable;
-            opt->default_str(out.str());
-        }
+            return out.str();
+        };
+
+        CLI::Option *opt =
+            add_option(option_name, std::move(fun), std::move(option_description), defaulted, default_function);
+
+        opt->type_name(label)->type_size(2);
         return opt;
     }
 
@@ -1012,8 +976,12 @@ class App {
                        bool config_required = false) {
 
         // Remove existing config if present
-        if(config_ptr_ != nullptr)
+        if(config_ptr_ != nullptr) {
             remove_option(config_ptr_);
+            config_name_ = "";
+            config_required_ = false; // Not really needed, but complete
+            config_ptr_ = nullptr;    // need to remove the config_ptr completely
+        }
 
         // Only add config if option passed
         if(!option_name.empty()) {
@@ -1118,8 +1086,11 @@ class App {
     }
     /// Get a pointer to subcommand by index
     App *get_subcommand(int index = 0) const {
-        if((index >= 0) && (index < static_cast<int>(subcommands_.size())))
-            return subcommands_[index].get();
+        if(index >= 0) {
+            auto uindex = static_cast<unsigned>(index);
+            if(uindex < subcommands_.size())
+                return subcommands_[uindex].get();
+        }
         throw OptionNotFound(std::to_string(index));
     }
 
@@ -1143,8 +1114,11 @@ class App {
 
     /// Get an owning pointer to subcommand by index
     CLI::App_p get_subcommand_ptr(int index = 0) const {
-        if((index >= 0) && (index < static_cast<int>(subcommands_.size())))
-            return subcommands_[index];
+        if(index >= 0) {
+            auto uindex = static_cast<unsigned>(index);
+            if(uindex < subcommands_.size())
+                return subcommands_[uindex];
+        }
         throw OptionNotFound(std::to_string(index));
     }
 
@@ -1287,15 +1261,16 @@ class App {
     /// This must be called after the options are in but before the rest of the program.
     void parse(int argc, const char *const *argv) {
         // If the name is not set, read from command line
-        if((name_.empty()) || (has_automatic_name_)) {
+        if(name_.empty() || has_automatic_name_) {
             has_automatic_name_ = true;
             name_ = argv[0];
         }
 
         std::vector<std::string> args;
+        args.reserve(static_cast<size_t>(argc) - 1);
         for(int i = argc - 1; i > 0; i--)
             args.emplace_back(argv[i]);
-        parse(args);
+        parse(std::move(args));
     }
 
     /// Parse a single string as if it contained command line arguments.
@@ -1325,7 +1300,7 @@ class App {
         args.erase(std::remove(args.begin(), args.end(), std::string{}), args.end());
         std::reverse(args.begin(), args.end());
 
-        parse(args);
+        parse(std::move(args));
     }
 
     /// The real work is done here. Expects a reversed vector.
@@ -1349,6 +1324,26 @@ class App {
         run_callback();
     }
 
+    /// The real work is done here. Expects a reversed vector.
+    void parse(std::vector<std::string> &&args) {
+        // Clear if parsed
+        if(parsed_ > 0)
+            clear();
+
+        // parsed_ is incremented in commands/subcommands,
+        // but placed here to make sure this is cleared when
+        // running parse after an error is thrown, even by _validate or _configure.
+        parsed_ = 1;
+        _validate();
+        _configure();
+        // set the parent as nullptr as this object should be the top now
+        parent_ = nullptr;
+        parsed_ = 0;
+
+        _parse(std::move(args));
+        run_callback();
+    }
+
     /// Provide a function to print a help message. The function gets access to the App pointer and error.
     void failure_message(std::function<std::string(const App *, const Error &e)> function) {
         failure_message_ = function;
@@ -1459,25 +1454,23 @@ class App {
     /// Removes an option from the excludes list of this subcommand
     bool remove_excludes(Option *opt) {
         auto iterator = std::find(std::begin(exclude_options_), std::end(exclude_options_), opt);
-        if(iterator != std::end(exclude_options_)) {
-            exclude_options_.erase(iterator);
-            return true;
-        } else {
+        if(iterator == std::end(exclude_options_)) {
             return false;
         }
+        exclude_options_.erase(iterator);
+        return true;
     }
 
     /// Removes a subcommand from this excludes list of this subcommand
     bool remove_excludes(App *app) {
         auto iterator = std::find(std::begin(exclude_subcommands_), std::end(exclude_subcommands_), app);
-        if(iterator != std::end(exclude_subcommands_)) {
-            auto other_app = *iterator;
-            exclude_subcommands_.erase(iterator);
-            other_app->remove_excludes(this);
-            return true;
-        } else {
+        if(iterator == std::end(exclude_subcommands_)) {
             return false;
         }
+        auto other_app = *iterator;
+        exclude_subcommands_.erase(iterator);
+        other_app->remove_excludes(this);
+        return true;
     }
 
     ///@}
@@ -1489,7 +1482,11 @@ class App {
         footer_ = std::move(footer_string);
         return this;
     }
-
+    /// Set footer.
+    App *footer(std::function<std::string()> footer_function) {
+        footer_callback_ = std::move(footer_function);
+        return this;
+    }
     /// Produce a string that could be read in as a config of the current values of the App. Set default_also to
     /// include default arguments. Prefix will add a string to the beginning of each option.
     std::string config_to_str(bool default_also = false, bool write_description = false) const {
@@ -1506,10 +1503,10 @@ class App {
 
         // Delegate to subcommand if needed
         auto selected_subcommands = get_subcommands();
-        if(!selected_subcommands.empty())
+        if(!selected_subcommands.empty()) {
             return selected_subcommands.at(0)->help(prev, mode);
-        else
-            return formatter_->make_help(this, prev, mode);
+        }
+        return formatter_->make_help(this, prev, mode);
     }
 
     ///@}
@@ -1628,8 +1625,8 @@ class App {
     /// Get the group of this subcommand
     const std::string &get_group() const { return group_; }
 
-    /// Get footer.
-    const std::string &get_footer() const { return footer_; }
+    /// Generate and return the footer.
+    std::string get_footer() const { return (footer_callback_) ? footer_callback_() + '\n' + footer_ : footer_; }
 
     /// Get the required min subcommand value
     size_t get_require_subcommand_min() const { return require_subcommand_min_; }
@@ -1755,6 +1752,13 @@ class App {
         return miss_list;
     }
 
+    /// This returns the missing options in a form ready for processing by another command line program
+    std::vector<std::string> remaining_for_passthrough(bool recurse = false) const {
+        std::vector<std::string> miss_list = remaining(recurse);
+        std::reverse(std::begin(miss_list), std::end(miss_list));
+        return miss_list;
+    }
+
     /// This returns the number of remaining options, minus the -- separator
     size_t remaining_size(bool recurse = false) const {
         auto remaining_options = static_cast<size_t>(std::count_if(
@@ -1829,23 +1833,27 @@ class App {
         }
     }
     /// Internal function to run (App) callback, bottom up
-    void run_callback() {
+    void run_callback(bool final_mode = false) {
         pre_callback();
+        // in the main app if immediate_callback_ is set it runs the main callback before the used subcommands
+        if(!final_mode && parse_complete_callback_) {
+            parse_complete_callback_();
+        }
         // run the callbacks for the received subcommands
         for(App *subc : get_subcommands()) {
-            if(!subc->immediate_callback_)
-                subc->run_callback();
+            subc->run_callback(true);
         }
         // now run callbacks for option_groups
         for(auto &subc : subcommands_) {
-            if(!subc->immediate_callback_ && subc->name_.empty() && subc->count_all() > 0) {
-                subc->run_callback();
+            if(subc->name_.empty() && subc->count_all() > 0) {
+                subc->run_callback(true);
             }
         }
+
         // finally run the main callback
-        if(callback_ && (parsed_ > 0)) {
+        if(final_callback_ && (parsed_ > 0)) {
             if(!name_.empty() || count_all() > 0) {
-                callback_();
+                final_callback_();
             }
         }
     }
@@ -1874,11 +1882,17 @@ class App {
             return detail::Classifier::SUBCOMMAND;
         if(detail::split_long(current, dummy1, dummy2))
             return detail::Classifier::LONG;
-        if(detail::split_short(current, dummy1, dummy2))
+        if(detail::split_short(current, dummy1, dummy2)) {
+            if(dummy1[0] >= '0' && dummy1[0] <= '9') {
+                if(get_option_no_throw(std::string{'-', dummy1[0]}) == nullptr) {
+                    return detail::Classifier::NONE;
+                }
+            }
             return detail::Classifier::SHORT;
+        }
         if((allow_windows_style_options_) && (detail::split_windows_style(current, dummy1, dummy2)))
             return detail::Classifier::WINDOWS;
-        if((current == "++") && !name_.empty())
+        if((current == "++") && !name_.empty() && parent_ != nullptr)
             return detail::Classifier::SUBCOMMAND_TERMINATOR;
         return detail::Classifier::NONE;
     }
@@ -1933,7 +1947,7 @@ class App {
         }
 
         for(App_p &sub : subcommands_) {
-            if(sub->get_name().empty() || !sub->immediate_callback_)
+            if(sub->get_name().empty() || !sub->parse_complete_callback_)
                 sub->_process_env();
         }
     }
@@ -1943,7 +1957,7 @@ class App {
 
         for(App_p &sub : subcommands_) {
             // process the priority option_groups first
-            if(sub->get_name().empty() && sub->immediate_callback_) {
+            if(sub->get_name().empty() && sub->parse_complete_callback_) {
                 if(sub->count_all() > 0) {
                     sub->_process_callbacks();
                     sub->run_callback();
@@ -1956,9 +1970,8 @@ class App {
                 opt->run_callback();
             }
         }
-
         for(App_p &sub : subcommands_) {
-            if(!sub->immediate_callback_) {
+            if(!sub->parse_complete_callback_) {
                 sub->_process_callbacks();
             }
         }
@@ -2047,8 +2060,8 @@ class App {
 
         // Max error cannot occur, the extra subcommand will parse as an ExtrasError or a remaining item.
 
-        // run this loop to check how many unnamed subcommands were actually used since they are considered options from
-        // the perspective of an App
+        // run this loop to check how many unnamed subcommands were actually used since they are considered options
+        // from the perspective of an App
         for(App_p &sub : subcommands_) {
             if(sub->disabled_)
                 continue;
@@ -2106,6 +2119,21 @@ class App {
         _process_requirements();
     }
 
+    /// Throw an error if anything is left over and should not be.
+    void _process_extras() {
+        if(!(allow_extras_ || prefix_command_)) {
+            size_t num_left_over = remaining_size();
+            if(num_left_over > 0) {
+                throw ExtrasError(name_, remaining(false));
+            }
+        }
+
+        for(App_p &sub : subcommands_) {
+            if(sub->count() > 0)
+                sub->_process_extras();
+        }
+    }
+
     /// Throw an error if anything is left over and should not be.
     /// Modifies the args to fill in the missing items before throwing.
     void _process_extras(std::vector<std::string> &args) {
@@ -2113,7 +2141,7 @@ class App {
             size_t num_left_over = remaining_size();
             if(num_left_over > 0) {
                 args = remaining(false);
-                throw ExtrasError(args);
+                throw ExtrasError(name_, args);
             }
         }
 
@@ -2149,9 +2177,9 @@ class App {
             // Throw error if any items are left over (depending on settings)
             _process_extras(args);
 
-            // Convert missing (pairs) to extras (string only)
-            args = remaining(false);
-        } else if(immediate_callback_) {
+            // Convert missing (pairs) to extras (string only) ready for processing in another app
+            args = remaining_for_passthrough(false);
+        } else if(parse_complete_callback_) {
             _process_env();
             _process_callbacks();
             _process_help_flags();
@@ -2160,6 +2188,23 @@ class App {
         }
     }
 
+    /// Internal parse function
+    void _parse(std::vector<std::string> &&args) {
+        // this can only be called by the top level in which case parent == nullptr by definition
+        // operation is simplified
+        increment_parsed();
+        _trigger_pre_parse(args.size());
+        bool positional_only = false;
+
+        while(!args.empty()) {
+            _parse_single(args, positional_only);
+        }
+        _process();
+
+        // Throw error if any items are left over (depending on settings)
+        _process_extras();
+    }
+
     /// Parse one config param, return false if not found in any subcommand, remove if it is
     ///
     /// If this has more than one dot.separated.name, go into the subcommand matching it
@@ -2227,6 +2272,7 @@ class App {
             }
             break;
         case detail::Classifier::SUBCOMMAND_TERMINATOR:
+            // treat this like a positional mark if in the parent app
             args.pop_back();
             retval = false;
             break;
@@ -2249,7 +2295,7 @@ class App {
 
             // LCOV_EXCL_START
         default:
-            HorribleError("unrecognized classifier (you should not see this!)");
+            throw HorribleError("unrecognized classifier (you should not see this!)");
             // LCOV_EXCL_END
         }
         return retval;
@@ -2258,11 +2304,15 @@ class App {
     /// Count the required remaining positional arguments
     size_t _count_remaining_positionals(bool required_only = false) const {
         size_t retval = 0;
-        for(const Option_p &opt : options_)
-            if(opt->get_positional() && (!required_only || opt->get_required()) && opt->get_items_expected() > 0 &&
-               static_cast<int>(opt->count()) < opt->get_items_expected())
-                retval = static_cast<size_t>(opt->get_items_expected()) - opt->count();
-
+        for(const Option_p &opt : options_) {
+            if(opt->get_positional() && (!required_only || opt->get_required())) {
+                if(opt->get_items_expected() > 0 && static_cast<int>(opt->count()) < opt->get_items_expected()) {
+                    retval += static_cast<size_t>(opt->get_items_expected()) - opt->count();
+                } else if(opt->get_required() && opt->get_items_expected() < 0 && opt->count() == 0ul) {
+                    retval += 1;
+                }
+            }
+        }
         return retval;
     }
 
@@ -2281,13 +2331,39 @@ class App {
     bool _parse_positional(std::vector<std::string> &args) {
 
         const std::string &positional = args.back();
+
+        if(positionals_at_end_) {
+            // deal with the case of required arguments at the end which should take precedence over other arguments
+            auto arg_rem = args.size();
+            auto remreq = _count_remaining_positionals(true);
+            if(arg_rem <= remreq) {
+                for(const Option_p &opt : options_) {
+                    if(opt->get_positional() && opt->required_) {
+                        if(static_cast<int>(opt->count()) < opt->get_items_expected() ||
+                           (opt->get_items_expected() < 0 && opt->count() == 0lu)) {
+                            if(validate_positionals_) {
+                                std::string pos = positional;
+                                pos = opt->_validate(pos, 0);
+                                if(!pos.empty()) {
+                                    continue;
+                                }
+                            }
+                            opt->add_result(positional);
+                            parse_order_.push_back(opt.get());
+                            args.pop_back();
+                            return true;
+                        }
+                    }
+                }
+            }
+        }
         for(const Option_p &opt : options_) {
             // Eat options, one by one, until done
             if(opt->get_positional() &&
                (static_cast<int>(opt->count()) < opt->get_items_expected() || opt->get_items_expected() < 0)) {
                 if(validate_positionals_) {
                     std::string pos = positional;
-                    pos = opt->_validate(pos);
+                    pos = opt->_validate(pos, 0);
                     if(!pos.empty()) {
                         continue;
                     }
@@ -2330,7 +2406,7 @@ class App {
         }
 
         if(positionals_at_end_) {
-            throw CLI::ExtrasError(args);
+            throw CLI::ExtrasError(name_, args);
         }
         /// If this is an option group don't deal with it
         if(parent_ != nullptr && name_.empty()) {
@@ -2626,7 +2702,7 @@ class App {
             throw OptionNotFound("could not locate the given App");
         }
     }
-};
+}; // namespace CLI
 
 /// Extension of App to better manage groups of options
 class Option_group : public App {
diff --git a/packages/CLI11/include/CLI/CLI.hpp b/packages/CLI11/include/CLI/CLI.hpp
index 2feb19247843b99293198f0b881d014fee066612..c2dbe7c5f304a00e3ea548e0aeda76ff21eba1cf 100644
--- a/packages/CLI11/include/CLI/CLI.hpp
+++ b/packages/CLI11/include/CLI/CLI.hpp
@@ -10,8 +10,6 @@
 
 #include "CLI/Macros.hpp"
 
-#include "CLI/Optional.hpp"
-
 #include "CLI/StringTools.hpp"
 
 #include "CLI/Error.hpp"
diff --git a/packages/CLI11/include/CLI/Config.hpp b/packages/CLI11/include/CLI/Config.hpp
index a48c20e10a98a2cc9da29020e469faedb27dd223..d3e0f2b9e3b21d58f920102d63fabe295dc33f46 100644
--- a/packages/CLI11/include/CLI/Config.hpp
+++ b/packages/CLI11/include/CLI/Config.hpp
@@ -32,8 +32,8 @@ ConfigINI::to_config(const App *app, bool default_also, bool write_description,
                     value = detail::ini_join(opt->results());
 
                 // If the option has a default and is requested by optional argument
-                else if(default_also && !opt->get_defaultval().empty())
-                    value = opt->get_defaultval();
+                else if(default_also && !opt->get_default_str().empty())
+                    value = opt->get_default_str();
                 // Flag, one passed
             } else if(opt->count() == 1) {
                 value = "true";
diff --git a/packages/CLI11/include/CLI/ConfigFwd.hpp b/packages/CLI11/include/CLI/ConfigFwd.hpp
index 9e9de6986ec91a30a5041d1d106122691a29e95a..ba009ba687a0181ace120b95e2d280e2ceb4b9f7 100644
--- a/packages/CLI11/include/CLI/ConfigFwd.hpp
+++ b/packages/CLI11/include/CLI/ConfigFwd.hpp
@@ -8,6 +8,7 @@
 #include <iostream>
 #include <string>
 
+#include "CLI/Error.hpp"
 #include "CLI/StringTools.hpp"
 
 namespace CLI {
@@ -93,7 +94,8 @@ class Config {
 /// This converter works with INI files
 class ConfigINI : public Config {
   public:
-    std::string to_config(const App *, bool default_also, bool write_description, std::string prefix) const override;
+    std::string
+    to_config(const App * /*app*/, bool default_also, bool write_description, std::string prefix) const override;
 
     std::vector<ConfigItem> from_config(std::istream &input) const override {
         std::string line;
diff --git a/packages/CLI11/include/CLI/Error.hpp b/packages/CLI11/include/CLI/Error.hpp
index 59687f5c8bead2dd99c7adc48aed399c2ab43e69..115bd66d4a743a917d89deb3c48b6411b05fcac2 100644
--- a/packages/CLI11/include/CLI/Error.hpp
+++ b/packages/CLI11/include/CLI/Error.hpp
@@ -206,32 +206,32 @@ class RequiredError : public ParseError {
     CLI11_ERROR_DEF(ParseError, RequiredError)
     explicit RequiredError(std::string name) : RequiredError(name + " is required", ExitCodes::RequiredError) {}
     static RequiredError Subcommand(size_t min_subcom) {
-        if(min_subcom == 1)
+        if(min_subcom == 1) {
             return RequiredError("A subcommand");
-        else
-            return RequiredError("Requires at least " + std::to_string(min_subcom) + " subcommands",
-                                 ExitCodes::RequiredError);
+        }
+        return RequiredError("Requires at least " + std::to_string(min_subcom) + " subcommands",
+                             ExitCodes::RequiredError);
     }
     static RequiredError Option(size_t min_option, size_t max_option, size_t used, const std::string &option_list) {
         if((min_option == 1) && (max_option == 1) && (used == 0))
             return RequiredError("Exactly 1 option from [" + option_list + "]");
-        else if((min_option == 1) && (max_option == 1) && (used > 1))
+        if((min_option == 1) && (max_option == 1) && (used > 1))
             return RequiredError("Exactly 1 option from [" + option_list + "] is required and " + std::to_string(used) +
                                      " were given",
                                  ExitCodes::RequiredError);
-        else if((min_option == 1) && (used == 0))
+        if((min_option == 1) && (used == 0))
             return RequiredError("At least 1 option from [" + option_list + "]");
-        else if(used < min_option)
+        if(used < min_option)
             return RequiredError("Requires at least " + std::to_string(min_option) + " options used and only " +
                                      std::to_string(used) + "were given from [" + option_list + "]",
                                  ExitCodes::RequiredError);
-        else if(max_option == 1)
+        if(max_option == 1)
             return RequiredError("Requires at most 1 options be given from [" + option_list + "]",
                                  ExitCodes::RequiredError);
-        else
-            return RequiredError("Requires at most " + std::to_string(max_option) + " options be used and " +
-                                     std::to_string(used) + "were given from [" + option_list + "]",
-                                 ExitCodes::RequiredError);
+
+        return RequiredError("Requires at most " + std::to_string(max_option) + " options be used and " +
+                                 std::to_string(used) + "were given from [" + option_list + "]",
+                             ExitCodes::RequiredError);
     }
 };
 
@@ -279,6 +279,12 @@ class ExtrasError : public ParseError {
                                        : "The following argument was not expected: ") +
                           detail::rjoin(args, " "),
                       ExitCodes::ExtrasError) {}
+    ExtrasError(const std::string &name, std::vector<std::string> args)
+        : ExtrasError(name,
+                      (args.size() > 1 ? "The following arguments were not expected: "
+                                       : "The following argument was not expected: ") +
+                          detail::rjoin(args, " "),
+                      ExitCodes::ExtrasError) {}
 };
 
 /// Thrown when extra values are found in an INI file
diff --git a/packages/CLI11/include/CLI/Formatter.hpp b/packages/CLI11/include/CLI/Formatter.hpp
index 78acbc6112d208a08decee5d9fc5756fec257da3..a5bdd709f9f6c44365f344318227af979bd04976 100644
--- a/packages/CLI11/include/CLI/Formatter.hpp
+++ b/packages/CLI11/include/CLI/Formatter.hpp
@@ -28,8 +28,8 @@ inline std::string Formatter::make_positionals(const App *app) const {
 
     if(opts.empty())
         return std::string();
-    else
-        return make_group(get_label("Positionals"), true, opts);
+
+    return make_group(get_label("Positionals"), true, opts);
 }
 
 inline std::string Formatter::make_groups(const App *app, AppFormatMode mode) const {
@@ -126,10 +126,10 @@ inline std::string Formatter::make_usage(const App *app, std::string name) const
 
 inline std::string Formatter::make_footer(const App *app) const {
     std::string footer = app->get_footer();
-    if(!footer.empty())
-        return footer + "\n";
-    else
-        return "";
+    if(footer.empty()) {
+        return std::string{};
+    }
+    return footer + "\n";
 }
 
 inline std::string Formatter::make_help(const App *app, std::string name, AppFormatMode mode) const {
@@ -151,7 +151,7 @@ inline std::string Formatter::make_help(const App *app, std::string name, AppFor
     out << make_positionals(app);
     out << make_groups(app, mode);
     out << make_subcommands(app, mode);
-    out << make_footer(app);
+    out << '\n' << make_footer(app);
 
     return out.str();
 }
@@ -222,8 +222,8 @@ inline std::string Formatter::make_expanded(const App *sub) const {
 inline std::string Formatter::make_option_name(const Option *opt, bool is_positional) const {
     if(is_positional)
         return opt->get_name(true, false);
-    else
-        return opt->get_name(false, true);
+
+    return opt->get_name(false, true);
 }
 
 inline std::string Formatter::make_option_opts(const Option *opt) const {
@@ -232,8 +232,8 @@ inline std::string Formatter::make_option_opts(const Option *opt) const {
     if(opt->get_type_size() != 0) {
         if(!opt->get_type_name().empty())
             out << " " << get_label(opt->get_type_name());
-        if(!opt->get_defaultval().empty())
-            out << "=" << opt->get_defaultval();
+        if(!opt->get_default_str().empty())
+            out << "=" << opt->get_default_str();
         if(opt->get_expected() > 1)
             out << " x " << opt->get_expected();
         if(opt->get_expected() == -1)
diff --git a/packages/CLI11/include/CLI/FormatterFwd.hpp b/packages/CLI11/include/CLI/FormatterFwd.hpp
index ebaace645a8e4596f379d9e83cf73db8018e36e4..4a398245ab0aa5ebf9aeba811df4c96edcd8cdae 100644
--- a/packages/CLI11/include/CLI/FormatterFwd.hpp
+++ b/packages/CLI11/include/CLI/FormatterFwd.hpp
@@ -144,7 +144,7 @@ class Formatter : public FormatterBase {
     virtual std::string make_usage(const App *app, std::string name) const;
 
     /// This puts everything together
-    std::string make_help(const App *, std::string, AppFormatMode) const override;
+    std::string make_help(const App * /*app*/, std::string, AppFormatMode) const override;
 
     ///@}
     /// @name Options
diff --git a/packages/CLI11/include/CLI/Option.hpp b/packages/CLI11/include/CLI/Option.hpp
index 563ae32dddca1e4f57eeb6d5c935b5196e4c7369..1a20395ba8d6d9fdbd6a0b546a79ce13f507bc8e 100644
--- a/packages/CLI11/include/CLI/Option.hpp
+++ b/packages/CLI11/include/CLI/Option.hpp
@@ -50,10 +50,16 @@ template <typename CRTP> class OptionBase {
 
     /// Allow this option to be given in a configuration file
     bool configurable_{true};
+
     /// Disable overriding flag values with '=value'
     bool disable_flag_override_{false};
+
     /// Specify a delimiter character for vector arguments
     char delimiter_{'\0'};
+
+    /// Automatically capture default value
+    bool always_capture_default_{false};
+
     /// Policy for multiple arguments when `expected_ == 1`  (can be set on bool flags, too)
     MultiOptionPolicy multi_option_policy_{MultiOptionPolicy::Throw};
 
@@ -66,6 +72,7 @@ template <typename CRTP> class OptionBase {
         other->configurable(configurable_);
         other->disable_flag_override(disable_flag_override_);
         other->delimiter(delimiter_);
+        other->always_capture_default(always_capture_default_);
         other->multi_option_policy(multi_option_policy_);
     }
 
@@ -87,6 +94,11 @@ template <typename CRTP> class OptionBase {
     /// Support Plumbum term
     CRTP *mandatory(bool value = true) { return required(value); }
 
+    CRTP *always_capture_default(bool value = true) {
+        always_capture_default_ = value;
+        return static_cast<CRTP *>(this);
+    }
+
     // Getters
 
     /// Get the group of this option
@@ -107,7 +119,12 @@ template <typename CRTP> class OptionBase {
     /// The status of configurable
     bool get_disable_flag_override() const { return disable_flag_override_; }
 
+    /// Get the current delimeter char
     char get_delimiter() const { return delimiter_; }
+
+    /// Return true if this will automatically capture the default value for help printing
+    bool get_always_capture_default() const { return always_capture_default_; }
+
     /// The status of the multi option policy
     MultiOptionPolicy get_multi_option_policy() const { return multi_option_policy_; }
 
@@ -219,16 +236,16 @@ class Option : public OptionBase<Option> {
     /// The description for help strings
     std::string description_;
 
-    /// A human readable default value, usually only set if default is true in creation
-    std::string defaultval_;
+    /// A human readable default value, either manually set, captured, or captured by default
+    std::string default_str_;
 
     /// A human readable type value, set when App creates this
     ///
     /// This is a lambda function so "types" can be dynamic, such as when a set prints its contents.
     std::function<std::string()> type_name_{[]() { return std::string(); }};
 
-    /// True if this option has a default
-    bool default_{false};
+    /// Run this function to capture a default (ignore if empty)
+    std::function<std::string()> default_function_;
 
     ///@}
     /// @name Configuration
@@ -277,10 +294,8 @@ class Option : public OptionBase<Option> {
     Option(std::string option_name,
            std::string option_description,
            std::function<bool(results_t)> callback,
-           bool defaulted,
            App *parent)
-        : description_(std::move(option_description)), default_(defaulted), parent_(parent),
-          callback_(std::move(callback)) {
+        : description_(std::move(option_description)), parent_(parent), callback_(std::move(callback)) {
         std::tie(snames_, lnames_, pname_) = detail::get_names(detail::split_names(option_name));
     }
 
@@ -292,7 +307,7 @@ class Option : public OptionBase<Option> {
     size_t count() const { return results_.size(); }
 
     /// True if the option was not passed
-    size_t empty() const { return results_.empty(); }
+    bool empty() const { return results_.empty(); }
 
     /// This class is true if option is passed.
     operator bool() const { return !empty(); }
@@ -306,24 +321,25 @@ class Option : public OptionBase<Option> {
 
     /// Set the number of expected arguments (Flags don't use this)
     Option *expected(int value) {
+
         // Break if this is a flag
         if(type_size_ == 0)
             throw IncorrectConstruction::SetFlag(get_name(true, true));
 
         // Setting 0 is not allowed
-        else if(value == 0)
+        if(value == 0)
             throw IncorrectConstruction::Set0Opt(get_name());
 
         // No change is okay, quit now
-        else if(expected_ == value)
+        if(expected_ == value)
             return this;
 
         // Type must be a vector
-        else if(type_size_ >= 0)
+        if(type_size_ >= 0)
             throw IncorrectConstruction::ChangeNotVector(get_name());
 
         // TODO: Can support multioption for non-1 values (except for join)
-        else if(value != 1 && multi_option_policy_ != MultiOptionPolicy::Throw)
+        if(value != 1 && multi_option_policy_ != MultiOptionPolicy::Throw)
             throw IncorrectConstruction::AfterMultiOpt(get_name());
 
         expected_ = value;
@@ -335,7 +351,7 @@ class Option : public OptionBase<Option> {
         validator.non_modifying();
         validators_.push_back(std::move(validator));
         if(!validator_name.empty())
-            validators_.front().name(validator_name);
+            validators_.back().name(validator_name);
         return this;
     }
 
@@ -392,8 +408,17 @@ class Option : public OptionBase<Option> {
         if((validator_name.empty()) && (!validators_.empty())) {
             return &(validators_.front());
         }
-        throw OptionNotFound(std::string("Validator ") + validator_name + " Not Found");
+        throw OptionNotFound(std::string{"Validator "} + validator_name + " Not Found");
     }
+
+    /// Get a Validator by index NOTE: this may not be the order of definition
+    Validator *get_validator(int index) {
+        if(index >= 0 && index < static_cast<int>(validators_.size())) {
+            return &(validators_[index]);
+        }
+        throw OptionNotFound("Validator index is not valid");
+    }
+
     /// Sets required options
     Option *needs(Option *opt) {
         auto tup = needs_.insert(opt);
@@ -420,12 +445,11 @@ class Option : public OptionBase<Option> {
     bool remove_needs(Option *opt) {
         auto iterator = std::find(std::begin(needs_), std::end(needs_), opt);
 
-        if(iterator != std::end(needs_)) {
-            needs_.erase(iterator);
-            return true;
-        } else {
+        if(iterator == std::end(needs_)) {
             return false;
         }
+        needs_.erase(iterator);
+        return true;
     }
 
     /// Sets excluded options
@@ -459,12 +483,11 @@ class Option : public OptionBase<Option> {
     bool remove_excludes(Option *opt) {
         auto iterator = std::find(std::begin(excludes_), std::end(excludes_), opt);
 
-        if(iterator != std::end(excludes_)) {
-            excludes_.erase(iterator);
-            return true;
-        } else {
+        if(iterator == std::end(excludes_)) {
             return false;
         }
+        excludes_.erase(iterator);
+        return true;
     }
 
     /// Sets environment variable to read if no option given
@@ -511,7 +534,7 @@ class Option : public OptionBase<Option> {
         return this;
     }
 
-    /// disable flag overrides
+    /// Disable flag overrides values, e.g. --flag=<value> is not allowed
     Option *disable_flag_override(bool value = true) {
         disable_flag_override_ = value;
         return this;
@@ -532,8 +555,12 @@ class Option : public OptionBase<Option> {
     /// The set of options excluded
     std::set<Option *> get_excludes() const { return excludes_; }
 
+    /// The default value (for help printing) DEPRECATED Use get_default_str() instead
+    CLI11_DEPRECATED("Use get_default_str() instead")
+    std::string get_defaultval() const { return default_str_; }
+
     /// The default value (for help printing)
-    std::string get_defaultval() const { return defaultval_; }
+    std::string get_default_str() const { return default_str_; }
 
     /// Get the callback function
     callback_t get_callback() const { return callback_; }
@@ -544,7 +571,7 @@ class Option : public OptionBase<Option> {
     /// Get the short names
     const std::vector<std::string> get_snames() const { return snames_; }
 
-    /// get the flag names with specified default values
+    /// Get the flag names with specified default values
     const std::vector<std::string> get_fnames() const { return fnames_; }
 
     /// The number of times the option expects to be included
@@ -571,9 +598,6 @@ class Option : public OptionBase<Option> {
                ((multi_option_policy_ != MultiOptionPolicy::Throw || (expected_ < 0 && type_size_ < 0) ? -1 : 1));
     }
 
-    /// True if this has a default value
-    int get_default() const { return default_; }
-
     /// True if the argument can be given directly
     bool get_positional() const { return pname_.length() > 0; }
 
@@ -609,8 +633,9 @@ class Option : public OptionBase<Option> {
             std::vector<std::string> name_list;
 
             /// The all list will never include a positional unless asked or that's the only name.
-            if((positional && pname_.length()) || (snames_.empty() && lnames_.empty()))
+            if((positional && (!pname_.empty())) || (snames_.empty() && lnames_.empty())) {
                 name_list.push_back(pname_);
+            }
             if((get_items_expected() == 0) && (!fnames_.empty())) {
                 for(const std::string &sname : snames_) {
                     name_list.push_back("-" + sname);
@@ -634,25 +659,22 @@ class Option : public OptionBase<Option> {
             }
 
             return detail::join(name_list);
+        }
 
-        } else {
-
-            // This returns the positional name no matter what
-            if(positional)
-                return pname_;
+        // This returns the positional name no matter what
+        if(positional)
+            return pname_;
 
-            // Prefer long name
-            else if(!lnames_.empty())
-                return std::string("--") + lnames_[0];
+        // Prefer long name
+        if(!lnames_.empty())
+            return std::string(2, '-') + lnames_[0];
 
-            // Or short name if no long name
-            else if(!snames_.empty())
-                return std::string("-") + snames_[0];
+        // Or short name if no long name
+        if(!snames_.empty())
+            return std::string(1, '-') + snames_[0];
 
-            // If positional is the only name, it's okay to use that
-            else
-                return pname_;
-        }
+        // If positional is the only name, it's okay to use that
+        return pname_;
     }
 
     ///@}
@@ -666,8 +688,17 @@ class Option : public OptionBase<Option> {
 
         // Run the validators (can change the string)
         if(!validators_.empty()) {
+            int index = 0;
+            // this is not available until multi_option_policy with type_size_>0 is enabled and functional
+            // if(type_size_ > 0 && multi_option_policy_ == CLI::MultiOptionPolicy::TakeLast) {
+            //    index = type_size_ - static_cast<int>(results_.size());
+            //}
+            if(type_size_ < 0 && multi_option_policy_ == CLI::MultiOptionPolicy::TakeLast) { // for vector operations
+                index = expected_ - static_cast<int>(results_.size());
+            }
             for(std::string &result : results_) {
-                auto err_msg = _validate(result);
+                auto err_msg = _validate(result, index);
+                ++index;
                 if(!err_msg.empty())
                     throw ValidationError(get_name(), err_msg);
             }
@@ -705,7 +736,7 @@ class Option : public OptionBase<Option> {
             } else if(get_items_expected() < 0) {
                 // Require that this be a multiple of expected size and at least as many as expected
                 if(results_.size() < static_cast<size_t>(-get_items_expected()) ||
-                   results_.size() % static_cast<size_t>(std::abs(get_type_size())) != 0)
+                   results_.size() % static_cast<size_t>(std::abs(get_type_size())) != 0u)
                     throw ArgumentMismatch(get_name(), get_items_expected(), results_.size());
             }
             local_result = !callback_(results_);
@@ -741,20 +772,19 @@ class Option : public OptionBase<Option> {
 
         if(name.length() > 2 && name[0] == '-' && name[1] == '-')
             return check_lname(name.substr(2));
-        else if(name.length() > 1 && name.front() == '-')
+        if(name.length() > 1 && name.front() == '-')
             return check_sname(name.substr(1));
-        else {
-            std::string local_pname = pname_;
-            if(ignore_underscore_) {
-                local_pname = detail::remove_underscore(local_pname);
-                name = detail::remove_underscore(name);
-            }
-            if(ignore_case_) {
-                local_pname = detail::to_lower(local_pname);
-                name = detail::to_lower(name);
-            }
-            return name == local_pname;
+
+        std::string local_pname = pname_;
+        if(ignore_underscore_) {
+            local_pname = detail::remove_underscore(local_pname);
+            name = detail::remove_underscore(name);
+        }
+        if(ignore_case_) {
+            local_pname = detail::to_lower(local_pname);
+            name = detail::to_lower(name);
         }
+        return name == local_pname;
     }
 
     /// Requires "-" to be removed from string
@@ -773,6 +803,7 @@ class Option : public OptionBase<Option> {
         return (detail::find_member(name, fnames_, ignore_case_, ignore_underscore_) >= 0);
     }
 
+    /// Get the value that goes for a flag, nominally gets the default value but allows for overrides if not disabled
     std::string get_flag_value(std::string name, std::string input_value) const {
         static const std::string trueString{"true"};
         static const std::string falseString{"false"};
@@ -782,7 +813,8 @@ class Option : public OptionBase<Option> {
             if(!((input_value.empty()) || (input_value == emptyString))) {
                 auto default_ind = detail::find_member(name, fnames_, ignore_case_, ignore_underscore_);
                 if(default_ind >= 0) {
-                    if(default_flag_values_[default_ind].second != input_value) {
+                    // We can static cast this to size_t because it is more than 0 in this block
+                    if(default_flag_values_[static_cast<size_t>(default_ind)].second != input_value) {
                         throw(ArgumentMismatch::FlagOverride(name));
                     }
                 } else {
@@ -794,12 +826,12 @@ class Option : public OptionBase<Option> {
         }
         auto ind = detail::find_member(name, fnames_, ignore_case_, ignore_underscore_);
         if((input_value.empty()) || (input_value == emptyString)) {
-            return (ind < 0) ? trueString : default_flag_values_[ind].second;
+            return (ind < 0) ? trueString : default_flag_values_[static_cast<size_t>(ind)].second;
         }
         if(ind < 0) {
             return input_value;
         }
-        if(default_flag_values_[ind].second == falseString) {
+        if(default_flag_values_[static_cast<size_t>(ind)].second == falseString) {
             try {
                 auto val = detail::to_flag_value(input_value);
                 return (val == 1) ? falseString : (val == (-1) ? trueString : std::to_string(-val));
@@ -837,13 +869,13 @@ class Option : public OptionBase<Option> {
     /// Get a copy of the results
     std::vector<std::string> results() const { return results_; }
 
-    /// get the results as a particular type
+    /// Get the results as a specified type
     template <typename T,
               enable_if_t<!is_vector<T>::value && !std::is_const<T>::value, detail::enabler> = detail::dummy>
     void results(T &output) const {
         bool retval;
         if(results_.empty()) {
-            retval = detail::lexical_cast(defaultval_, output);
+            retval = detail::lexical_cast(default_str_, output);
         } else if(results_.size() == 1) {
             retval = detail::lexical_cast(results_[0], output);
         } else {
@@ -866,7 +898,7 @@ class Option : public OptionBase<Option> {
             throw ConversionError(get_name(), results_);
         }
     }
-    /// get the results as a vector of a particular type
+    /// Get the results as a vector of the specified type
     template <typename T> void results(std::vector<T> &output) const {
         output.clear();
         bool retval = true;
@@ -881,7 +913,7 @@ class Option : public OptionBase<Option> {
         }
     }
 
-    /// return the results as a particular type
+    /// Return the results as the specified type
     template <typename T> T as() const {
         T output;
         results(output);
@@ -917,13 +949,27 @@ class Option : public OptionBase<Option> {
         return this;
     }
 
-    /// Set the default value string representation
+    /// Set a capture function for the default. Mostly used by App.
+    Option *default_function(const std::function<std::string()> &func) {
+        default_function_ = func;
+        return this;
+    }
+
+    /// Capture the default value from the original value (if it can be captured)
+    Option *capture_default_str() {
+        if(default_function_) {
+            default_str_ = default_function_();
+        }
+        return this;
+    }
+
+    /// Set the default value string representation (does not change the contained value)
     Option *default_str(std::string val) {
-        defaultval_ = val;
+        default_str_ = val;
         return this;
     }
 
-    /// Set the default value string representation and evaluate
+    /// Set the default value string representation and evaluate into the bound value
     Option *default_val(std::string val) {
         default_str(val);
         auto old_results = results_;
@@ -948,21 +994,25 @@ class Option : public OptionBase<Option> {
     }
 
   private:
-    // run through the validators
-    std::string _validate(std::string &result) {
+    // Run a result through the validators
+    std::string _validate(std::string &result, int index) {
         std::string err_msg;
         for(const auto &vali : validators_) {
-            try {
-                err_msg = vali(result);
-            } catch(const ValidationError &err) {
-                err_msg = err.what();
+            auto v = vali.get_application_index();
+            if(v == -1 || v == index) {
+                try {
+                    err_msg = vali(result);
+                } catch(const ValidationError &err) {
+                    err_msg = err.what();
+                }
+                if(!err_msg.empty())
+                    break;
             }
-            if(!err_msg.empty())
-                break;
         }
         return err_msg;
     }
 
+    /// Add a single result to the result set, taking into account delimiters
     int _add_result(std::string &&result) {
         int result_count = 0;
         if(delimiter_ == '\0') {
@@ -983,6 +1033,6 @@ class Option : public OptionBase<Option> {
         }
         return result_count;
     }
-};
+}; // namespace CLI
 
 } // namespace CLI
diff --git a/packages/CLI11/include/CLI/Optional.hpp b/packages/CLI11/include/CLI/Optional.hpp
deleted file mode 100644
index 3fbc43a622dc3b4305f6059db1134c7264eba1e3..0000000000000000000000000000000000000000
--- a/packages/CLI11/include/CLI/Optional.hpp
+++ /dev/null
@@ -1,95 +0,0 @@
-#pragma once
-
-// Distributed under the 3-Clause BSD License.  See accompanying
-// file LICENSE or https://github.com/CLIUtils/CLI11 for details.
-
-#include <istream>
-
-#include "CLI/Macros.hpp"
-
-// [CLI11:verbatim]
-#ifdef __has_include
-
-// You can explicitly enable or disable support
-// by defining these to 1 or 0.
-#if defined(CLI11_CPP17) && __has_include(<optional>) && \
-     !defined(CLI11_STD_OPTIONAL)
-#define CLI11_STD_OPTIONAL 1
-#elif !defined(CLI11_STD_OPTIONAL)
-#define CLI11_STD_OPTIONAL 0
-#endif
-
-#if defined(CLI11_CPP14) && __has_include(<experimental/optional>) && \
-    !defined(CLI11_EXPERIMENTAL_OPTIONAL) \
-    && (!defined(CLI11_STD_OPTIONAL) || CLI11_STD_OPTIONAL == 0)
-#define CLI11_EXPERIMENTAL_OPTIONAL 1
-#elif !defined(CLI11_EXPERIMENTAL_OPTIONAL)
-#define CLI11_EXPERIMENTAL_OPTIONAL 0
-#endif
-
-#if __has_include(<boost/optional.hpp>) && !defined(CLI11_BOOST_OPTIONAL)
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 106100
-#define CLI11_BOOST_OPTIONAL 1
-#endif
-#elif !defined(CLI11_BOOST_OPTIONAL)
-#define CLI11_BOOST_OPTIONAL 0
-#endif
-
-#endif
-
-#if CLI11_STD_OPTIONAL
-#include <optional>
-#endif
-#if CLI11_EXPERIMENTAL_OPTIONAL
-#include <experimental/optional>
-#endif
-#if CLI11_BOOST_OPTIONAL
-#include <boost/optional.hpp>
-#endif
-// [CLI11:verbatim]
-
-namespace CLI {
-
-#if CLI11_STD_OPTIONAL
-template <typename T> std::istream &operator>>(std::istream &in, std::optional<T> &val) {
-    T v;
-    in >> v;
-    val = v;
-    return in;
-}
-#endif
-
-#if CLI11_EXPERIMENTAL_OPTIONAL
-template <typename T> std::istream &operator>>(std::istream &in, std::experimental::optional<T> &val) {
-    T v;
-    in >> v;
-    val = v;
-    return in;
-}
-#endif
-
-#if CLI11_BOOST_OPTIONAL
-template <typename T> std::istream &operator>>(std::istream &in, boost::optional<T> &val) {
-    T v;
-    in >> v;
-    val = v;
-    return in;
-}
-#endif
-
-// Export the best optional to the CLI namespace
-#if CLI11_STD_OPTIONAL
-using std::optional;
-#elif CLI11_EXPERIMENTAL_OPTIONAL
-using std::experimental::optional;
-#elif CLI11_BOOST_OPTIONAL
-using boost::optional;
-#endif
-
-// This is true if any optional is found
-#if CLI11_STD_OPTIONAL || CLI11_EXPERIMENTAL_OPTIONAL || CLI11_BOOST_OPTIONAL
-#define CLI11_OPTIONAL 1
-#endif
-
-} // namespace CLI
diff --git a/packages/CLI11/include/CLI/Split.hpp b/packages/CLI11/include/CLI/Split.hpp
index 3c3b0523046e7b8992961761d15bcc3588587b1f..020c590bdb69afa0f9ac1de9b20dbe7f44332652 100644
--- a/packages/CLI11/include/CLI/Split.hpp
+++ b/packages/CLI11/include/CLI/Split.hpp
@@ -19,8 +19,8 @@ inline bool split_short(const std::string &current, std::string &name, std::stri
         name = current.substr(1, 1);
         rest = current.substr(2);
         return true;
-    } else
-        return false;
+    }
+    return false;
 }
 
 // Returns false if not a long option. Otherwise, sets opt name and other side of = and returns true
@@ -35,8 +35,8 @@ inline bool split_long(const std::string &current, std::string &name, std::strin
             value = "";
         }
         return true;
-    } else
-        return false;
+    }
+    return false;
 }
 
 // Returns false if not a windows style option. Otherwise, sets opt name and value and returns true
@@ -51,8 +51,8 @@ inline bool split_windows_style(const std::string &current, std::string &name, s
             value = "";
         }
         return true;
-    } else
-        return false;
+    }
+    return false;
 }
 
 // Splits a string into multiple long and short names
@@ -103,9 +103,10 @@ get_names(const std::vector<std::string> &input) {
     std::string pos_name;
 
     for(std::string name : input) {
-        if(name.length() == 0)
+        if(name.length() == 0) {
             continue;
-        else if(name.length() > 1 && name[0] == '-' && name[1] != '-') {
+        }
+        if(name.length() > 1 && name[0] == '-' && name[1] != '-') {
             if(name.length() == 2 && valid_first_char(name[1]))
                 short_names.emplace_back(1, name[1]);
             else
diff --git a/packages/CLI11/include/CLI/StringTools.hpp b/packages/CLI11/include/CLI/StringTools.hpp
index a680b5a160b03488e6db15db9963fab3364e8949..4ed8ea057fa908cbd2ff9caaf55bed8348a14a64 100644
--- a/packages/CLI11/include/CLI/StringTools.hpp
+++ b/packages/CLI11/include/CLI/StringTools.hpp
@@ -25,14 +25,6 @@ std::ostream &operator<<(std::ostream &in, const T &item) {
     return in << static_cast<typename std::underlying_type<T>::type>(item);
 }
 
-/// input streaming for enumerations
-template <typename T, typename = typename std::enable_if<std::is_enum<T>::value>::type>
-std::istream &operator>>(std::istream &in, T &item) {
-    typename std::underlying_type<T>::type i;
-    in >> i;
-    item = static_cast<T>(i);
-    return in;
-}
 } // namespace enums
 
 /// Export to CLI namespace
@@ -57,17 +49,6 @@ inline std::vector<std::string> split(const std::string &s, char delim) {
     }
     return elems;
 }
-/// simple utility to convert various types to a string
-template <typename T> inline std::string as_string(const T &v) {
-    std::ostringstream s;
-    s << v;
-    return s.str();
-}
-// if the data type is already a string just forward it
-template <typename T, typename = typename std::enable_if<std::is_constructible<std::string, T>::value>::type>
-inline auto as_string(T &&v) -> decltype(std::forward<T>(v)) {
-    return std::forward<T>(v);
-}
 
 /// Simple function to join a string
 template <typename T> std::string join(const T &v, std::string delim = ",") {
@@ -164,7 +145,12 @@ inline std::ostream &format_help(std::ostream &out, std::string name, std::strin
     if(!description.empty()) {
         if(name.length() >= wid)
             out << "\n" << std::setw(static_cast<int>(wid)) << "";
-        out << description;
+        for(const char c : description) {
+            out.put(c);
+            if(c == '\n') {
+                out << std::setw(static_cast<int>(wid)) << "";
+            }
+        }
     }
     out << "\n";
     return out;
@@ -188,6 +174,11 @@ inline bool valid_name_string(const std::string &str) {
     return true;
 }
 
+/// Verify that str consists of letters only
+inline bool isalpha(const std::string &str) {
+    return std::all_of(str.begin(), str.end(), [](char c) { return std::isalpha(c, std::locale()); });
+}
+
 /// Return a lower case version of a string
 inline std::string to_lower(std::string str) {
     std::transform(std::begin(str), std::end(str), std::begin(str), [](const std::string::value_type &x) {
@@ -221,11 +212,12 @@ inline bool has_default_flag_values(const std::string &flags) {
 }
 
 inline void remove_default_flag_values(std::string &flags) {
-    size_t loc = flags.find_first_of('{');
+    auto loc = flags.find_first_of('{');
     while(loc != std::string::npos) {
         auto finish = flags.find_first_of("},", loc + 1);
         if((finish != std::string::npos) && (flags[finish] == '}')) {
-            flags.erase(flags.begin() + loc, flags.begin() + finish + 1);
+            flags.erase(flags.begin() + static_cast<std::ptrdiff_t>(loc),
+                        flags.begin() + static_cast<std::ptrdiff_t>(finish) + 1);
         }
         loc = flags.find_first_of('{', loc + 1);
     }
diff --git a/packages/CLI11/include/CLI/Timer.hpp b/packages/CLI11/include/CLI/Timer.hpp
index 61039c2cde10a7c76a75968b2bac877c3e43bef5..481546ab8c889c800ae88072bfa381926d47322d 100644
--- a/packages/CLI11/include/CLI/Timer.hpp
+++ b/packages/CLI11/include/CLI/Timer.hpp
@@ -9,6 +9,7 @@
 #define _GLIBCXX_USE_NANOSLEEP
 #endif
 
+#include <array>
 #include <chrono>
 #include <functional>
 #include <iostream>
@@ -67,9 +68,9 @@ class Timer {
             f();
             std::chrono::duration<double> elapsed = clock::now() - start_;
             total_time = elapsed.count();
-        } while(n++ < 100 && total_time < target_time);
+        } while(n++ < 100u && total_time < target_time);
 
-        std::string out = make_time_str(total_time / n) + " for " + std::to_string(n) + " tries";
+        std::string out = make_time_str(total_time / static_cast<double>(n)) + " for " + std::to_string(n) + " tries";
         start_ = start;
         return out;
     }
@@ -78,7 +79,7 @@ class Timer {
     std::string make_time_str() const {
         time_point stop = clock::now();
         std::chrono::duration<double> elapsed = stop - start_;
-        double time = elapsed.count() / cycles;
+        double time = elapsed.count() / static_cast<double>(cycles);
         return make_time_str(time);
     }
 
@@ -86,9 +87,9 @@ class Timer {
     /// This prints out a time string from a time
     std::string make_time_str(double time) const {
         auto print_it = [](double x, std::string unit) {
-            char buffer[50];
-            std::snprintf(buffer, 50, "%.5g", x);
-            return buffer + std::string(" ") + unit;
+            std::array<char, 50> buffer;
+            std::snprintf(buffer.data(), 50, "%.5g", x);
+            return buffer.data() + std::string(" ") + unit;
         };
 
         if(time < .000001)
diff --git a/packages/CLI11/include/CLI/TypeTools.hpp b/packages/CLI11/include/CLI/TypeTools.hpp
index ca0100605533eed5ace149018ff44d3a08ebca2a..66a2909fefd6354c14e684f2af6f227baea8a0f6 100644
--- a/packages/CLI11/include/CLI/TypeTools.hpp
+++ b/packages/CLI11/include/CLI/TypeTools.hpp
@@ -124,6 +124,287 @@ struct pair_adaptor<
     }
 };
 
+// Warning is suppressed due to "bug" in gcc<5.0 and gcc 7.0 with c++17 enabled that generates a Wnarrowing warning
+// in the unevaluated context even if the function that was using this wasn't used.  The standard says narrowing in
+// brace initialization shouldn't be allowed but for backwards compatibility gcc allows it in some contexts.  It is a
+// little fuzzy what happens in template constructs and I think that was something GCC took a little while to work out.
+// But regardless some versions of gcc generate a warning when they shouldn't from the following code so that should be
+// suppressed
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnarrowing"
+#endif
+// check for constructibility from a specific type and copy assignable used in the parse detection
+template <typename T, typename C> class is_direct_constructible {
+    template <typename TT, typename CC>
+    static auto test(int, std::true_type) -> decltype(TT{std::declval<CC>()}, std::is_move_assignable<TT>());
+
+    template <typename TT, typename CC> static auto test(int, std::false_type) -> std::false_type;
+
+    template <typename, typename> static auto test(...) -> std::false_type;
+
+  public:
+    static constexpr bool value = decltype(test<T, C>(0, typename std::is_constructible<T, C>::type()))::value;
+};
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
+// Check for output streamability
+// Based on https://stackoverflow.com/questions/22758291/how-can-i-detect-if-a-type-can-be-streamed-to-an-stdostream
+
+template <typename T, typename S = std::ostringstream> class is_ostreamable {
+    template <typename TT, typename SS>
+    static auto test(int) -> decltype(std::declval<SS &>() << std::declval<TT>(), std::true_type());
+
+    template <typename, typename> static auto test(...) -> std::false_type;
+
+  public:
+    static constexpr bool value = decltype(test<T, S>(0))::value;
+};
+
+/// Check for input streamability
+template <typename T, typename S = std::istringstream> class is_istreamable {
+    template <typename TT, typename SS>
+    static auto test(int) -> decltype(std::declval<SS &>() >> std::declval<TT &>(), std::true_type());
+
+    template <typename, typename> static auto test(...) -> std::false_type;
+
+  public:
+    static constexpr bool value = decltype(test<T, S>(0))::value;
+};
+
+/// Templated operation to get a value from a stream
+template <typename T, enable_if_t<is_istreamable<T>::value, detail::enabler> = detail::dummy>
+bool from_stream(const std::string &istring, T &obj) {
+    std::istringstream is;
+    is.str(istring);
+    is >> obj;
+    return !is.fail() && !is.rdbuf()->in_avail();
+}
+
+template <typename T, enable_if_t<!is_istreamable<T>::value, detail::enabler> = detail::dummy>
+bool from_stream(const std::string & /*istring*/, T & /*obj*/) {
+    return false;
+}
+
+// Check for tuple like types, as in classes with a tuple_size type trait
+template <typename S> class is_tuple_like {
+    template <typename SS>
+    // static auto test(int)
+    //     -> decltype(std::conditional<(std::tuple_size<SS>::value > 0), std::true_type, std::false_type>::type());
+    static auto test(int) -> decltype(std::tuple_size<SS>::value, std::true_type{});
+    template <typename> static auto test(...) -> std::false_type;
+
+  public:
+    static constexpr bool value = decltype(test<S>(0))::value;
+};
+
+/// Convert an object to a string (directly forward if this can become a string)
+template <typename T, enable_if_t<std::is_constructible<std::string, T>::value, detail::enabler> = detail::dummy>
+auto to_string(T &&value) -> decltype(std::forward<T>(value)) {
+    return std::forward<T>(value);
+}
+
+/// Convert an object to a string (streaming must be supported for that type)
+template <typename T,
+          enable_if_t<!std::is_constructible<std::string, T>::value && is_ostreamable<T>::value, detail::enabler> =
+              detail::dummy>
+std::string to_string(T &&value) {
+    std::stringstream stream;
+    stream << value;
+    return stream.str();
+}
+
+/// If conversion is not supported, return an empty string (streaming is not supported for that type)
+template <typename T,
+          enable_if_t<!std::is_constructible<std::string, T>::value && !is_ostreamable<T>::value &&
+                          !is_vector<typename std::remove_reference<typename std::remove_const<T>::type>::type>::value,
+                      detail::enabler> = detail::dummy>
+std::string to_string(T &&) {
+    return std::string{};
+}
+
+/// convert a vector to a string
+template <typename T,
+          enable_if_t<!std::is_constructible<std::string, T>::value && !is_ostreamable<T>::value &&
+                          is_vector<typename std::remove_reference<typename std::remove_const<T>::type>::type>::value,
+                      detail::enabler> = detail::dummy>
+std::string to_string(T &&variable) {
+    std::vector<std::string> defaults;
+    defaults.reserve(variable.size());
+    auto cval = variable.begin();
+    auto end = variable.end();
+    while(cval != end) {
+        defaults.emplace_back(CLI::detail::to_string(*cval));
+        ++cval;
+    }
+    return std::string("[" + detail::join(defaults) + "]");
+}
+
+/// special template overload
+template <typename T1,
+          typename T2,
+          typename T,
+          enable_if_t<std::is_same<T1, T2>::value, detail::enabler> = detail::dummy>
+auto checked_to_string(T &&value) -> decltype(to_string(std::forward<T>(value))) {
+    return to_string(std::forward<T>(value));
+}
+
+/// special template overload
+template <typename T1,
+          typename T2,
+          typename T,
+          enable_if_t<!std::is_same<T1, T2>::value, detail::enabler> = detail::dummy>
+std::string checked_to_string(T &&) {
+    return std::string{};
+}
+
+/// This will only trigger for actual void type
+template <typename T, typename Enable = void> struct type_count { static const int value{0}; };
+
+/// Set of overloads to get the type size of an object
+template <typename T> struct type_count<T, typename std::enable_if<is_tuple_like<T>::value>::type> {
+    static constexpr int value{std::tuple_size<T>::value};
+};
+/// Type size for regular object types that do not look like a tuple
+template <typename T>
+struct type_count<
+    T,
+    typename std::enable_if<!is_vector<T>::value && !is_tuple_like<T>::value && !std::is_void<T>::value>::type> {
+    static constexpr int value{1};
+};
+/// Type size of types that look like a vector
+template <typename T> struct type_count<T, typename std::enable_if<is_vector<T>::value>::type> {
+    static constexpr int value{-1};
+};
+
+// Enumeration of the different supported categorizations of objects
+enum objCategory : int {
+    integral_value = 2,
+    unsigned_integral = 4,
+    enumeration = 6,
+    boolean_value = 8,
+    floating_point = 10,
+    number_constructible = 12,
+    double_constructible = 14,
+    integer_constructible = 16,
+    vector_value = 30,
+    tuple_value = 35,
+    // string assignable or greater used in a condition so anything string like must come last
+    string_assignable = 50,
+    string_constructible = 60,
+    other = 200,
+
+};
+
+/// some type that is not otherwise recognized
+template <typename T, typename Enable = void> struct classify_object { static constexpr objCategory value{other}; };
+
+/// Set of overloads to classify an object according to type
+template <typename T>
+struct classify_object<T,
+                       typename std::enable_if<std::is_integral<T>::value && std::is_signed<T>::value &&
+                                               !is_bool<T>::value && !std::is_enum<T>::value>::type> {
+    static constexpr objCategory value{integral_value};
+};
+
+/// Unsigned integers
+template <typename T>
+struct classify_object<
+    T,
+    typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value && !is_bool<T>::value>::type> {
+    static constexpr objCategory value{unsigned_integral};
+};
+
+/// Boolean values
+template <typename T> struct classify_object<T, typename std::enable_if<is_bool<T>::value>::type> {
+    static constexpr objCategory value{boolean_value};
+};
+
+/// Floats
+template <typename T> struct classify_object<T, typename std::enable_if<std::is_floating_point<T>::value>::type> {
+    static constexpr objCategory value{floating_point};
+};
+
+/// String and similar direct assignment
+template <typename T>
+struct classify_object<
+    T,
+    typename std::enable_if<!std::is_floating_point<T>::value && !std::is_integral<T>::value &&
+                            std::is_assignable<T &, std::string>::value && !is_vector<T>::value>::type> {
+    static constexpr objCategory value{string_assignable};
+};
+
+/// String and similar constructible and copy assignment
+template <typename T>
+struct classify_object<
+    T,
+    typename std::enable_if<!std::is_floating_point<T>::value && !std::is_integral<T>::value &&
+                            !std::is_assignable<T &, std::string>::value &&
+                            std::is_constructible<T, std::string>::value && !is_vector<T>::value>::type> {
+    static constexpr objCategory value{string_constructible};
+};
+
+/// Enumerations
+template <typename T> struct classify_object<T, typename std::enable_if<std::is_enum<T>::value>::type> {
+    static constexpr objCategory value{enumeration};
+};
+
+/// Handy helper to contain a bunch of checks that rule out many common types (integers, string like, floating point,
+/// vectors, and enumerations
+template <typename T> struct uncommon_type {
+    using type = typename std::conditional<!std::is_floating_point<T>::value && !std::is_integral<T>::value &&
+                                               !std::is_assignable<T &, std::string>::value &&
+                                               !std::is_constructible<T, std::string>::value && !is_vector<T>::value &&
+                                               !std::is_enum<T>::value,
+                                           std::true_type,
+                                           std::false_type>::type;
+    static constexpr bool value = type::value;
+};
+
+/// Assignable from double or int
+template <typename T>
+struct classify_object<T,
+                       typename std::enable_if<uncommon_type<T>::value && type_count<T>::value == 1 &&
+                                               is_direct_constructible<T, double>::value &&
+                                               is_direct_constructible<T, int>::value>::type> {
+    static constexpr objCategory value{number_constructible};
+};
+
+/// Assignable from int
+template <typename T>
+struct classify_object<T,
+                       typename std::enable_if<uncommon_type<T>::value && type_count<T>::value == 1 &&
+                                               !is_direct_constructible<T, double>::value &&
+                                               is_direct_constructible<T, int>::value>::type> {
+    static constexpr objCategory value{integer_constructible};
+};
+
+/// Assignable from double
+template <typename T>
+struct classify_object<T,
+                       typename std::enable_if<uncommon_type<T>::value && type_count<T>::value == 1 &&
+                                               is_direct_constructible<T, double>::value &&
+                                               !is_direct_constructible<T, int>::value>::type> {
+    static constexpr objCategory value{double_constructible};
+};
+
+/// Tuple type
+template <typename T>
+struct classify_object<
+    T,
+    typename std::enable_if<type_count<T>::value >= 2 || (is_tuple_like<T>::value && uncommon_type<T>::value &&
+                                                          !is_direct_constructible<T, double>::value &&
+                                                          !is_direct_constructible<T, int>::value)>::type> {
+    static constexpr objCategory value{tuple_value};
+};
+
+/// Vector type
+template <typename T> struct classify_object<T, typename std::enable_if<is_vector<T>::value>::type> {
+    static constexpr objCategory value{vector_value};
+};
+
 // Type name print
 
 /// Was going to be based on
@@ -131,42 +412,83 @@ struct pair_adaptor<
 /// But this is cleaner and works better in this case
 
 template <typename T,
-          enable_if_t<std::is_integral<T>::value && std::is_signed<T>::value, detail::enabler> = detail::dummy>
+          enable_if_t<classify_object<T>::value == integral_value || classify_object<T>::value == integer_constructible,
+                      detail::enabler> = detail::dummy>
 constexpr const char *type_name() {
     return "INT";
 }
 
-template <typename T,
-          enable_if_t<std::is_integral<T>::value && std::is_unsigned<T>::value, detail::enabler> = detail::dummy>
+template <typename T, enable_if_t<classify_object<T>::value == unsigned_integral, detail::enabler> = detail::dummy>
 constexpr const char *type_name() {
     return "UINT";
 }
 
-template <typename T, enable_if_t<std::is_floating_point<T>::value, detail::enabler> = detail::dummy>
+template <
+    typename T,
+    enable_if_t<classify_object<T>::value == floating_point || classify_object<T>::value == number_constructible ||
+                    classify_object<T>::value == double_constructible,
+                detail::enabler> = detail::dummy>
 constexpr const char *type_name() {
     return "FLOAT";
 }
 
-/// This one should not be used, since vector types print the internal type
-template <typename T, enable_if_t<is_vector<T>::value, detail::enabler> = detail::dummy>
+/// Print name for enumeration types
+template <typename T, enable_if_t<classify_object<T>::value == enumeration, detail::enabler> = detail::dummy>
 constexpr const char *type_name() {
-    return "VECTOR";
+    return "ENUM";
 }
+
 /// Print name for enumeration types
-template <typename T, enable_if_t<std::is_enum<T>::value, detail::enabler> = detail::dummy>
+template <typename T, enable_if_t<classify_object<T>::value == boolean_value, detail::enabler> = detail::dummy>
 constexpr const char *type_name() {
-    return "ENUM";
+    return "BOOLEAN";
 }
 
 /// Print for all other types
-template <typename T,
-          enable_if_t<!std::is_floating_point<T>::value && !std::is_integral<T>::value && !is_vector<T>::value &&
-                          !std::is_enum<T>::value,
-                      detail::enabler> = detail::dummy>
+template <typename T, enable_if_t<classify_object<T>::value >= string_assignable, detail::enabler> = detail::dummy>
 constexpr const char *type_name() {
     return "TEXT";
 }
 
+/// This one should not be used normally, since vector types print the internal type
+template <typename T, enable_if_t<classify_object<T>::value == vector_value, detail::enabler> = detail::dummy>
+constexpr const char *type_name() {
+    return type_name<typename T::value_type>();
+}
+
+/// Print name for single element tuple types
+template <
+    typename T,
+    enable_if_t<classify_object<T>::value == tuple_value && type_count<T>::value == 1, detail::enabler> = detail::dummy>
+std::string type_name() {
+    return type_name<typename std::tuple_element<0, T>::type>();
+}
+
+/// Empty string if the index > tuple size
+template <typename T, std::size_t I>
+inline typename std::enable_if<I == type_count<T>::value, std::string>::type tuple_name() {
+    return std::string{};
+}
+
+/// Recursively generate the tuple type name
+template <typename T, std::size_t I>
+    inline typename std::enable_if < I<type_count<T>::value, std::string>::type tuple_name() {
+    std::string str = std::string(type_name<typename std::tuple_element<I, T>::type>()) + ',' + tuple_name<T, I + 1>();
+    if(str.back() == ',')
+        str.pop_back();
+    return str;
+}
+
+/// Print type name for tuples with 2 or more elements
+template <
+    typename T,
+    enable_if_t<classify_object<T>::value == tuple_value && type_count<T>::value >= 2, detail::enabler> = detail::dummy>
+std::string type_name() {
+    auto tname = std::string(1, '[') + tuple_name<T, 0>();
+    tname.push_back(']');
+    return tname;
+}
+
 // Lexical cast
 
 /// Convert a flag into an integer value  typically binary flags
@@ -182,6 +504,9 @@ inline int64_t to_flag_value(std::string val) {
     val = detail::to_lower(val);
     int64_t ret;
     if(val.size() == 1) {
+        if(val[0] >= '1' && val[0] <= '9') {
+            return (static_cast<int64_t>(val[0]) - '0');
+        }
         switch(val[0]) {
         case '0':
         case 'f':
@@ -189,22 +514,11 @@ inline int64_t to_flag_value(std::string val) {
         case '-':
             ret = -1;
             break;
-        case '1':
         case 't':
         case 'y':
         case '+':
             ret = 1;
             break;
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-        case '6':
-        case '7':
-        case '8':
-        case '9':
-            ret = val[0] - '0';
-            break;
         default:
             throw std::invalid_argument("unrecognized character");
         }
@@ -221,11 +535,8 @@ inline int64_t to_flag_value(std::string val) {
 }
 
 /// Signed integers
-template <
-    typename T,
-    enable_if_t<std::is_integral<T>::value && std::is_signed<T>::value && !is_bool<T>::value && !std::is_enum<T>::value,
-                detail::enabler> = detail::dummy>
-bool lexical_cast(std::string input, T &output) {
+template <typename T, enable_if_t<classify_object<T>::value == integral_value, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
     try {
         size_t n = 0;
         long long output_ll = std::stoll(input, &n, 0);
@@ -239,10 +550,8 @@ bool lexical_cast(std::string input, T &output) {
 }
 
 /// Unsigned integers
-template <typename T,
-          enable_if_t<std::is_integral<T>::value && std::is_unsigned<T>::value && !is_bool<T>::value, detail::enabler> =
-              detail::dummy>
-bool lexical_cast(std::string input, T &output) {
+template <typename T, enable_if_t<classify_object<T>::value == unsigned_integral, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
     if(!input.empty() && input.front() == '-')
         return false; // std::stoull happily converts negative values to junk without any errors.
 
@@ -259,20 +568,25 @@ bool lexical_cast(std::string input, T &output) {
 }
 
 /// Boolean values
-template <typename T, enable_if_t<is_bool<T>::value, detail::enabler> = detail::dummy>
-bool lexical_cast(std::string input, T &output) {
+template <typename T, enable_if_t<classify_object<T>::value == boolean_value, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
     try {
         auto out = to_flag_value(input);
         output = (out > 0);
         return true;
     } catch(const std::invalid_argument &) {
         return false;
+    } catch(const std::out_of_range &) {
+        // if the number is out of the range of a 64 bit value then it is still a number and for this purpose is still
+        // valid all we care about the sign
+        output = (input[0] != '-');
+        return true;
     }
 }
 
 /// Floats
-template <typename T, enable_if_t<std::is_floating_point<T>::value, detail::enabler> = detail::dummy>
-bool lexical_cast(std::string input, T &output) {
+template <typename T, enable_if_t<classify_object<T>::value == floating_point, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
     try {
         size_t n = 0;
         output = static_cast<T>(std::stold(input, &n));
@@ -284,19 +598,23 @@ bool lexical_cast(std::string input, T &output) {
     }
 }
 
-/// String and similar
-template <typename T,
-          enable_if_t<!std::is_floating_point<T>::value && !std::is_integral<T>::value &&
-                          std::is_assignable<T &, std::string>::value,
-                      detail::enabler> = detail::dummy>
-bool lexical_cast(std::string input, T &output) {
+/// String and similar direct assignment
+template <typename T, enable_if_t<classify_object<T>::value == string_assignable, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
     output = input;
     return true;
 }
 
+/// String and similar constructible and copy assignment
+template <typename T, enable_if_t<classify_object<T>::value == string_constructible, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
+    output = T(input);
+    return true;
+}
+
 /// Enumerations
-template <typename T, enable_if_t<std::is_enum<T>::value, detail::enabler> = detail::dummy>
-bool lexical_cast(std::string input, T &output) {
+template <typename T, enable_if_t<classify_object<T>::value == enumeration, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
     typename std::underlying_type<T>::type val;
     bool retval = detail::lexical_cast(input, val);
     if(!retval) {
@@ -306,21 +624,179 @@ bool lexical_cast(std::string input, T &output) {
     return true;
 }
 
-/// Non-string parsable
+/// Assignable from double or int
+template <typename T, enable_if_t<classify_object<T>::value == number_constructible, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
+    int val;
+    if(lexical_cast(input, val)) {
+        output = T(val);
+        return true;
+    } else {
+        double dval;
+        if(lexical_cast(input, dval)) {
+            output = T{dval};
+            return true;
+        }
+    }
+    return from_stream(input, output);
+}
+
+/// Assignable from int
+template <typename T, enable_if_t<classify_object<T>::value == integer_constructible, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
+    int val;
+    if(lexical_cast(input, val)) {
+        output = T(val);
+        return true;
+    }
+    return from_stream(input, output);
+}
+
+/// Assignable from double
+template <typename T, enable_if_t<classify_object<T>::value == double_constructible, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
+    double val;
+    if(lexical_cast(input, val)) {
+        output = T{val};
+        return true;
+    }
+    return from_stream(input, output);
+}
+
+/// Non-string parsable by a stream
+template <typename T, enable_if_t<classify_object<T>::value == other, detail::enabler> = detail::dummy>
+bool lexical_cast(const std::string &input, T &output) {
+    static_assert(is_istreamable<T>::value,
+                  "option object type must have a lexical cast overload or streaming input operator(>>) defined, if it "
+                  "is convertible from another type use the add_option<T, XC>(...) with XC being the known type");
+    return from_stream(input, output);
+}
+
+/// Assign a value through lexical cast operations
+template <typename T, typename XC, enable_if_t<std::is_same<T, XC>::value, detail::enabler> = detail::dummy>
+bool lexical_assign(const std::string &input, T &output) {
+    return lexical_cast(input, output);
+}
+
+/// Assign a value converted from a string in lexical cast to the output value directly
+template <
+    typename T,
+    typename XC,
+    enable_if_t<!std::is_same<T, XC>::value && std::is_assignable<T &, XC &>::value, detail::enabler> = detail::dummy>
+bool lexical_assign(const std::string &input, T &output) {
+    XC val;
+    bool parse_result = lexical_cast<XC>(input, val);
+    if(parse_result) {
+        output = val;
+    }
+    return parse_result;
+}
+
+/// Assign a value from a lexical cast through constructing a value and move assigning it
 template <typename T,
-          enable_if_t<!std::is_floating_point<T>::value && !std::is_integral<T>::value &&
-                          !std::is_assignable<T &, std::string>::value && !std::is_enum<T>::value,
+          typename XC,
+          enable_if_t<!std::is_same<T, XC>::value && !std::is_assignable<T &, XC &>::value &&
+                          std::is_move_assignable<T>::value,
                       detail::enabler> = detail::dummy>
-bool lexical_cast(std::string input, T &output) {
-    std::istringstream is;
+bool lexical_assign(const std::string &input, T &output) {
+    XC val;
+    bool parse_result = lexical_cast<XC>(input, val);
+    if(parse_result) {
+        output = T(val); // use () form of constructor to allow some implicit conversions
+    }
+    return parse_result;
+}
+/// Lexical conversion if there is only one element
+template <typename T,
+          typename XC,
+          enable_if_t<!is_tuple_like<T>::value && !is_tuple_like<XC>::value && !is_vector<T>::value, detail::enabler> =
+              detail::dummy>
+bool lexical_conversion(const std::vector<std ::string> &strings, T &output) {
+    return lexical_assign<T, XC>(strings[0], output);
+}
 
-    is.str(input);
-    is >> output;
-    return !is.fail() && !is.rdbuf()->in_avail();
+/// Lexical conversion if there is only one element but the conversion type is for two call a two element constructor
+template <typename T,
+          typename XC,
+          enable_if_t<type_count<T>::value == 1 && type_count<XC>::value == 2, detail::enabler> = detail::dummy>
+bool lexical_conversion(const std::vector<std ::string> &strings, T &output) {
+    typename std::tuple_element<0, XC>::type v1;
+    typename std::tuple_element<1, XC>::type v2;
+    bool retval = lexical_cast(strings[0], v1);
+    if(strings.size() > 1) {
+        retval &= lexical_cast(strings[1], v2);
+    }
+    if(retval) {
+        output = T{v1, v2};
+    }
+    return retval;
+}
+
+/// Lexical conversion of a vector types
+template <class T,
+          class XC,
+          enable_if_t<type_count<T>::value == -1 && type_count<XC>::value == -1, detail::enabler> = detail::dummy>
+bool lexical_conversion(const std::vector<std ::string> &strings, T &output) {
+    bool retval = true;
+    output.clear();
+    output.reserve(strings.size());
+    for(const auto &elem : strings) {
+
+        output.emplace_back();
+        retval &= lexical_assign<typename T::value_type, typename XC::value_type>(elem, output.back());
+    }
+    return (!output.empty()) && retval;
+}
+
+/// Conversion to a vector type using a particular single type as the conversion type
+template <class T,
+          class XC,
+          enable_if_t<(type_count<T>::value == -1) && (type_count<XC>::value == 1), detail::enabler> = detail::dummy>
+bool lexical_conversion(const std::vector<std ::string> &strings, T &output) {
+    bool retval = true;
+    output.clear();
+    output.reserve(strings.size());
+    for(const auto &elem : strings) {
+
+        output.emplace_back();
+        retval &= lexical_assign<typename T::value_type, XC>(elem, output.back());
+    }
+    return (!output.empty()) && retval;
+}
+
+/// function template for converting tuples if the static Index is greater than the tuple size
+template <class T, class XC, std::size_t I>
+inline typename std::enable_if<I >= type_count<T>::value, bool>::type tuple_conversion(const std::vector<std::string> &,
+                                                                                       T &) {
+    return true;
+}
+/// Tuple conversion operation
+template <class T, class XC, std::size_t I>
+    inline typename std::enable_if <
+    I<type_count<T>::value, bool>::type tuple_conversion(const std::vector<std::string> &strings, T &output) {
+    bool retval = true;
+    if(strings.size() > I) {
+        retval &= lexical_assign<
+            typename std::tuple_element<I, T>::type,
+            typename std::conditional<is_tuple_like<XC>::value, typename std::tuple_element<I, XC>::type, XC>::type>(
+            strings[I], std::get<I>(output));
+    }
+    retval &= tuple_conversion<T, XC, I + 1>(strings, output);
+    return retval;
+}
+
+/// Conversion for tuples
+template <class T, class XC, enable_if_t<is_tuple_like<T>::value, detail::enabler> = detail::dummy>
+bool lexical_conversion(const std::vector<std ::string> &strings, T &output) {
+    static_assert(
+        !is_tuple_like<XC>::value || type_count<T>::value == type_count<XC>::value,
+        "if the conversion type is defined as a tuple it must be the same size as the type you are converting to");
+    return tuple_conversion<T, XC, 0>(strings, output);
 }
 
 /// Sum a vector of flag representations
-/// The flag vector produces a series of strings in a vector,  simple true is represented by a "1",  simple false is by
+/// The flag vector produces a series of strings in a vector,  simple true is represented by a "1",  simple false is
+/// by
 /// "-1" an if numbers are passed by some fashion they are captured as well so the function just checks for the most
 /// common true and false strings then uses stoll to convert the rest for summing
 template <typename T,
@@ -334,7 +810,8 @@ void sum_flag_vector(const std::vector<std::string> &flags, T &output) {
 }
 
 /// Sum a vector of flag representations
-/// The flag vector produces a series of strings in a vector,  simple true is represented by a "1",  simple false is by
+/// The flag vector produces a series of strings in a vector,  simple true is represented by a "1",  simple false is
+/// by
 /// "-1" an if numbers are passed by some fashion they are captured as well so the function just checks for the most
 /// common true and false strings then uses stoll to convert the rest for summing
 template <typename T,
diff --git a/packages/CLI11/include/CLI/Validators.hpp b/packages/CLI11/include/CLI/Validators.hpp
index 54294743ecd156b16caff57c1c4202385b089587..b4586ed11348c1b5fbf0e076fcfd5f75f44bf337 100644
--- a/packages/CLI11/include/CLI/Validators.hpp
+++ b/packages/CLI11/include/CLI/Validators.hpp
@@ -1,13 +1,15 @@
 #pragma once
-
 // Distributed under the 3-Clause BSD License.  See accompanying
 // file LICENSE or https://github.com/CLIUtils/CLI11 for details.
 
 #include "CLI/StringTools.hpp"
 #include "CLI/TypeTools.hpp"
 
+#include <cmath>
 #include <functional>
 #include <iostream>
+#include <limits>
+#include <map>
 #include <memory>
 #include <string>
 
@@ -41,6 +43,8 @@ class Validator {
     std::function<std::string(std::string &)> func_{[](std::string &) { return std::string{}; }};
     /// The name for search purposes of the Validator
     std::string name_;
+    /// A Validator will only apply to an indexed value (-1 is all elements)
+    int application_index_ = -1;
     /// Enable for Validator to allow it to be disabled if need be
     bool active_{true};
     /// specify that a validator should not modify the input
@@ -50,7 +54,7 @@ class Validator {
     Validator() = default;
     /// Construct a Validator with just the description string
     explicit Validator(std::string validator_desc) : desc_function_([validator_desc]() { return validator_desc; }) {}
-    // Construct Validator from basic information
+    /// Construct Validator from basic information
     Validator(std::function<std::string(std::string &)> op, std::string validator_desc, std::string validator_name = "")
         : desc_function_([validator_desc]() { return validator_desc; }), func_(std::move(op)),
           name_(std::move(validator_name)) {}
@@ -86,6 +90,12 @@ class Validator {
         desc_function_ = [validator_desc]() { return validator_desc; };
         return *this;
     }
+    /// Specify the type string
+    Validator description(std::string validator_desc) const {
+        Validator newval(*this);
+        newval.desc_function_ = [validator_desc]() { return validator_desc; };
+        return newval;
+    }
     /// Generate type description information for the Validator
     std::string get_description() const {
         if(active_) {
@@ -98,6 +108,12 @@ class Validator {
         name_ = std::move(validator_name);
         return *this;
     }
+    /// Specify the type string
+    Validator name(std::string validator_name) const {
+        Validator newval(*this);
+        newval.name_ = std::move(validator_name);
+        return newval;
+    }
     /// Get the name of the Validator
     const std::string &get_name() const { return name_; }
     /// Specify whether the Validator is active or not
@@ -105,13 +121,31 @@ class Validator {
         active_ = active_val;
         return *this;
     }
+    /// Specify whether the Validator is active or not
+    Validator active(bool active_val = true) const {
+        Validator newval(*this);
+        newval.active_ = active_val;
+        return newval;
+    }
 
     /// Specify whether the Validator can be modifying or not
     Validator &non_modifying(bool no_modify = true) {
         non_modifying_ = no_modify;
         return *this;
     }
-
+    /// Specify the application index of a validator
+    Validator &application_index(int app_index) {
+        application_index_ = app_index;
+        return *this;
+    };
+    /// Specify the application index of a validator
+    Validator application_index(int app_index) const {
+        Validator newval(*this);
+        newval.application_index_ = app_index;
+        return newval;
+    };
+    /// Get the current value of the application index
+    int get_application_index() const { return application_index_; }
     /// Get a boolean if the validator is active
     bool get_active() const { return active_; }
 
@@ -139,6 +173,7 @@ class Validator {
         };
 
         newval.active_ = (active_ & other.active_);
+        newval.application_index_ = application_index_;
         return newval;
     }
 
@@ -158,10 +193,11 @@ class Validator {
             std::string s2 = f2(input);
             if(s1.empty() || s2.empty())
                 return std::string();
-            else
-                return std::string("(") + s1 + ") OR (" + s2 + ")";
+
+            return std::string("(") + s1 + ") OR (" + s2 + ")";
         };
         newval.active_ = (active_ & other.active_);
+        newval.application_index_ = application_index_;
         return newval;
     }
 
@@ -180,10 +216,11 @@ class Validator {
             std::string s1 = f1(test);
             if(s1.empty()) {
                 return std::string("check ") + dfunc1() + " succeeded improperly";
-            } else
-                return std::string{};
+            }
+            return std::string{};
         };
         newval.active_ = active_;
+        newval.application_index_ = application_index_;
         return newval;
     }
 
@@ -199,10 +236,10 @@ class Validator {
             if((f1.empty()) || (f2.empty())) {
                 return f1 + f2;
             }
-            return std::string("(") + f1 + ")" + merger + "(" + f2 + ")";
+            return std::string(1, '(') + f1 + ')' + merger + '(' + f2 + ')';
         };
     }
-};
+}; // namespace CLI
 
 /// Class wrapping some of the accessors of Validator
 class CustomValidator : public Validator {
@@ -223,7 +260,8 @@ class ExistingFileValidator : public Validator {
             bool is_dir = (buffer.st_mode & S_IFDIR) != 0;
             if(!exist) {
                 return "File does not exist: " + filename;
-            } else if(is_dir) {
+            }
+            if(is_dir) {
                 return "File is actually a directory: " + filename;
             }
             return std::string();
@@ -241,7 +279,8 @@ class ExistingDirectoryValidator : public Validator {
             bool is_dir = (buffer.st_mode & S_IFDIR) != 0;
             if(!exist) {
                 return "Directory does not exist: " + filename;
-            } else if(!is_dir) {
+            }
+            if(!is_dir) {
                 return "Directory is actually a file: " + filename;
             }
             return std::string();
@@ -405,11 +444,11 @@ class Bound : public Validator {
                 return "Value " + input + " could not be converted";
             }
             if(val < min)
-                input = detail::as_string(min);
+                input = detail::to_string(min);
             else if(val > max)
-                input = detail::as_string(max);
+                input = detail::to_string(max);
 
-            return std::string();
+            return std::string{};
         };
     }
 
@@ -443,28 +482,33 @@ template <typename T> std::string generate_set(const T &set) {
 }
 
 /// Generate a string representation of a map
-template <typename T> std::string generate_map(const T &map) {
+template <typename T> std::string generate_map(const T &map, bool key_only = false) {
     using element_t = typename detail::element_type<T>::type;
     using iteration_type_t = typename detail::pair_adaptor<element_t>::value_type; // the type of the object pair
     std::string out(1, '{');
     out.append(detail::join(detail::smart_deref(map),
-                            [](const iteration_type_t &v) {
-                                return detail::as_string(detail::pair_adaptor<element_t>::first(v)) + "->" +
-                                       detail::as_string(detail::pair_adaptor<element_t>::second(v));
+                            [key_only](const iteration_type_t &v) {
+                                std::string res{detail::to_string(detail::pair_adaptor<element_t>::first(v))};
+
+                                if(!key_only) {
+                                    res.append("->");
+                                    res += detail::to_string(detail::pair_adaptor<element_t>::second(v));
+                                }
+                                return res;
                             },
                             ","));
     out.push_back('}');
     return out;
 }
 
-template <typename> struct sfinae_true : std::true_type {};
-/// Function to check for the existence of a member find function which presumably is more efficient than looping over
-/// everything
-template <typename T, typename V>
-static auto test_find(int) -> sfinae_true<decltype(std::declval<T>().find(std::declval<V>()))>;
-template <typename, typename V> static auto test_find(long) -> std::false_type;
+template <typename C, typename V> struct has_find {
+    template <typename CC, typename VV>
+    static auto test(int) -> decltype(std::declval<CC>().find(std::declval<VV>()), std::true_type());
+    template <typename, typename> static auto test(...) -> decltype(std::false_type());
 
-template <typename T, typename V> struct has_find : decltype(test_find<T, V>(0)) {};
+    static const auto value = decltype(test<C, V>(0))::value;
+    using type = std::integral_constant<bool, value>;
+};
 
 /// A search function
 template <typename T, typename V, enable_if_t<!has_find<T, V>::value, detail::enabler> = detail::dummy>
@@ -498,13 +542,58 @@ auto search(const T &set, const V &val, const std::function<V(V)> &filter_functi
     // if we haven't found it do the longer linear search with all the element translations
     auto &setref = detail::smart_deref(set);
     auto it = std::find_if(std::begin(setref), std::end(setref), [&](decltype(*std::begin(setref)) v) {
-        V a = detail::pair_adaptor<element_t>::first(v);
+        V a{detail::pair_adaptor<element_t>::first(v)};
         a = filter_function(a);
         return (a == val);
     });
     return {(it != std::end(setref)), it};
 }
 
+// the following suggestion was made by Nikita Ofitserov(@himikof)
+// done in templates to prevent compiler warnings on negation of unsigned numbers
+
+/// Do a check for overflow on signed numbers
+template <typename T>
+inline typename std::enable_if<std::is_signed<T>::value, T>::type overflowCheck(const T &a, const T &b) {
+    if((a > 0) == (b > 0)) {
+        return ((std::numeric_limits<T>::max)() / (std::abs)(a) < (std::abs)(b));
+    } else {
+        return ((std::numeric_limits<T>::min)() / (std::abs)(a) > -(std::abs)(b));
+    }
+}
+/// Do a check for overflow on unsigned numbers
+template <typename T>
+inline typename std::enable_if<!std::is_signed<T>::value, T>::type overflowCheck(const T &a, const T &b) {
+    return ((std::numeric_limits<T>::max)() / a < b);
+}
+
+/// Performs a *= b; if it doesn't cause integer overflow. Returns false otherwise.
+template <typename T> typename std::enable_if<std::is_integral<T>::value, bool>::type checked_multiply(T &a, T b) {
+    if(a == 0 || b == 0 || a == 1 || b == 1) {
+        a *= b;
+        return true;
+    }
+    if(a == (std::numeric_limits<T>::min)() || b == (std::numeric_limits<T>::min)()) {
+        return false;
+    }
+    if(overflowCheck(a, b)) {
+        return false;
+    }
+    a *= b;
+    return true;
+}
+
+/// Performs a *= b; if it doesn't equal infinity. Returns false otherwise.
+template <typename T>
+typename std::enable_if<std::is_floating_point<T>::value, bool>::type checked_multiply(T &a, T b) {
+    T c = a * b;
+    if(std::isinf(c) && !std::isinf(a) && !std::isinf(b)) {
+        return false;
+    }
+    a = c;
+    return true;
+}
+
 } // namespace detail
 /// Verify items are in a set
 class IsMember : public Validator {
@@ -551,7 +640,7 @@ class IsMember : public Validator {
             if(res.first) {
                 // Make sure the version in the input string is identical to the one in the set
                 if(filter_fn) {
-                    input = detail::as_string(detail::pair_adaptor<element_t>::first(*(res.second)));
+                    input = detail::to_string(detail::pair_adaptor<element_t>::first(*(res.second)));
                 }
 
                 // Return empty error string (success)
@@ -619,7 +708,7 @@ class Transformer : public Validator {
             }
             auto res = detail::search(mapping, b, filter_fn);
             if(res.first) {
-                input = detail::as_string(detail::pair_adaptor<element_t>::second(*res.second));
+                input = detail::to_string(detail::pair_adaptor<element_t>::second(*res.second));
             }
             return std::string{};
         };
@@ -669,7 +758,7 @@ class CheckedTransformer : public Validator {
             out += detail::generate_map(detail::smart_deref(mapping)) + " OR {";
             out += detail::join(
                 detail::smart_deref(mapping),
-                [](const iteration_type_t &v) { return detail::as_string(detail::pair_adaptor<element_t>::second(v)); },
+                [](const iteration_type_t &v) { return detail::to_string(detail::pair_adaptor<element_t>::second(v)); },
                 ",");
             out.push_back('}');
             return out;
@@ -686,12 +775,12 @@ class CheckedTransformer : public Validator {
                 }
                 auto res = detail::search(mapping, b, filter_fn);
                 if(res.first) {
-                    input = detail::as_string(detail::pair_adaptor<element_t>::second(*res.second));
+                    input = detail::to_string(detail::pair_adaptor<element_t>::second(*res.second));
                     return std::string{};
                 }
             }
             for(const auto &v : detail::smart_deref(mapping)) {
-                auto output_string = detail::as_string(detail::pair_adaptor<element_t>::second(v));
+                auto output_string = detail::to_string(detail::pair_adaptor<element_t>::second(v));
                 if(output_string == input) {
                     return std::string();
                 }
@@ -707,7 +796,7 @@ class CheckedTransformer : public Validator {
         : CheckedTransformer(std::forward<T>(mapping),
                              [filter_fn_1, filter_fn_2](std::string a) { return filter_fn_2(filter_fn_1(a)); },
                              other...) {}
-}; // namespace CLI
+};
 
 /// Helper function to allow ignore_case to be passed to IsMember or Transform
 inline std::string ignore_case(std::string item) { return detail::to_lower(item); }
@@ -722,6 +811,197 @@ inline std::string ignore_space(std::string item) {
     return item;
 }
 
+/// Multiply a number by a factor using given mapping.
+/// Can be used to write transforms for SIZE or DURATION inputs.
+///
+/// Example:
+///   With mapping = `{"b"->1, "kb"->1024, "mb"->1024*1024}`
+///   one can recognize inputs like "100", "12kb", "100 MB",
+///   that will be automatically transformed to 100, 14448, 104857600.
+///
+/// Output number type matches the type in the provided mapping.
+/// Therefore, if it is required to interpret real inputs like "0.42 s",
+/// the mapping should be of a type <string, float> or <string, double>.
+class AsNumberWithUnit : public Validator {
+  public:
+    /// Adjust AsNumberWithUnit behavior.
+    /// CASE_SENSITIVE/CASE_INSENSITIVE controls how units are matched.
+    /// UNIT_OPTIONAL/UNIT_REQUIRED throws ValidationError
+    ///   if UNIT_REQUIRED is set and unit literal is not found.
+    enum Options {
+        CASE_SENSITIVE = 0,
+        CASE_INSENSITIVE = 1,
+        UNIT_OPTIONAL = 0,
+        UNIT_REQUIRED = 2,
+        DEFAULT = CASE_INSENSITIVE | UNIT_OPTIONAL
+    };
+
+    template <typename Number>
+    explicit AsNumberWithUnit(std::map<std::string, Number> mapping,
+                              Options opts = DEFAULT,
+                              const std::string &unit_name = "UNIT") {
+        description(generate_description<Number>(unit_name, opts));
+        validate_mapping(mapping, opts);
+
+        // transform function
+        func_ = [mapping, opts](std::string &input) -> std::string {
+            Number num;
+
+            detail::rtrim(input);
+            if(input.empty()) {
+                throw ValidationError("Input is empty");
+            }
+
+            // Find split position between number and prefix
+            auto unit_begin = input.end();
+            while(unit_begin > input.begin() && std::isalpha(*(unit_begin - 1), std::locale())) {
+                --unit_begin;
+            }
+
+            std::string unit{unit_begin, input.end()};
+            input.resize(static_cast<size_t>(std::distance(input.begin(), unit_begin)));
+            detail::trim(input);
+
+            if(opts & UNIT_REQUIRED && unit.empty()) {
+                throw ValidationError("Missing mandatory unit");
+            }
+            if(opts & CASE_INSENSITIVE) {
+                unit = detail::to_lower(unit);
+            }
+
+            bool converted = detail::lexical_cast(input, num);
+            if(!converted) {
+                throw ValidationError("Value " + input + " could not be converted to " + detail::type_name<Number>());
+            }
+
+            if(unit.empty()) {
+                // No need to modify input if no unit passed
+                return {};
+            }
+
+            // find corresponding factor
+            auto it = mapping.find(unit);
+            if(it == mapping.end()) {
+                throw ValidationError(unit +
+                                      " unit not recognized. "
+                                      "Allowed values: " +
+                                      detail::generate_map(mapping, true));
+            }
+
+            // perform safe multiplication
+            bool ok = detail::checked_multiply(num, it->second);
+            if(!ok) {
+                throw ValidationError(detail::to_string(num) + " multiplied by " + unit +
+                                      " factor would cause number overflow. Use smaller value.");
+            }
+            input = detail::to_string(num);
+
+            return {};
+        };
+    }
+
+  private:
+    /// Check that mapping contains valid units.
+    /// Update mapping for CASE_INSENSITIVE mode.
+    template <typename Number> static void validate_mapping(std::map<std::string, Number> &mapping, Options opts) {
+        for(auto &kv : mapping) {
+            if(kv.first.empty()) {
+                throw ValidationError("Unit must not be empty.");
+            }
+            if(!detail::isalpha(kv.first)) {
+                throw ValidationError("Unit must contain only letters.");
+            }
+        }
+
+        // make all units lowercase if CASE_INSENSITIVE
+        if(opts & CASE_INSENSITIVE) {
+            std::map<std::string, Number> lower_mapping;
+            for(auto &kv : mapping) {
+                auto s = detail::to_lower(kv.first);
+                if(lower_mapping.count(s)) {
+                    throw ValidationError("Several matching lowercase unit representations are found: " + s);
+                }
+                lower_mapping[detail::to_lower(kv.first)] = kv.second;
+            }
+            mapping = std::move(lower_mapping);
+        }
+    }
+
+    /// Generate description like this: NUMBER [UNIT]
+    template <typename Number> static std::string generate_description(const std::string &name, Options opts) {
+        std::stringstream out;
+        out << detail::type_name<Number>() << ' ';
+        if(opts & UNIT_REQUIRED) {
+            out << name;
+        } else {
+            out << '[' << name << ']';
+        }
+        return out.str();
+    }
+};
+
+/// Converts a human-readable size string (with unit literal) to uin64_t size.
+/// Example:
+///   "100" => 100
+///   "1 b" => 100
+///   "10Kb" => 10240 // you can configure this to be interpreted as kilobyte (*1000) or kibibyte (*1024)
+///   "10 KB" => 10240
+///   "10 kb" => 10240
+///   "10 kib" => 10240 // *i, *ib are always interpreted as *bibyte (*1024)
+///   "10kb" => 10240
+///   "2 MB" => 2097152
+///   "2 EiB" => 2^61 // Units up to exibyte are supported
+class AsSizeValue : public AsNumberWithUnit {
+  public:
+    using result_t = uint64_t;
+
+    /// If kb_is_1000 is true,
+    /// interpret 'kb', 'k' as 1000 and 'kib', 'ki' as 1024
+    /// (same applies to higher order units as well).
+    /// Otherwise, interpret all literals as factors of 1024.
+    /// The first option is formally correct, but
+    /// the second interpretation is more wide-spread
+    /// (see https://en.wikipedia.org/wiki/Binary_prefix).
+    explicit AsSizeValue(bool kb_is_1000) : AsNumberWithUnit(get_mapping(kb_is_1000)) {
+        if(kb_is_1000) {
+            description("SIZE [b, kb(=1000b), kib(=1024b), ...]");
+        } else {
+            description("SIZE [b, kb(=1024b), ...]");
+        }
+    }
+
+  private:
+    /// Get <size unit, factor> mapping
+    static std::map<std::string, result_t> init_mapping(bool kb_is_1000) {
+        std::map<std::string, result_t> m;
+        result_t k_factor = kb_is_1000 ? 1000 : 1024;
+        result_t ki_factor = 1024;
+        result_t k = 1;
+        result_t ki = 1;
+        m["b"] = 1;
+        for(std::string p : {"k", "m", "g", "t", "p", "e"}) {
+            k *= k_factor;
+            ki *= ki_factor;
+            m[p] = k;
+            m[p + "b"] = k;
+            m[p + "i"] = ki;
+            m[p + "ib"] = ki;
+        }
+        return m;
+    }
+
+    /// Cache calculated mapping
+    static std::map<std::string, result_t> get_mapping(bool kb_is_1000) {
+        if(kb_is_1000) {
+            static auto m = init_mapping(true);
+            return m;
+        } else {
+            static auto m = init_mapping(false);
+            return m;
+        }
+    }
+};
+
 namespace detail {
 /// Split a string into a program name and command line arguments
 /// the string is assumed to contain a file name followed by other arguments
diff --git a/packages/CLI11/include/CLI/Version.hpp b/packages/CLI11/include/CLI/Version.hpp
index c86c09c40efa8892a8e11f878e297f4a533a6d5d..e9261b8951fde2a1db1ed6069de359a4e13cc2c4 100644
--- a/packages/CLI11/include/CLI/Version.hpp
+++ b/packages/CLI11/include/CLI/Version.hpp
@@ -6,8 +6,8 @@
 // [CLI11:verbatim]
 
 #define CLI11_VERSION_MAJOR 1
-#define CLI11_VERSION_MINOR 7
-#define CLI11_VERSION_PATCH 1
-#define CLI11_VERSION "1.7.1"
+#define CLI11_VERSION_MINOR 8
+#define CLI11_VERSION_PATCH 0
+#define CLI11_VERSION "1.8.0"
 
 // [CLI11:verbatim]
diff --git a/packages/CLI11/meson.build b/packages/CLI11/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..8b36c2a777f4e16f8f693b2de44c4f74001705b7
--- /dev/null
+++ b/packages/CLI11/meson.build
@@ -0,0 +1,11 @@
+project('CLI11', ['cpp'],
+  version         : run_command(find_program('scripts/ExtractVersion.py')).stdout().strip(),
+  default_options : ['cpp_std=c++11']
+)
+
+CLI11_inc = include_directories(['include'])
+
+CLI11_dep = declare_dependency(
+  include_directories : CLI11_inc,
+  version             : meson.project_version(),
+)
diff --git a/packages/CLI11/scripts/ExtractVersion.py b/packages/CLI11/scripts/ExtractVersion.py
new file mode 100755
index 0000000000000000000000000000000000000000..42d82cd267eb45125cc9e3afc8f6ed3749aa4647
--- /dev/null
+++ b/packages/CLI11/scripts/ExtractVersion.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+
+import os
+import re
+
+base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+config_h  = os.path.join(base_path, 'include', 'CLI', 'Version.hpp')
+data      = {'MAJOR': 0, 'MINOR': 0, 'PATCH': 0}
+reg       = re.compile(r'^\s*#define\s+CLI11_VERSION_([A-Z]+)\s+([0-9]+).*$')
+
+with open(config_h, 'r') as fp:
+  for l in fp:
+    m = reg.match(l)
+    if m:
+      data[m.group(1)] = int(m.group(2))
+
+print('{}.{}.{}'.format(data['MAJOR'], data['MINOR'], data['PATCH']))
diff --git a/packages/CLI11/scripts/check_style_docker.sh b/packages/CLI11/scripts/check_style_docker.sh
index 9030dc51e578d2e446d5d6b94580b13c02ebaa16..3defb240675fda1a8c0449854c7bd6bbebb3bdee 100755
--- a/packages/CLI11/scripts/check_style_docker.sh
+++ b/packages/CLI11/scripts/check_style_docker.sh
@@ -1,12 +1,13 @@
 #!/usr/bin/env sh
 
 # Also good but untagged: CLANG_FORMAT=unibeautify/clang-format
+# This might provide more control in the future: silkeh/clang:8 (etc)
 CLANG_FORMAT=saschpe/clang-format:5.0.1
 
 set -evx
 
-docker run --rm -it ${CLANG_FORMAT} --version
-docker run --rm -it -v "$(pwd)":/workdir -w /workdir ${CLANG_FORMAT} -style=file -sort-includes -i $(git ls-files -- '*.cpp' '*.hpp')
+docker run --rm ${CLANG_FORMAT} --version
+docker run --rm --user $(id -u):$(id -g) -v "$(pwd)":/workdir -w /workdir ${CLANG_FORMAT} -style=file -sort-includes -i $(git ls-files -- '*.cpp' '*.hpp')
 
 git diff --exit-code --color
 
diff --git a/packages/CLI11/tests/AppTest.cpp b/packages/CLI11/tests/AppTest.cpp
index 54cf8501001c043b3c22aa186e9bb76143fc265f..8037cae2f47f84850f17a341914036db891b5a5b 100644
--- a/packages/CLI11/tests/AppTest.cpp
+++ b/packages/CLI11/tests/AppTest.cpp
@@ -647,6 +647,15 @@ TEST_F(TApp, BoolOption) {
     args = {"-b", "-7"};
     run();
     EXPECT_FALSE(bflag);
+
+    // cause an out of bounds error internally
+    args = {"-b", "751615654161688126132138844896646748852"};
+    run();
+    EXPECT_TRUE(bflag);
+
+    args = {"-b", "-751615654161688126132138844896646748852"};
+    run();
+    EXPECT_FALSE(bflag);
 }
 
 TEST_F(TApp, ShortOpts) {
@@ -669,13 +678,34 @@ TEST_F(TApp, ShortOpts) {
     EXPECT_EQ(app.count_all(), 3u);
 }
 
+TEST_F(TApp, TwoParamTemplateOpts) {
+
+    double funnyint;
+    auto opt = app.add_option<double, unsigned int>("-y", funnyint);
+
+    args = {"-y", "32"};
+
+    run();
+
+    EXPECT_EQ(32.0, funnyint);
+
+    args = {"-y", "32.3"};
+    EXPECT_THROW(run(), CLI::ConversionError);
+
+    args = {"-y", "-19"};
+    EXPECT_THROW(run(), CLI::ConversionError);
+
+    opt->capture_default_str();
+    EXPECT_TRUE(opt->get_default_str().empty());
+}
+
 TEST_F(TApp, DefaultOpts) {
 
     int i = 3;
     std::string s = "HI";
 
-    app.add_option("-i,i", i, "", false);
-    app.add_option("-s,s", s, "", true);
+    app.add_option("-i,i", i);
+    app.add_option("-s,s", s)->capture_default_str(); //  Used to be different
 
     args = {"-i2", "9"};
 
@@ -770,6 +800,19 @@ TEST_F(TApp, TakeLastOptMulti) {
     EXPECT_EQ(vals, std::vector<int>({2, 3}));
 }
 
+TEST_F(TApp, TakeLastOptMultiCheck) {
+    std::vector<int> vals;
+    auto opt = app.add_option("--long", vals)->expected(2)->take_last();
+
+    opt->check(CLI::Validator(CLI::PositiveNumber).application_index(0));
+    opt->check((!CLI::PositiveNumber).application_index(1));
+    args = {"--long", "-1", "2", "-3"};
+
+    EXPECT_NO_THROW(run());
+
+    EXPECT_EQ(vals, std::vector<int>({2, -3}));
+}
+
 TEST_F(TApp, TakeFirstOptMulti) {
     std::vector<int> vals;
     app.add_option("--long", vals)->expected(2)->take_first();
@@ -962,13 +1005,81 @@ TEST_F(TApp, PositionalAtEnd) {
     EXPECT_THROW(run(), CLI::ExtrasError);
 }
 
+// Tests positionals at end
+TEST_F(TApp, RequiredPositionals) {
+    std::vector<std::string> sources;
+    std::string dest;
+    app.add_option("src", sources);
+    app.add_option("dest", dest)->required();
+    app.positionals_at_end();
+
+    args = {"1", "2", "3"};
+    run();
+
+    EXPECT_EQ(sources.size(), 2u);
+    EXPECT_EQ(dest, "3");
+
+    args = {"a"};
+    sources.clear();
+    run();
+
+    EXPECT_EQ(sources.size(), 0u);
+    EXPECT_EQ(dest, "a");
+}
+
+TEST_F(TApp, RequiredPositionalVector) {
+    std::string d1;
+    std::string d2;
+    std::string d3;
+    std::vector<std::string> sources;
+
+    app.add_option("dest1", d1);
+    app.add_option("dest2", d2);
+    app.add_option("dest3", d3);
+    app.add_option("src", sources)->required();
+
+    app.positionals_at_end();
+
+    args = {"1", "2", "3"};
+    run();
+
+    EXPECT_EQ(sources.size(), 1u);
+    EXPECT_EQ(d1, "1");
+    EXPECT_EQ(d2, "2");
+    EXPECT_TRUE(d3.empty());
+    args = {"a"};
+    sources.clear();
+    run();
+
+    EXPECT_EQ(sources.size(), 1u);
+}
+
+// Tests positionals at end
+TEST_F(TApp, RequiredPositionalValidation) {
+    std::vector<std::string> sources;
+    int dest;
+    std::string d2;
+    app.add_option("src", sources);
+    app.add_option("dest", dest)->required()->check(CLI::PositiveNumber);
+    app.add_option("dest2", d2)->required();
+    app.positionals_at_end()->validate_positionals();
+
+    args = {"1", "2", "string", "3"};
+    run();
+
+    EXPECT_EQ(sources.size(), 2u);
+    EXPECT_EQ(dest, 3);
+    EXPECT_EQ(d2, "string");
+}
+
 // Tests positionals at end
 TEST_F(TApp, PositionalValidation) {
     std::string options;
     std::string foo;
 
-    app.add_option("bar", options)->check(CLI::Number);
-    app.add_option("foo", foo);
+    app.add_option("bar", options)->check(CLI::Number.name("valbar"));
+    // disable the check on foo
+    app.add_option("foo", foo)->check(CLI::Number.active(false));
     app.validate_positionals();
     args = {"1", "param1"};
     run();
@@ -977,10 +1088,12 @@ TEST_F(TApp, PositionalValidation) {
     EXPECT_EQ(foo, "param1");
 
     args = {"param1", "1"};
-    run();
+    EXPECT_NO_THROW(run());
 
     EXPECT_EQ(options, "1");
     EXPECT_EQ(foo, "param1");
+
+    EXPECT_NE(app.get_option("bar")->get_validator("valbar"), nullptr);
 }
 
 TEST_F(TApp, PositionalNoSpaceLong) {
@@ -1494,6 +1607,63 @@ TEST_F(TApp, NotFileExists) {
     EXPECT_FALSE(CLI::ExistingFile(myfile).empty());
 }
 
+TEST_F(TApp, pair_check) {
+    std::string myfile{"pair_check_file.txt"};
+    bool ok = static_cast<bool>(std::ofstream(myfile.c_str()).put('a')); // create file
+    EXPECT_TRUE(ok);
+
+    EXPECT_TRUE(CLI::ExistingFile(myfile).empty());
+    std::pair<std::string, int> findex;
+
+    auto v0 = CLI::ExistingFile;
+    v0.application_index(0);
+    auto v1 = CLI::PositiveNumber;
+    v1.application_index(1);
+    app.add_option("--file", findex)->check(v0)->check(v1);
+
+    args = {"--file", myfile, "2"};
+
+    EXPECT_NO_THROW(run());
+
+    EXPECT_EQ(findex.first, myfile);
+    EXPECT_EQ(findex.second, 2);
+
+    args = {"--file", myfile, "-3"};
+
+    EXPECT_THROW(run(), CLI::ValidationError);
+
+    args = {"--file", myfile, "2"};
+    std::remove(myfile.c_str());
+    EXPECT_THROW(run(), CLI::ValidationError);
+}
+
+// this will require that modifying the multi-option policy for tuples be allowed which it isn't at present
+/*
+TEST_F(TApp, pair_check_take_first) {
+    std::string myfile{"pair_check_file2.txt"};
+    bool ok = static_cast<bool>(std::ofstream(myfile.c_str()).put('a')); // create file
+    EXPECT_TRUE(ok);
+
+    EXPECT_TRUE(CLI::ExistingFile(myfile).empty());
+    std::pair<std::string, int> findex;
+
+    auto opt = app.add_option("--file", findex)->check(CLI::ExistingFile)->check(CLI::PositiveNumber);
+    EXPECT_THROW(opt->get_validator(3), CLI::OptionNotFound);
+    opt->get_validator(0)->application_index(0);
+    opt->get_validator(1)->application_index(1);
+    opt->multi_option_policy(CLI::MultiOptionPolicy::TakeLast);
+    args = {"--file", "not_a_file.txt", "-16", "--file", myfile, "2"};
+    // should only check the last one
+    EXPECT_NO_THROW(run());
+
+    EXPECT_EQ(findex.first, myfile);
+    EXPECT_EQ(findex.second, 2);
+
+    opt->multi_option_policy(CLI::MultiOptionPolicy::TakeFirst);
+
+    EXPECT_THROW(run(), CLI::ValidationError);
+}
+*/
 TEST_F(TApp, VectorFixedString) {
     std::vector<std::string> strvec;
     std::vector<std::string> answer{"mystring", "mystring2", "mystring3"};
@@ -1511,7 +1681,7 @@ TEST_F(TApp, VectorDefaultedFixedString) {
     std::vector<std::string> strvec{"one"};
     std::vector<std::string> answer{"mystring", "mystring2", "mystring3"};
 
-    CLI::Option *opt = app.add_option("-s,--string", strvec, "", true)->expected(3);
+    CLI::Option *opt = app.add_option("-s,--string", strvec, "")->expected(3)->capture_default_str();
     EXPECT_EQ(3, opt->get_expected());
 
     args = {"--string", "mystring", "mystring2", "mystring3"};
@@ -1520,10 +1690,28 @@ TEST_F(TApp, VectorDefaultedFixedString) {
     EXPECT_EQ(answer, strvec);
 }
 
+TEST_F(TApp, VectorIndexedValidator) {
+    std::vector<int> vvec;
+
+    CLI::Option *opt = app.add_option("-v", vvec);
+
+    args = {"-v", "1", "-1", "-v", "3", "-v", "-976"};
+    run();
+    EXPECT_EQ(4u, app.count("-v"));
+    EXPECT_EQ(4u, vvec.size());
+    opt->check(CLI::PositiveNumber.application_index(0));
+    opt->check((!CLI::PositiveNumber).application_index(1));
+    EXPECT_NO_THROW(run());
+    EXPECT_EQ(4u, vvec.size());
+    // v[3] would be negative
+    opt->check(CLI::PositiveNumber.application_index(3));
+    EXPECT_THROW(run(), CLI::ValidationError);
+}
+
 TEST_F(TApp, DefaultedResult) {
     std::string sval = "NA";
     int ival;
-    auto opts = app.add_option("--string", sval, "", true);
+    auto opts = app.add_option("--string", sval)->capture_default_str();
     auto optv = app.add_option("--val", ival);
     args = {};
     run();
@@ -1815,7 +2003,74 @@ TEST_F(TApp, AllowExtrasOrder) {
 
     std::vector<std::string> left_over = app.remaining();
     app.parse(left_over);
-    EXPECT_EQ(app.remaining(), left_over);
+    EXPECT_EQ(app.remaining(), std::vector<std::string>({"-f", "-x"}));
+    EXPECT_EQ(app.remaining_for_passthrough(), left_over);
+}
+
+TEST_F(TApp, AllowExtrasCascade) {
+
+    app.allow_extras();
+
+    args = {"-x", "45", "-f", "27"};
+    ASSERT_NO_THROW(run());
+    EXPECT_EQ(app.remaining(), std::vector<std::string>({"-x", "45", "-f", "27"}));
+
+    std::vector<std::string> left_over = app.remaining_for_passthrough();
+
+    CLI::App capp{"cascade_program"};
+    int v1 = 0;
+    int v2 = 0;
+    capp.add_option("-x", v1);
+    capp.add_option("-f", v2);
+
+    capp.parse(left_over);
+    EXPECT_EQ(v1, 45);
+    EXPECT_EQ(v2, 27);
+}
+// makes sure the error throws on the rValue version of the parse
+TEST_F(TApp, ExtrasErrorRvalueParse) {
+
+    args = {"-x", "45", "-f", "27"};
+    EXPECT_THROW(app.parse(std::vector<std::string>({"-x", "45", "-f", "27"})), CLI::ExtrasError);
+}
+
+TEST_F(TApp, AllowExtrasCascadeDirect) {
+
+    app.allow_extras();
+
+    args = {"-x", "45", "-f", "27"};
+    ASSERT_NO_THROW(run());
+    EXPECT_EQ(app.remaining(), std::vector<std::string>({"-x", "45", "-f", "27"}));
+
+    CLI::App capp{"cascade_program"};
+    int v1 = 0;
+    int v2 = 0;
+    capp.add_option("-x", v1);
+    capp.add_option("-f", v2);
+
+    capp.parse(app.remaining_for_passthrough());
+    EXPECT_EQ(v1, 45);
+    EXPECT_EQ(v2, 27);
+}
+
+TEST_F(TApp, AllowExtrasArgModify) {
+
+    int v1 = 0;
+    int v2 = 0;
+    app.allow_extras();
+    app.add_option("-f", v2);
+    args = {"27", "-f", "45", "-x"};
+    auto cargs = args;
+    app.parse(args);
+    EXPECT_EQ(args, std::vector<std::string>({"45", "-x"}));
+
+    CLI::App capp{"cascade_program"};
+
+    capp.add_option("-x", v1);
+
+    capp.parse(args);
+    EXPECT_EQ(v1, 45);
+    EXPECT_EQ(v2, 27);
 }
 
 // Test horrible error
@@ -1880,7 +2135,7 @@ TEST_F(TApp, FallthroughParents) {
 
 TEST_F(TApp, OptionWithDefaults) {
     int someint = 2;
-    app.add_option("-a", someint, "", true);
+    app.add_option("-a", someint)->capture_default_str();
 
     args = {"-a1", "-a2"};
 
@@ -1954,6 +2209,20 @@ TEST_F(TApp, CustomDoubleOption) {
     EXPECT_DOUBLE_EQ(custom_opt.second, 1.5);
 }
 
+// now with tuple support this is possible
+TEST_F(TApp, CustomDoubleOptionAlt) {
+
+    std::pair<int, double> custom_opt;
+
+    app.add_option("posit", custom_opt);
+
+    args = {"12", "1.5"};
+
+    run();
+    EXPECT_EQ(custom_opt.first, 12);
+    EXPECT_DOUBLE_EQ(custom_opt.second, 1.5);
+}
+
 // #128
 TEST_F(TApp, RepeatingMultiArgumentOptions) {
     std::vector<std::string> entries;
@@ -2024,7 +2293,7 @@ TEST_F(TApp, CustomUserSepParse) {
 
     app.remove_option(opt);
 
-    app.add_option("--idx", vals, "", true)->delimiter(',');
+    app.add_option("--idx", vals)->delimiter(',')->capture_default_str();
     run();
     EXPECT_EQ(vals, std::vector<int>({1, 2, 3}));
 }
@@ -2064,7 +2333,7 @@ TEST_F(TApp, CustomUserSepParse2) {
 
     app.remove_option(opt);
 
-    app.add_option("--idx", vals, "", true)->delimiter(',');
+    app.add_option("--idx", vals, "")->delimiter(',')->capture_default_str();
     run();
     EXPECT_EQ(vals, std::vector<int>({1, 2}));
 }
@@ -2118,13 +2387,13 @@ TEST_F(TApp, CustomUserSepParse4) {
 
     std::vector<int> vals;
     args = {"--idx", "1,    2"};
-    auto opt = app.add_option("--idx", vals)->delimiter(',');
+    auto opt = app.add_option("--idx", vals)->delimiter(',')->capture_default_str();
     run();
     EXPECT_EQ(vals, std::vector<int>({1, 2}));
 
     app.remove_option(opt);
 
-    app.add_option("--idx", vals, "", true)->delimiter(',');
+    app.add_option("--idx", vals)->delimiter(',');
     run();
     EXPECT_EQ(vals, std::vector<int>({1, 2}));
 }
@@ -2140,7 +2409,7 @@ TEST_F(TApp, CustomUserSepParse5) {
 
     app.remove_option(opt);
     args = {"this", "is", "a", "test"};
-    app.add_option("bar", bar, "bar", true);
+    app.add_option("bar", bar, "bar")->capture_default_str();
     run();
     EXPECT_EQ(bar, std::vector<std::string>({"this", "is", "a", "test"}));
 }
diff --git a/packages/CLI11/tests/CMakeLists.txt b/packages/CLI11/tests/CMakeLists.txt
index ec1f931a2c18d1f2d8946a9b647e8d8474058a5e..9e021f7451f1582fb7603b8ecfe748c8407350ea 100644
--- a/packages/CLI11/tests/CMakeLists.txt
+++ b/packages/CLI11/tests/CMakeLists.txt
@@ -55,7 +55,7 @@ foreach(T ${CLI11_TESTS})
 
     add_executable(${T} ${T}.cpp ${CLI11_headers})
     add_sanitizers(${T})
-    target_link_libraries(${T} PUBLIC CLI11)
+    target_link_libraries(${T} PUBLIC CLI11 CLI11_warnings)
     add_gtest(${T})
 
     if(CLI11_SINGLE_FILE AND CLI11_SINGLE_FILE_TESTS)
@@ -84,6 +84,11 @@ if(NOT MSVC)
     if(TARGET DeprecatedTest_Single)
         target_compile_options(DeprecatedTest_Single PRIVATE -Wno-deprecated-declarations)
     endif()
+else()
+    target_compile_options(DeprecatedTest PRIVATE "/wd4996")
+    if(TARGET DeprecatedTest_Single)
+        target_compile_options(DeprecatedTest_Single PRIVATE "/wd4996")
+    endif()
 endif()
 
 # Link test (build error if inlines missing)
@@ -115,15 +120,15 @@ file(WRITE "${PROJECT_BINARY_DIR}/CTestCustom.cmake"
 find_package(Boost 1.61)
 if(Boost_FOUND)
     if(TARGET Boost::boost)
-        target_link_libraries(informational PUBLIC Boost::boost)
-        target_link_libraries(OptionalTest PUBLIC Boost::boost)
+        target_link_libraries(informational PRIVATE Boost::boost)
+        target_link_libraries(OptionalTest PRIVATE Boost::boost)
     else()
-        target_include_directories(informational PUBLIC ${Boost_INCLUDE_DIRS})
-        target_include_directories(OptionalTest PUBLIC ${Boost_INCLUDE_DIRS})
+        target_include_directories(informational PRIVATE ${Boost_INCLUDE_DIRS})
+        target_include_directories(OptionalTest PRIVATE ${Boost_INCLUDE_DIRS})
     endif()
-    # Enforce Boost::Optional even if __has_include is missing on your compiler
-    target_compile_definitions(informational PUBLIC CLI11_BOOST_OPTIONAL)
-    target_compile_definitions(OptionalTest PUBLIC CLI11_BOOST_OPTIONAL)
+
+    target_compile_definitions(informational PRIVATE CLI11_BOOST_OPTIONAL)
+    target_compile_definitions(OptionalTest PRIVATE CLI11_BOOST_OPTIONAL)
 endif()
 
 if(CMAKE_BUILD_TYPE STREQUAL Coverage)
diff --git a/packages/CLI11/tests/CreationTest.cpp b/packages/CLI11/tests/CreationTest.cpp
index 8fc5d624375ae689d4fa7852b7641902d4d12ae6..682a0cd57186652abee840a78f1143a59ec887bf 100644
--- a/packages/CLI11/tests/CreationTest.cpp
+++ b/packages/CLI11/tests/CreationTest.cpp
@@ -728,4 +728,50 @@ TEST(ValidatorTests, ValidatorDefaults) {
     EXPECT_EQ(V2.get_description(), "check");
     EXPECT_TRUE(V2.get_active());
     EXPECT_TRUE(V2.get_modifying());
+    // This class only support streaming in, not out
+}
+
+class Unstreamable {
+  private:
+    int x_ = -1;
+
+  public:
+    Unstreamable() {}
+    int get_x() const { return x_; }
+    void set_x(int x) { x_ = x; }
+};
+
+// this needs to be a different check then the one after the function definition otherwise they conflict
+static_assert(!CLI::detail::is_istreamable<Unstreamable, std::istream>::value, "Unstreamable type is streamable");
+
+std::istream &operator>>(std::istream &in, Unstreamable &value) {
+    int x;
+    in >> x;
+    value.set_x(x);
+    return in;
+}
+// these need to be different classes otherwise the definitions conflict
+static_assert(CLI::detail::is_istreamable<Unstreamable>::value, "Unstreamable type is still unstreamable");
+
+TEST_F(TApp, MakeUnstreamableOptions) {
+    Unstreamable value;
+    app.add_option("--value", value);
+
+    // This used to fail to build, since it tries to stream from Unstreamable
+    app.add_option("--value2", value, "", false);
+
+    std::vector<Unstreamable> values;
+    app.add_option("--values", values);
+
+    // This used to fail to build, since it tries to stream from Unstreamable
+    app.add_option("--values2", values, "", false);
+
+    args = {"--value", "45"};
+    run();
+    EXPECT_EQ(value.get_x(), 45);
+
+    args = {"--values", "45", "27", "34"};
+    run();
+    EXPECT_EQ(values.size(), 3u);
+    EXPECT_EQ(values[2].get_x(), 34);
 }
diff --git a/packages/CLI11/tests/DeprecatedTest.cpp b/packages/CLI11/tests/DeprecatedTest.cpp
index c1981eacae7b7bf163fb42849f0abe46ad9306a7..9dc064ec31ab904eba6aaee05e19e4f430f6a5b5 100644
--- a/packages/CLI11/tests/DeprecatedTest.cpp
+++ b/packages/CLI11/tests/DeprecatedTest.cpp
@@ -1,5 +1,10 @@
 #include "app_helper.hpp"
 
+#include "gmock/gmock.h"
+
+using ::testing::HasSubstr;
+using ::testing::Not;
+
 TEST(Deprecated, Emtpy) {
     // No deprecated features at this time.
     EXPECT_TRUE(true);
@@ -326,3 +331,212 @@ TEST_F(TApp, AddRemoveSetItemsNoCase) {
     args = {"--type2", "TYpE2"};
     EXPECT_THROW(run(), CLI::ValidationError);
 }
+
+TEST(THelp, Defaults) {
+    CLI::App app{"My prog"};
+
+    int one{1}, two{2};
+    app.add_option("--one", one, "Help for one", true);
+    app.add_option("--set", two, "Help for set", true)->check(CLI::IsMember({2, 3, 4}));
+
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("--one"));
+    EXPECT_THAT(help, HasSubstr("--set"));
+    EXPECT_THAT(help, HasSubstr("1"));
+    EXPECT_THAT(help, HasSubstr("=2"));
+    EXPECT_THAT(help, HasSubstr("2,3,4"));
+}
+
+TEST(THelp, VectorOpts) {
+    CLI::App app{"My prog"};
+    std::vector<int> x = {1, 2};
+    app.add_option("-q,--quick", x, "", true);
+
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("INT=[1,2] ..."));
+}
+
+TEST(THelp, SetLower) {
+    CLI::App app{"My prog"};
+
+    std::string def{"One"};
+    app.add_option("--set", def, "Help for set", true)->check(CLI::IsMember({"oNe", "twO", "THREE"}));
+
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("--set"));
+    EXPECT_THAT(help, HasSubstr("=One"));
+    EXPECT_THAT(help, HasSubstr("oNe"));
+    EXPECT_THAT(help, HasSubstr("twO"));
+    EXPECT_THAT(help, HasSubstr("THREE"));
+}
+
+TEST(THelp, ChangingSetDefaulted) {
+    CLI::App app;
+
+    std::set<int> vals{1, 2, 3};
+    int val = 2;
+    app.add_option("--val", val, "", true)->check(CLI::IsMember(&vals));
+
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("1"));
+    EXPECT_THAT(help, Not(HasSubstr("4")));
+
+    vals.insert(4);
+    vals.erase(1);
+
+    help = app.help();
+
+    EXPECT_THAT(help, Not(HasSubstr("1")));
+    EXPECT_THAT(help, HasSubstr("4"));
+}
+
+TEST(THelp, ChangingCaselessSetDefaulted) {
+    CLI::App app;
+
+    std::set<std::string> vals{"1", "2", "3"};
+    std::string val = "2";
+    app.add_option("--val", val, "", true)->check(CLI::IsMember(&vals, CLI::ignore_case));
+
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("1"));
+    EXPECT_THAT(help, Not(HasSubstr("4")));
+
+    vals.insert("4");
+    vals.erase("1");
+
+    help = app.help();
+
+    EXPECT_THAT(help, Not(HasSubstr("1")));
+    EXPECT_THAT(help, HasSubstr("4"));
+}
+
+TEST_F(TApp, DefaultOpts) {
+
+    int i = 3;
+    std::string s = "HI";
+
+    app.add_option("-i,i", i, "", false);
+    app.add_option("-s,s", s, "", true);
+
+    args = {"-i2", "9"};
+
+    run();
+
+    EXPECT_EQ(1u, app.count("i"));
+    EXPECT_EQ(1u, app.count("-s"));
+    EXPECT_EQ(2, i);
+    EXPECT_EQ("9", s);
+}
+
+TEST_F(TApp, VectorDefaultedFixedString) {
+    std::vector<std::string> strvec{"one"};
+    std::vector<std::string> answer{"mystring", "mystring2", "mystring3"};
+
+    CLI::Option *opt = app.add_option("-s,--string", strvec, "", true)->expected(3);
+    EXPECT_EQ(3, opt->get_expected());
+
+    args = {"--string", "mystring", "mystring2", "mystring3"};
+    run();
+    EXPECT_EQ(3u, app.count("--string"));
+    EXPECT_EQ(answer, strvec);
+}
+
+TEST_F(TApp, DefaultedResult) {
+    std::string sval = "NA";
+    int ival;
+    auto opts = app.add_option("--string", sval, "", true);
+    auto optv = app.add_option("--val", ival);
+    args = {};
+    run();
+    EXPECT_EQ(sval, "NA");
+    std::string nString;
+    opts->results(nString);
+    EXPECT_EQ(nString, "NA");
+    int newIval;
+    EXPECT_THROW(optv->results(newIval), CLI::ConversionError);
+    optv->default_str("442");
+    optv->results(newIval);
+    EXPECT_EQ(newIval, 442);
+}
+
+TEST_F(TApp, OptionWithDefaults) {
+    int someint = 2;
+    app.add_option("-a", someint, "", true);
+
+    args = {"-a1", "-a2"};
+
+    EXPECT_THROW(run(), CLI::ArgumentMismatch);
+}
+
+// #209
+TEST_F(TApp, CustomUserSepParse) {
+
+    std::vector<int> vals = {1, 2, 3};
+    args = {"--idx", "1,2,3"};
+    auto opt = app.add_option("--idx", vals)->delimiter(',');
+    run();
+    EXPECT_EQ(vals, std::vector<int>({1, 2, 3}));
+    std::vector<int> vals2;
+    // check that the results vector gets the results in the same way
+    opt->results(vals2);
+    EXPECT_EQ(vals2, vals);
+
+    app.remove_option(opt);
+
+    app.add_option("--idx", vals, "", true)->delimiter(',');
+    run();
+    EXPECT_EQ(vals, std::vector<int>({1, 2, 3}));
+}
+
+// #209
+TEST_F(TApp, CustomUserSepParse2) {
+
+    std::vector<int> vals = {1, 2, 3};
+    args = {"--idx", "1,2,"};
+    auto opt = app.add_option("--idx", vals)->delimiter(',');
+    run();
+    EXPECT_EQ(vals, std::vector<int>({1, 2}));
+
+    app.remove_option(opt);
+
+    app.add_option("--idx", vals, "", true)->delimiter(',');
+    run();
+    EXPECT_EQ(vals, std::vector<int>({1, 2}));
+}
+//
+// #209
+TEST_F(TApp, CustomUserSepParse4) {
+
+    std::vector<int> vals;
+    args = {"--idx", "1,    2"};
+    auto opt = app.add_option("--idx", vals, "", true)->delimiter(',');
+    run();
+    EXPECT_EQ(vals, std::vector<int>({1, 2}));
+
+    app.remove_option(opt);
+
+    app.add_option("--idx", vals)->delimiter(',');
+    run();
+    EXPECT_EQ(vals, std::vector<int>({1, 2}));
+}
+
+// #218
+TEST_F(TApp, CustomUserSepParse5) {
+
+    std::vector<std::string> bar;
+    args = {"this", "is", "a", "test"};
+    auto opt = app.add_option("bar", bar, "bar");
+    run();
+    EXPECT_EQ(bar, std::vector<std::string>({"this", "is", "a", "test"}));
+
+    app.remove_option(opt);
+    args = {"this", "is", "a", "test"};
+    app.add_option("bar", bar, "bar", true);
+    run();
+    EXPECT_EQ(bar, std::vector<std::string>({"this", "is", "a", "test"}));
+}
diff --git a/packages/CLI11/tests/FormatterTest.cpp b/packages/CLI11/tests/FormatterTest.cpp
index dc9bb664e771672bb637fc8d0084a3600243dd25..d3be30168d377fcdf399a3bc0738017d39682ee9 100644
--- a/packages/CLI11/tests/FormatterTest.cpp
+++ b/packages/CLI11/tests/FormatterTest.cpp
@@ -60,7 +60,7 @@ TEST(Formatter, OptCustomize) {
               "Usage: [OPTIONS]\n\n"
               "Options:\n"
               "  -h,--help              Print this help message and exit\n"
-              "  --opt INT (MUST HAVE)  Something\n");
+              "  --opt INT (MUST HAVE)  Something\n\n");
 }
 
 TEST(Formatter, OptCustomizeSimple) {
@@ -80,7 +80,7 @@ TEST(Formatter, OptCustomizeSimple) {
               "Usage: [OPTIONS]\n\n"
               "Options:\n"
               "  -h,--help              Print this help message and exit\n"
-              "  --opt INT (MUST HAVE)  Something\n");
+              "  --opt INT (MUST HAVE)  Something\n\n");
 }
 
 TEST(Formatter, FalseFlagExample) {
@@ -121,7 +121,7 @@ TEST(Formatter, AppCustomize) {
               "  -h,--help         Print this help message and exit\n\n"
               "Subcommands:\n"
               "  subcom1           This\n"
-              "  subcom2           This\n");
+              "  subcom2           This\n\n");
 }
 
 TEST(Formatter, AppCustomizeSimple) {
@@ -141,7 +141,7 @@ TEST(Formatter, AppCustomizeSimple) {
               "  -h,--help         Print this help message and exit\n\n"
               "Subcommands:\n"
               "  subcom1           This\n"
-              "  subcom2           This\n");
+              "  subcom2           This\n\n");
 }
 
 TEST(Formatter, AllSub) {
diff --git a/packages/CLI11/tests/HelpTest.cpp b/packages/CLI11/tests/HelpTest.cpp
index d6e0d7c26f1901add5bf8a6a26b9efcf1fffa4c4..229d441b06d98d50ff9ab0fe01325783665c1888 100644
--- a/packages/CLI11/tests/HelpTest.cpp
+++ b/packages/CLI11/tests/HelpTest.cpp
@@ -35,6 +35,33 @@ TEST(THelp, Footer) {
     EXPECT_THAT(help, HasSubstr("Report bugs to bugs@example.com"));
 }
 
+TEST(THelp, FooterCallback) {
+    CLI::App app{"My prog"};
+    app.footer([]() { return "Report bugs to bugs@example.com"; });
+
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("My prog"));
+    EXPECT_THAT(help, HasSubstr("-h,--help"));
+    EXPECT_THAT(help, HasSubstr("Options:"));
+    EXPECT_THAT(help, HasSubstr("Usage:"));
+    EXPECT_THAT(help, HasSubstr("Report bugs to bugs@example.com"));
+}
+
+TEST(THelp, FooterCallbackBoth) {
+    CLI::App app{"My prog"};
+    app.footer([]() { return "Report bugs to bugs@example.com"; });
+    app.footer(" foot!!!!");
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("My prog"));
+    EXPECT_THAT(help, HasSubstr("-h,--help"));
+    EXPECT_THAT(help, HasSubstr("Options:"));
+    EXPECT_THAT(help, HasSubstr("Usage:"));
+    EXPECT_THAT(help, HasSubstr("Report bugs to bugs@example.com"));
+    EXPECT_THAT(help, HasSubstr("foot!!!!"));
+}
+
 TEST(THelp, OptionalPositional) {
     CLI::App app{"My prog", "program"};
 
@@ -119,7 +146,7 @@ TEST(THelp, MultiOpts) {
 TEST(THelp, VectorOpts) {
     CLI::App app{"My prog"};
     std::vector<int> x = {1, 2};
-    app.add_option("-q,--quick", x, "", true);
+    app.add_option("-q,--quick", x)->capture_default_str();
 
     std::string help = app.help();
 
@@ -299,8 +326,8 @@ TEST(THelp, IntDefaults) {
     CLI::App app{"My prog"};
 
     int one{1}, two{2};
-    app.add_option("--one", one, "Help for one", true);
-    app.add_option("--set", two, "Help for set", true)->check(CLI::IsMember({2, 3, 4}));
+    app.add_option("--one", one, "Help for one")->capture_default_str();
+    app.add_option("--set", two, "Help for set")->capture_default_str()->check(CLI::IsMember({2, 3, 4}));
 
     std::string help = app.help();
 
@@ -313,9 +340,10 @@ TEST(THelp, IntDefaults) {
 
 TEST(THelp, SetLower) {
     CLI::App app{"My prog"};
+    app.option_defaults()->always_capture_default();
 
     std::string def{"One"};
-    app.add_option("--set", def, "Help for set", true)->check(CLI::IsMember({"oNe", "twO", "THREE"}));
+    app.add_option("--set", def, "Help for set")->check(CLI::IsMember({"oNe", "twO", "THREE"}));
 
     std::string help = app.help();
 
@@ -470,6 +498,18 @@ TEST(THelp, CustomHelp) {
     }
 }
 
+TEST(THelp, NextLineShouldBeAlignmentInMultilineDescription) {
+    CLI::App app;
+    int i;
+    const std::string first{"first line"};
+    const std::string second{"second line"};
+    app.add_option("-i,--int", i, first + "\n" + second);
+
+    const std::string help = app.help();
+    const auto width = app.get_formatter()->get_column_width();
+    EXPECT_THAT(help, HasSubstr(first + "\n" + std::string(width, ' ') + second));
+}
+
 TEST(THelp, NiceName) {
     CLI::App app;
 
@@ -589,7 +629,7 @@ TEST_F(CapturedHelp, CallForAllHelpOutput) {
               "  One description\n\n"
               "two\n"
               "  Options:\n"
-              "    --three                     \n\n");
+              "    --three                     \n\n\n");
 }
 TEST_F(CapturedHelp, NewFormattedHelp) {
     app.formatter_fn([](const CLI::App *, std::string, CLI::AppFormatMode) { return "New Help"; });
@@ -758,6 +798,16 @@ TEST(THelp, ValidatorsText) {
     EXPECT_THAT(help, HasSubstr("UINT:INT in [0 - 12]")); // Loses UINT
 }
 
+TEST(THelp, ValidatorsTextCustom) {
+    CLI::App app;
+
+    std::string filename;
+    app.add_option("--f1", filename)->check(CLI::ExistingFile.description("Existing file"));
+
+    std::string help = app.help();
+    EXPECT_THAT(help, HasSubstr("Existing file"));
+}
+
 TEST(THelp, ValidatorsNonPathText) {
     CLI::App app;
 
@@ -854,7 +904,7 @@ TEST(THelp, ChangingSetDefaulted) {
 
     std::set<int> vals{1, 2, 3};
     int val = 2;
-    app.add_option("--val", val, "", true)->check(CLI::IsMember(&vals));
+    app.add_option("--val", val, "")->check(CLI::IsMember(&vals))->capture_default_str();
 
     std::string help = app.help();
 
@@ -869,6 +919,7 @@ TEST(THelp, ChangingSetDefaulted) {
     EXPECT_THAT(help, Not(HasSubstr("1")));
     EXPECT_THAT(help, HasSubstr("4"));
 }
+
 TEST(THelp, ChangingCaselessSet) {
     CLI::App app;
 
@@ -892,10 +943,11 @@ TEST(THelp, ChangingCaselessSet) {
 
 TEST(THelp, ChangingCaselessSetDefaulted) {
     CLI::App app;
+    app.option_defaults()->always_capture_default();
 
     std::set<std::string> vals{"1", "2", "3"};
     std::string val = "2";
-    app.add_option("--val", val, "", true)->check(CLI::IsMember(&vals, CLI::ignore_case));
+    app.add_option("--val", val)->check(CLI::IsMember(&vals, CLI::ignore_case));
 
     std::string help = app.help();
 
@@ -910,3 +962,50 @@ TEST(THelp, ChangingCaselessSetDefaulted) {
     EXPECT_THAT(help, Not(HasSubstr("1")));
     EXPECT_THAT(help, HasSubstr("4"));
 }
+
+// New defaults tests (1.8)
+
+TEST(THelp, ChangingDefaults) {
+
+    CLI::App app;
+
+    std::vector<int> x = {1, 2};
+    CLI::Option *opt = app.add_option("-q,--quick", x);
+    x = {3, 4};
+
+    opt->capture_default_str();
+
+    x = {5, 6};
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("INT=[3,4] ..."));
+}
+
+TEST(THelp, ChangingDefaultsWithAutoCapture) {
+
+    CLI::App app;
+    app.option_defaults()->always_capture_default();
+
+    std::vector<int> x = {1, 2};
+    app.add_option("-q,--quick", x);
+    x = {3, 4};
+
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("INT=[1,2] ..."));
+}
+
+TEST(THelp, FunctionDefaultString) {
+
+    CLI::App app;
+
+    std::vector<int> x = {1, 2};
+    CLI::Option *opt = app.add_option("-q,--quick", x);
+
+    opt->default_function([]() { return std::string("Powerful"); });
+    opt->capture_default_str();
+
+    std::string help = app.help();
+
+    EXPECT_THAT(help, HasSubstr("INT=Powerful"));
+}
diff --git a/packages/CLI11/tests/HelpersTest.cpp b/packages/CLI11/tests/HelpersTest.cpp
index afbefc9a7c98f364b27481fe9e8deb8cc4a3df0f..778046c9f8e2382010e9713d4d2d01f27f5f49c2 100644
--- a/packages/CLI11/tests/HelpersTest.cpp
+++ b/packages/CLI11/tests/HelpersTest.cpp
@@ -1,10 +1,55 @@
 #include "app_helper.hpp"
 
+#include <array>
+#include <climits>
 #include <complex>
 #include <cstdint>
 #include <cstdio>
 #include <fstream>
 #include <string>
+#include <tuple>
+
+class NotStreamable {};
+
+class Streamable {};
+
+std::ostream &operator<<(std::ostream &out, const Streamable &) { return out << "Streamable"; }
+
+TEST(TypeTools, Streaming) {
+
+    EXPECT_EQ(CLI::detail::to_string(NotStreamable{}), "");
+
+    EXPECT_EQ(CLI::detail::to_string(Streamable{}), "Streamable");
+
+    EXPECT_EQ(CLI::detail::to_string(5), "5");
+
+    EXPECT_EQ(CLI::detail::to_string("string"), std::string("string"));
+    EXPECT_EQ(CLI::detail::to_string(std::string("string")), std::string("string"));
+}
+
+TEST(TypeTools, tuple) {
+    EXPECT_FALSE(CLI::detail::is_tuple_like<int>::value);
+    EXPECT_FALSE(CLI::detail::is_tuple_like<std::vector<double>>::value);
+    auto v = CLI::detail::is_tuple_like<std::tuple<double, int>>::value;
+    EXPECT_TRUE(v);
+    v = CLI::detail::is_tuple_like<std::tuple<double, double, double>>::value;
+    EXPECT_TRUE(v);
+}
+
+TEST(TypeTools, type_size) {
+    auto V = CLI::detail::type_count<int>::value;
+    EXPECT_EQ(V, 1);
+    V = CLI::detail::type_count<void>::value;
+    EXPECT_EQ(V, 0);
+    V = CLI::detail::type_count<std::vector<double>>::value;
+    EXPECT_EQ(V, -1);
+    V = CLI::detail::type_count<std::tuple<double, int>>::value;
+    EXPECT_EQ(V, 2);
+    V = CLI::detail::type_count<std::tuple<std::string, double, int>>::value;
+    EXPECT_EQ(V, 3);
+    V = CLI::detail::type_count<std::array<std::string, 5>>::value;
+    EXPECT_EQ(V, 5);
+}
 
 TEST(Split, SimpleByToken) {
     auto out = CLI::detail::split("one.two.three", '.');
@@ -67,7 +112,7 @@ TEST(StringTools, Modify3) {
     std::string newString = CLI::detail::find_and_modify("baaaaaaaaaa", "aaa", [](std::string &str, size_t index) {
         str.erase(index, 3);
         str.insert(str.begin(), 'a');
-        return 0;
+        return 0u;
     });
     EXPECT_EQ(newString, "aba");
 }
@@ -86,6 +131,18 @@ TEST(StringTools, flagValues) {
     EXPECT_EQ(CLI::detail::to_flag_value("475555233"), 475555233);
 }
 
+TEST(StringTools, Validation) {
+    EXPECT_TRUE(CLI::detail::isalpha(""));
+    EXPECT_TRUE(CLI::detail::isalpha("a"));
+    EXPECT_TRUE(CLI::detail::isalpha("abcd"));
+    EXPECT_FALSE(CLI::detail::isalpha("_"));
+    EXPECT_FALSE(CLI::detail::isalpha("2"));
+    EXPECT_FALSE(CLI::detail::isalpha("test test"));
+    EXPECT_FALSE(CLI::detail::isalpha("test "));
+    EXPECT_FALSE(CLI::detail::isalpha(" test"));
+    EXPECT_FALSE(CLI::detail::isalpha("test2"));
+}
+
 TEST(Trim, Various) {
     std::string s1{"  sdlfkj sdflk sd s  "};
     std::string a1{"sdlfkj sdflk sd s"};
@@ -341,6 +398,218 @@ TEST(Validators, ProgramNameSplit) {
     EXPECT_TRUE(res.second.empty());
 }
 
+TEST(CheckedMultiply, Int) {
+    int a = 10;
+    int b = -20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, -200);
+
+    a = 0;
+    b = -20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, 0);
+
+    a = 20;
+    b = 0;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, 0);
+
+    a = std::numeric_limits<int>::max();
+    b = 1;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<int>::max());
+
+    a = std::numeric_limits<int>::max();
+    b = 2;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<int>::max());
+
+    a = std::numeric_limits<int>::max();
+    b = -1;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, -std::numeric_limits<int>::max());
+
+    a = std::numeric_limits<int>::max();
+    b = std::numeric_limits<int>::max();
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<int>::max());
+
+    a = std::numeric_limits<int>::min();
+    b = std::numeric_limits<int>::max();
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<int>::min());
+
+    a = std::numeric_limits<int>::min();
+    b = 1;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<int>::min());
+
+    a = std::numeric_limits<int>::min();
+    b = -1;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<int>::min());
+
+    b = std::numeric_limits<int>::min();
+    a = -1;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, -1);
+
+    a = std::numeric_limits<int>::min() / 100;
+    b = 99;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<int>::min() / 100 * 99);
+
+    a = std::numeric_limits<int>::min() / 100;
+    b = -101;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<int>::min() / 100);
+    a = 2;
+    b = std::numeric_limits<int>::min() / 2;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    a = std::numeric_limits<int>::min() / 2;
+    b = 2;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+
+    a = 4;
+    b = std::numeric_limits<int>::min() / 4;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+
+    a = 48;
+    b = std::numeric_limits<int>::min() / 48;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+}
+
+TEST(CheckedMultiply, SizeT) {
+    size_t a = 10;
+    size_t b = 20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, 200u);
+
+    a = 0u;
+    b = 20u;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, 0u);
+
+    a = 20u;
+    b = 0u;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, 0u);
+
+    a = std::numeric_limits<size_t>::max();
+    b = 1u;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<size_t>::max());
+
+    a = std::numeric_limits<size_t>::max();
+    b = 2u;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<size_t>::max());
+
+    a = std::numeric_limits<size_t>::max();
+    b = std::numeric_limits<size_t>::max();
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<size_t>::max());
+
+    a = std::numeric_limits<size_t>::max() / 100;
+    b = 99u;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_EQ(a, std::numeric_limits<size_t>::max() / 100u * 99u);
+}
+
+TEST(CheckedMultiply, Float) {
+    float a = 10;
+    float b = 20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, 200);
+
+    a = 0;
+    b = 20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, 0);
+
+    a = INFINITY;
+    b = 20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, INFINITY);
+
+    a = 2;
+    b = -INFINITY;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, -INFINITY);
+
+    a = std::numeric_limits<float>::max() / 100;
+    b = 1;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, std::numeric_limits<float>::max() / 100);
+
+    a = std::numeric_limits<float>::max() / 100;
+    b = 99;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, std::numeric_limits<float>::max() / 100 * 99);
+
+    a = std::numeric_limits<float>::max() / 100;
+    b = 101;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, std::numeric_limits<float>::max() / 100);
+
+    a = std::numeric_limits<float>::max() / 100;
+    b = -99;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, std::numeric_limits<float>::max() / 100 * -99);
+
+    a = std::numeric_limits<float>::max() / 100;
+    b = -101;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_FLOAT_EQ(a, std::numeric_limits<float>::max() / 100);
+}
+
+TEST(CheckedMultiply, Double) {
+    double a = 10;
+    double b = 20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, 200);
+
+    a = 0;
+    b = 20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, 0);
+
+    a = INFINITY;
+    b = 20;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, INFINITY);
+
+    a = 2;
+    b = -INFINITY;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, -INFINITY);
+
+    a = std::numeric_limits<double>::max() / 100;
+    b = 1;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, std::numeric_limits<double>::max() / 100);
+
+    a = std::numeric_limits<double>::max() / 100;
+    b = 99;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, std::numeric_limits<double>::max() / 100 * 99);
+
+    a = std::numeric_limits<double>::max() / 100;
+    b = 101;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, std::numeric_limits<double>::max() / 100);
+
+    a = std::numeric_limits<double>::max() / 100;
+    b = -99;
+    ASSERT_TRUE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, std::numeric_limits<double>::max() / 100 * -99);
+
+    a = std::numeric_limits<double>::max() / 100;
+    b = -101;
+    ASSERT_FALSE(CLI::detail::checked_multiply(a, b));
+    ASSERT_DOUBLE_EQ(a, std::numeric_limits<double>::max() / 100);
+}
+
 // Yes, this is testing an app_helper :)
 TEST(AppHelper, TempfileCreated) {
     std::string name = "TestFileNotUsed.txt";
@@ -539,7 +808,36 @@ TEST(Types, TypeName) {
     EXPECT_EQ("FLOAT", float_name);
 
     std::string vector_name = CLI::detail::type_name<std::vector<int>>();
-    EXPECT_EQ("VECTOR", vector_name);
+    EXPECT_EQ("INT", vector_name);
+
+    vector_name = CLI::detail::type_name<std::vector<double>>();
+    EXPECT_EQ("FLOAT", vector_name);
+
+    vector_name = CLI::detail::type_name<std::vector<std::vector<unsigned char>>>();
+    EXPECT_EQ("UINT", vector_name);
+    auto vclass = CLI::detail::classify_object<std::tuple<double>>::value;
+    EXPECT_EQ(vclass, CLI::detail::objCategory::number_constructible);
+
+    std::string tuple_name = CLI::detail::type_name<std::tuple<double>>();
+    EXPECT_EQ("FLOAT", tuple_name);
+
+    static_assert(CLI::detail::classify_object<std::tuple<int, std::string>>::value ==
+                      CLI::detail::objCategory::tuple_value,
+                  "tuple<int,string> does not read like a tuple");
+    tuple_name = CLI::detail::type_name<std::tuple<int, std::string>>();
+    EXPECT_EQ("[INT,TEXT]", tuple_name);
+
+    tuple_name = CLI::detail::type_name<std::tuple<int, std::string, double>>();
+    EXPECT_EQ("[INT,TEXT,FLOAT]", tuple_name);
+
+    tuple_name = CLI::detail::type_name<std::tuple<int, std::string, double, unsigned int>>();
+    EXPECT_EQ("[INT,TEXT,FLOAT,UINT]", tuple_name);
+
+    tuple_name = CLI::detail::type_name<std::tuple<int, std::string, double, unsigned int, std::string>>();
+    EXPECT_EQ("[INT,TEXT,FLOAT,UINT,TEXT]", tuple_name);
+
+    tuple_name = CLI::detail::type_name<std::array<int, 10>>();
+    EXPECT_EQ("[INT,INT,INT,INT,INT,INT,INT,INT,INT,INT]", tuple_name);
 
     std::string text_name = CLI::detail::type_name<std::string>();
     EXPECT_EQ("TEXT", text_name);
@@ -550,11 +848,18 @@ TEST(Types, TypeName) {
     enum class test { test1, test2, test3 };
     std::string enum_name = CLI::detail::type_name<test>();
     EXPECT_EQ("ENUM", enum_name);
+
+    vclass = CLI::detail::classify_object<std::tuple<test>>::value;
+    EXPECT_EQ(vclass, CLI::detail::objCategory::tuple_value);
+    static_assert(CLI::detail::classify_object<std::tuple<test>>::value == CLI::detail::objCategory::tuple_value,
+                  "tuple<test> does not classify as a tuple");
+    std::string enum_name2 = CLI::detail::type_name<std::tuple<test>>();
+    EXPECT_EQ("ENUM", enum_name2);
 }
 
 TEST(Types, OverflowSmall) {
-    char x;
-    auto strmax = std::to_string(INT8_MAX + 1);
+    signed char x;
+    auto strmax = std::to_string(SCHAR_MAX + 1);
     EXPECT_FALSE(CLI::detail::lexical_cast(strmax, x));
 
     unsigned char y;
@@ -636,12 +941,16 @@ TEST(Types, LexicalCastParsable) {
     EXPECT_DOUBLE_EQ(output.real(), 4.2); // Doing this in one go sometimes has trouble
     EXPECT_DOUBLE_EQ(output.imag(), 7.3); // on clang + c++4.8 due to missing const
 
+    EXPECT_TRUE(CLI::detail::lexical_cast("2.456", output));
+    EXPECT_DOUBLE_EQ(output.real(), 2.456); // Doing this in one go sometimes has trouble
+    EXPECT_DOUBLE_EQ(output.imag(), 0.0);   // on clang + c++4.8 due to missing const
+
     EXPECT_FALSE(CLI::detail::lexical_cast(fail_input, output));
     EXPECT_FALSE(CLI::detail::lexical_cast(extra_input, output));
 }
 
 TEST(Types, LexicalCastEnum) {
-    enum t1 : char { v1 = 5, v3 = 7, v5 = -9 };
+    enum t1 : signed char { v1 = 5, v3 = 7, v5 = -9 };
 
     t1 output;
     EXPECT_TRUE(CLI::detail::lexical_cast("-9", output));
@@ -659,6 +968,155 @@ TEST(Types, LexicalCastEnum) {
     EXPECT_EQ(output2, t2::enum3);
 }
 
+TEST(Types, LexicalConversionDouble) {
+    CLI::results_t input = {"9.12"};
+    long double x;
+    bool res = CLI::detail::lexical_conversion<long double, double>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_FLOAT_EQ((float)9.12, (float)x);
+
+    CLI::results_t bad_input = {"hello"};
+    res = CLI::detail::lexical_conversion<long double, double>(input, x);
+    EXPECT_TRUE(res);
+}
+
+TEST(Types, LexicalConversionDoubleTuple) {
+    CLI::results_t input = {"9.12"};
+    std::tuple<double> x;
+    bool res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_DOUBLE_EQ(9.12, std::get<0>(x));
+
+    CLI::results_t bad_input = {"hello"};
+    res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_TRUE(res);
+}
+
+TEST(Types, LexicalConversionVectorDouble) {
+    CLI::results_t input = {"9.12", "10.79", "-3.54"};
+    std::vector<double> x;
+    bool res = CLI::detail::lexical_conversion<std::vector<double>, double>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_EQ(x.size(), 3u);
+    EXPECT_DOUBLE_EQ(x[2], -3.54);
+
+    res = CLI::detail::lexical_conversion<std::vector<double>, std::vector<double>>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_EQ(x.size(), 3u);
+    EXPECT_DOUBLE_EQ(x[2], -3.54);
+}
+
+static_assert(!CLI::detail::is_tuple_like<std::vector<double>>::value, "vector should not be like a tuple");
+static_assert(CLI::detail::is_tuple_like<std::pair<double, double>>::value, "pair of double should be like a tuple");
+static_assert(CLI::detail::is_tuple_like<std::array<double, 4>>::value, "std::array<double,4> should be like a tuple");
+static_assert(CLI::detail::is_tuple_like<std::array<int, 10>>::value, "std::array<int,10> should be like a tuple");
+static_assert(!CLI::detail::is_tuple_like<std::string>::value, "std::string should not be like a tuple");
+static_assert(!CLI::detail::is_tuple_like<double>::value, "double should not be like a tuple");
+static_assert(CLI::detail::is_tuple_like<std::tuple<double, int, double>>::value, "tuple should look like a tuple");
+
+TEST(Types, LexicalConversionTuple2) {
+    CLI::results_t input = {"9.12", "19"};
+
+    std::tuple<double, int> x;
+    static_assert(CLI::detail::is_tuple_like<decltype(x)>::value,
+                  "tuple type must have is_tuple_like trait to be true");
+    bool res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_EQ(std::get<1>(x), 19);
+    EXPECT_DOUBLE_EQ(std::get<0>(x), 9.12);
+
+    input = {"19", "9.12"};
+    res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_FALSE(res);
+}
+
+TEST(Types, LexicalConversionTuple3) {
+    CLI::results_t input = {"9.12", "19", "hippo"};
+    std::tuple<double, int, std::string> x;
+    bool res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_EQ(std::get<1>(x), 19);
+    EXPECT_DOUBLE_EQ(std::get<0>(x), 9.12);
+    EXPECT_EQ(std::get<2>(x), "hippo");
+
+    input = {"19", "9.12"};
+    res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_FALSE(res);
+}
+
+TEST(Types, LexicalConversionTuple4) {
+    CLI::results_t input = {"9.12", "19", "18.6", "5.87"};
+    std::array<double, 4> x;
+    bool res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_DOUBLE_EQ(std::get<1>(x), 19);
+    EXPECT_DOUBLE_EQ(x[0], 9.12);
+    EXPECT_DOUBLE_EQ(x[2], 18.6);
+    EXPECT_DOUBLE_EQ(x[3], 5.87);
+
+    input = {"19", "9.12", "hippo"};
+    res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_FALSE(res);
+}
+
+TEST(Types, LexicalConversionTuple5) {
+    CLI::results_t input = {"9", "19", "18", "5", "235235"};
+    std::array<unsigned int, 5> x;
+    bool res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_EQ(std::get<1>(x), 19u);
+    EXPECT_EQ(x[0], 9u);
+    EXPECT_EQ(x[2], 18u);
+    EXPECT_EQ(x[3], 5u);
+    EXPECT_EQ(x[4], 235235u);
+
+    input = {"19", "9.12", "hippo"};
+    res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_FALSE(res);
+}
+
+TEST(Types, LexicalConversionTuple10) {
+    CLI::results_t input = {"9", "19", "18", "5", "235235", "9", "19", "18", "5", "235235"};
+    std::array<unsigned int, 10> x;
+    bool res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_EQ(std::get<1>(x), 19u);
+    EXPECT_EQ(x[0], 9u);
+    EXPECT_EQ(x[2], 18u);
+    EXPECT_EQ(x[3], 5u);
+    EXPECT_EQ(x[4], 235235u);
+    EXPECT_EQ(x[9], 235235u);
+    input[3] = "hippo";
+    res = CLI::detail::lexical_conversion<decltype(x), decltype(x)>(input, x);
+    EXPECT_FALSE(res);
+}
+
+TEST(Types, LexicalConversionTuple10XC) {
+    CLI::results_t input = {"9", "19", "18", "5", "235235", "9", "19", "18", "5", "235235"};
+    std::array<double, 10> x;
+    bool res = CLI::detail::lexical_conversion<decltype(x), std::array<unsigned int, 10>>(input, x);
+
+    EXPECT_TRUE(res);
+    EXPECT_EQ(std::get<1>(x), 19.0);
+    EXPECT_EQ(x[0], 9.0);
+    EXPECT_EQ(x[2], 18.0);
+    EXPECT_EQ(x[3], 5.0);
+    EXPECT_EQ(x[4], 235235.0);
+    EXPECT_EQ(x[9], 235235.0);
+    input[3] = "19.7";
+    res = CLI::detail::lexical_conversion<decltype(x), std::array<unsigned int, 10>>(input, x);
+    EXPECT_FALSE(res);
+}
+
+TEST(Types, LexicalConversionComplex) {
+    CLI::results_t input = {"5.1", "3.5"};
+    std::complex<double> x;
+    bool res = CLI::detail::lexical_conversion<std::complex<double>, std::array<double, 2>>(input, x);
+    EXPECT_TRUE(res);
+    EXPECT_EQ(x.real(), 5.1);
+    EXPECT_EQ(x.imag(), 3.5);
+}
+
 TEST(FixNewLines, BasicCheck) {
     std::string input = "one\ntwo";
     std::string output = "one\n; two";
diff --git a/packages/CLI11/tests/IniTest.cpp b/packages/CLI11/tests/IniTest.cpp
index 97c5737662d4cd94a435c50af0771ceaeb0998fc..afff26bcdb0554775a8f59c9dd3044a4fbb7ae49 100644
--- a/packages/CLI11/tests/IniTest.cpp
+++ b/packages/CLI11/tests/IniTest.cpp
@@ -889,3 +889,25 @@ TEST_F(TApp, DefaultsIniQuotedOutput) {
     EXPECT_THAT(str, HasSubstr("val1=\"I am a string\""));
     EXPECT_THAT(str, HasSubstr("val2='I am a \"confusing\" string'"));
 }
+
+// #298
+TEST_F(TApp, StopReadingConfigOnClear) {
+
+    TempFile tmpini{"TestIniTmp.ini"};
+
+    app.set_config("--config", tmpini);
+    auto ptr = app.set_config(); // Should *not* read config file
+    EXPECT_EQ(ptr, nullptr);
+
+    {
+        std::ofstream out{tmpini};
+        out << "volume=1" << std::endl;
+    }
+
+    int volume = 0;
+    app.add_option("--volume", volume, "volume1");
+
+    run();
+
+    EXPECT_EQ(volume, 0);
+}
diff --git a/packages/CLI11/tests/NewParseTest.cpp b/packages/CLI11/tests/NewParseTest.cpp
index 89e7fbeea54a21926486627fdd161bc7ee7e1a41..4a3997af5f4da288fcd4d07874dbc499ba9f533f 100644
--- a/packages/CLI11/tests/NewParseTest.cpp
+++ b/packages/CLI11/tests/NewParseTest.cpp
@@ -130,14 +130,20 @@ TEST_F(TApp, BuiltinComplexFail) {
     EXPECT_THROW(run(), CLI::ArgumentMismatch);
 }
 
+class spair {
+  public:
+    spair() = default;
+    spair(const std::string &s1, const std::string &s2) : first(s1), second(s2) {}
+    std::string first;
+    std::string second;
+};
 // an example of custom converter that can be used to add new parsing options
 // On MSVC and possibly some other new compilers this can be a free standing function without the template
 // specialization but this is compiler dependent
 namespace CLI {
 namespace detail {
 
-template <>
-bool lexical_cast<std::pair<std::string, std::string>>(std::string input, std::pair<std::string, std::string> &output) {
+template <> bool lexical_cast<spair>(const std::string &input, spair &output) {
 
     auto sep = input.find_first_of(':');
     if((sep == std::string::npos) && (sep > 0)) {
@@ -150,7 +156,7 @@ bool lexical_cast<std::pair<std::string, std::string>>(std::string input, std::p
 } // namespace CLI
 
 TEST_F(TApp, custom_string_converter) {
-    std::pair<std::string, std::string> val;
+    spair val;
     app.add_option("-d,--dual_string", val);
 
     args = {"-d", "string1:string2"};
@@ -161,7 +167,7 @@ TEST_F(TApp, custom_string_converter) {
 }
 
 TEST_F(TApp, custom_string_converterFail) {
-    std::pair<std::string, std::string> val;
+    spair val;
     app.add_option("-d,--dual_string", val);
 
     args = {"-d", "string2"};
@@ -187,7 +193,7 @@ namespace detail {
 
 // On MSVC and possibly some other new compilers this can be a free standing function without the template
 // specialization but this is compiler dependent
-template <> bool lexical_cast<std::complex<double>>(std::string input, std::complex<double> &output) {
+template <> bool lexical_cast<std::complex<double>>(const std::string &input, std::complex<double> &output) {
     // regular expression to handle complex numbers of various formats
     static const std::regex creg(
         R"(([+-]?(\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)?)\s*([+-]\s*(\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)?)[ji]*)");
@@ -209,8 +215,9 @@ template <> bool lexical_cast<std::complex<double>>(std::string input, std::comp
             CLI::detail::trim(strval);
             worked = CLI::detail::lexical_cast(strval, y);
         } else {
-            CLI::detail::trim(input);
-            worked = CLI::detail::lexical_cast(input, x);
+            std::string ival = input;
+            CLI::detail::trim(ival);
+            worked = CLI::detail::lexical_cast(ival, x);
         }
     }
     if(worked) {
@@ -259,3 +266,187 @@ TEST_F(TApp, AddingComplexParserDetail) {
     }
 }
 #endif
+
+/// simple class to wrap another  with a very specific type constructor and assignment operators to test out some of the
+/// option assignments
+template <class X> class objWrapper {
+  public:
+    objWrapper() = default;
+    explicit objWrapper(X obj) : val_{obj} {};
+    objWrapper(const objWrapper &ow) = default;
+    template <class TT> objWrapper(const TT &obj) = delete;
+    objWrapper &operator=(const objWrapper &) = default;
+    objWrapper &operator=(objWrapper &&) = default;
+    // delete all other assignment operators
+    template <typename TT> void operator=(TT &&obj) = delete;
+
+    const X &value() const { return val_; }
+
+  private:
+    X val_;
+};
+
+// I think there is a bug with the is_assignable in visual studio 2015 it is fixed in later versions
+// so this test will not compile in that compiler
+#if !defined(_MSC_VER) || _MSC_VER >= 1910
+
+static_assert(CLI::detail::is_direct_constructible<objWrapper<std::string>, std::string>::value,
+              "string wrapper isn't properly constructible");
+
+static_assert(!std::is_assignable<objWrapper<std::string>, std::string>::value,
+              "string wrapper is improperly assignable");
+TEST_F(TApp, stringWrapper) {
+    objWrapper<std::string> sWrapper;
+    app.add_option("-v", sWrapper);
+    args = {"-v", "string test"};
+
+    run();
+
+    EXPECT_EQ(sWrapper.value(), "string test");
+}
+
+static_assert(CLI::detail::is_direct_constructible<objWrapper<double>, double>::value,
+              "double wrapper isn't properly assignable");
+
+static_assert(!CLI::detail::is_direct_constructible<objWrapper<double>, int>::value,
+              "double wrapper can be assigned from int");
+
+static_assert(!CLI::detail::is_istreamable<objWrapper<double>>::value,
+              "double wrapper is input streamable and it shouldn't be");
+
+TEST_F(TApp, doubleWrapper) {
+    objWrapper<double> dWrapper;
+    app.add_option("-v", dWrapper);
+    args = {"-v", "2.36"};
+
+    run();
+
+    EXPECT_EQ(dWrapper.value(), 2.36);
+
+    args = {"-v", "thing"};
+
+    EXPECT_THROW(run(), CLI::ConversionError);
+}
+
+static_assert(CLI::detail::is_direct_constructible<objWrapper<int>, int>::value,
+              "int wrapper is not constructible from int64");
+
+static_assert(!CLI::detail::is_direct_constructible<objWrapper<int>, double>::value,
+              "int wrapper is constructible from double");
+
+static_assert(!CLI::detail::is_istreamable<objWrapper<int>>::value,
+              "int wrapper is input streamable and it shouldn't be");
+
+TEST_F(TApp, intWrapper) {
+    objWrapper<int> iWrapper;
+    app.add_option("-v", iWrapper);
+    args = {"-v", "45"};
+
+    run();
+
+    EXPECT_EQ(iWrapper.value(), 45);
+    args = {"-v", "thing"};
+
+    EXPECT_THROW(run(), CLI::ConversionError);
+}
+
+static_assert(!CLI::detail::is_direct_constructible<objWrapper<float>, int>::value,
+              "float wrapper is constructible from int");
+static_assert(!CLI::detail::is_direct_constructible<objWrapper<float>, double>::value,
+              "float wrapper is constructible from double");
+
+static_assert(!CLI::detail::is_istreamable<objWrapper<float>>::value,
+              "float wrapper is input streamable and it shouldn't be");
+
+TEST_F(TApp, floatWrapper) {
+    objWrapper<float> iWrapper;
+    app.add_option<objWrapper<float>, float>("-v", iWrapper);
+    args = {"-v", "45.3"};
+
+    run();
+
+    EXPECT_EQ(iWrapper.value(), 45.3f);
+    args = {"-v", "thing"};
+
+    EXPECT_THROW(run(), CLI::ConversionError);
+}
+
+#endif
+/// simple class to wrap another  with a very specific type constructor to test out some of the option assignments
+class dobjWrapper {
+  public:
+    dobjWrapper() = default;
+    explicit dobjWrapper(double obj) : dval_{obj} {};
+    explicit dobjWrapper(int obj) : ival_{obj} {};
+
+    double dvalue() const { return dval_; }
+    int ivalue() const { return ival_; }
+
+  private:
+    double dval_{0.0};
+    int ival_{0};
+};
+
+TEST_F(TApp, dobjWrapper) {
+    dobjWrapper iWrapper;
+    app.add_option("-v", iWrapper);
+    args = {"-v", "45"};
+
+    run();
+
+    EXPECT_EQ(iWrapper.ivalue(), 45);
+    EXPECT_EQ(iWrapper.dvalue(), 0.0);
+
+    args = {"-v", "thing"};
+
+    EXPECT_THROW(run(), CLI::ConversionError);
+    iWrapper = dobjWrapper{};
+
+    args = {"-v", "45.1"};
+
+    run();
+    EXPECT_EQ(iWrapper.ivalue(), 0);
+    EXPECT_EQ(iWrapper.dvalue(), 45.1);
+}
+
+/// simple class to wrap another  with a very specific type constructor and assignment operators to test out some of the
+/// option assignments
+template <class X> class AobjWrapper {
+  public:
+    AobjWrapper() = default;
+    // delete all other constructors
+    template <class TT> AobjWrapper(TT &&obj) = delete;
+    // single assignment operator
+    void operator=(X val) { val_ = val; }
+    // delete all other assignment operators
+    template <typename TT> void operator=(TT &&obj) = delete;
+
+    const X &value() const { return val_; }
+
+  private:
+    X val_;
+};
+
+static_assert(std::is_assignable<AobjWrapper<uint16_t> &, uint16_t>::value,
+              "AobjWrapper not assignable like it should be ");
+
+TEST_F(TApp, uint16Wrapper) {
+    AobjWrapper<uint16_t> sWrapper;
+    app.add_option<AobjWrapper<uint16_t>, uint16_t>("-v", sWrapper);
+    args = {"-v", "9"};
+
+    run();
+
+    EXPECT_EQ(sWrapper.value(), 9u);
+    args = {"-v", "thing"};
+
+    EXPECT_THROW(run(), CLI::ConversionError);
+
+    args = {"-v", "72456245754"};
+
+    EXPECT_THROW(run(), CLI::ConversionError);
+
+    args = {"-v", "-3"};
+
+    EXPECT_THROW(run(), CLI::ConversionError);
+}
diff --git a/packages/CLI11/tests/OptionGroupTest.cpp b/packages/CLI11/tests/OptionGroupTest.cpp
index e6de7014e608c828b6cc61555ad00737d521fe5d..2620e1b9aa6fe145a05e2a4a8e119350051acfad 100644
--- a/packages/CLI11/tests/OptionGroupTest.cpp
+++ b/packages/CLI11/tests/OptionGroupTest.cpp
@@ -622,7 +622,7 @@ TEST_F(ManyGroups, Moving) {
 }
 
 struct ManyGroupsPreTrigger : public ManyGroups {
-    size_t triggerMain, trigger1{87u}, trigger2{34u}, trigger3{27u};
+    size_t triggerMain{0u}, trigger1{87u}, trigger2{34u}, trigger3{27u};
     ManyGroupsPreTrigger() {
         remove_required();
         app.preparse_callback([this](size_t count) { triggerMain = count; });
diff --git a/packages/CLI11/tests/OptionalTest.cpp b/packages/CLI11/tests/OptionalTest.cpp
index 720e73b7a630f1c6fcff008409225d3c2522f852..32c29d303f2a3d5f1ffb8424f33d93f5fd60bec7 100644
--- a/packages/CLI11/tests/OptionalTest.cpp
+++ b/packages/CLI11/tests/OptionalTest.cpp
@@ -3,6 +3,48 @@
 
 #include "app_helper.hpp"
 
+// You can explicitly enable or disable support
+// by defining to 1 or 0. Extra check here to ensure it's in the stdlib too.
+// We nest the check for __has_include and it's usage
+#ifndef CLI11_STD_OPTIONAL
+#ifdef __has_include
+#if defined(CLI11_CPP17) && __has_include(<optional>)
+#define CLI11_STD_OPTIONAL 1
+#else
+#define CLI11_STD_OPTIONAL 0
+#endif
+#else
+#define CLI11_STD_OPTIONAL 0
+#endif
+#endif
+
+#ifndef CLI11_EXPERIMENTAL_OPTIONAL
+#define CLI11_EXPERIMENTAL_OPTIONAL 0
+#endif
+
+#ifndef CLI11_BOOST_OPTIONAL
+#define CLI11_BOOST_OPTIONAL 0
+#endif
+
+#if CLI11_BOOST_OPTIONAL
+#include <boost/version.hpp>
+#if BOOST_VERSION < 106100
+#error "This boost::optional version is not supported, use 1.61 or better"
+#endif
+#endif
+
+#if CLI11_STD_OPTIONAL
+#include <optional>
+#endif
+#if CLI11_EXPERIMENTAL_OPTIONAL
+#include <experimental/optional>
+#endif
+#if CLI11_BOOST_OPTIONAL
+#include <boost/optional.hpp>
+#include <boost/optional/optional_io.hpp>
+#endif
+// [CLI11:verbatim]
+
 #if CLI11_STD_OPTIONAL
 
 TEST_F(TApp, StdOptionalTest) {
@@ -55,13 +97,69 @@ TEST_F(TApp, BoostOptionalTest) {
     run();
     EXPECT_TRUE(opt);
     EXPECT_EQ(*opt, 1);
+    opt = {};
+    args = {"--count", "3"};
+    run();
+    EXPECT_TRUE(opt);
+    EXPECT_EQ(*opt, 3);
+}
 
+TEST_F(TApp, BoostOptionalint64Test) {
+    boost::optional<int64_t> opt;
+    app.add_option("-c,--count", opt);
+    run();
+    EXPECT_FALSE(opt);
+
+    args = {"-c", "1"};
+    run();
+    EXPECT_TRUE(opt);
+    EXPECT_EQ(*opt, 1);
+    opt = {};
     args = {"--count", "3"};
     run();
     EXPECT_TRUE(opt);
     EXPECT_EQ(*opt, 3);
 }
 
+TEST_F(TApp, BoostOptionalStringTest) {
+    boost::optional<std::string> opt;
+    app.add_option("-s,--string", opt);
+    run();
+    EXPECT_FALSE(opt);
+
+    args = {"-s", "strval"};
+    run();
+    EXPECT_TRUE(opt);
+    EXPECT_EQ(*opt, "strval");
+    opt = {};
+    args = {"--string", "strv"};
+    run();
+    EXPECT_TRUE(opt);
+    EXPECT_EQ(*opt, "strv");
+}
+
+TEST_F(TApp, BoostOptionalEnumTest) {
+    enum class eval : char { val0 = 0, val1 = 1, val2 = 2, val3 = 3, val4 = 4 };
+    boost::optional<eval> opt;
+    auto optptr = app.add_option<decltype(opt), eval>("-v,--val", opt);
+    optptr->capture_default_str();
+
+    auto dstring = optptr->get_default_str();
+    EXPECT_TRUE(dstring.empty());
+    run();
+    EXPECT_FALSE(opt);
+
+    args = {"-v", "3"};
+    run();
+    EXPECT_TRUE(opt);
+    EXPECT_TRUE(*opt == eval::val3);
+    opt = {};
+    args = {"--val", "1"};
+    run();
+    EXPECT_TRUE(opt);
+    EXPECT_TRUE(*opt == eval::val1);
+}
+
 TEST_F(TApp, BoostOptionalVector) {
     boost::optional<std::vector<int>> opt;
     app.add_option_function<std::vector<int>>("-v,--vec", [&opt](const std::vector<int> &v) { opt = v; }, "some vector")
diff --git a/packages/CLI11/tests/SubcommandTest.cpp b/packages/CLI11/tests/SubcommandTest.cpp
index 4db7f2cf01a0b7ed59ae6773a4c1d895c4169f05..fa6309365f81032e5628ee31c69fd21055a36e9f 100644
--- a/packages/CLI11/tests/SubcommandTest.cpp
+++ b/packages/CLI11/tests/SubcommandTest.cpp
@@ -229,6 +229,49 @@ TEST_F(TApp, Callbacks) {
     EXPECT_TRUE(val);
 }
 
+TEST_F(TApp, CallbackOrder) {
+
+    std::vector<std::string> cb;
+    app.parse_complete_callback([&cb]() { cb.push_back("ac1"); });
+    app.final_callback([&cb]() { cb.push_back("ac2"); });
+    auto sub1 = app.add_subcommand("sub1")
+                    ->parse_complete_callback([&cb]() { cb.push_back("c1"); })
+                    ->preparse_callback([&cb](size_t v1) { cb.push_back(std::string("pc1-") + std::to_string(v1)); });
+    auto sub2 = app.add_subcommand("sub2")
+                    ->final_callback([&cb]() { cb.push_back("c2"); })
+                    ->preparse_callback([&cb](size_t v1) { cb.push_back(std::string("pc2-") + std::to_string(v1)); });
+    app.preparse_callback([&cb](size_t v1) { cb.push_back(std::string("pa-") + std::to_string(v1)); });
+
+    app.add_option("--opt1");
+    sub1->add_flag("--sub1opt");
+    sub1->add_option("--sub1optb");
+    sub1->add_flag("--sub1opt2");
+    sub2->add_flag("--sub2opt");
+    sub2->add_option("--sub2opt2");
+    args = {"--opt1",
+            "opt1_val",
+            "sub1",
+            "--sub1opt",
+            "--sub1optb",
+            "val",
+            "sub2",
+            "--sub2opt",
+            "sub1",
+            "--sub1opt2",
+            "sub2",
+            "--sub2opt2",
+            "val"};
+    run();
+    EXPECT_EQ(cb.size(), 8u);
+    EXPECT_EQ(cb[0], "pa-13");
+    EXPECT_EQ(cb[1], "pc1-10");
+    EXPECT_EQ(cb[2], "c1");
+    EXPECT_EQ(cb[3], "pc2-6");
+    EXPECT_EQ(cb[4], "c1");
+    EXPECT_EQ(cb[5], "ac1");
+    EXPECT_EQ(cb[6], "c2");
+    EXPECT_EQ(cb[7], "ac2");
+}
 TEST_F(TApp, RuntimeErrorInCallback) {
     auto sub1 = app.add_subcommand("sub1");
     sub1->callback([]() { throw CLI::RuntimeError(); });
@@ -519,6 +562,57 @@ TEST_F(TApp, CallbackOrderingImmediate) {
     EXPECT_EQ(2, sub_val);
 }
 
+TEST_F(TApp, CallbackOrderingImmediateMain) {
+    app.fallthrough();
+    int val = 0, sub_val = 0;
+
+    auto sub = app.add_subcommand("sub");
+    sub->callback([&val, &sub_val]() {
+        sub_val = val;
+        val = 2;
+    });
+    app.callback([&val]() { val = 1; });
+    args = {"sub"};
+    run();
+    EXPECT_EQ(1, val);
+    EXPECT_EQ(0, sub_val);
+    // the main app callback should run before the subcommand callbacks
+    app.immediate_callback();
+    val = 0; // reset value
+    run();
+    EXPECT_EQ(2, val);
+    EXPECT_EQ(1, sub_val);
+    // the subcommand callback now runs immediately after processing and before the main app callback again
+    sub->immediate_callback();
+    val = 0; // reset value
+    run();
+    EXPECT_EQ(1, val);
+    EXPECT_EQ(0, sub_val);
+}
+
+// Test based on issue #308
+TEST_F(TApp, CallbackOrderingImmediateModeOrder) {
+
+    app.require_subcommand(1, 1);
+    std::vector<int> v;
+    app.callback([&v]() { v.push_back(1); })->immediate_callback(true);
+
+    auto sub = app.add_subcommand("hello")->callback([&v]() { v.push_back(2); })->immediate_callback(false);
+    args = {"hello"};
+    run();
+    // immediate_callback inherited
+    ASSERT_EQ(v.size(), 2u);
+    EXPECT_EQ(v[0], 1);
+    EXPECT_EQ(v[1], 2);
+    v.clear();
+    sub->immediate_callback(true);
+    run();
+    // immediate_callback is now triggered for the main first
+    ASSERT_EQ(v.size(), 2u);
+    EXPECT_EQ(v[0], 2);
+    EXPECT_EQ(v[1], 1);
+}
+
 TEST_F(TApp, RequiredSubCom) {
     app.add_subcommand("sub1");
     app.add_subcommand("sub2");
diff --git a/packages/CLI11/tests/TransformTest.cpp b/packages/CLI11/tests/TransformTest.cpp
index ba0e11a997975387c8df99b07cd1d85076f0abc0..ad3ce1382acf1978b1b50356509344b47d4c54b9 100644
--- a/packages/CLI11/tests/TransformTest.cpp
+++ b/packages/CLI11/tests/TransformTest.cpp
@@ -2,6 +2,15 @@
 
 #include <unordered_map>
 
+#if defined(CLI11_CPP17)
+#if defined(__has_include)
+#if __has_include(<string_view>)
+#include <string_view>
+#define CLI11_HAS_STRING_VIEW
+#endif
+#endif
+#endif
+
 TEST_F(TApp, SimpleTransform) {
     int value;
     auto opt = app.add_option("-s", value)->transform(CLI::Transformer({{"one", std::string("1")}}));
@@ -102,6 +111,19 @@ TEST_F(TApp, SimpleTransformFn) {
     EXPECT_EQ(value, 1);
 }
 
+#if defined(CLI11_HAS_STRING_VIEW)
+TEST_F(TApp, StringViewTransformFn) {
+    std::string value;
+    std::map<std::string_view, std::string_view> map = {// key length > std::string().capacity() [SSO length]
+                                                        {"a-rather-long-argument", "mapped"}};
+    app.add_option("-s", value)->transform(CLI::CheckedTransformer(map));
+    args = {"-s", "a-rather-long-argument"};
+    run();
+    EXPECT_EQ(value, "mapped");
+}
+
+#endif
+
 TEST_F(TApp, SimpleNumericalTransformFn) {
     int value;
     auto opt =
@@ -431,3 +453,406 @@ TEST_F(TApp, BoundTests) {
     EXPECT_TRUE(help.find("bounded to") != std::string::npos);
     EXPECT_TRUE(help.find("[3.4 - 5.9]") != std::string::npos);
 }
+
+TEST_F(TApp, NumberWithUnitCorrecltySplitNumber) {
+    std::map<std::string, int> mapping{{"a", 10}, {"b", 100}, {"cc", 1000}};
+
+    int value = 0;
+    app.add_option("-n", value)->transform(CLI::AsNumberWithUnit(mapping));
+
+    args = {"-n", "42"};
+    run();
+    EXPECT_EQ(value, 42);
+
+    args = {"-n", "42a"};
+    run();
+    EXPECT_EQ(value, 420);
+
+    args = {"-n", "  42  cc  "};
+    run();
+    EXPECT_EQ(value, 42000);
+    args = {"-n", "  -42  cc  "};
+    run();
+    EXPECT_EQ(value, -42000);
+}
+
+TEST_F(TApp, NumberWithUnitFloatTest) {
+    std::map<std::string, double> mapping{{"a", 10}, {"b", 100}, {"cc", 1000}};
+    double value = 0;
+    app.add_option("-n", value)->transform(CLI::AsNumberWithUnit(mapping));
+
+    args = {"-n", "42"};
+    run();
+    EXPECT_DOUBLE_EQ(value, 42);
+
+    args = {"-n", ".5"};
+    run();
+    EXPECT_DOUBLE_EQ(value, .5);
+
+    args = {"-n", "42.5 a"};
+    run();
+    EXPECT_DOUBLE_EQ(value, 425);
+
+    args = {"-n", "42.cc"};
+    run();
+    EXPECT_DOUBLE_EQ(value, 42000);
+}
+
+TEST_F(TApp, NumberWithUnitCaseSensitive) {
+    std::map<std::string, int> mapping{{"a", 10}, {"A", 100}};
+
+    int value = 0;
+    app.add_option("-n", value)->transform(CLI::AsNumberWithUnit(mapping, CLI::AsNumberWithUnit::CASE_SENSITIVE));
+
+    args = {"-n", "42a"};
+    run();
+    EXPECT_EQ(value, 420);
+
+    args = {"-n", "42A"};
+    run();
+    EXPECT_EQ(value, 4200);
+}
+
+TEST_F(TApp, NumberWithUnitCaseInsensitive) {
+    std::map<std::string, int> mapping{{"a", 10}, {"B", 100}};
+
+    int value = 0;
+    app.add_option("-n", value)->transform(CLI::AsNumberWithUnit(mapping, CLI::AsNumberWithUnit::CASE_INSENSITIVE));
+
+    args = {"-n", "42a"};
+    run();
+    EXPECT_EQ(value, 420);
+
+    args = {"-n", "42A"};
+    run();
+    EXPECT_EQ(value, 420);
+
+    args = {"-n", "42b"};
+    run();
+    EXPECT_EQ(value, 4200);
+
+    args = {"-n", "42B"};
+    run();
+    EXPECT_EQ(value, 4200);
+}
+
+TEST_F(TApp, NumberWithUnitMandatoryUnit) {
+    std::map<std::string, int> mapping{{"a", 10}, {"A", 100}};
+
+    int value;
+    app.add_option("-n", value)
+        ->transform(CLI::AsNumberWithUnit(mapping,
+                                          CLI::AsNumberWithUnit::Options(CLI::AsNumberWithUnit::UNIT_REQUIRED |
+                                                                         CLI::AsNumberWithUnit::CASE_SENSITIVE)));
+
+    args = {"-n", "42a"};
+    run();
+    EXPECT_EQ(value, 420);
+
+    args = {"-n", "42A"};
+    run();
+    EXPECT_EQ(value, 4200);
+
+    args = {"-n", "42"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+}
+
+TEST_F(TApp, NumberWithUnitMandatoryUnit2) {
+    std::map<std::string, int> mapping{{"a", 10}, {"B", 100}};
+
+    int value;
+    app.add_option("-n", value)
+        ->transform(CLI::AsNumberWithUnit(mapping,
+                                          CLI::AsNumberWithUnit::Options(CLI::AsNumberWithUnit::UNIT_REQUIRED |
+                                                                         CLI::AsNumberWithUnit::CASE_INSENSITIVE)));
+
+    args = {"-n", "42A"};
+    run();
+    EXPECT_EQ(value, 420);
+
+    args = {"-n", "42b"};
+    run();
+    EXPECT_EQ(value, 4200);
+
+    args = {"-n", "42"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+}
+
+TEST_F(TApp, NumberWithUnitBadMapping) {
+    EXPECT_THROW(CLI::AsNumberWithUnit(std::map<std::string, int>{{"a", 10}, {"A", 100}},
+                                       CLI::AsNumberWithUnit::CASE_INSENSITIVE),
+                 CLI::ValidationError);
+    EXPECT_THROW(CLI::AsNumberWithUnit(std::map<std::string, int>{{"a", 10}, {"9", 100}}), CLI::ValidationError);
+    EXPECT_THROW(CLI::AsNumberWithUnit(std::map<std::string, int>{{"a", 10}, {"AA A", 100}}), CLI::ValidationError);
+    EXPECT_THROW(CLI::AsNumberWithUnit(std::map<std::string, int>{{"a", 10}, {"", 100}}), CLI::ValidationError);
+}
+
+TEST_F(TApp, NumberWithUnitBadInput) {
+    std::map<std::string, int> mapping{{"a", 10}, {"b", 100}};
+
+    int value;
+    app.add_option("-n", value)->transform(CLI::AsNumberWithUnit(mapping));
+
+    args = {"-n", "13 a b"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+    args = {"-n", "13 c"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+    args = {"-n", "a"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+    args = {"-n", "12.0a"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+    args = {"-n", "a5"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+    args = {"-n", ""};
+    EXPECT_THROW(run(), CLI::ValidationError);
+    args = {"-n", "13 a-"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+}
+
+TEST_F(TApp, NumberWithUnitIntOverflow) {
+    std::map<std::string, int> mapping{{"a", 1000000}, {"b", 100}, {"c", 101}};
+
+    int32_t value;
+    app.add_option("-n", value)->transform(CLI::AsNumberWithUnit(mapping));
+
+    args = {"-n", "1000 a"};
+    run();
+    EXPECT_EQ(value, 1000000000);
+
+    args = {"-n", "1000000 a"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+
+    args = {"-n", "-1000000 a"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+
+    args = {"-n", "21474836 b"};
+    run();
+    EXPECT_EQ(value, 2147483600);
+
+    args = {"-n", "21474836 c"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+}
+
+TEST_F(TApp, NumberWithUnitFloatOverflow) {
+    std::map<std::string, float> mapping{{"a", 2.f}, {"b", 1.f}, {"c", 0.f}};
+
+    float value;
+    app.add_option("-n", value)->transform(CLI::AsNumberWithUnit(mapping));
+
+    args = {"-n", "3e+38 a"};
+    EXPECT_THROW(run(), CLI::ValidationError);
+
+    args = {"-n", "3e+38 b"};
+    run();
+    EXPECT_FLOAT_EQ(value, 3e+38f);
+
+    args = {"-n", "3e+38 c"};
+    run();
+    EXPECT_FLOAT_EQ(value, 0.f);
+}
+
+TEST_F(TApp, AsSizeValue1000_1024) {
+    uint64_t value;
+    app.add_option("-s", value)->transform(CLI::AsSizeValue(true));
+
+    args = {"-s", "10240"};
+    run();
+    EXPECT_EQ(value, 10240u);
+
+    args = {"-s", "1b"};
+    run();
+    EXPECT_EQ(value, 1u);
+
+    uint64_t k_value = 1000u;
+    uint64_t ki_value = 1024u;
+    args = {"-s", "1k"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1kb"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1 Kb"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1ki"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1kib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    k_value = 1000ull * 1000u;
+    ki_value = 1024ull * 1024u;
+    args = {"-s", "1m"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1mb"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1mi"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1mib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    k_value = 1000ull * 1000u * 1000u;
+    ki_value = 1024ull * 1024u * 1024u;
+    args = {"-s", "1g"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1gb"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1gi"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1gib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    k_value = 1000ull * 1000u * 1000u * 1000u;
+    ki_value = 1024ull * 1024u * 1024u * 1024u;
+    args = {"-s", "1t"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1tb"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1ti"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1tib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    k_value = 1000ull * 1000u * 1000u * 1000u * 1000u;
+    ki_value = 1024ull * 1024u * 1024u * 1024u * 1024u;
+    args = {"-s", "1p"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1pb"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1pi"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1pib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    k_value = 1000ull * 1000u * 1000u * 1000u * 1000u * 1000u;
+    ki_value = 1024ull * 1024u * 1024u * 1024u * 1024u * 1024u;
+    args = {"-s", "1e"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1eb"};
+    run();
+    EXPECT_EQ(value, k_value);
+    args = {"-s", "1ei"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1eib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+}
+
+TEST_F(TApp, AsSizeValue1024) {
+    uint64_t value;
+    app.add_option("-s", value)->transform(CLI::AsSizeValue(false));
+
+    args = {"-s", "10240"};
+    run();
+    EXPECT_EQ(value, 10240u);
+
+    args = {"-s", "1b"};
+    run();
+    EXPECT_EQ(value, 1u);
+
+    uint64_t ki_value = 1024u;
+    args = {"-s", "1k"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1kb"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1 Kb"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1ki"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1kib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    ki_value = 1024ull * 1024u;
+    args = {"-s", "1m"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1mb"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1mi"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1mib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    ki_value = 1024ull * 1024u * 1024u;
+    args = {"-s", "1g"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1gb"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1gi"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1gib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    ki_value = 1024ull * 1024u * 1024u * 1024u;
+    args = {"-s", "1t"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1tb"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1ti"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1tib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    ki_value = 1024ull * 1024u * 1024u * 1024u * 1024u;
+    args = {"-s", "1p"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1pb"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1pi"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1pib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+
+    ki_value = 1024ull * 1024u * 1024u * 1024u * 1024u * 1024u;
+    args = {"-s", "1e"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1eb"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1ei"};
+    run();
+    EXPECT_EQ(value, ki_value);
+    args = {"-s", "1eib"};
+    run();
+    EXPECT_EQ(value, ki_value);
+}
diff --git a/packages/CLI11/tests/mesonTest/README.md b/packages/CLI11/tests/mesonTest/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..ec08dc5be71eef08edae21939c09248796b03ffd
--- /dev/null
+++ b/packages/CLI11/tests/mesonTest/README.md
@@ -0,0 +1,10 @@
+# CLI11 Meson test / example
+
+Requirements: meson, ninja
+
+## Build
+
+```bash
+meson build
+ninja -C build
+```
diff --git a/packages/CLI11/tests/mesonTest/main.cpp b/packages/CLI11/tests/mesonTest/main.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..24647ba11771093c68236e31a71f2f787cf5d00c
--- /dev/null
+++ b/packages/CLI11/tests/mesonTest/main.cpp
@@ -0,0 +1,11 @@
+#include <CLI/CLI.hpp>
+
+int main(int argc, char **argv) {
+    CLI::App app{"App description"};
+
+    std::string filename = "default";
+    app.add_option("-f,--file", filename, "A help string");
+
+    CLI11_PARSE(app, argc, argv);
+    return 0;
+}
diff --git a/packages/CLI11/tests/mesonTest/meson.build b/packages/CLI11/tests/mesonTest/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..56ebadb659a179929f7ade06db02ef10466bddfe
--- /dev/null
+++ b/packages/CLI11/tests/mesonTest/meson.build
@@ -0,0 +1,5 @@
+project('mesonTest', ['c', 'cpp'], default_options: ['cpp_std=c++11'])
+
+cli11_dep = subproject('CLI11').get_variable('CLI11_dep')
+
+mainExe = executable('main', ['main.cpp'], dependencies: [cli11_dep])
diff --git a/packages/CLI11/tests/mesonTest/subprojects/CLI11 b/packages/CLI11/tests/mesonTest/subprojects/CLI11
new file mode 120000
index 0000000000000000000000000000000000000000..a8a4f8c2127bf74725cf14800dde7ea8aeec5c5c
--- /dev/null
+++ b/packages/CLI11/tests/mesonTest/subprojects/CLI11
@@ -0,0 +1 @@
+../../..
\ No newline at end of file
diff --git a/packages/Catch2/.github/FUNDING.yml b/packages/Catch2/.github/FUNDING.yml
new file mode 100644
index 0000000000000000000000000000000000000000..01d384e8268e6a7e979bb2e73724bb336baf3a09
--- /dev/null
+++ b/packages/Catch2/.github/FUNDING.yml
@@ -0,0 +1 @@
+patreon: horenmar
diff --git a/packages/Catch2/.gitrepo b/packages/Catch2/.gitrepo
index a2720b741741a21e88ba3d222b9e5fa93abfc033..81212f2a76c2e84ebd308d585037e06a5a17f25c 100644
--- a/packages/Catch2/.gitrepo
+++ b/packages/Catch2/.gitrepo
@@ -6,7 +6,7 @@
 [subrepo]
 	remote = git@github.com:catchorg/Catch2.git
 	branch = master
-	commit = 36fb8561633cca30a66d47314e5da9c61c6a756b
-	parent = da523f3d6fb1784863693f1a678839df16f5084f
+	commit = 060a41ec7b954cf6a556a88035f04b771680916b
+	parent = df97ccdd26a1350902ae665b134949710d78071e
 	cmdver = 0.4.0
 	method = merge
diff --git a/packages/Catch2/.travis.yml b/packages/Catch2/.travis.yml
index 345edfbb3add1a27422d3a91560a325496a5806c..0fe2abb198488640c7b2b83c1de67caf03bad4a5 100644
--- a/packages/Catch2/.travis.yml
+++ b/packages/Catch2/.travis.yml
@@ -9,8 +9,8 @@ common_sources: &all_sources
   - llvm-toolchain-trusty
   - llvm-toolchain-trusty-3.9
   - llvm-toolchain-trusty-4.0
-  - llvm-toolchain-trusty-5.0
-  - llvm-toolchain-trusty-6.0
+  - llvm-toolchain-xenial-5.0
+  - llvm-toolchain-xenial-6.0
 
 matrix:
   include:
@@ -60,6 +60,7 @@ matrix:
       env: COMPILER='clang++-4.0'
 
     - os: linux
+      dist: xenial
       compiler: clang
       addons:
           apt:
@@ -68,6 +69,7 @@ matrix:
       env: COMPILER='clang++-5.0'
 
     - os: linux
+      dist: xenial
       compiler: clang
       addons:
           apt:
@@ -153,6 +155,7 @@ matrix:
       env: COMPILER='clang++-4.0' CPP14=1
 
     - os: linux
+      dist: xenial
       compiler: clang
       addons:
           apt:
@@ -161,6 +164,7 @@ matrix:
       env: COMPILER='clang++-5.0' CPP14=1
 
     - os: linux
+      dist: xenial
       compiler: clang
       addons:
           apt:
@@ -255,6 +259,7 @@ matrix:
       env: COMPILER='g++-7' EXAMPLES=1 COVERAGE=1 EXTRAS=1 CPP17=1
 
     - os: linux
+      dist: xenial
       compiler: clang
       addons:
           apt:
@@ -263,6 +268,7 @@ matrix:
       env: COMPILER='clang++-6.0' CPP17=1
 
     - os: linux
+      dist: xenial
       compiler: clang
       addons:
           apt:
@@ -276,7 +282,7 @@ matrix:
         - "3.7"
       dist: xenial
       install:
-        - pip install conan==1.10.2 conan-package-tools
+        - pip install conan-package-tools
       env:
         - CONAN_GCC_VERSIONS=8
         - CONAN_DOCKER_IMAGE=conanio/gcc8
@@ -301,10 +307,19 @@ before_script:
   # Regenerate single header file, so it is tested in the examples...
   - python scripts/generateSingleHeader.py
 
+  - |
+    if [[ ${CPP17} -eq 1 ]]; then
+      export CPP_STANDARD=17
+    elif [[ ${CPP14} -eq 1 ]]; then
+      export CPP_STANDARD=14
+    else
+      export CPP_STANDARD=11
+    fi
+
     # Use Debug builds for running Valgrind and building examples
-  - cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug -Wdev -DUSE_CPP14=${CPP14} -DUSE_CPP17=${CPP17} -DCATCH_USE_VALGRIND=${VALGRIND} -DCATCH_BUILD_EXAMPLES=${EXAMPLES} -DCATCH_ENABLE_COVERAGE=${COVERAGE} -DCATCH_BUILD_EXTRA_TESTS=${EXTRAS}
+  - cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug -Wdev -DCATCH_USE_VALGRIND=${VALGRIND} -DCATCH_BUILD_EXAMPLES=${EXAMPLES} -DCATCH_ENABLE_COVERAGE=${COVERAGE} -DCATCH_BUILD_EXTRA_TESTS=${EXTRAS} -DCMAKE_CXX_STANDARD=${CPP_STANDARD} -DCMAKE_CXX_STANDARD_REQUIRED=On -DCMAKE_CXX_EXTENSIONS=OFF
     # Don't bother with release build for coverage build
-  - cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release -Wdev -DUSE_CPP14=${CPP14} -DUSE_CPP17=${CPP17}
+  - cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release -Wdev -DCMAKE_CXX_STANDARD=${CPP_STANDARD} -DCMAKE_CXX_STANDARD_REQUIRED=On -DCMAKE_CXX_EXTENSIONS=OFF
 
 
 script:
diff --git a/packages/Catch2/CMakeLists.txt b/packages/Catch2/CMakeLists.txt
index 6609104699629e01002fafe4ccf1e26afb7c21fb..2ead67597f2262e8e54bd23f7be47a267b5c73ea 100644
--- a/packages/Catch2/CMakeLists.txt
+++ b/packages/Catch2/CMakeLists.txt
@@ -6,7 +6,15 @@ if(NOT DEFINED PROJECT_NAME)
   set(NOT_SUBPROJECT ON)
 endif()
 
-project(Catch2 LANGUAGES CXX VERSION 2.7.1)
+# Catch2's build breaks if done in-tree. You probably should not build
+# things in tree anyway, but we can allow projects that include Catch2
+# as a subproject to build in-tree as long as it is not in our tree.
+if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+    message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
+endif()
+
+
+project(Catch2 LANGUAGES CXX VERSION 2.10.0)
 
 # Provide path for scripts
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
@@ -88,6 +96,10 @@ target_include_directories(Catch2
     $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
 )
 
+if (ANDROID)
+    target_link_libraries(Catch2 INTERFACE log)
+endif()
+
 # provide a namespaced alias for clients to 'link' against if catch is included as a sub-project
 add_library(Catch2::Catch2 ALIAS Catch2)
 
@@ -132,9 +144,11 @@ if (NOT_SUBPROJECT)
     #
     # CMake does not provide a direct customization point for this in
     # `write_basic_package_version_file`, but it can be accomplished
-    # indirectly by temporarily undefining `CMAKE_SIZEOF_VOID_P`.
+    # indirectly by temporarily redefining `CMAKE_SIZEOF_VOID_P` to an
+    # empty string. Note that just undefining the variable could be
+    # insufficient in cases where the variable was already in CMake cache
     set(CATCH2_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
-    unset(CMAKE_SIZEOF_VOID_P)
+    set(CMAKE_SIZEOF_VOID_P "")
     write_basic_package_version_file(
       "${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
       COMPATIBILITY
@@ -205,4 +219,15 @@ if (NOT_SUBPROJECT)
         ${PKGCONFIG_INSTALL_DIR}
     )
 
+    # CPack/CMake started taking the package version from project version 3.12
+    # So we need to set the version manually for older CMake versions
+    if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
+        set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
+    endif()
+
+    set(CPACK_PACKAGE_CONTACT "https://github.com/catchorg/Catch2/")
+
+
+    include( CPack )
+
 endif(NOT_SUBPROJECT)
diff --git a/packages/Catch2/README.md b/packages/Catch2/README.md
index a09ad44bb5297923afae7f352e4216af2a10002f..2b806cd4d69923cd68f864fb24ec9966ab2dd0b7 100644
--- a/packages/Catch2/README.md
+++ b/packages/Catch2/README.md
@@ -5,11 +5,11 @@
 [![Build Status](https://travis-ci.org/catchorg/Catch2.svg?branch=master)](https://travis-ci.org/catchorg/Catch2)
 [![Build status](https://ci.appveyor.com/api/projects/status/github/catchorg/Catch2?svg=true)](https://ci.appveyor.com/project/catchorg/catch2)
 [![codecov](https://codecov.io/gh/catchorg/Catch2/branch/master/graph/badge.svg)](https://codecov.io/gh/catchorg/Catch2)
-[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/ZFBZ5XbLA9F1gzKi)
+[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/00GdTUbFWaV3bNah)
 [![Join the chat in Discord: https://discord.gg/4CWS9zD](https://img.shields.io/badge/Discord-Chat!-brightgreen.svg)](https://discord.gg/4CWS9zD)
 
 
-<a href="https://github.com/catchorg/Catch2/releases/download/v2.7.1/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>
+<a href="https://github.com/catchorg/Catch2/releases/download/v2.10.0/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>
 
 ## Catch2 is released!
 
@@ -19,9 +19,8 @@ before moving to Catch2. You might also like to read [this blog post](https://le
 
 ## What's the Catch?
 
-Catch2 stands for C++ Automated Test Cases in a Header and is a
-multi-paradigm test framework for C++. which also supports Objective-C
-(and maybe C).
+Catch2 is a multi-paradigm test framework for C++. which also supports
+Objective-C (and maybe C).
 It is primarily distributed as a single header file, although certain
 extensions may require additional headers.
 
diff --git a/packages/Catch2/artwork/catch2-c-logo.png b/packages/Catch2/artwork/catch2-c-logo.png
index bab400f91a822bbd14b8712d5815111d4d1b6bea..b1066b8ee7edda10ec0b70d9e207e7c19062ace8 100644
Binary files a/packages/Catch2/artwork/catch2-c-logo.png and b/packages/Catch2/artwork/catch2-c-logo.png differ
diff --git a/packages/Catch2/artwork/catch2-hand-logo.png b/packages/Catch2/artwork/catch2-hand-logo.png
index 5a5e142d2b8537f0cc7d8c4d66ea28c3310be37d..ab857eaab75d6159d251fa7e50f989edeab193f9 100644
Binary files a/packages/Catch2/artwork/catch2-hand-logo.png and b/packages/Catch2/artwork/catch2-hand-logo.png differ
diff --git a/packages/Catch2/artwork/catch2-logo-small.png b/packages/Catch2/artwork/catch2-logo-small.png
index f2118bee09cf296a9f0598980f5a7c94b8e9f077..742e81e15ce43f13b1c0fd0f4b3225e76b624382 100644
Binary files a/packages/Catch2/artwork/catch2-logo-small.png and b/packages/Catch2/artwork/catch2-logo-small.png differ
diff --git a/packages/Catch2/conanfile.py b/packages/Catch2/conanfile.py
index a7cebb9223756ded639e564e124ee7890035d276..8d407bafd9d70dacf7489727a599ef8dc0cb9e6e 100644
--- a/packages/Catch2/conanfile.py
+++ b/packages/Catch2/conanfile.py
@@ -18,7 +18,7 @@ class CatchConan(ConanFile):
         cmake.definitions["BUILD_TESTING"] = "OFF"
         cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
         cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
-        cmake.configure()
+        cmake.configure(build_folder='build')
         cmake.install()
 
         self.copy(pattern="LICENSE.txt", dst="licenses")
diff --git a/packages/Catch2/contrib/CatchAddTests.cmake b/packages/Catch2/contrib/CatchAddTests.cmake
index 2220ce3ac6b987b1e8b1ae82466a3f715916687c..156d55ffe7510d2ff6b2b8e20225af7b9b05e6b0 100644
--- a/packages/Catch2/contrib/CatchAddTests.cmake
+++ b/packages/Catch2/contrib/CatchAddTests.cmake
@@ -51,8 +51,11 @@ string(REPLACE "\n" ";" output "${output}")
 # Parse output
 foreach(line ${output})
   set(test ${line})
-  # use escape commas to handle properly test cases with commans inside the name
-  string(REPLACE "," "\\," test_name ${test})
+  # Escape characters in test case names that would be parsed by Catch2
+  set(test_name ${test})
+  foreach(char , [ ])
+    string(REPLACE ${char} "\\${char}" test_name ${test_name})
+  endforeach(char)
   # ...and add to script
   add_command(add_test
     "${prefix}${test}${suffix}"
diff --git a/packages/Catch2/contrib/ParseAndAddCatchTests.cmake b/packages/Catch2/contrib/ParseAndAddCatchTests.cmake
index dac1dc926fb07583e93a01bb05dce7e4e282fde1..925d932819621028968173aa07c930ff0d096853 100644
--- a/packages/Catch2/contrib/ParseAndAddCatchTests.cmake
+++ b/packages/Catch2/contrib/ParseAndAddCatchTests.cmake
@@ -88,6 +88,11 @@ endfunction()
 
 # Worker function
 function(ParseAndAddCatchTests_ParseFile SourceFile TestTarget)
+    # If SourceFile is an object library, do not scan it (as it is not a file). Exit without giving a warning about a missing file.
+    if(SourceFile MATCHES "\\\$<TARGET_OBJECTS:.+>")
+        ParseAndAddCatchTests_PrintDebugMessage("Detected OBJECT library: ${SourceFile} this will not be scanned for tests.")
+        return()
+    endif()
     # According to CMake docs EXISTS behavior is well-defined only for full paths.
     get_filename_component(SourceFile ${SourceFile} ABSOLUTE)
     if(NOT EXISTS ${SourceFile})
diff --git a/packages/Catch2/docs/Readme.md b/packages/Catch2/docs/Readme.md
index 721880ab7baa565d657dae3fb672fd46424a30dd..582540f4e9cff21a2df99de9df4876065a0da232 100644
--- a/packages/Catch2/docs/Readme.md
+++ b/packages/Catch2/docs/Readme.md
@@ -14,6 +14,7 @@ Writing tests:
 * [Event Listeners](event-listeners.md#top)
 * [Data Generators](generators.md#top)
 * [Other macros](other-macros.md#top)
+* [Micro benchmarking](benchmarks.md#top)
 
 Fine tuning:
 * [Supplying your own main()](own-main.md#top)
diff --git a/packages/Catch2/docs/assertions.md b/packages/Catch2/docs/assertions.md
index 07d2484e72df9abcdd8e31e5b6e79c52523ac8d8..682eb6e7ce34615ee615e449e53acc2ccf42e9ac 100644
--- a/packages/Catch2/docs/assertions.md
+++ b/packages/Catch2/docs/assertions.md
@@ -136,7 +136,7 @@ REQUIRE_THROWS_WITH( dismantleHal(), "My mind is going" );
 * **REQUIRE_THROWS_MATCHES(** _expression_, _exception type_, _matcher for given exception type_ **)** and
 * **CHECK_THROWS_MATCHES(** _expression_, _exception type_, _matcher for given exception type_ **)**
 
-Expects that exception of _exception type_ is thrown and it matches provided matcher (see next section for Matchers).
+Expects that exception of _exception type_ is thrown and it matches provided matcher (see the [documentation for Matchers](matchers.md#top)).
 
 
 _Please note that the `THROW` family of assertions expects to be passed a single expression, not a statement or series of statements. If you want to check a more complicated sequence of operations, you can use a C++11 lambda function._
diff --git a/packages/Catch2/docs/benchmarks.md b/packages/Catch2/docs/benchmarks.md
new file mode 100644
index 0000000000000000000000000000000000000000..295bba300161f106038d8d53bb50251a4d824625
--- /dev/null
+++ b/packages/Catch2/docs/benchmarks.md
@@ -0,0 +1,256 @@
+<a id="top"></a>
+# Authoring benchmarks
+
+> [Introduced](https://github.com/catchorg/Catch2/issues/1616) in Catch 2.9.0.
+
+_Note that benchmarking support is disabled by default and to enable it,
+you need to define `CATCH_CONFIG_ENABLE_BENCHMARKING`. For more details,
+see the [compile-time configuration documentation](configuration.md#top)._
+
+Writing benchmarks is not easy. Catch simplifies certain aspects but you'll
+always need to take care about various aspects. Understanding a few things about
+the way Catch runs your code will be very helpful when writing your benchmarks.
+
+First off, let's go over some terminology that will be used throughout this
+guide.
+
+- *User code*: user code is the code that the user provides to be measured.
+- *Run*: one run is one execution of the user code.
+- *Sample*: one sample is one data point obtained by measuring the time it takes
+  to perform a certain number of runs. One sample can consist of more than one
+  run if the clock available does not have enough resolution to accurately
+  measure a single run. All samples for a given benchmark execution are obtained
+  with the same number of runs.
+
+## Execution procedure
+
+Now I can explain how a benchmark is executed in Catch. There are three main
+steps, though the first does not need to be repeated for every benchmark.
+
+1. *Environmental probe*: before any benchmarks can be executed, the clock's
+resolution is estimated. A few other environmental artifacts are also estimated
+at this point, like the cost of calling the clock function, but they almost
+never have any impact in the results.
+
+2. *Estimation*: the user code is executed a few times to obtain an estimate of
+the amount of runs that should be in each sample. This also has the potential
+effect of bringing relevant code and data into the caches before the actual
+measurement starts.
+
+3. *Measurement*: all the samples are collected sequentially by performing the
+number of runs estimated in the previous step for each sample.
+
+This already gives us one important rule for writing benchmarks for Catch: the
+benchmarks must be repeatable. The user code will be executed several times, and
+the number of times it will be executed during the estimation step cannot be
+known beforehand since it depends on the time it takes to execute the code.
+User code that cannot be executed repeatedly will lead to bogus results or
+crashes.
+
+## Benchmark specification
+
+Benchmarks can be specified anywhere inside a Catch test case.
+There is a simple and a slightly more advanced version of the `BENCHMARK` macro.
+
+Let's have a look how a naive Fibonacci implementation could be benchmarked:
+```c++
+std::uint64_t Fibonacci(std::uint64_t number) {
+    return number < 2 ? 1 : Fibonacci(number - 1) + Fibonacci(number - 2);
+}
+```
+Now the most straight forward way to benchmark this function, is just adding a `BENCHMARK` macro to our test case:
+```c++
+TEST_CASE("Fibonacci") {
+    CHECK(Fibonacci(0) == 1);
+    // some more asserts..
+    CHECK(Fibonacci(5) == 8);
+    // some more asserts..
+
+    // now let's benchmark:
+    BENCHMARK("Fibonacci 20") {
+        return Fibonacci(20);
+    };
+
+    BENCHMARK("Fibonacci 25") {
+        return Fibonacci(25);
+    };
+
+    BENCHMARK("Fibonacci 30") {
+        return Fibonacci(30);
+    };
+
+    BENCHMARK("Fibonacci 35") {
+        return Fibonacci(35);
+    };
+}
+```
+There's a few things to note:
+- As `BENCHMARK` expands to a lambda expression it is necessary to add a semicolon after
+ the closing brace (as opposed to the first experimental version).
+- The `return` is a handy way to avoid the compiler optimizing away the benchmark code.
+
+Running this already runs the benchmarks and outputs something similar to:
+```
+-------------------------------------------------------------------------------
+Fibonacci
+-------------------------------------------------------------------------------
+C:\path\to\Catch2\Benchmark.tests.cpp(10)
+...............................................................................
+benchmark name                                  samples       iterations    estimated
+                                                mean          low mean      high mean
+                                                std dev       low std dev   high std dev
+-------------------------------------------------------------------------------
+Fibonacci 20                                            100       416439   83.2878 ms
+                                                       2 ns         2 ns         2 ns
+                                                       0 ns         0 ns         0 ns
+
+Fibonacci 25                                            100       400776   80.1552 ms
+                                                       3 ns         3 ns         3 ns
+                                                       0 ns         0 ns         0 ns
+
+Fibonacci 30                                            100       396873   79.3746 ms
+                                                      17 ns        17 ns        17 ns
+                                                       0 ns         0 ns         0 ns
+
+Fibonacci 35                                            100       145169   87.1014 ms
+                                                     468 ns       464 ns       473 ns
+                                                      21 ns        15 ns        34 ns
+```
+
+### Advanced benchmarking
+The simplest use case shown above, takes no arguments and just runs the user code that needs to be measured.
+However, if using the `BENCHMARK_ADVANCED` macro and adding a `Catch::Benchmark::Chronometer` argument after
+the macro, some advanced features are available. The contents of the simple benchmarks are invoked once per run,
+while the blocks of the advanced benchmarks are invoked exactly twice:
+once during the estimation phase, and another time during the execution phase.
+
+```c++
+BENCHMARK("simple"){ return long_computation(); };
+
+BENCHMARK_ADVANCED("advanced")(Catch::Benchmark::Chronometer meter) {
+    set_up();
+    meter.measure([] { return long_computation(); });
+};
+```
+
+These advanced benchmarks no longer consist entirely of user code to be measured.
+In these cases, the code to be measured is provided via the
+`Catch::Benchmark::Chronometer::measure` member function. This allows you to set up any
+kind of state that might be required for the benchmark but is not to be included
+in the measurements, like making a vector of random integers to feed to a
+sorting algorithm.
+
+A single call to `Catch::Benchmark::Chronometer::measure` performs the actual measurements
+by invoking the callable object passed in as many times as necessary. Anything
+that needs to be done outside the measurement can be done outside the call to
+`measure`.
+
+The callable object passed in to `measure` can optionally accept an `int`
+parameter.
+
+```c++
+meter.measure([](int i) { return long_computation(i); });
+```
+
+If it accepts an `int` parameter, the sequence number of each run will be passed
+in, starting with 0. This is useful if you want to measure some mutating code,
+for example. The number of runs can be known beforehand by calling
+`Catch::Benchmark::Chronometer::runs`; with this one can set up a different instance to be
+mutated by each run.
+
+```c++
+std::vector<std::string> v(meter.runs());
+std::fill(v.begin(), v.end(), test_string());
+meter.measure([&v](int i) { in_place_escape(v[i]); });
+```
+
+Note that it is not possible to simply use the same instance for different runs
+and resetting it between each run since that would pollute the measurements with
+the resetting code.
+
+It is also possible to just provide an argument name to the simple `BENCHMARK` macro to get 
+the same semantics as providing a callable to `meter.measure` with `int` argument:
+
+```c++
+BENCHMARK("indexed", i){ return long_computation(i); };
+```
+
+### Constructors and destructors
+
+All of these tools give you a lot mileage, but there are two things that still
+need special handling: constructors and destructors. The problem is that if you
+use automatic objects they get destroyed by the end of the scope, so you end up
+measuring the time for construction and destruction together. And if you use
+dynamic allocation instead, you end up including the time to allocate memory in
+the measurements.
+
+To solve this conundrum, Catch provides class templates that let you manually
+construct and destroy objects without dynamic allocation and in a way that lets
+you measure construction and destruction separately.
+
+```c++
+BENCHMARK_ADVANCED("construct")(Catch::Benchmark::Chronometer meter)
+{
+    std::vector<Catch::Benchmark::storage_for<std::string>> storage(meter.runs());
+    meter.measure([&](int i) { storage[i].construct("thing"); });
+})
+
+BENCHMARK_ADVANCED("destroy", [](Catch::Benchmark::Chronometer meter)
+{
+    std::vector<Catch::Benchmark::destructable_object<std::string>> storage(meter.runs());
+    for(auto&& o : storage)
+        o.construct("thing");
+    meter.measure([&](int i) { storage[i].destruct(); });
+})
+```
+
+`Catch::Benchmark::storage_for<T>` objects are just pieces of raw storage suitable for `T`
+objects. You can use the `Catch::Benchmark::storage_for::construct` member function to call a constructor and
+create an object in that storage. So if you want to measure the time it takes
+for a certain constructor to run, you can just measure the time it takes to run
+this function.
+
+When the lifetime of a `Catch::Benchmark::storage_for<T>` object ends, if an actual object was
+constructed there it will be automatically destroyed, so nothing leaks.
+
+If you want to measure a destructor, though, we need to use
+`Catch::Benchmark::destructable_object<T>`. These objects are similar to
+`Catch::Benchmark::storage_for<T>` in that construction of the `T` object is manual, but
+it does not destroy anything automatically. Instead, you are required to call
+the `Catch::Benchmark::destructable_object::destruct` member function, which is what you
+can use to measure the destruction time.
+
+### The optimizer
+
+Sometimes the optimizer will optimize away the very code that you want to
+measure. There are several ways to use results that will prevent the optimiser
+from removing them. You can use the `volatile` keyword, or you can output the
+value to standard output or to a file, both of which force the program to
+actually generate the value somehow.
+
+Catch adds a third option. The values returned by any function provided as user
+code are guaranteed to be evaluated and not optimised out. This means that if
+your user code consists of computing a certain value, you don't need to bother
+with using `volatile` or forcing output. Just `return` it from the function.
+That helps with keeping the code in a natural fashion.
+
+Here's an example:
+
+```c++
+// may measure nothing at all by skipping the long calculation since its
+// result is not used
+BENCHMARK("no return"){ long_calculation(); };
+
+// the result of long_calculation() is guaranteed to be computed somehow
+BENCHMARK("with return"){ return long_calculation(); };
+```
+
+However, there's no other form of control over the optimizer whatsoever. It is
+up to you to write a benchmark that actually measures what you want and doesn't
+just measure the time to do a whole bunch of nothing.
+
+To sum up, there are two simple rules: whatever you would do in handwritten code
+to control optimization still works in Catch; and Catch makes return values
+from user code into observable effects that can't be optimized away.
+
+<i>Adapted from nonius' documentation.</i>
diff --git a/packages/Catch2/docs/command-line.md b/packages/Catch2/docs/command-line.md
index f68c84ca83c96c412e1b4099e2f74169e1dd6a6d..d204da0e5bba36d62aeac05f6578e9bdb7e1f271 100644
--- a/packages/Catch2/docs/command-line.md
+++ b/packages/Catch2/docs/command-line.md
@@ -20,7 +20,10 @@
 [Specify a seed for the Random Number Generator](#specify-a-seed-for-the-random-number-generator)<br>
 [Identify framework and version according to the libIdentify standard](#identify-framework-and-version-according-to-the-libidentify-standard)<br>
 [Wait for key before continuing](#wait-for-key-before-continuing)<br>
-[Specify multiples of clock resolution to run benchmarks for](#specify-multiples-of-clock-resolution-to-run-benchmarks-for)<br>
+[Specify the number of benchmark samples to collect](#specify-the-number-of-benchmark-samples-to-collect)<br>
+[Specify the number of resamples for bootstrapping](#specify-the-number-of-resamples-for-bootstrapping)<br>
+[Specify the confidence-interval for bootstrapping](#specify-the-confidence-interval-for-bootstrapping)<br>
+[Disable statistical analysis of collected benchmark samples](#disable-statistical-analysis-of-collected-benchmark-samples)<br>
 [Usage](#usage)<br>
 [Specify the section to run](#specify-the-section-to-run)<br>
 [Filenames as tags](#filenames-as-tags)<br>
@@ -57,7 +60,10 @@ Click one of the following links to take you straight to that option - or scroll
 <a href="#rng-seed">                                    `    --rng-seed`</a><br />
 <a href="#libidentify">                                 `    --libidentify`</a><br />
 <a href="#wait-for-keypress">                           `    --wait-for-keypress`</a><br />
-<a href="#benchmark-resolution-multiple">               `    --benchmark-resolution-multiple`</a><br />
+<a href="#benchmark-samples">                           `    --benchmark-samples`</a><br />
+<a href="#benchmark-resamples">                         `    --benchmark-resamples`</a><br />
+<a href="#benchmark-confidence-interval">               `    --benchmark-confidence-interval`</a><br />
+<a href="#benchmark-no-analysis">                       `    --benchmark-no-analysis`</a><br />
 <a href="#use-colour">                                  `    --use-colour`</a><br />
 
 </br>
@@ -236,7 +242,7 @@ Test cases are ordered one of three ways:
 
 
 ### decl
-Declaration order. The order the tests were originally declared in. Note that ordering between files is not guaranteed and is implementation dependent.
+Declaration order (this is the default order if no --order argument is provided). The order the tests were originally declared in. Note that ordering between files is not guaranteed and is implementation dependent.
 
 ### lex
 Lexicographically sorted. Tests are sorted, alpha-numerically, by name.
@@ -250,7 +256,7 @@ Randomly sorted. Test names are sorted using ```std::random_shuffle()```. By def
 
 Sets a seed for the random number generator using ```std::srand()```. 
 If a number is provided this is used directly as the seed so the random pattern is repeatable.
-Alternatively if the keyword ```time``` is provided then the result of calling ```std::time(0)``` is used and so the pattern becomes unpredictable.
+Alternatively if the keyword ```time``` is provided then the result of calling ```std::time(0)``` is used and so the pattern becomes unpredictable. In some cases, you might need to pass the keyword ```time``` in double quotes instead of single quotes.
 
 In either case the actual value for the seed is printed as part of Catch's output so if an issue is discovered that is sensitive to test ordering the ordering can be reproduced - even if it was originally seeded from ```std::time(0)```.
 
@@ -267,13 +273,48 @@ See [The LibIdentify repo for more information and examples](https://github.com/
 Will cause the executable to print a message and wait until the return/ enter key is pressed before continuing -
 either before running any tests, after running all tests - or both, depending on the argument.
 
-<a id="benchmark-resolution-multiple"></a>
-## Specify multiples of clock resolution to run benchmarks for
-<pre>--benchmark-resolution-multiple &lt;multiplier&gt;</pre>
+<a id="benchmark-samples"></a>
+## Specify the number of benchmark samples to collect
+<pre>--benchmark-samples &lt;# of samples&gt;</pre>
 
-When running benchmarks the clock resolution is estimated. Benchmarks are then run for exponentially increasing
-numbers of iterations until some multiple of the estimated resolution is exceed. By default that multiple is 100, but 
-it can be overridden here.
+> [Introduced](https://github.com/catchorg/Catch2/issues/1616) in Catch 2.9.0.
+
+When running benchmarks a number of "samples" is collected. This is the base data for later statistical analysis.
+Per sample a clock resolution dependent number of iterations of the user code is run, which is independent of the number of samples. Defaults to 100.
+
+<a id="benchmark-resamples"></a>
+## Specify the number of resamples for bootstrapping
+<pre>--benchmark-resamples &lt;# of resamples&gt;</pre>
+
+> [Introduced](https://github.com/catchorg/Catch2/issues/1616) in Catch 2.9.0.
+
+After the measurements are performed, statistical [bootstrapping] is performed
+on the samples. The number of resamples for that bootstrapping is configurable
+but defaults to 100000. Due to the bootstrapping it is possible to give
+estimates for the mean and standard deviation. The estimates come with a lower
+bound and an upper bound, and the confidence interval (which is configurable but
+defaults to 95%).
+
+ [bootstrapping]: http://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29
+
+<a id="benchmark-confidence-interval"></a>
+## Specify the confidence-interval for bootstrapping
+<pre>--benchmark-confidence-interval &lt;confidence-interval&gt;</pre>
+
+> [Introduced](https://github.com/catchorg/Catch2/issues/1616) in Catch 2.9.0.
+
+The confidence-interval is used for statistical bootstrapping on the samples to
+calculate the upper and lower bounds of mean and standard deviation.
+Must be between 0 and 1 and defaults to 0.95.
+
+<a id="benchmark-no-analysis"></a>
+## Disable statistical analysis of collected benchmark samples
+<pre>--benchmark-no-analysis</pre>
+
+> [Introduced](https://github.com/catchorg/Catch2/issues/1616) in Catch 2.9.0.
+
+When this flag is specified no bootstrapping or any other statistical analysis is performed.
+Instead the user code is only measured and the plain mean from the samples is reported.
 
 <a id="usage"></a>
 ## Usage
diff --git a/packages/Catch2/docs/commercial-users.md b/packages/Catch2/docs/commercial-users.md
index 4f98f759fe89776c6fb5cd58afedd81e336b305a..2b17e0c39c4eaf930d239e586884de25bf381f22 100644
--- a/packages/Catch2/docs/commercial-users.md
+++ b/packages/Catch2/docs/commercial-users.md
@@ -17,3 +17,4 @@ fact then please let us know - either directly, via a PR or
  - NASA
  - [Inscopix Inc.](https://www.inscopix.com/)
  - [Makimo](https://makimo.pl/)
+ - [UX3D] (https://ux3d.io)
diff --git a/packages/Catch2/docs/configuration.md b/packages/Catch2/docs/configuration.md
index c01d7f5e6328133a65cb5aa41391060c5f875aaa..599bb9ae4a273351108622a9c0fd1cf2b8be181a 100644
--- a/packages/Catch2/docs/configuration.md
+++ b/packages/Catch2/docs/configuration.md
@@ -127,8 +127,12 @@ Catch's selection, by defining either `CATCH_CONFIG_CPP11_TO_STRING` or
 ## C++17 toggles
 
     CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS  // Use std::uncaught_exceptions instead of std::uncaught_exception
-    CATCH_CONFIG_CPP17_STRING_VIEW          // Provide StringMaker specialization for std::string_view
-    CATCH_CONFIG_CPP17_VARIANT              // Override C++17 detection for CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER
+    CATCH_CONFIG_CPP17_STRING_VIEW          // Override std::string_view support detection(Catch provides a StringMaker specialization by default)
+    CATCH_CONFIG_CPP17_VARIANT              // Override std::variant support detection (checked by CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER)
+    CATCH_CONFIG_CPP17_OPTIONAL             // Override std::optional support detection (checked by CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER)
+    CATCH_CONFIG_CPP17_BYTE                 // Override std::byte support detection (Catch provides a StringMaker specialization by default)
+
+> `CATCH_CONFIG_CPP17_STRING_VIEW` was [introduced](https://github.com/catchorg/Catch2/issues/1376) in Catch 2.4.1.
 
 Catch contains basic compiler/standard detection and attempts to use
 some C++17 features whenever appropriate. This automatic detection
@@ -149,6 +153,12 @@ by using `_NO_` in the macro, e.g. `CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS`.
     CATCH_CONFIG_DISABLE                    // Disables assertions and test case registration
     CATCH_CONFIG_WCHAR                      // Enables use of wchart_t
     CATCH_CONFIG_EXPERIMENTAL_REDIRECT      // Enables the new (experimental) way of capturing stdout/stderr
+    CATCH_CONFIG_ENABLE_BENCHMARKING        // Enables the integrated benchmarking features (has a significant effect on compilation speed)
+    CATCH_CONFIG_USE_ASYNC                  // Force parallel statistical processing of samples during benchmarking
+    CATCH_CONFIG_ANDROID_LOGWRITE           // Use android's logging system for debug output
+    CATCH_CONFIG_GLOBAL_NEXTAFTER           // Use nextafter{,f,l} instead of std::nextafter
+
+> [`CATCH_CONFIG_ANDROID_LOGWRITE`](https://github.com/catchorg/Catch2/issues/1743) and [`CATCH_CONFIG_GLOBAL_NEXTAFTER`](https://github.com/catchorg/Catch2/pull/1739) were introduced in Catch 2.10.0
 
 Currently Catch enables `CATCH_CONFIG_WINDOWS_SEH` only when compiled with MSVC, because some versions of MinGW do not have the necessary Win32 API support.
 
@@ -207,9 +217,14 @@ By default, Catch does not stringify some types from the standard library. This
     CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER // Provide StringMaker specialization for std::optional (on C++17)
     CATCH_CONFIG_ENABLE_ALL_STRINGMAKERS     // Defines all of the above
 
+> `CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER` was [introduced](https://github.com/catchorg/Catch2/issues/1380) in Catch 2.4.1.
+
+> `CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER` was [introduced](https://github.com/catchorg/Catch2/issues/1510) in Catch 2.6.0.
 
 ## Disabling exceptions
 
+> Introduced in Catch 2.4.0.
+
 By default, Catch2 uses exceptions to signal errors and to abort tests
 when an assertion from the `REQUIRE` family of assertions fails. We also
 provide an experimental support for disabling exceptions. Catch2 should
diff --git a/packages/Catch2/docs/contributing.md b/packages/Catch2/docs/contributing.md
index 21bbad14c892d3039f4ef553ff27f41eb972f495..5429bf9dc18f48fdeae1ab2162120b1d23994ef6 100644
--- a/packages/Catch2/docs/contributing.md
+++ b/packages/Catch2/docs/contributing.md
@@ -1,6 +1,13 @@
 <a id="top"></a>
 # Contributing to Catch
 
+**Contents**<br>
+[Branches](#branches)<br>
+[Directory structure](#directory-structure)<br>
+[Testing your changes](#testing-your-changes)<br>
+[Documenting your code](#documenting-your-code)<br>
+[Code constructs to watch out for](#code-constructs-to-watch-out-for)<br>
+
 So you want to contribute something to Catch? That's great! Whether it's a bug fix, a new feature, support for
 additional compilers - or just a fix to the documentation - all contributions are very welcome and very much appreciated.
 Of course so are bug reports and other comments and questions.
@@ -63,6 +70,10 @@ locally takes just a few minutes.
 $ cd debug-build
 $ ctest -j 2 --output-on-failure
 ```
+__Note:__ When running your tests with multi-configuration generators like
+Visual Studio, you might get errors "Test not available without configuration."
+You then have to pick one configuration (e.g. ` -C Debug`) in the `ctest` call.
+
 If you added new tests, approval tests are very likely to fail. If they
 do not, it means that your changes weren't run as part of them. This
 _might_ be intentional, but usually is not.
@@ -75,8 +86,87 @@ before you do so, you need to check that the introduced changes are indeed
 intentional.
 
 
+## Documenting your code
+
+If you have added new feature to Catch2, it needs documentation, so that
+other people can use it as well. This section collects some technical
+information that you will need for updating Catch2's documentation, and
+possibly some generic advise as well.
+
+First, the technicalities:
+
+* We introduced version tags to the documentation, which show users in
+which version a specific feature was introduced. This means that newly
+written documentation should be tagged with a placeholder, that will
+be replaced with the actual version upon release. There are 2 styles
+of placeholders used through the documentation, you should pick one that
+fits your text better (if in doubt, take a look at the existing version
+tags for other features).
+  * `> [Introduced](link-to-issue-or-PR) in Catch X.Y.Z` - this
+  placeholder is usually used after a section heading
+  * `> X (Y and Z) was [introduced](link-to-issue-or-PR) in Catch X.Y.Z`
+  - this placeholder is used when you need to tag a subpart of something,
+  e.g. list
+* Crosslinks to different pages should target the `top` anchor, like this
+`[link to contributing](contributing.md#top)`.
+* If you have introduced a new document, there is a simple template you
+should use. It provides you with the top anchor mentioned above, and also
+with a backlink to the top of the documentation:
+```markdown
+<a id="top"></a>
+# Cool feature
+
+Text that explains how to use the cool feature.
+
+
+---
+
+[Home](Readme.md#top)
+```
+* For pages with more than 4 subheadings, we provide a table of contents
+(ToC) at the top of the page. Because GitHub markdown does not support
+automatic generation of ToC, it has to be handled semi-manually. Thus,
+if you've added a new subheading to some page, you should add it to the
+ToC. This can be done either manually, or by running the
+`updateDocumentToC.py` script in the `scripts/` folder.
+
+
+Now, for the generic tips:
+  * Usage examples are good
+  * Don't be afraid to introduce new pages
+  * Try to be reasonably consistent with the surrounding documentation
+
+
+
+
+## Code constructs to watch out for
+
+This section is a (sadly incomplete) listing of various constructs that
+are problematic and are not always caught by our CI infrastructure.
+
+### Naked exceptions and exceptions-related function
+
+If you are throwing an exception, it should be done via `CATCH_ERROR`
+or `CATCH_RUNTIME_ERROR` in `catch_enforce.h`. These macros will handle
+the differences between compilation with or without exceptions for you.
+However, some platforms (IAR) also have problems with exceptions-related
+functions, such as `std::current_exceptions`. We do not have IAR in our
+CI, but luckily there should not be too many reasons to use these.
+However, if you do, they should be kept behind a
+`CATCH_CONFIG_DISABLE_EXCEPTIONS` macro.
+
+### Unqualified usage of functions from C's stdlib
+
+If you are using a function from C's stdlib, please include the header
+as `<cfoo>` and call the function qualified. The common knowledge that
+there is no difference is wrong, QNX and VxWorks won't compile if you
+include the header as `<cfoo>` and call the function unqualified.
+
+
+----
 
- *this document is still in-progress...*
+_This documentation will always be in-progress as new information comes
+up, but we are trying to keep it as up to date as possible._
 
 ---
 
diff --git a/packages/Catch2/docs/deprecations.md b/packages/Catch2/docs/deprecations.md
index 0489e1ff8a4ec37ded6c1d77bb59e8e6a27d0352..77830298be66b228518e6213ceb4723d99cb37af 100644
--- a/packages/Catch2/docs/deprecations.md
+++ b/packages/Catch2/docs/deprecations.md
@@ -39,6 +39,11 @@ apart from writing it out for `--list-tests -v high`.
 Because it isn't actually used nor documented, and brings complications
 to Catch2's internals, description support will be removed.
 
+### SourceLineInfo::empty()
+
+There should be no reason to ever have an empty `SourceLineInfo`, so the
+method will be removed.
+
 
 ## Planned changes
 
diff --git a/packages/Catch2/docs/event-listeners.md b/packages/Catch2/docs/event-listeners.md
index c6625a2e0b474b8c993a5e02d38dc8447ffead08..6231100667cbda9a7629d6c9b638f65e9431d2b2 100644
--- a/packages/Catch2/docs/event-listeners.md
+++ b/packages/Catch2/docs/event-listeners.md
@@ -29,13 +29,13 @@ struct MyListener : Catch::TestEventListenerBase {
 
     using TestEventListenerBase::TestEventListenerBase; // inherit constructor
 
-    virtual void testCaseStarting( Catch::TestCaseInfo const& testInfo ) override {
+    void testCaseStarting( Catch::TestCaseInfo const& testInfo ) override {
         // Perform some setup before a test case is run
     }
     
-    virtual void testCaseEnded( Catch::TestCaseStats const& testCaseStats ) override {
+    void testCaseEnded( Catch::TestCaseStats const& testCaseStats ) override {
         // Tear-down after a test case is run
-    }    
+    }
 };
 CATCH_REGISTER_LISTENER( MyListener )
 ```
diff --git a/packages/Catch2/docs/generators.md b/packages/Catch2/docs/generators.md
index 57fdf44bbe69c28fb57e2856050dcefe1015fea5..61276f3cca6e72e73d34bb599eefab036313a49e 100644
--- a/packages/Catch2/docs/generators.md
+++ b/packages/Catch2/docs/generators.md
@@ -1,6 +1,8 @@
 <a id="top"></a>
 # Data Generators
 
+> Introduced in Catch 2.6.0.
+
 Data generators (also known as _data driven/parametrized test cases_)
 let you reuse the same set of assertions across different input values.
 In Catch2, this means that they respect the ordering and nesting
@@ -34,8 +36,8 @@ Catch2's provided generator functionality consists of three parts,
 * `GENERATE` macro,  that serves to integrate generator expression with
 a test case,
 * 2 fundamental generators
-  * `ValueGenerator<T>` -- contains only single element
-  * `ValuesGenerator<T>` -- contains multiple elements
+  * `SingleValueGenerator<T>` -- contains only single element
+  * `FixedValuesGenerator<T>` -- contains multiple elements
 * 5 generic generators that modify other generators
   * `FilterGenerator<T, Predicate>` -- filters out elements from a generator
   for which the predicate returns "false"
@@ -44,16 +46,22 @@ a test case,
   * `MapGenerator<T, U, Func>` -- returns the result of applying `Func`
   on elements from a different generator
   * `ChunkGenerator<T>` -- returns chunks (inside `std::vector`) of n elements from a generator
-* 3 specific purpose generators
+* 4 specific purpose generators
   * `RandomIntegerGenerator<Integral>` -- generates random Integrals from range
   * `RandomFloatGenerator<Float>` -- generates random Floats from range
   * `RangeGenerator<T>` -- generates all values inside a specific range
+  * `IteratorGenerator<T>` -- copies and returns values from an iterator range
+
+> `ChunkGenerator<T>`, `RandomIntegerGenerator<Integral>`, `RandomFloatGenerator<Float>` and `RangeGenerator<T>` were introduced in Catch 2.7.0.
+
+> `IteratorGenerator<T>` was introduced in Catch 2.10.0.
 
 The generators also have associated helper functions that infer their
 type, making their usage much nicer. These are
 
-* `value(T&&)` for `ValueGenerator<T>`
-* `values(std::initializer_list<T>)` for `ValuesGenerator<T>`
+* `value(T&&)` for `SingleValueGenerator<T>`
+* `values(std::initializer_list<T>)` for `FixedValuesGenerator<T>`
+* `table<Ts...>(std::initializer_list<std::tuple<Ts...>>)` for `FixedValuesGenerator<std::tuple<Ts...>>`
 * `filter(predicate, GeneratorWrapper<T>&&)` for `FilterGenerator<T, Predicate>`
 * `take(count, GeneratorWrapper<T>&&)` for `TakeGenerator<T>`
 * `repeat(repeats, GeneratorWrapper<T>&&)` for `RepeatGenerator<T>`
@@ -63,7 +71,12 @@ type, making their usage much nicer. These are
 * `random(IntegerOrFloat a, IntegerOrFloat b)` for `RandomIntegerGenerator` or `RandomFloatGenerator`
 * `range(start, end)` for `RangeGenerator<T>` with a step size of `1`
 * `range(start, end, step)` for `RangeGenerator<T>` with a custom step size
+* `from_range(InputIterator from, InputIterator to)` for `IteratorGenerator<T>`
+* `from_range(Container const&)` for `IteratorGenerator<T>`
 
+> `chunk()`, `random()` and both `range()` functions were introduced in Catch 2.7.0.
+
+> `from_range` has been introduced in Catch 2.10.0
 
 And can be used as shown in the example below to create a generator
 that returns 100 odd random number:
@@ -84,7 +97,7 @@ Apart from registering generators with Catch2, the `GENERATE` macro has
 one more purpose, and that is to provide simple way of generating trivial
 generators, as seen in the first example on this page, where we used it
 as `auto i = GENERATE(1, 2, 3);`. This usage converted each of the three
-literals into a single `ValueGenerator<int>` and then placed them all in
+literals into a single `SingleValueGenerator<int>` and then placed them all in
 a special generator that concatenates other generators. It can also be
 used with other generators as arguments, such as `auto i = GENERATE(0, 2,
 take(100, random(300, 3000)));`. This is useful e.g. if you know that
@@ -96,6 +109,8 @@ scope and thus capturing references is dangerous. If you need to use
 variables inside the generator expression, make sure you thought through
 the lifetime implications and use `GENERATE_COPY` or `GENERATE_REF`.**
 
+> `GENERATE_COPY` and `GENERATE_REF` were introduced in Catch 2.7.1.
+
 You can also override the inferred type by using `as<type>` as the first
 argument to the macro. This can be useful when dealing with string literals,
 if you want them to come out as `std::string`:
diff --git a/packages/Catch2/docs/logging.md b/packages/Catch2/docs/logging.md
index 7b5c6c4b77705130036fb63664c33919099e07c0..476b1e08484c7ddbb438413867cc5cde8d29f4c0 100644
--- a/packages/Catch2/docs/logging.md
+++ b/packages/Catch2/docs/logging.md
@@ -30,6 +30,8 @@ When the last `CHECK` fails in the "Bar" test case, then only one message will b
 
 ## Logging without local scope
 
+> [Introduced](https://github.com/catchorg/Catch2/issues/1522) in Catch 2.7.0.
+
 `UNSCOPED_INFO` is similar to `INFO` with two key differences:
 
 - Lifetime of an unscoped message is not tied to its own scope.
@@ -104,6 +106,8 @@ This semicolon will be removed with next major version. It is highly advised to
 
 **UNSCOPED_INFO(** _message expression_ **)**
 
+> [Introduced](https://github.com/catchorg/Catch2/issues/1522) in Catch 2.7.0.
+
 Similar to `INFO`, but messages are not limited to their own scope: They are removed from the buffer after each assertion, section or test case, whichever comes first.
 
 **WARN(** _message expression_ **)**
diff --git a/packages/Catch2/docs/matchers.md b/packages/Catch2/docs/matchers.md
index e3d936bd5021e3167bf8a1b9525d1a3bed71ab71..af2071e375e7ecafcf26e7b3053512ee4cf5bf3c 100644
--- a/packages/Catch2/docs/matchers.md
+++ b/packages/Catch2/docs/matchers.md
@@ -12,11 +12,11 @@ The first argument is the thing (object or value) under test. The second part is
 which consists of either a single matcher or one or more matchers combined using `&&`, `||` or `!` operators.
 
 For example, to assert that a string ends with a certain substring:
- 
+
  ```c++
 using Catch::Matchers::EndsWith; // or Catch::EndsWith
 std::string str = getStringFromSomewhere();
-REQUIRE_THAT( str, EndsWith( "as a service" ) ); 
+REQUIRE_THAT( str, EndsWith( "as a service" ) );
  ```
 
 The matcher objects can take multiple arguments, allowing more fine tuning.
@@ -24,19 +24,29 @@ The built-in string matchers, for example, take a second argument specifying whe
 case sensitive or not:
 
 ```c++
-REQUIRE_THAT( str, EndsWith( "as a service", Catch::CaseSensitive::No ) ); 
+REQUIRE_THAT( str, EndsWith( "as a service", Catch::CaseSensitive::No ) );
  ```
 
 And matchers can be combined:
 
 ```c++
-REQUIRE_THAT( str, 
-    EndsWith( "as a service" ) || 
-    (StartsWith( "Big data" ) && !Contains( "web scale" ) ) ); 
+REQUIRE_THAT( str,
+    EndsWith( "as a service" ) ||
+    (StartsWith( "Big data" ) && !Contains( "web scale" ) ) );
 ```
 
 ## Built in matchers
-Catch currently provides some matchers, they are in the `Catch::Matchers` and `Catch` namespaces.
+Catch2 provides some matchers by default. They can be found in the
+`Catch::Matchers::foo` namespace and are imported into the `Catch`
+namespace as well.
+
+There are two parts to each of the built-in matchers, the matcher
+type itself and a helper function that provides template argument
+deduction when creating templated matchers. As an example, the matcher
+for checking that two instances of `std::vector` are identical is
+`EqualsMatcher<T>`, but the user is expected to use the `Equals`
+helper function instead.
+
 
 ### String matchers
 The string matchers are `StartsWith`, `EndsWith`, `Contains`, `Equals` and `Matches`. The first four match a literal (sub)string against a result, while `Matches` takes and matches an ECMAScript regex. Do note that `Matches` matches the string as a whole, meaning that "abc" will not match against "abcd", but "abc.*" will.
@@ -45,13 +55,42 @@ Each of the provided `std::string` matchers also takes an optional second argume
 
 
 ### Vector matchers
-The vector matchers are `Contains`, `VectorContains` and `Equals`. `VectorContains` looks for a single element in the matched vector, `Contains` looks for a set (vector) of elements inside the matched vector.
+Catch2 currently provides 5 built-in matchers that work on `std::vector`.
+These are
 
-### Floating point matchers
-The floating point matchers are `WithinULP` and `WithinAbs`. `WithinAbs` accepts floating point numbers that are within a certain margin of target. `WithinULP` performs an [ULP](https://en.wikipedia.org/wiki/Unit_in_the_last_place)-based comparison of two floating point numbers and accepts them if they are less than certain number of ULPs apart.
+ * `Contains` which checks whether a specified vector is present in the result
+ * `VectorContains` which checks whether a specified element is present in the result
+ * `Equals` which checks whether the result is exactly equal (order matters) to a specific vector
+ * `UnorderedEquals` which checks whether the result is equal to a specific vector under a permutation
+ * `Approx` which checks whether the result is "approx-equal" (order matters, but comparison is done via `Approx`) to a specific vector
+> Approx matcher was [introduced](https://github.com/catchorg/Catch2/issues/1499) in Catch 2.7.2.
 
-Do note that ULP-based checks only make sense when both compared numbers are of the same type and `WithinULP` will use type of its argument as the target type. This means that `WithinULP(1.f, 1)` will expect to compare `float`s, but `WithinULP(1., 1)` will expect to compare `double`s.
 
+### Floating point matchers
+Catch2 provides 3 matchers for working with floating point numbers. These
+are `WithinAbsMatcher`, `WithinUlpsMatcher` and `WithinRelMatcher`.
+
+The `WithinAbsMatcher` matcher accepts floating point numbers that are
+within a certain distance of target. It should be constructed with the
+`WithinAbs(double target, double margin)` helper.
+
+The `WithinUlpsMatcher` matcher accepts floating point numbers that are
+within a certain number of [ULPs](https://en.wikipedia.org/wiki/Unit_in_the_last_place)
+of the target. Because ULP comparisons need to be done differently for
+`float`s and for `double`s, there are two overloads of the helpers for
+this matcher, `WithinULP(float target, int64_t ULPs)`, and
+`WithinULP(double target, int64_t ULPs)`.
+
+The `WithinRelMatcher` matcher accepts floating point numbers that are
+_approximately equal_ with the target number with some specific tolerance.
+In other words, it checks that `|lhs - rhs| <= epsilon * max(|lhs|, |rhs|)`,
+with special casing for `INFINITY` and `NaN`. There are _4_ overloads of
+the helpers for this matcher, `WithinRel(double target, double margin)`,
+`WithinRel(float target, float margin)`, `WithinRel(double target)`, and
+`WithinRel(float target)`. The latter two provide a default epsilon of
+machine epsilon * 100.
+
+> `WithinRel` matcher was introduced in Catch 2.10.0
 
 ### Generic matchers
 Catch also aims to provide a set of generic matchers. Currently this set
@@ -72,13 +111,29 @@ The second argument is an optional description of the predicate, and is
 used only during reporting of the result.
 
 
+### Exception matchers
+Catch2 also provides an exception matcher that can be used to verify
+that an exception's message exactly matches desired string. The matcher
+is `ExceptionMessageMatcher`, and we also provide a helper function
+`Message`.
+
+The matched exception must publicly derive from `std::exception` and
+the message matching is done _exactly_, including case.
+
+> `ExceptionMessageMatcher` was introduced in Catch 2.10.0
+
+Example use:
+```cpp
+REQUIRE_THROWS_MATCHES(throwsDerivedException(),  DerivedException,  Message("DerivedException::what"));
+```
+
 ## Custom matchers
 It's easy to provide your own matchers to extend Catch or just to work with your own types.
 
-You need to provide two things: 
+You need to provide two things:
 1. A matcher class, derived from `Catch::MatcherBase<T>` - where `T` is the type being tested.
 The constructor takes and stores any arguments needed (e.g. something to compare against) and you must
-override two methods: `match()` and `describe()`. 
+override two methods: `match()` and `describe()`.
 2. A simple builder function. This is what is actually called from the test code and allows overloading.
 
 Here's an example for asserting that an integer falls within a given range
@@ -92,7 +147,7 @@ public:
     IntRange( int begin, int end ) : m_begin( begin ), m_end( end ) {}
 
     // Performs the test for this matcher
-    virtual bool match( int const& i ) const override {
+    bool match( int const& i ) const override {
         return i >= m_begin && i <= m_end;
     }
 
@@ -123,7 +178,7 @@ TEST_CASE("Integers are within a range")
 ```
 
 Running this test gives the following in the console:
- 
+
 ```
 /**/TestFile.cpp:123: FAILED:
   CHECK_THAT( 100, IsBetween( 1, 10 ) )
diff --git a/packages/Catch2/docs/opensource-users.md b/packages/Catch2/docs/opensource-users.md
index 489bbdcc6b581dedcc40ceb49957da50e240146b..36c0db64f6fd7d65d519e1e9b06b41eea7683ea5 100644
--- a/packages/Catch2/docs/opensource-users.md
+++ b/packages/Catch2/docs/opensource-users.md
@@ -23,6 +23,9 @@ C++11 implementation of Approval Tests, for quick, convenient testing of legacy
 ### [Azmq](https://github.com/zeromq/azmq)
 Boost Asio style bindings for ZeroMQ.
 
+### [Cataclysm: Dark Days Ahead](https://github.com/CleverRaven/Cataclysm-DDA)
+Post-apocalyptic survival RPG.
+
 ### [ChakraCore](https://github.com/Microsoft/ChakraCore)
 The core part of the Chakra JavaScript engine that powers Microsoft Edge.
 
@@ -50,9 +53,6 @@ Open source Oracle Tuxedo-like XATMI middleware for C and C++.
 ### [Inja](https://github.com/pantor/inja)
 A header-only template engine for modern C++.
 
-### [JSON for Modern C++](https://github.com/nlohmann/json)
-A, single-header, JSON parsing library that takes advantage of what C++ has to offer.
-
 ### [libcluon](https://github.com/chrberger/libcluon)
 A single-header-only library written in C++14 to glue distributed software components (UDP, TCP, shared memory) supporting natively Protobuf, LCM/ZCM, MsgPack, and JSON for dynamic message transformations in-between. 
 
@@ -112,6 +112,9 @@ SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gr
 ### [Standardese](https://github.com/foonathan/standardese)
 Standardese aims to be a nextgen Doxygen.
 
+### [PopHead](https://github.com/SPC-Some-Polish-Coders/PopHead)
+A 2D, Zombie, RPG game which is being made on our own engine.
+
 ---
 
 [Home](Readme.md#top)
diff --git a/packages/Catch2/docs/other-macros.md b/packages/Catch2/docs/other-macros.md
index 345234d55f7c5e30dfb9e7c6cbf3fd83c0f415c3..994115f16d120b2f1af08fc54444e21b8fce8460 100644
--- a/packages/Catch2/docs/other-macros.md
+++ b/packages/Catch2/docs/other-macros.md
@@ -59,6 +59,8 @@ TEST_CASE( "SUCCEED showcase" ) {
 
 * `STATIC_REQUIRE`
 
+> [Introduced](https://github.com/catchorg/Catch2/issues/1362) in Catch 2.4.2.
+
 `STATIC_REQUIRE( expr )` is a macro that can be used the same way as a
 `static_assert`, but also registers the success with Catch2, so it is
 reported as a success at runtime. The whole check can also be deferred
@@ -132,6 +134,8 @@ ANON_TEST_CASE() {
 
 * `DYNAMIC_SECTION`
 
+> Introduced in Catch 2.3.0.
+
 `DYNAMIC_SECTION` is a `SECTION` where the user can use `operator<<` to
 create the final name for that section. This can be useful with e.g.
 generators, or when creating a `SECTION` dynamically, within a loop.
diff --git a/packages/Catch2/docs/release-notes.md b/packages/Catch2/docs/release-notes.md
index 528f6cf12a9c625de72a4e6a787e0ce11fabe633..0af35c679808971f638333f3b98458b0d0f80722 100644
--- a/packages/Catch2/docs/release-notes.md
+++ b/packages/Catch2/docs/release-notes.md
@@ -2,6 +2,12 @@
 
 # Release notes
 **Contents**<br>
+[2.10.0](#2100)<br>
+[2.9.2](#292)<br>
+[2.9.1](#291)<br>
+[2.9.0](#290)<br>
+[2.8.0](#280)<br>
+[2.7.2](#272)<br>
 [2.7.1](#271)<br>
 [2.7.0](#270)<br>
 [2.6.1](#261)<br>
@@ -22,11 +28,153 @@
 [Older versions](#older-versions)<br>
 [Even Older versions](#even-older-versions)<br>
 
+
+
+## 2.10.0
+
+### Fixes
+* `TEMPLATE_LIST_TEST_CASE` now properly handles non-copyable and non-movable types (#1729)
+* Fixed compilation error on Solaris caused by a system header defining macro `TT` (#1722, #1723)
+* `REGISTER_ENUM` will now fail at compilation time if the registered enum is too large
+* Removed use of `std::is_same_v` in C++17 mode (#1757)
+* Fixed parsing of escaped special characters when reading test specs from a file (#1767, #1769)
+
+
+### Improvements
+* Trailing and leading whitespace in test/section specs are now ignored.
+* Writing to Android debug log now uses `__android_log_write` instead of `__android_log_print`
+* Android logging support can now be turned on/off at compile time (#1743)
+  * The toggle is `CATCH_CONFIG_ANDROID_LOGWRITE`
+* Added a generator that returns elements of a range
+  * Use via `from_range(from, to)` or `from_range(container)`
+* Added support for CRTs that do not provide `std::nextafter` (#1739)
+  * They must still provide global `nextafter{f,l,}`
+  * Enabled via `CATCH_CONFIG_GLOBAL_NEXTAFTER`
+* Special cased `Approx(inf)` not to match non-infinite values
+  * Very strictly speaking this might be a breaking change, but it should match user expectations better
+* The output of benchmarking through the Console reporter when `--benchmark-no-analysis` is set is now much simpler (#1768)
+* Added a matcher that can be used for checking an exceptions message (#1649, #1728)
+  * The matcher helper function is called `Message`
+  * The exception must publicly derive from `std::exception`
+  * The matching is done exactly, including case and whitespace
+* Added a matcher that can be used for checking relative equality of floating point numbers (#1746)
+  * Unlike `Approx`, it considers both sides when determining the allowed margin
+  * Special cases `NaN` and `INFINITY` to match user expectations
+  * The matcher helper function is called `WithinRel`
+* The ULP matcher now allows for any possible distance between the two numbers
+* The random number generators now use Catch-global instance of RNG (#1734, #1736)
+  * This means that nested random number generators actually generate different numbers
+
+
+### Miscellaneous
+* In-repo PNGs have been optimized to lower overhead of using Catch2 via git clone
+* Catch2 now uses its own implementation of the URBG concept
+  * In the future we also plan to use our own implementation of the distributions from `<random>` to provide cross-platform repeatability of random results
+
+
+
+## 2.9.2
+
+### Fixes
+* `ChunkGenerator` can now be used with chunks of size 0 (#1671)
+* Nested subsections are now run properly when specific section is run via the `-c` argument (#1670, #1673)
+* Catch2 now consistently uses `_WIN32` to detect Windows platform (#1676)
+* `TEMPLATE_LIST_TEST_CASE` now support non-default constructible type lists (#1697)
+* Fixed a crash in the XMLReporter when a benchmark throws exception during warmup (#1706)
+* Fixed a possible infinite loop in CompactReporter (#1715)
+* Fixed `-w NoTests` returning 0 even when no tests were matched (#1449, #1683, #1684)
+* Fixed matcher compilation under Obj-C++ (#1661)
+
+### Improvements
+* `RepeatGenerator` and `FixedValuesGenerator` now fail to compile when used with `bool` (#1692)
+  * Previously they would fail at runtime.
+* Catch2 now supports Android's debug logging for its debug output (#1710)
+* Catch2 now detects and configures itself for the RTX platform (#1693)
+  * You still need to pass `--benchmark-no-analysis` if you are using benchmarking under RTX
+* Removed a "storage class is not first" warning when compiling Catch2 with PGI compiler (#1717)
+
+### Miscellaneous
+* Documentation now contains indication when a specific feature was introduced (#1695)
+  * These start with Catch2 v2.3.0, (a bit over a year ago).
+  * `docs/contributing.md` has been updated to provide contributors guidance on how to add these to newly written documentation
+* Various other documentation improvements
+  * ToC fixes
+  * Documented `--order` and `--rng-seed` command line options
+  * Benchmarking documentation now clearly states that it requires opt-in
+  * Documented `CATCH_CONFIG_CPP17_OPTIONAL` and `CATCH_CONFIG_CPP17_BYTE` macros
+  * Properly documented built-in vector matchers
+  * Improved `*_THROWS_MATCHES` documentation a bit
+* CMake config file is now arch-independent even if `CMAKE_SIZEOF_VOID_P` is in CMake cache (#1660)
+* `CatchAddTests` now properly escapes `[` and `]` in test names (#1634, #1698)
+* Reverted `CatchAddTests` adding tags as CTest labels (#1658)
+  * The script broke when test names were too long
+  * Overwriting `LABELS` caused trouble for users who set them manually
+  * CMake does not let users append to `LABELS` if the test name has spaces
+
+
+## 2.9.1
+
+### Fixes
+* Fix benchmarking compilation failure in files without `CATCH_CONFIG_EXTERNAL_INTERFACES` (or implementation)
+
+## 2.9.0
+
+### Improvements
+* The experimental benchmarking support has been replaced by integrating Nonius code (#1616)
+  * This provides a much more featurefull micro-benchmarking support.
+  * Due to the compilation cost, it is disabled by default. See the documentation for details.
+  * As far as backwards compatibility is concerned, this feature is still considered experimental in that we might change the interface based on user feedback.
+* `WithinULP` matcher now shows the acceptable range (#1581)
+* Template test cases now support type lists (#1627)
+
+
+## 2.8.0
+
+### Improvements
+* Templated test cases no longer check whether the provided types are unique (#1628)
+  * This allows you to e.g. test over `uint32_t`, `uint64_t`, and `size_t` without compilation failing
+* The precision of floating point stringification can be modified by user (#1612, #1614)
+* We now provide `REGISTER_ENUM` convenience macro for generating `StringMaker` specializations for enums
+  * See the "String conversion" documentation for details
+* Added new set of macros for template test cases that enables the use of NTTPs (#1531, #1609)
+  * See "Test cases and sections" documentation for details
+
+### Fixes
+* `UNSCOPED_INFO` macro now has a prefixed/disabled/prefixed+disabled versions (#1611)
+* Reporting errors at startup should no longer cause a segfault under certain circumstances (#1626)
+
+
+### Miscellaneous
+* CMake will now prevent you from attempting in-tree build (#1636, #1638)
+  * Previously it would break with an obscure error message during the build step
+
+
+## 2.7.2
+
+### Improvements
+* Added an approximate vector matcher (#1499)
+
+### Fixes
+* Filters will no longer be shown if there were none
+* Fixed compilation error when using Homebrew GCC on OS X (#1588, #1589)
+* Fixed the console reporter not showing messages that start with a newline (#1455, #1470)
+* Modified JUnit reporter's output so that rng seed and filters are reported according to the JUnit schema (#1598)
+* Fixed some obscure warnings and static analysis passes
+
+### Miscellaneous
+* Various improvements to `ParseAndAddCatchTests` (#1559, #1601)
+  * When a target is parsed, it receives `ParseAndAddCatchTests_TESTS` property which summarizes found tests
+  * Fixed problem with tests not being found if the `OptionalCatchTestLauncher` variables is used
+  * Including the script will no longer forcefully modify `CMAKE_MINIMUM_REQUIRED_VERSION`
+  * CMake object libraries are ignored when parsing to avoid needless warnings
+* `CatchAddTests` now adds test's tags to their CTest labels (#1600)
+* Added basic CPack support to our build
+
 ## 2.7.1
 
 ### Improvements
 * Reporters now print out the filters applied to test cases (#1550, #1585)
-* Added `GENERATE_COPY` and `GENERATE_VAR` macros that can use variables inside the generator expression
+* Added `GENERATE_COPY` and `GENERATE_REF` macros that can use variables inside the generator expression
   * Because of the significant danger of lifetime issues, the default `GENERATE` macro still does not allow variables
 * The `map` generator helper now deduces the mapped return type (#1576)
 
diff --git a/packages/Catch2/docs/slow-compiles.md b/packages/Catch2/docs/slow-compiles.md
index 0853b661982ee8d27cb5c7b0336fb9edcb8bf3ab..366adf291574922934c30c000bbba71fb41b1626 100644
--- a/packages/Catch2/docs/slow-compiles.md
+++ b/packages/Catch2/docs/slow-compiles.md
@@ -51,14 +51,15 @@ After compiling `tests-main.cpp` once, it is enough to link it with separately c
 
 ```
 $ g++ tests-main.cpp -c
-$ g++ tests-main.o tests-factorial.cpp -o tests && ./tests -r compact
+$ g++ factorial.cpp -c
+$ g++ tests-main.o factorial.o tests-factorial.cpp -o tests && ./tests -r compact
 Passed 1 test case with 4 assertions.
 ```
 
 Now, the next time we change the file `tests-factorial.cpp` (say we add `REQUIRE( Factorial(0) == 1)`), it is enough to recompile the tests instead of recompiling main as well:
 
 ```
-$ g++ tests-main.o tests-factorial.cpp -o tests && ./tests -r compact
+$ g++ tests-main.o factorial.o tests-factorial.cpp -o tests && ./tests -r compact
 tests-factorial.cpp:11: failed: Factorial(0) == 1 for: 0 == 1
 Failed 1 test case, failed 1 assertion.
 ```
diff --git a/packages/Catch2/docs/test-cases-and-sections.md b/packages/Catch2/docs/test-cases-and-sections.md
index 62a805f49ef903fa66972ce49f8f54438b3455cf..53f9e1504e741f0a8e4b96728edb973ced2dce0d 100644
--- a/packages/Catch2/docs/test-cases-and-sections.md
+++ b/packages/Catch2/docs/test-cases-and-sections.md
@@ -6,6 +6,7 @@
 [Tag aliases](#tag-aliases)<br>
 [BDD-style test cases](#bdd-style-test-cases)<br>
 [Type parametrised test cases](#type-parametrised-test-cases)<br>
+[Signature based parametrised test cases](#signature-based-parametrised-test-cases)<br>
 
 While Catch fully supports the traditional, xUnit, style of class-based fixtures containing test case methods this is not the preferred style.
 
@@ -83,10 +84,13 @@ This macro maps onto ```TEST_CASE``` and works in the same way, except that the
 
 These macros map onto ```SECTION```s except that the section names are the _something_s prefixed by "given: ", "when: " or "then: " respectively.
 
+* **AND_GIVEN(** _something_ **)**
 * **AND_WHEN(** _something_ **)**
 * **AND_THEN(** _something_ **)**
 
-Similar to ```WHEN``` and ```THEN``` except that the prefixes start with "and ". These are used to chain ```WHEN```s and ```THEN```s together.
+Similar to ```GIVEN```, ```WHEN``` and ```THEN``` except that the prefixes start with "and ". These are used to chain ```GIVEN```s, ```WHEN```s and ```THEN```s together.
+
+> `AND_GIVEN` was [introduced](https://github.com/catchorg/Catch2/issues/1360) in Catch 2.4.0.
 
 When any of these macros are used the console reporter recognises them and formats the test case header such that the Givens, Whens and Thens are aligned to aid readability.
 
@@ -95,11 +99,13 @@ Other than the additional prefixes and the formatting in the console reporter th
 ## Type parametrised test cases
 
 In addition to `TEST_CASE`s, Catch2 also supports test cases parametrised
-by types, in the form of `TEMPLATE_TEST_CASE` and
-`TEMPLATE_PRODUCT_TEST_CASE`.
+by types, in the form of `TEMPLATE_TEST_CASE`,
+`TEMPLATE_PRODUCT_TEST_CASE` and `TEMPLATE_LIST_TEST_CASE`.
 
 * **TEMPLATE_TEST_CASE(** _test name_ , _tags_,  _type1_, _type2_, ..., _typen_ **)**
 
+> [Introduced](https://github.com/catchorg/Catch2/issues/1437) in Catch 2.5.0.
+
 _test name_ and _tag_ are exactly the same as they are in `TEST_CASE`,
 with the difference that the tag string must be provided (however, it
 can be empty). _type1_ through _typen_ is the list of types for which
@@ -150,6 +156,8 @@ TEMPLATE_TEST_CASE( "vectors can be sized and resized", "[vector][template]", in
 
 * **TEMPLATE_PRODUCT_TEST_CASE(** _test name_ , _tags_, (_template-type1_, _template-type2_, ..., _template-typen_), (_template-arg1_, _template-arg2_, ..., _template-argm_) **)**
 
+> [Introduced](https://github.com/catchorg/Catch2/issues/1468) in Catch 2.6.0.
+
 _template-type1_ through _template-typen_ is list of template template
 types which should be combined with each of _template-arg1_ through
  _template-argm_, resulting in _n * m_ test cases. Inside the test case,
@@ -191,6 +199,77 @@ _While there is an upper limit on the number of types you can specify
 in single `TEMPLATE_TEST_CASE` or `TEMPLATE_PRODUCT_TEST_CASE`, the limit
 is very high and should not be encountered in practice._
 
+* **TEMPLATE_LIST_TEST_CASE(** _test name_, _tags_, _type list_ **)**
+
+> [Introduced](https://github.com/catchorg/Catch2/issues/1627) in Catch 2.9.0.
+
+_type list_ is a generic list of types on which test case should be instantiated.
+List can be `std::tuple`, `boost::mpl::list`, `boost::mp11::mp_list` or anything with
+`template <typename...>` signature.
+
+This allows you to reuse the _type list_ in multiple test cases.
+
+Example:
+```cpp
+using MyTypes = std::tuple<int, char, float>;
+TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside std::tuple", "[template][list]", MyTypes)
+{
+    REQUIRE(sizeof(TestType) > 0);
+}
+```
+
+
+## Signature based parametrised test cases
+
+> [Introduced](https://github.com/catchorg/Catch2/issues/1609) in Catch 2.8.0.
+
+In addition to [type parametrised test cases](#type-parametrised-test-cases) Catch2 also supports
+signature base parametrised test cases, in form of `TEMPLATE_TEST_CASE_SIG` and `TEMPLATE_PRODUCT_TEST_CASE_SIG`.
+These test cases have similar syntax like [type parametrised test cases](#type-parametrised-test-cases), with one
+additional positional argument which specifies the signature.
+
+### Signature
+Signature has some strict rules for these tests cases to work properly:
+* signature with multiple template parameters e.g. `typename T, size_t S` must have this format in test case declaration
+  `((typename T, size_t S), T, S)`
+* signature with variadic template arguments e.g. `typename T, size_t S, typename...Ts` must have this format in test case declaration
+  `((typename T, size_t S, typename...Ts), T, S, Ts...)`
+* signature with single non type template parameter e.g. `int V` must have this format in test case declaration `((int V), V)`
+* signature with single type template parameter e.g. `typename T` should not be used as it is in fact `TEMPLATE_TEST_CASE`
+
+Currently Catch2 support up to 11 template parameters in signature
+
+### Examples
+
+* **TEMPLATE_TEST_CASE_SIG(** _test name_ , _tags_,  _signature_, _type1_, _type2_, ..., _typen_ **)**
+
+Inside `TEMPLATE_TEST_CASE_SIG` test case you can use the names of template parameters as defined in _signature_. 
+
+```cpp
+TEMPLATE_TEST_CASE_SIG("TemplateTestSig: arrays can be created from NTTP arguments", "[vector][template][nttp]",
+  ((typename T, int V), T, V), (int,5), (float,4), (std::string,15), ((std::tuple<int, float>), 6)) {
+
+    std::array<T, V> v;
+    REQUIRE(v.size() > 1);
+}
+```
+
+* **TEMPLATE_PRODUCT_TEST_CASE_SIG(** _test name_ , _tags_, _signature_, (_template-type1_, _template-type2_, ..., _template-typen_), (_template-arg1_, _template-arg2_, ..., _template-argm_) **)**
+
+```cpp
+
+template<typename T, size_t S>
+struct Bar {
+    size_t size() { return S; }
+};
+
+TEMPLATE_PRODUCT_TEST_CASE_SIG("A Template product test case with array signature", "[template][product][nttp]", ((typename T, size_t S), T, S), (std::array, Bar), ((int, 9), (float, 42))) {
+    TestType x;
+    REQUIRE(x.size() > 0);
+}
+```
+
+
 ---
 
 [Home](Readme.md#top)
diff --git a/packages/Catch2/docs/test-fixtures.md b/packages/Catch2/docs/test-fixtures.md
index 6b29ce68b1707a51963d99fea26dbb4c92ce71da..832bba128023811273e72b1569256d2d352f6fee 100644
--- a/packages/Catch2/docs/test-fixtures.md
+++ b/packages/Catch2/docs/test-fixtures.md
@@ -1,6 +1,8 @@
 <a id="top"></a>
 # Test fixtures
 
+## Defining test fixtures
+
 Although Catch allows you to group tests together as sections within a test case, it can still be convenient, sometimes, to group them using a more traditional test fixture. Catch fully supports this too. You define the test fixture as a simple structure:
 
 ```c++
@@ -84,6 +86,58 @@ _While there is an upper limit on the number of types you can specify
 in single `TEMPLATE_TEST_CASE_METHOD` or `TEMPLATE_PRODUCT_TEST_CASE_METHOD`,
 the limit is very high and should not be encountered in practice._
 
+## Signature-based parametrised test fixtures
+
+> [Introduced](https://github.com/catchorg/Catch2/issues/1609) in Catch 2.8.0.
+
+Catch2 also provides `TEMPLATE_TEST_CASE_METHOD_SIG` and `TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG` to support
+fixtures using non-type template parameters. These test cases work similar to `TEMPLATE_TEST_CASE_METHOD` and `TEMPLATE_PRODUCT_TEST_CASE_METHOD`,
+with additional positional argument for [signature](test-cases-and-sections.md#signature-based-parametrised-test-cases).
+
+Example:
+```cpp
+template <int V>
+struct Nttp_Fixture{
+    int value = V;
+};
+
+TEMPLATE_TEST_CASE_METHOD_SIG(Nttp_Fixture, "A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds", "[class][template][nttp]",((int V), V), 1, 3, 6) {
+    REQUIRE(Nttp_Fixture<V>::value > 0);
+}
+
+template<typename T>
+struct Template_Fixture_2 {
+    Template_Fixture_2() {}
+
+    T m_a;
+};
+
+template< typename T, size_t V>
+struct Template_Foo_2 {
+    size_t size() { return V; }
+};
+
+TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds", "[class][template][product][nttp]", ((typename T, size_t S), T, S),(std::array, Template_Foo_2), ((int,2), (float,6)))
+{
+    REQUIRE(Template_Fixture_2<TestType>{}.m_a.size() >= 2);
+}
+```
+
+## Template fixtures with types specified in template type lists
+
+Catch2 also provides `TEMPLATE_LIST_TEST_CASE_METHOD` to support template fixtures with types specified in
+template type lists like `std::tuple`, `boost::mpl::list` or `boost::mp11::mp_list`. This test case works the same as `TEMPLATE_TEST_CASE_METHOD`,
+only difference is the source of types. This allows you to reuse the template type list in multiple test cases.
+
+Example:
+```cpp
+using MyTypes = std::tuple<int, char, double>;
+TEMPLATE_LIST_TEST_CASE_METHOD(Template_Fixture, "Template test case method with test types specified inside std::tuple", "[class][template][list]", MyTypes)
+{
+    REQUIRE( Template_Fixture<TestType>::m_a == 1 );
+}
+```
+
 ---
 
 [Home](Readme.md#top)
diff --git a/packages/Catch2/docs/tostring.md b/packages/Catch2/docs/tostring.md
index 933f2e619fe3cb5ceae815ac83fbff60488a7e99..156c895a6e7b6dc70ac665f7811374621571ee1a 100644
--- a/packages/Catch2/docs/tostring.md
+++ b/packages/Catch2/docs/tostring.md
@@ -6,6 +6,9 @@
 [Catch::StringMaker specialisation](#catchstringmaker-specialisation)<br>
 [Catch::is_range specialisation](#catchis_range-specialisation)<br>
 [Exceptions](#exceptions)<br>
+[Enums](#enums)<br>
+[Floating point precision](#floating-point-precision)<br>
+
 
 Catch needs to be able to convert types you use in assertions and logging expressions into strings (for logging and reporting purposes).
 Most built-in or std types are supported out of the box but there are two ways that you can tell Catch how to convert your own types (or other, third-party types) into strings.
@@ -14,7 +17,7 @@ Most built-in or std types are supported out of the box but there are two ways t
 
 This is the standard way of providing string conversions in C++ - and the chances are you may already provide this for your own purposes. If you're not familiar with this idiom it involves writing a free function of the form:
 
-```
+```cpp
 std::ostream& operator << ( std::ostream& os, T const& value ) {
     os << convertMyTypeToString( value );
     return os;
@@ -28,7 +31,7 @@ You should put this function in the same namespace as your type, or the global n
 ## Catch::StringMaker specialisation
 If you don't want to provide an ```operator <<``` overload, or you want to convert your type differently for testing purposes, you can provide a specialization for `Catch::StringMaker<T>`:
 
-```
+```cpp
 namespace Catch {
     template<>
     struct StringMaker<T> {
@@ -60,12 +63,70 @@ namespace Catch {
 
 By default all exceptions deriving from `std::exception` will be translated to strings by calling the `what()` method. For exception types that do not derive from `std::exception` - or if `what()` does not return a suitable string - use `CATCH_TRANSLATE_EXCEPTION`. This defines a function that takes your exception type, by reference, and returns a string. It can appear anywhere in the code - it doesn't have to be in the same translation unit. For example:
 
-```
+```cpp
 CATCH_TRANSLATE_EXCEPTION( MyType& ex ) {
     return ex.message();
 }
 ```
 
+## Enums
+
+> Introduced in Catch 2.8.0.
+
+Enums that already have a `<<` overload for `std::ostream` will convert to strings as expected.
+If you only need to convert enums to strings for test reporting purposes you can provide a `StringMaker` specialisations as any other type.
+However, as a convenience, Catch provides the `REGISTER_ENUM` helper macro that will generate the `StringMaker` specialiation for you with minimal code.
+Simply provide it the (qualified) enum name, followed by all the enum values, and you're done!
+
+E.g.
+
+```cpp
+enum class Fruits { Banana, Apple, Mango };
+
+CATCH_REGISTER_ENUM( Fruits, Fruits::Banana, Fruits::Apple, Fruits::Mango )
+
+TEST_CASE() {
+    REQUIRE( Fruits::Mango == Fruits::Apple );
+}
+```
+
+... or if the enum is in a namespace:
+```cpp
+namespace Bikeshed {
+    enum class Colours { Red, Green, Blue };
+}
+
+// Important!: This macro must appear at top level scope - not inside a namespace
+// You can fully qualify the names, or use a using if you prefer
+CATCH_REGISTER_ENUM( Bikeshed::Colours,
+    Bikeshed::Colours::Red,
+    Bikeshed::Colours::Green,
+    Bikeshed::Colours::Blue )
+
+TEST_CASE() {
+    REQUIRE( Bikeshed::Colours::Red == Bikeshed::Colours::Blue );
+}
+```
+
+## Floating point precision
+
+> [Introduced](https://github.com/catchorg/Catch2/issues/1614) in Catch 2.8.0.
+
+Catch provides a built-in `StringMaker` specialization for both `float`
+and `double`. By default, it uses what we think is a reasonable precision,
+but you can customize it by modifying the `precision` static variable
+inside the `StringMaker` specialization, like so:
+
+```cpp
+        Catch::StringMaker<float>::precision = 15;
+        const float testFloat1 = 1.12345678901234567899f;
+        const float testFloat2 = 1.12345678991234567899f;
+        REQUIRE(testFloat1 == testFloat2);
+```
+
+This assertion will fail and print out the `testFloat1` and `testFloat2`
+to 15 decimal places.
+
 ---
 
 [Home](Readme.md#top)
diff --git a/packages/Catch2/examples/210-Evt-EventListeners.cpp b/packages/Catch2/examples/210-Evt-EventListeners.cpp
index fde51c7ea1157f83775c88c95ea135766797e30d..2d5fdb287570cd37f5d6368879b779b66ab666e6 100644
--- a/packages/Catch2/examples/210-Evt-EventListeners.cpp
+++ b/packages/Catch2/examples/210-Evt-EventListeners.cpp
@@ -305,7 +305,7 @@ struct MyListener : Catch::TestEventListenerBase {
     ~MyListener();
 
     // The whole test run starting
-    virtual void testRunStarting( Catch::TestRunInfo const& testRunInfo ) override {
+    void testRunStarting( Catch::TestRunInfo const& testRunInfo ) override {
         std::cout
             << std::boolalpha
             << "\nEvent: testRunStarting:\n";
@@ -313,7 +313,7 @@ struct MyListener : Catch::TestEventListenerBase {
     }
 
     // The whole test run ending
-    virtual void testRunEnded( Catch::TestRunStats const& testRunStats ) override {
+    void testRunEnded( Catch::TestRunStats const& testRunStats ) override {
         std::cout
             << dashed_line
             << "\nEvent: testRunEnded:\n";
@@ -321,7 +321,7 @@ struct MyListener : Catch::TestEventListenerBase {
     }
 
     // A test is being skipped (because it is "hidden")
-    virtual void skipTest( Catch::TestCaseInfo const& testInfo ) override {
+    void skipTest( Catch::TestCaseInfo const& testInfo ) override {
         std::cout
             << dashed_line
             << "\nEvent: skipTest:\n";
@@ -329,7 +329,7 @@ struct MyListener : Catch::TestEventListenerBase {
     }
 
     // Test cases starting
-    virtual void testCaseStarting( Catch::TestCaseInfo const& testInfo ) override {
+    void testCaseStarting( Catch::TestCaseInfo const& testInfo ) override {
         std::cout
             << dashed_line
             << "\nEvent: testCaseStarting:\n";
@@ -337,30 +337,30 @@ struct MyListener : Catch::TestEventListenerBase {
     }
 
     // Test cases ending
-    virtual void testCaseEnded( Catch::TestCaseStats const& testCaseStats ) override {
+    void testCaseEnded( Catch::TestCaseStats const& testCaseStats ) override {
         std::cout << "\nEvent: testCaseEnded:\n";
         print( std::cout, 1, "testCaseStats", testCaseStats );
     }
 
     // Sections starting
-    virtual void sectionStarting( Catch::SectionInfo const& sectionInfo ) override {
+    void sectionStarting( Catch::SectionInfo const& sectionInfo ) override {
         std::cout << "\nEvent: sectionStarting:\n";
         print( std::cout, 1, "- sectionInfo", sectionInfo );
     }
 
     // Sections ending
-    virtual void sectionEnded( Catch::SectionStats const& sectionStats ) override {
+    void sectionEnded( Catch::SectionStats const& sectionStats ) override {
         std::cout << "\nEvent: sectionEnded:\n";
         print( std::cout, 1, "- sectionStats", sectionStats );
     }
 
     // Assertions before/ after
-    virtual void assertionStarting( Catch::AssertionInfo const& assertionInfo ) override {
+    void assertionStarting( Catch::AssertionInfo const& assertionInfo ) override {
         std::cout << "\nEvent: assertionStarting:\n";
         print( std::cout, 1, "- assertionInfo", assertionInfo );
     }
 
-    virtual bool assertionEnded( Catch::AssertionStats const& assertionStats ) override {
+    bool assertionEnded( Catch::AssertionStats const& assertionStats ) override {
         std::cout << "\nEvent: assertionEnded:\n";
         print( std::cout, 1, "- assertionStats", assertionStats );
         return true;
diff --git a/packages/Catch2/include/catch.hpp b/packages/Catch2/include/catch.hpp
index 5ee7ffdd9d4134bc96934fe669eaa213fde91821..5d38092e0bc2dbe697b12a91eb7f545d74429018 100644
--- a/packages/Catch2/include/catch.hpp
+++ b/packages/Catch2/include/catch.hpp
@@ -10,8 +10,8 @@
 #define TWOBLUECUBES_CATCH_HPP_INCLUDED
 
 #define CATCH_VERSION_MAJOR 2
-#define CATCH_VERSION_MINOR 7
-#define CATCH_VERSION_PATCH 1
+#define CATCH_VERSION_MINOR 10
+#define CATCH_VERSION_PATCH 0
 
 #ifdef __clang__
 #    pragma clang system_header
@@ -53,7 +53,6 @@
 #include "internal/catch_test_registry.h"
 #include "internal/catch_capture.hpp"
 #include "internal/catch_section.h"
-#include "internal/catch_benchmark.h"
 #include "internal/catch_interfaces_exception.h"
 #include "internal/catch_approx.h"
 #include "internal/catch_compiler_capabilities.h"
@@ -75,10 +74,15 @@
 #include "internal/catch_objc.hpp"
 #endif
 
-#ifdef CATCH_CONFIG_EXTERNAL_INTERFACES
+// Benchmarking needs the externally-facing parts of reporters to work
+#if defined(CATCH_CONFIG_EXTERNAL_INTERFACES) || defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
 #include "internal/catch_external_interfaces.h"
 #endif
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+#include "internal/benchmark/catch_benchmark.hpp"
+#endif
+
 #endif // ! CATCH_CONFIG_IMPL_ONLY
 
 #ifdef CATCH_IMPL
@@ -89,6 +93,7 @@
 #include "internal/catch_default_main.hpp"
 #endif
 
+
 #if !defined(CATCH_CONFIG_IMPL_ONLY)
 
 #ifdef CLARA_CONFIG_MAIN_NOT_DEFINED
@@ -132,6 +137,7 @@
 #endif // CATCH_CONFIG_DISABLE_MATCHERS
 
 #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg )
+#define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "CATCH_UNSCOPED_INFO", msg )
 #define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )
 #define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CATCH_CAPTURE",__VA_ARGS__ )
 
@@ -149,14 +155,22 @@
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
 #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )
 #define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
 #else
 #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
 #endif
 
 
@@ -179,6 +193,13 @@
 #define CATCH_THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( "     Then: " << desc )
 #define CATCH_AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( "      And: " << desc )
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+#define CATCH_BENCHMARK(...) \
+    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))
+#define CATCH_BENCHMARK_ADVANCED(name) \
+    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name)
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
 // If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required
 #else
 
@@ -232,14 +253,26 @@
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
 #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )
 #define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
+#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(__VA_ARGS__)
+#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #else
 #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )
+#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
+#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
 #define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )
+#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
+#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
+#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE( __VA_ARGS__ ) )
+#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
 #endif
 
 
@@ -266,6 +299,13 @@
 #define THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( "     Then: " << desc )
 #define AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( "      And: " << desc )
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+#define BENCHMARK(...) \
+    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))
+#define BENCHMARK_ADVANCED(name) \
+    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name)
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
 using Catch::Detail::Approx;
 
 #else // CATCH_CONFIG_DISABLE
@@ -305,9 +345,10 @@ using Catch::Detail::Approx;
 #define CATCH_REQUIRE_THAT( arg, matcher ) (void)(0)
 #endif // CATCH_CONFIG_DISABLE_MATCHERS
 
-#define CATCH_INFO( msg )    (void)(0)
-#define CATCH_WARN( msg )    (void)(0)
-#define CATCH_CAPTURE( msg ) (void)(0)
+#define CATCH_INFO( msg )          (void)(0)
+#define CATCH_UNSCOPED_INFO( msg ) (void)(0)
+#define CATCH_WARN( msg )          (void)(0)
+#define CATCH_CAPTURE( msg )       (void)(0)
 
 #define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ))
 #define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ))
@@ -322,15 +363,23 @@ using Catch::Detail::Approx;
 #define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
-#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) )
-#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className )
+#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)
+#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)
+#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)
+#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #else
-#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) ) )
-#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className ) )
+#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )
+#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )
+#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #endif
 
 // "BDD-style" convenience wrappers
@@ -382,6 +431,7 @@ using Catch::Detail::Approx;
 #endif // CATCH_CONFIG_DISABLE_MATCHERS
 
 #define INFO( msg ) (void)(0)
+#define UNSCOPED_INFO( msg ) (void)(0)
 #define WARN( msg ) (void)(0)
 #define CAPTURE( msg ) (void)(0)
 
@@ -397,15 +447,23 @@ using Catch::Detail::Approx;
 #define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
-#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) )
-#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className )
+#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)
+#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)
+#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)
+#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #else
-#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) ) )
-#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className ) )
+#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )
+#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )
+#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )
+#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )
 #define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #endif
 
 #define STATIC_REQUIRE( ... )       (void)(0)
diff --git a/packages/Catch2/include/internal/benchmark/catch_benchmark.hpp b/packages/Catch2/include/internal/benchmark/catch_benchmark.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..3c061210798a8db1a16f32a84e75db62d4bf7a7d
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_benchmark.hpp
@@ -0,0 +1,122 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Benchmark
+#ifndef TWOBLUECUBES_CATCH_BENCHMARK_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_BENCHMARK_HPP_INCLUDED
+
+#include "../catch_config.hpp"
+#include "../catch_context.h"
+#include "../catch_interfaces_reporter.h"
+#include "../catch_test_registry.h"
+
+#include "catch_chronometer.hpp"
+#include "catch_clock.hpp"
+#include "catch_environment.hpp"
+#include "catch_execution_plan.hpp"
+#include "detail/catch_estimate_clock.hpp"
+#include "detail/catch_complete_invoke.hpp"
+#include "detail/catch_analyse.hpp"
+#include "detail/catch_benchmark_function.hpp"
+#include "detail/catch_run_for_at_least.hpp"
+
+#include <algorithm>
+#include <functional>
+#include <string>
+#include <vector>
+#include <cmath>
+
+namespace Catch {
+    namespace Benchmark {
+        struct Benchmark {
+            Benchmark(std::string &&name)
+                : name(std::move(name)) {}
+
+            template <class FUN>
+            Benchmark(std::string &&name, FUN &&func)
+                : fun(std::move(func)), name(std::move(name)) {}
+
+            template <typename Clock>
+            ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {
+                auto min_time = env.clock_resolution.mean * Detail::minimum_ticks;
+                auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(Detail::warmup_time));
+                auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun);
+                int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed));
+                return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(Detail::warmup_time), Detail::warmup_iterations };
+            }
+
+            template <typename Clock = default_clock>
+            void run() {
+                IConfigPtr cfg = getCurrentContext().getConfig();
+
+                auto env = Detail::measure_environment<Clock>();
+
+                getResultCapture().benchmarkPreparing(name);
+                CATCH_TRY{
+                    auto plan = user_code([&] {
+                        return prepare<Clock>(*cfg, env);
+                    });
+
+                    BenchmarkInfo info {
+                        name,
+                        plan.estimated_duration.count(),
+                        plan.iterations_per_sample,
+                        cfg->benchmarkSamples(),
+                        cfg->benchmarkResamples(),
+                        env.clock_resolution.mean.count(),
+                        env.clock_cost.mean.count()
+                    };
+
+                    getResultCapture().benchmarkStarting(info);
+
+                    auto samples = user_code([&] {
+                        return plan.template run<Clock>(*cfg, env);
+                    });
+
+                    auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());
+                    BenchmarkStats<std::chrono::duration<double, std::nano>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
+                    getResultCapture().benchmarkEnded(stats);
+
+                } CATCH_CATCH_ALL{
+                    if (translateActiveException() != Detail::benchmarkErrorMsg) // benchmark errors have been reported, otherwise rethrow.
+                        std::rethrow_exception(std::current_exception());
+                }
+            }
+
+            // sets lambda to be used in fun *and* executes benchmark!
+            template <typename Fun,
+                typename std::enable_if<!Detail::is_related<Fun, Benchmark>::value, int>::type = 0>
+                Benchmark & operator=(Fun func) {
+                fun = Detail::BenchmarkFunction(func);
+                run();
+                return *this;
+            }
+
+            explicit operator bool() {
+                return true;
+            }
+
+        private:
+            Detail::BenchmarkFunction fun;
+            std::string name;
+        };
+    }
+} // namespace Catch
+
+#define INTERNAL_CATCH_GET_1_ARG(arg1, arg2, ...) arg1
+#define INTERNAL_CATCH_GET_2_ARG(arg1, arg2, ...) arg2
+
+#define INTERNAL_CATCH_BENCHMARK(BenchmarkName, name, benchmarkIndex)\
+    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
+        BenchmarkName = [&](int benchmarkIndex)
+
+#define INTERNAL_CATCH_BENCHMARK_ADVANCED(BenchmarkName, name)\
+    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
+        BenchmarkName = [&]
+
+#endif // TWOBLUECUBES_CATCH_BENCHMARK_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_chronometer.hpp b/packages/Catch2/include/internal/benchmark/catch_chronometer.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..1022017d086fe46756e0f5d8e6deb1c9dd3cdb17
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_chronometer.hpp
@@ -0,0 +1,71 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// User-facing chronometer
+
+#ifndef TWOBLUECUBES_CATCH_CHRONOMETER_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_CHRONOMETER_HPP_INCLUDED
+
+#include "catch_clock.hpp"
+#include "catch_optimizer.hpp"
+#include "detail/catch_complete_invoke.hpp"
+#include "../catch_meta.hpp"
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            struct ChronometerConcept {
+                virtual void start() = 0;
+                virtual void finish() = 0;
+                virtual ~ChronometerConcept() = default;
+            };
+            template <typename Clock>
+            struct ChronometerModel final : public ChronometerConcept {
+                void start() override { started = Clock::now(); }
+                void finish() override { finished = Clock::now(); }
+
+                ClockDuration<Clock> elapsed() const { return finished - started; }
+
+                TimePoint<Clock> started;
+                TimePoint<Clock> finished;
+            };
+        } // namespace Detail
+
+        struct Chronometer {
+        public:
+            template <typename Fun>
+            void measure(Fun&& fun) { measure(std::forward<Fun>(fun), is_callable<Fun(int)>()); }
+
+            int runs() const { return k; }
+
+            Chronometer(Detail::ChronometerConcept& meter, int k)
+                : impl(&meter)
+                , k(k) {}
+
+        private:
+            template <typename Fun>
+            void measure(Fun&& fun, std::false_type) {
+                measure([&fun](int) { return fun(); }, std::true_type());
+            }
+
+            template <typename Fun>
+            void measure(Fun&& fun, std::true_type) {
+                Detail::optimizer_barrier();
+                impl->start();
+                for (int i = 0; i < k; ++i) invoke_deoptimized(fun, i);
+                impl->finish();
+                Detail::optimizer_barrier();
+            }
+
+            Detail::ChronometerConcept* impl;
+            int k;
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_CHRONOMETER_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_clock.hpp b/packages/Catch2/include/internal/benchmark/catch_clock.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..32a3e868b9661076a2c0ed00e74eb6b933e7432e
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_clock.hpp
@@ -0,0 +1,40 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Clocks
+
+#ifndef TWOBLUECUBES_CATCH_CLOCK_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_CLOCK_HPP_INCLUDED
+
+#include <chrono>
+#include <ratio>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Clock>
+        using ClockDuration = typename Clock::duration;
+        template <typename Clock>
+        using FloatDuration = std::chrono::duration<double, typename Clock::period>;
+
+        template <typename Clock>
+        using TimePoint = typename Clock::time_point;
+
+        using default_clock = std::chrono::steady_clock;
+
+        template <typename Clock>
+        struct now {
+            TimePoint<Clock> operator()() const {
+                return Clock::now();
+            }
+        };
+
+        using fp_seconds = std::chrono::duration<double, std::ratio<1>>;
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_CLOCK_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_constructor.hpp b/packages/Catch2/include/internal/benchmark/catch_constructor.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bf6dfec990bc58f395c93b052c3648b7359563e7
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_constructor.hpp
@@ -0,0 +1,73 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Constructor and destructor helpers
+
+#ifndef TWOBLUECUBES_CATCH_CONSTRUCTOR_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_CONSTRUCTOR_HPP_INCLUDED
+
+#include <type_traits>
+
+namespace Catch {
+    namespace Detail {
+        template <typename T, bool Destruct>
+        struct ObjectStorage
+        {
+            using TStorage = typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type;
+
+            ObjectStorage() : data() {}
+
+            ObjectStorage(const ObjectStorage& other)
+            {
+                new(&data) T(other.stored_object());
+            }
+
+            ObjectStorage(ObjectStorage&& other)
+            {
+                new(&data) T(std::move(other.stored_object()));
+            }
+
+            ~ObjectStorage() { destruct_on_exit<T>(); }
+
+            template <typename... Args>
+            void construct(Args&&... args)
+            {
+                new (&data) T(std::forward<Args>(args)...);
+            }
+
+            template <bool AllowManualDestruction = !Destruct>
+            typename std::enable_if<AllowManualDestruction>::type destruct()
+            {
+                stored_object().~T();
+            }
+
+        private:
+            // If this is a constructor benchmark, destruct the underlying object
+            template <typename U>
+            void destruct_on_exit(typename std::enable_if<Destruct, U>::type* = 0) { destruct<true>(); }
+            // Otherwise, don't
+            template <typename U>
+            void destruct_on_exit(typename std::enable_if<!Destruct, U>::type* = 0) { }
+
+            T& stored_object()
+            {
+                return *static_cast<T*>(static_cast<void*>(&data));
+            }
+
+            TStorage data;
+        };
+    }
+
+    template <typename T>
+    using storage_for = Detail::ObjectStorage<T, true>;
+
+    template <typename T>
+    using destructable_object = Detail::ObjectStorage<T, false>;
+}
+
+#endif // TWOBLUECUBES_CATCH_CONSTRUCTOR_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_environment.hpp b/packages/Catch2/include/internal/benchmark/catch_environment.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..5595124987e7bdbc06f743cb924b9ecf7560dd64
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_environment.hpp
@@ -0,0 +1,38 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Environment information
+
+#ifndef TWOBLUECUBES_CATCH_ENVIRONMENT_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_ENVIRONMENT_HPP_INCLUDED
+
+#include "catch_clock.hpp"
+#include "catch_outlier_classification.hpp"
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct EnvironmentEstimate {
+            Duration mean;
+            OutlierClassification outliers;
+
+            template <typename Duration2>
+            operator EnvironmentEstimate<Duration2>() const {
+                return { mean, outliers };
+            }
+        };
+        template <typename Clock>
+        struct Environment {
+            using clock_type = Clock;
+            EnvironmentEstimate<FloatDuration<Clock>> clock_resolution;
+            EnvironmentEstimate<FloatDuration<Clock>> clock_cost;
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_ENVIRONMENT_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_estimate.hpp b/packages/Catch2/include/internal/benchmark/catch_estimate.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..a3c913ce69bf084888915e95d0990d33c7961d75
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_estimate.hpp
@@ -0,0 +1,31 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Statistics estimates
+
+#ifndef TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct Estimate {
+            Duration point;
+            Duration lower_bound;
+            Duration upper_bound;
+            double confidence_interval;
+
+            template <typename Duration2>
+            operator Estimate<Duration2>() const {
+                return { point, lower_bound, upper_bound, confidence_interval };
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_execution_plan.hpp b/packages/Catch2/include/internal/benchmark/catch_execution_plan.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..e56c83aa7c57f96dc148de99e5b0ed2bb561453f
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_execution_plan.hpp
@@ -0,0 +1,58 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Execution plan
+
+#ifndef TWOBLUECUBES_CATCH_EXECUTION_PLAN_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_EXECUTION_PLAN_HPP_INCLUDED
+
+#include "../catch_config.hpp"
+#include "catch_clock.hpp"
+#include "catch_environment.hpp"
+#include "detail/catch_benchmark_function.hpp"
+#include "detail/catch_repeat.hpp"
+#include "detail/catch_run_for_at_least.hpp"
+
+#include <algorithm>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct ExecutionPlan {
+            int iterations_per_sample;
+            Duration estimated_duration;
+            Detail::BenchmarkFunction benchmark;
+            Duration warmup_time;
+            int warmup_iterations;
+
+            template <typename Duration2>
+            operator ExecutionPlan<Duration2>() const {
+                return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations };
+            }
+
+            template <typename Clock>
+            std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {
+                // warmup a bit
+                Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_iterations, Detail::repeat(now<Clock>{}));
+
+                std::vector<FloatDuration<Clock>> times;
+                times.reserve(cfg.benchmarkSamples());
+                std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] {
+                    Detail::ChronometerModel<Clock> model;
+                    this->benchmark(Chronometer(model, iterations_per_sample));
+                    auto sample_time = model.elapsed() - env.clock_cost.mean;
+                    if (sample_time < FloatDuration<Clock>::zero()) sample_time = FloatDuration<Clock>::zero();
+                    return sample_time / iterations_per_sample;
+                });
+                return times;
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_EXECUTION_PLAN_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_optimizer.hpp b/packages/Catch2/include/internal/benchmark/catch_optimizer.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bda7c6d7e94e2bb09c91f7c96f07b8f50bfcaddd
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_optimizer.hpp
@@ -0,0 +1,68 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Hinting the optimizer
+
+#ifndef TWOBLUECUBES_CATCH_OPTIMIZER_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_OPTIMIZER_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+#   include <atomic> // atomic_thread_fence
+#endif
+
+namespace Catch {
+    namespace Benchmark {
+#if defined(__GNUC__) || defined(__clang__)
+        template <typename T>
+        inline void keep_memory(T* p) {
+            asm volatile("" : : "g"(p) : "memory");
+        }
+        inline void keep_memory() {
+            asm volatile("" : : : "memory");
+        }
+
+        namespace Detail {
+            inline void optimizer_barrier() { keep_memory(); }
+        } // namespace Detail
+#elif defined(_MSC_VER)
+
+#pragma optimize("", off)
+        template <typename T>
+        inline void keep_memory(T* p) {
+            // thanks @milleniumbug
+            *reinterpret_cast<char volatile*>(p) = *reinterpret_cast<char const volatile*>(p);
+        }
+        // TODO equivalent keep_memory()
+#pragma optimize("", on)
+
+        namespace Detail {
+            inline void optimizer_barrier() {
+                std::atomic_thread_fence(std::memory_order_seq_cst);
+            }
+        } // namespace Detail
+
+#endif
+
+        template <typename T>
+        inline void deoptimize_value(T&& x) {
+            keep_memory(&x);
+        }
+
+        template <typename Fn, typename... Args>
+        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<!std::is_same<void, decltype(fn(args...))>::value>::type {
+            deoptimize_value(std::forward<Fn>(fn) (std::forward<Args...>(args...)));
+        }
+
+        template <typename Fn, typename... Args>
+        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<std::is_same<void, decltype(fn(args...))>::value>::type {
+            std::forward<Fn>(fn) (std::forward<Args...>(args...));
+        }
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_OPTIMIZER_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_outlier_classification.hpp b/packages/Catch2/include/internal/benchmark/catch_outlier_classification.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..66a0adf57917d59406d75698044b99e3c43e0bf0
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_outlier_classification.hpp
@@ -0,0 +1,29 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Outlier information
+#ifndef TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED
+
+namespace Catch {
+    namespace Benchmark {
+        struct OutlierClassification {
+            int samples_seen = 0;
+            int low_severe = 0;     // more than 3 times IQR below Q1
+            int low_mild = 0;       // 1.5 to 3 times IQR below Q1
+            int high_mild = 0;      // 1.5 to 3 times IQR above Q3
+            int high_severe = 0;    // more than 3 times IQR above Q3
+
+            int total() const {
+                return low_severe + low_mild + high_mild + high_severe;
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/catch_sample_analysis.hpp b/packages/Catch2/include/internal/benchmark/catch_sample_analysis.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..4550d0bc4e03e000e1b42d7ca3545ada093f4aad
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/catch_sample_analysis.hpp
@@ -0,0 +1,50 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Benchmark results
+
+#ifndef TWOBLUECUBES_CATCH_BENCHMARK_RESULTS_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_BENCHMARK_RESULTS_HPP_INCLUDED
+
+#include "catch_clock.hpp"
+#include "catch_estimate.hpp"
+#include "catch_outlier_classification.hpp"
+
+#include <algorithm>
+#include <vector>
+#include <string>
+#include <iterator>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct SampleAnalysis {
+            std::vector<Duration> samples;
+            Estimate<Duration> mean;
+            Estimate<Duration> standard_deviation;
+            OutlierClassification outliers;
+            double outlier_variance;
+
+            template <typename Duration2>
+            operator SampleAnalysis<Duration2>() const {
+                std::vector<Duration2> samples2;
+                samples2.reserve(samples.size());
+                std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });
+                return {
+                    std::move(samples2),
+                    mean,
+                    standard_deviation,
+                    outliers,
+                    outlier_variance,
+                };
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_BENCHMARK_RESULTS_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_analyse.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_analyse.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..a3becbe4d81f255e4109eecee0d5de3994a4bdec
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_analyse.hpp
@@ -0,0 +1,78 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Run and analyse one benchmark
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_ANALYSE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_ANALYSE_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "../catch_sample_analysis.hpp"
+#include "catch_stats.hpp"
+
+#include <algorithm>
+#include <iterator>
+#include <vector>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Duration, typename Iterator>
+            SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last) {
+                if (!cfg.benchmarkNoAnalysis()) {
+                    std::vector<double> samples;
+                    samples.reserve(last - first);
+                    std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); });
+
+                    auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end());
+                    auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end());
+
+                    auto wrap_estimate = [](Estimate<double> e) {
+                        return Estimate<Duration> {
+                            Duration(e.point),
+                                Duration(e.lower_bound),
+                                Duration(e.upper_bound),
+                                e.confidence_interval,
+                        };
+                    };
+                    std::vector<Duration> samples2;
+                    samples2.reserve(samples.size());
+                    std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); });
+                    return {
+                        std::move(samples2),
+                        wrap_estimate(analysis.mean),
+                        wrap_estimate(analysis.standard_deviation),
+                        outliers,
+                        analysis.outlier_variance,
+                    };
+                } else {
+                    std::vector<Duration> samples; 
+                    samples.reserve(last - first);
+
+                    Duration mean = Duration(0);
+                    int i = 0;
+                    for (auto it = first; it < last; ++it, ++i) {
+                        samples.push_back(Duration(*it));
+                        mean += Duration(*it);
+                    }
+                    mean /= i;
+
+                    return {
+                        std::move(samples),
+                        Estimate<Duration>{mean, mean, mean, 0.0},
+                        Estimate<Duration>{Duration(0), Duration(0), Duration(0), 0.0},
+                        OutlierClassification{},
+                        0.0
+                    };
+                }
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_ANALYSE_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_benchmark_function.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_benchmark_function.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..60c7f1d692c2a93d3bbdea7a8becdc478272e3c8
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_benchmark_function.hpp
@@ -0,0 +1,105 @@
+    /*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Dumb std::function implementation for consistent call overhead
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_BENCHMARK_FUNCTION_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_BENCHMARK_FUNCTION_HPP_INCLUDED
+
+#include "../catch_chronometer.hpp"
+#include "catch_complete_invoke.hpp"
+#include "../../catch_meta.hpp"
+
+#include <cassert>
+#include <type_traits>
+#include <utility>
+#include <memory>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename T>
+            using Decay = typename std::decay<T>::type;
+            template <typename T, typename U>
+            struct is_related
+                : std::is_same<Decay<T>, Decay<U>> {};
+
+            /// We need to reinvent std::function because every piece of code that might add overhead
+            /// in a measurement context needs to have consistent performance characteristics so that we
+            /// can account for it in the measurement.
+            /// Implementations of std::function with optimizations that aren't always applicable, like
+            /// small buffer optimizations, are not uncommon.
+            /// This is effectively an implementation of std::function without any such optimizations;
+            /// it may be slow, but it is consistently slow.
+            struct BenchmarkFunction {
+            private:
+                struct callable {
+                    virtual void call(Chronometer meter) const = 0;
+                    virtual callable* clone() const = 0;
+                    virtual ~callable() = default;
+                };
+                template <typename Fun>
+                struct model : public callable {
+                    model(Fun&& fun) : fun(std::move(fun)) {}
+                    model(Fun const& fun) : fun(fun) {}
+
+                    model<Fun>* clone() const override { return new model<Fun>(*this); }
+
+                    void call(Chronometer meter) const override {
+                        call(meter, is_callable<Fun(Chronometer)>());
+                    }
+                    void call(Chronometer meter, std::true_type) const {
+                        fun(meter);
+                    }
+                    void call(Chronometer meter, std::false_type) const {
+                        meter.measure(fun);
+                    }
+
+                    Fun fun;
+                };
+
+                struct do_nothing { void operator()() const {} };
+
+                template <typename T>
+                BenchmarkFunction(model<T>* c) : f(c) {}
+
+            public:
+                BenchmarkFunction()
+                    : f(new model<do_nothing>{ {} }) {}
+
+                template <typename Fun,
+                    typename std::enable_if<!is_related<Fun, BenchmarkFunction>::value, int>::type = 0>
+                    BenchmarkFunction(Fun&& fun)
+                    : f(new model<typename std::decay<Fun>::type>(std::forward<Fun>(fun))) {}
+
+                BenchmarkFunction(BenchmarkFunction&& that)
+                    : f(std::move(that.f)) {}
+
+                BenchmarkFunction(BenchmarkFunction const& that)
+                    : f(that.f->clone()) {}
+
+                BenchmarkFunction& operator=(BenchmarkFunction&& that) {
+                    f = std::move(that.f);
+                    return *this;
+                }
+
+                BenchmarkFunction& operator=(BenchmarkFunction const& that) {
+                    f.reset(that.f->clone());
+                    return *this;
+                }
+
+                void operator()(Chronometer meter) const { f->call(meter); }
+
+            private:
+                std::unique_ptr<callable> f;
+            };
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_BENCHMARK_FUNCTION_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..abeb2ac71d6e6e76368f792ec67a4ccae5832f14
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp
@@ -0,0 +1,69 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Invoke with a special case for void
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
+
+#include "../../catch_enforce.h"
+
+#include <type_traits>
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename T>
+            struct CompleteType { using type = T; };
+            template <>
+            struct CompleteType<void> { struct type {}; };
+
+            template <typename T>
+            using CompleteType_t = typename CompleteType<T>::type;
+
+            template <typename Result>
+            struct CompleteInvoker {
+                template <typename Fun, typename... Args>
+                static Result invoke(Fun&& fun, Args&&... args) {
+                    return std::forward<Fun>(fun)(std::forward<Args>(args)...);
+                }
+            };
+            template <>
+            struct CompleteInvoker<void> {
+                template <typename Fun, typename... Args>
+                static CompleteType_t<void> invoke(Fun&& fun, Args&&... args) {
+                    std::forward<Fun>(fun)(std::forward<Args>(args)...);
+                    return {};
+                }
+            };
+            template <typename Sig>
+            using ResultOf_t = typename std::result_of<Sig>::type;
+
+            // invoke and not return void :(
+            template <typename Fun, typename... Args>
+            CompleteType_t<ResultOf_t<Fun(Args...)>> complete_invoke(Fun&& fun, Args&&... args) {
+                return CompleteInvoker<ResultOf_t<Fun(Args...)>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...);
+            }
+
+            const std::string benchmarkErrorMsg = "a benchmark failed to run successfully";
+        } // namespace Detail
+
+        template <typename Fun>
+        Detail::CompleteType_t<Detail::ResultOf_t<Fun()>> user_code(Fun&& fun) {
+            CATCH_TRY{
+                return Detail::complete_invoke(std::forward<Fun>(fun));
+            } CATCH_CATCH_ALL{
+                getResultCapture().benchmarkFailed(translateActiveException());
+                CATCH_RUNTIME_ERROR(Detail::benchmarkErrorMsg);
+            }
+        }
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_estimate_clock.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_estimate_clock.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..055c582500a3b4141c22b9e343bcd6ef89510b5c
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_estimate_clock.hpp
@@ -0,0 +1,113 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Environment measurement
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_ESTIMATE_CLOCK_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_ESTIMATE_CLOCK_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "../catch_environment.hpp"
+#include "catch_stats.hpp"
+#include "catch_measure.hpp"
+#include "catch_run_for_at_least.hpp"
+#include "../catch_clock.hpp"
+
+#include <algorithm>
+#include <iterator>
+#include <tuple>
+#include <vector>
+#include <cmath>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock>
+            std::vector<double> resolution(int k) {
+                std::vector<TimePoint<Clock>> times;
+                times.reserve(k + 1);
+                std::generate_n(std::back_inserter(times), k + 1, now<Clock>{});
+
+                std::vector<double> deltas;
+                deltas.reserve(k);
+                std::transform(std::next(times.begin()), times.end(), times.begin(),
+                    std::back_inserter(deltas),
+                    [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); });
+
+                return deltas;
+            }
+
+            const auto warmup_iterations = 10000;
+            const auto warmup_time = std::chrono::milliseconds(100);
+            const auto minimum_ticks = 1000;
+            const auto warmup_seed = 10000;
+            const auto clock_resolution_estimation_time = std::chrono::milliseconds(500);
+            const auto clock_cost_estimation_time_limit = std::chrono::seconds(1);
+            const auto clock_cost_estimation_tick_limit = 100000;
+            const auto clock_cost_estimation_time = std::chrono::milliseconds(10);
+            const auto clock_cost_estimation_iterations = 10000;
+
+            template <typename Clock>
+            int warmup() {
+                return run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_seed, &resolution<Clock>)
+                    .iterations;
+            }
+            template <typename Clock>
+            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) {
+                auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>)
+                    .result;
+                return {
+                    FloatDuration<Clock>(mean(r.begin(), r.end())),
+                    classify_outliers(r.begin(), r.end()),
+                };
+            }
+            template <typename Clock>
+            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) {
+                auto time_limit = std::min(resolution * clock_cost_estimation_tick_limit, FloatDuration<Clock>(clock_cost_estimation_time_limit));
+                auto time_clock = [](int k) {
+                    return Detail::measure<Clock>([k] {
+                        for (int i = 0; i < k; ++i) {
+                            volatile auto ignored = Clock::now();
+                            (void)ignored;
+                        }
+                    }).elapsed;
+                };
+                time_clock(1);
+                int iters = clock_cost_estimation_iterations;
+                auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_cost_estimation_time), iters, time_clock);
+                std::vector<double> times;
+                int nsamples = static_cast<int>(std::ceil(time_limit / r.elapsed));
+                times.reserve(nsamples);
+                std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] {
+                    return static_cast<double>((time_clock(r.iterations) / r.iterations).count());
+                });
+                return {
+                    FloatDuration<Clock>(mean(times.begin(), times.end())),
+                    classify_outliers(times.begin(), times.end()),
+                };
+            }
+
+            template <typename Clock>
+            Environment<FloatDuration<Clock>> measure_environment() {
+                static Environment<FloatDuration<Clock>>* env = nullptr;
+                if (env) {
+                    return *env;
+                }
+
+                auto iters = Detail::warmup<Clock>();
+                auto resolution = Detail::estimate_clock_resolution<Clock>(iters);
+                auto cost = Detail::estimate_clock_cost<Clock>(resolution.mean);
+
+                env = new Environment<FloatDuration<Clock>>{ resolution, cost };
+                return *env;
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_ESTIMATE_CLOCK_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_measure.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_measure.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..62ed2809633264ea2a6e449a88a46eb78294f5f8
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_measure.hpp
@@ -0,0 +1,35 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Measure
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_MEASURE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_MEASURE_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "catch_complete_invoke.hpp"
+#include "catch_timing.hpp"
+
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock, typename Fun, typename... Args>
+            TimingOf<Clock, Fun(Args...)> measure(Fun&& fun, Args&&... args) {
+                auto start = Clock::now();
+                auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...);
+                auto end = Clock::now();
+                auto delta = end - start;
+                return { delta, std::forward<decltype(r)>(r), 1 };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_MEASURE_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_repeat.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_repeat.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..ab240792b79700b6528dc565f490561fee7bf8cf
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_repeat.hpp
@@ -0,0 +1,37 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// repeat algorithm
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_REPEAT_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_REPEAT_HPP_INCLUDED
+
+#include <type_traits>
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Fun>
+            struct repeater {
+                void operator()(int k) const {
+                    for (int i = 0; i < k; ++i) {
+                        fun();
+                    }
+                }
+                Fun fun;
+            };
+            template <typename Fun>
+            repeater<typename std::decay<Fun>::type> repeat(Fun&& fun) {
+                return { std::forward<Fun>(fun) };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_REPEAT_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..a41c6b4611546b0d4d2f4e74fd5814210f800428
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp
@@ -0,0 +1,65 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Run a function for a minimum amount of time
+
+#ifndef TWOBLUECUBES_CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "../catch_chronometer.hpp"
+#include "catch_measure.hpp"
+#include "catch_complete_invoke.hpp"
+#include "catch_timing.hpp"
+#include "../../catch_meta.hpp"
+
+#include <utility>
+#include <type_traits>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun(int)> measure_one(Fun&& fun, int iters, std::false_type) {
+                return Detail::measure<Clock>(fun, iters);
+            }
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun(Chronometer)> measure_one(Fun&& fun, int iters, std::true_type) {
+                Detail::ChronometerModel<Clock> meter;
+                auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters));
+
+                return { meter.elapsed(), std::move(result), iters };
+            }
+
+            template <typename Clock, typename Fun>
+            using run_for_at_least_argument_t = typename std::conditional<is_callable<Fun(Chronometer)>::value, Chronometer, int>::type;
+
+            struct optimized_away_error : std::exception {
+                const char* what() const noexcept override {
+                    return "could not measure benchmark, maybe it was optimized away";
+                }
+            };
+
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun(run_for_at_least_argument_t<Clock, Fun>)> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) {
+                auto iters = seed;
+                while (iters < (1 << 30)) {
+                    auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
+
+                    if (Timing.elapsed >= how_long) {
+                        return { Timing.elapsed, std::move(Timing.result), iters };
+                    }
+                    iters *= 2;
+                }
+                throw optimized_away_error{};
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_stats.cpp b/packages/Catch2/include/internal/benchmark/detail/catch_stats.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..40e0ea9842e26f5ebf4a4e5a6f5a34e65918154e
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_stats.cpp
@@ -0,0 +1,223 @@
+/*
+ *  Created by Martin on 15/06/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Statistical analysis tools
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+
+#include "catch_stats.hpp"
+
+#include "../../catch_compiler_capabilities.h"
+
+#include <cassert>
+#include <random>
+
+
+#if defined(CATCH_CONFIG_USE_ASYNC)
+#include <future>
+#endif
+
+namespace {
+    double erf_inv(double x) {
+        // Code accompanying the article "Approximating the erfinv function" in GPU Computing Gems, Volume 2
+        double w, p;
+
+        w = -log((1.0 - x) * (1.0 + x));
+
+        if (w < 6.250000) {
+            w = w - 3.125000;
+            p = -3.6444120640178196996e-21;
+            p = -1.685059138182016589e-19 + p * w;
+            p = 1.2858480715256400167e-18 + p * w;
+            p = 1.115787767802518096e-17 + p * w;
+            p = -1.333171662854620906e-16 + p * w;
+            p = 2.0972767875968561637e-17 + p * w;
+            p = 6.6376381343583238325e-15 + p * w;
+            p = -4.0545662729752068639e-14 + p * w;
+            p = -8.1519341976054721522e-14 + p * w;
+            p = 2.6335093153082322977e-12 + p * w;
+            p = -1.2975133253453532498e-11 + p * w;
+            p = -5.4154120542946279317e-11 + p * w;
+            p = 1.051212273321532285e-09 + p * w;
+            p = -4.1126339803469836976e-09 + p * w;
+            p = -2.9070369957882005086e-08 + p * w;
+            p = 4.2347877827932403518e-07 + p * w;
+            p = -1.3654692000834678645e-06 + p * w;
+            p = -1.3882523362786468719e-05 + p * w;
+            p = 0.0001867342080340571352 + p * w;
+            p = -0.00074070253416626697512 + p * w;
+            p = -0.0060336708714301490533 + p * w;
+            p = 0.24015818242558961693 + p * w;
+            p = 1.6536545626831027356 + p * w;
+        } else if (w < 16.000000) {
+            w = sqrt(w) - 3.250000;
+            p = 2.2137376921775787049e-09;
+            p = 9.0756561938885390979e-08 + p * w;
+            p = -2.7517406297064545428e-07 + p * w;
+            p = 1.8239629214389227755e-08 + p * w;
+            p = 1.5027403968909827627e-06 + p * w;
+            p = -4.013867526981545969e-06 + p * w;
+            p = 2.9234449089955446044e-06 + p * w;
+            p = 1.2475304481671778723e-05 + p * w;
+            p = -4.7318229009055733981e-05 + p * w;
+            p = 6.8284851459573175448e-05 + p * w;
+            p = 2.4031110387097893999e-05 + p * w;
+            p = -0.0003550375203628474796 + p * w;
+            p = 0.00095328937973738049703 + p * w;
+            p = -0.0016882755560235047313 + p * w;
+            p = 0.0024914420961078508066 + p * w;
+            p = -0.0037512085075692412107 + p * w;
+            p = 0.005370914553590063617 + p * w;
+            p = 1.0052589676941592334 + p * w;
+            p = 3.0838856104922207635 + p * w;
+        } else {
+            w = sqrt(w) - 5.000000;
+            p = -2.7109920616438573243e-11;
+            p = -2.5556418169965252055e-10 + p * w;
+            p = 1.5076572693500548083e-09 + p * w;
+            p = -3.7894654401267369937e-09 + p * w;
+            p = 7.6157012080783393804e-09 + p * w;
+            p = -1.4960026627149240478e-08 + p * w;
+            p = 2.9147953450901080826e-08 + p * w;
+            p = -6.7711997758452339498e-08 + p * w;
+            p = 2.2900482228026654717e-07 + p * w;
+            p = -9.9298272942317002539e-07 + p * w;
+            p = 4.5260625972231537039e-06 + p * w;
+            p = -1.9681778105531670567e-05 + p * w;
+            p = 7.5995277030017761139e-05 + p * w;
+            p = -0.00021503011930044477347 + p * w;
+            p = -0.00013871931833623122026 + p * w;
+            p = 1.0103004648645343977 + p * w;
+            p = 4.8499064014085844221 + p * w;
+        }
+        return p * x;
+    }
+
+    double standard_deviation(std::vector<double>::iterator first, std::vector<double>::iterator last) {
+        auto m = Catch::Benchmark::Detail::mean(first, last);
+        double variance = std::accumulate(first, last, 0., [m](double a, double b) {
+            double diff = b - m;
+            return a + diff * diff;
+            }) / (last - first);
+            return std::sqrt(variance);
+    }
+
+}
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+
+            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) {
+                auto count = last - first;
+                double idx = (count - 1) * k / static_cast<double>(q);
+                int j = static_cast<int>(idx);
+                double g = idx - j;
+                std::nth_element(first, first + j, last);
+                auto xj = first[j];
+                if (g == 0) return xj;
+
+                auto xj1 = *std::min_element(first + (j + 1), last);
+                return xj + g * (xj1 - xj);
+            }
+
+
+            double erfc_inv(double x) {
+                return erf_inv(1.0 - x);
+            }
+
+            double normal_quantile(double p) {
+                static const double ROOT_TWO = std::sqrt(2.0);
+
+                double result = 0.0;
+                assert(p >= 0 && p <= 1);
+                if (p < 0 || p > 1) {
+                    return result;
+                }
+
+                result = -erfc_inv(2.0 * p);
+                // result *= normal distribution standard deviation (1.0) * sqrt(2)
+                result *= /*sd * */ ROOT_TWO;
+                // result += normal disttribution mean (0)
+                return result;
+            }
+
+
+            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) {
+                double sb = stddev.point;
+                double mn = mean.point / n;
+                double mg_min = mn / 2.;
+                double sg = std::min(mg_min / 4., sb / std::sqrt(n));
+                double sg2 = sg * sg;
+                double sb2 = sb * sb;
+
+                auto c_max = [n, mn, sb2, sg2](double x) -> double {
+                    double k = mn - x;
+                    double d = k * k;
+                    double nd = n * d;
+                    double k0 = -n * nd;
+                    double k1 = sb2 - n * sg2 + nd;
+                    double det = k1 * k1 - 4 * sg2 * k0;
+                    return (int)(-2. * k0 / (k1 + std::sqrt(det)));
+                };
+
+                auto var_out = [n, sb2, sg2](double c) {
+                    double nc = n - c;
+                    return (nc / n) * (sb2 - nc * sg2);
+                };
+
+                return std::min(var_out(1), var_out(std::min(c_max(0.), c_max(mg_min)))) / sb2;
+            }
+
+
+            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) {
+                CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
+                static std::random_device entropy;
+                CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
+
+                auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++
+
+                auto mean = &Detail::mean<std::vector<double>::iterator>;
+                auto stddev = &standard_deviation;
+
+#if defined(CATCH_CONFIG_USE_ASYNC)
+                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {
+                    auto seed = entropy();
+                    return std::async(std::launch::async, [=] {
+                        std::mt19937 rng(seed);
+                        auto resampled = resample(rng, n_resamples, first, last, f);
+                        return bootstrap(confidence_level, first, last, resampled, f);
+                    });
+                };
+
+                auto mean_future = Estimate(mean);
+                auto stddev_future = Estimate(stddev);
+
+                auto mean_estimate = mean_future.get();
+                auto stddev_estimate = stddev_future.get();
+#else
+                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {
+                    auto seed = entropy();
+                    std::mt19937 rng(seed);
+                    auto resampled = resample(rng, n_resamples, first, last, f);
+                    return bootstrap(confidence_level, first, last, resampled, f);
+                };
+
+                auto mean_estimate = Estimate(mean);
+                auto stddev_estimate = Estimate(stddev);
+#endif // CATCH_USE_ASYNC
+
+                double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n);
+
+                return { mean_estimate, stddev_estimate, outlier_variance };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_stats.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_stats.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..e686c1aa5fe172d630d12e141ac2f5d28db45749
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_stats.hpp
@@ -0,0 +1,158 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Statistical analysis tools
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_ANALYSIS_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_ANALYSIS_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "../catch_estimate.hpp"
+#include "../catch_outlier_classification.hpp"
+
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <numeric>
+#include <tuple>
+#include <cmath>
+#include <utility>
+#include <cstddef>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            using sample = std::vector<double>;
+
+            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last);
+
+            template <typename Iterator>
+            OutlierClassification classify_outliers(Iterator first, Iterator last) {
+                std::vector<double> copy(first, last);
+
+                auto q1 = weighted_average_quantile(1, 4, copy.begin(), copy.end());
+                auto q3 = weighted_average_quantile(3, 4, copy.begin(), copy.end());
+                auto iqr = q3 - q1;
+                auto los = q1 - (iqr * 3.);
+                auto lom = q1 - (iqr * 1.5);
+                auto him = q3 + (iqr * 1.5);
+                auto his = q3 + (iqr * 3.);
+
+                OutlierClassification o;
+                for (; first != last; ++first) {
+                    auto&& t = *first;
+                    if (t < los) ++o.low_severe;
+                    else if (t < lom) ++o.low_mild;
+                    else if (t > his) ++o.high_severe;
+                    else if (t > him) ++o.high_mild;
+                    ++o.samples_seen;
+                }
+                return o;
+            }
+
+            template <typename Iterator>
+            double mean(Iterator first, Iterator last) {
+                auto count = last - first;
+                double sum = std::accumulate(first, last, 0.);
+                return sum / count;
+            }
+
+            template <typename URng, typename Iterator, typename Estimator>
+            sample resample(URng& rng, int resamples, Iterator first, Iterator last, Estimator& estimator) {
+                auto n = last - first;
+                std::uniform_int_distribution<decltype(n)> dist(0, n - 1);
+
+                sample out;
+                out.reserve(resamples);
+                std::generate_n(std::back_inserter(out), resamples, [n, first, &estimator, &dist, &rng] {
+                    std::vector<double> resampled;
+                    resampled.reserve(n);
+                    std::generate_n(std::back_inserter(resampled), n, [first, &dist, &rng] { return first[dist(rng)]; });
+                    return estimator(resampled.begin(), resampled.end());
+                });
+                std::sort(out.begin(), out.end());
+                return out;
+            }
+
+            template <typename Estimator, typename Iterator>
+            sample jackknife(Estimator&& estimator, Iterator first, Iterator last) {
+                auto n = last - first;
+                auto second = std::next(first);
+                sample results;
+                results.reserve(n);
+
+                for (auto it = first; it != last; ++it) {
+                    std::iter_swap(it, first);
+                    results.push_back(estimator(second, last));
+                }
+
+                return results;
+            }
+
+            inline double normal_cdf(double x) {
+                return std::erfc(-x / std::sqrt(2.0)) / 2.0;
+            }
+
+            double erfc_inv(double x);
+
+            double normal_quantile(double p);
+
+            template <typename Iterator, typename Estimator>
+            Estimate<double> bootstrap(double confidence_level, Iterator first, Iterator last, sample const& resample, Estimator&& estimator) {
+                auto n_samples = last - first;
+
+                double point = estimator(first, last);
+                // Degenerate case with a single sample
+                if (n_samples == 1) return { point, point, point, confidence_level };
+
+                sample jack = jackknife(estimator, first, last);
+                double jack_mean = mean(jack.begin(), jack.end());
+                double sum_squares, sum_cubes;
+                std::tie(sum_squares, sum_cubes) = std::accumulate(jack.begin(), jack.end(), std::make_pair(0., 0.), [jack_mean](std::pair<double, double> sqcb, double x) -> std::pair<double, double> {
+                    auto d = jack_mean - x;
+                    auto d2 = d * d;
+                    auto d3 = d2 * d;
+                    return { sqcb.first + d2, sqcb.second + d3 };
+                });
+
+                double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5));
+                int n = static_cast<int>(resample.size());
+                double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / (double)n;
+                // degenerate case with uniform samples
+                if (prob_n == 0) return { point, point, point, confidence_level };
+
+                double bias = normal_quantile(prob_n);
+                double z1 = normal_quantile((1. - confidence_level) / 2.);
+
+                auto cumn = [n](double x) -> int {
+                    return std::lround(normal_cdf(x) * n); };
+                auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); };
+                double b1 = bias + z1;
+                double b2 = bias - z1;
+                double a1 = a(b1);
+                double a2 = a(b2);
+                auto lo = std::max(cumn(a1), 0);
+                auto hi = std::min(cumn(a2), n - 1);
+
+                return { point, resample[lo], resample[hi], confidence_level };
+            }
+
+            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n);
+
+            struct bootstrap_analysis {
+                Estimate<double> mean;
+                Estimate<double> standard_deviation;
+                double outlier_variance;
+            };
+
+            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last);
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_ANALYSIS_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/benchmark/detail/catch_timing.hpp b/packages/Catch2/include/internal/benchmark/detail/catch_timing.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..073cb74274bf9765d70e29bde279a3a6955d4964
--- /dev/null
+++ b/packages/Catch2/include/internal/benchmark/detail/catch_timing.hpp
@@ -0,0 +1,33 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Timing
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_TIMING_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_TIMING_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "catch_complete_invoke.hpp"
+
+#include <tuple>
+#include <type_traits>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration, typename Result>
+        struct Timing {
+            Duration elapsed;
+            Result result;
+            int iterations;
+        };
+        template <typename Clock, typename Sig>
+        using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<Detail::ResultOf_t<Sig>>>;
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_TIMING_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_approx.cpp b/packages/Catch2/include/internal/catch_approx.cpp
index a7d7111ca43f4fb24840adebf8611b689ea1a110..32b5e0437e0387d567c628a7a5fbb796326b1a8a 100644
--- a/packages/Catch2/include/internal/catch_approx.cpp
+++ b/packages/Catch2/include/internal/catch_approx.cpp
@@ -52,21 +52,22 @@ namespace Detail {
     bool Approx::equalityComparisonImpl(const double other) const {
         // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value
         // Thanks to Richard Harris for his help refining the scaled margin value
-        return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value)));
+        return marginComparison(m_value, other, m_margin)
+            || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(std::isinf(m_value)? 0 : m_value)));
     }
 
-    void Approx::setMargin(double margin) {
-        CATCH_ENFORCE(margin >= 0,
-            "Invalid Approx::margin: " << margin << '.'
+    void Approx::setMargin(double newMargin) {
+        CATCH_ENFORCE(newMargin >= 0,
+            "Invalid Approx::margin: " << newMargin << '.'
             << " Approx::Margin has to be non-negative.");
-        m_margin = margin;
+        m_margin = newMargin;
     }
 
-    void Approx::setEpsilon(double epsilon) {
-        CATCH_ENFORCE(epsilon >= 0 && epsilon <= 1.0,
-            "Invalid Approx::epsilon: " << epsilon << '.'
+    void Approx::setEpsilon(double newEpsilon) {
+        CATCH_ENFORCE(newEpsilon >= 0 && newEpsilon <= 1.0,
+            "Invalid Approx::epsilon: " << newEpsilon << '.'
             << " Approx::epsilon has to be in [0, 1]");
-        m_epsilon = epsilon;
+        m_epsilon = newEpsilon;
     }
 
 } // end namespace Detail
diff --git a/packages/Catch2/include/internal/catch_assertionresult.cpp b/packages/Catch2/include/internal/catch_assertionresult.cpp
index 4ce071876b9bd8e5228f55ea67b2fb680b34c8c4..608a9add69e41940838eeab00e7633adffa9e8d8 100644
--- a/packages/Catch2/include/internal/catch_assertionresult.cpp
+++ b/packages/Catch2/include/internal/catch_assertionresult.cpp
@@ -45,7 +45,7 @@ namespace Catch {
     }
 
     bool AssertionResult::hasExpression() const {
-        return m_info.capturedExpression[0] != 0;
+        return !m_info.capturedExpression.empty();
     }
 
     bool AssertionResult::hasMessage() const {
@@ -53,16 +53,22 @@ namespace Catch {
     }
 
     std::string AssertionResult::getExpression() const {
-        if( isFalseTest( m_info.resultDisposition ) )
-            return "!(" + m_info.capturedExpression + ")";
-        else
-            return m_info.capturedExpression;
+        // Possibly overallocating by 3 characters should be basically free
+        std::string expr; expr.reserve(m_info.capturedExpression.size() + 3);
+        if (isFalseTest(m_info.resultDisposition)) {
+            expr += "!(";
+        }
+        expr += m_info.capturedExpression;
+        if (isFalseTest(m_info.resultDisposition)) {
+            expr += ')';
+        }
+        return expr;
     }
 
     std::string AssertionResult::getExpressionInMacro() const {
         std::string expr;
-        if( m_info.macroName[0] == 0 )
-            expr = m_info.capturedExpression;
+        if( m_info.macroName.empty() )
+            expr = static_cast<std::string>(m_info.capturedExpression);
         else {
             expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );
             expr += m_info.macroName;
diff --git a/packages/Catch2/include/internal/catch_benchmark.cpp b/packages/Catch2/include/internal/catch_benchmark.cpp
deleted file mode 100644
index 742418f7fb7af8da9e44e2f39e45e37d6b8bbb96..0000000000000000000000000000000000000000
--- a/packages/Catch2/include/internal/catch_benchmark.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  Created by Phil on 04/07/2017.
- *  Copyright 2017 Two Blue Cubes Ltd. All rights reserved.
- *
- *  Distributed under the Boost Software License, Version 1.0. (See accompanying
- *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- */
-
-#include "catch_benchmark.h"
-#include "catch_capture.hpp"
-#include "catch_interfaces_reporter.h"
-#include "catch_context.h"
-
-namespace Catch {
-
-    auto BenchmarkLooper::getResolution() -> uint64_t {
-        return getEstimatedClockResolution() * getCurrentContext().getConfig()->benchmarkResolutionMultiple();
-    }
-
-    void BenchmarkLooper::reportStart() {
-        getResultCapture().benchmarkStarting( { m_name } );
-    }
-    auto BenchmarkLooper::needsMoreIterations() -> bool {
-        auto elapsed = m_timer.getElapsedNanoseconds();
-
-        // Exponentially increasing iterations until we're confident in our timer resolution
-        if( elapsed < m_resolution ) {
-            m_iterationsToRun *= 10;
-            return true;
-        }
-
-        getResultCapture().benchmarkEnded( { { m_name }, m_count, elapsed } );
-        return false;
-    }
-
-} // end namespace Catch
diff --git a/packages/Catch2/include/internal/catch_benchmark.h b/packages/Catch2/include/internal/catch_benchmark.h
deleted file mode 100644
index e546713cf9752d8775418e6fb16b64dc63416dae..0000000000000000000000000000000000000000
--- a/packages/Catch2/include/internal/catch_benchmark.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  Created by Phil on 04/07/2017.
- *  Copyright 2017 Two Blue Cubes Ltd. All rights reserved.
- *
- *  Distributed under the Boost Software License, Version 1.0. (See accompanying
- *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- */
-#ifndef TWOBLUECUBES_CATCH_BENCHMARK_H_INCLUDED
-#define TWOBLUECUBES_CATCH_BENCHMARK_H_INCLUDED
-
-#include "catch_stringref.h"
-#include "catch_timer.h"
-
-#include <cstdint>
-#include <string>
-
-namespace Catch {
-
-    class BenchmarkLooper {
-
-        std::string m_name;
-        std::size_t m_count = 0;
-        std::size_t m_iterationsToRun = 1;
-        uint64_t m_resolution;
-        Timer m_timer;
-
-        static auto getResolution() -> uint64_t;
-    public:
-        // Keep most of this inline as it's on the code path that is being timed
-        BenchmarkLooper( StringRef name )
-        :   m_name( name ),
-            m_resolution( getResolution() )
-        {
-            reportStart();
-            m_timer.start();
-        }
-
-        explicit operator bool() {
-            if( m_count < m_iterationsToRun )
-                return true;
-            return needsMoreIterations();
-        }
-
-        void increment() {
-            ++m_count;
-        }
-
-        void reportStart();
-        auto needsMoreIterations() -> bool;
-    };
-
-} // end namespace Catch
-
-#define BENCHMARK( name ) \
-    for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() )
-
-#endif // TWOBLUECUBES_CATCH_BENCHMARK_H_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_capture_matchers.h b/packages/Catch2/include/internal/catch_capture_matchers.h
index 0ced01d5785209496d7c2cdc95406d665aac5243..5386e5e179ef9c1b572382eb9dc8a334ebbef4e8 100644
--- a/packages/Catch2/include/internal/catch_capture_matchers.h
+++ b/packages/Catch2/include/internal/catch_capture_matchers.h
@@ -10,6 +10,7 @@
 
 #include "catch_capture.hpp"
 #include "catch_matchers.h"
+#include "catch_matchers_exception.hpp"
 #include "catch_matchers_floating.h"
 #include "catch_matchers_generic.hpp"
 #include "catch_matchers_string.h"
diff --git a/packages/Catch2/include/internal/catch_commandline.cpp b/packages/Catch2/include/internal/catch_commandline.cpp
index 66759ebbf168c842d48ef8ad356f612640108fd0..365a3c9d6ce9ab5265a65cdc2e780cc498867cbd 100644
--- a/packages/Catch2/include/internal/catch_commandline.cpp
+++ b/packages/Catch2/include/internal/catch_commandline.cpp
@@ -49,9 +49,15 @@ namespace Catch {
                     if( !line.empty() && !startsWith( line, '#' ) ) {
                         if( !startsWith( line, '"' ) )
                             line = '"' + line + '"';
-                        config.testsOrTags.push_back( line + ',' );
+                        config.testsOrTags.push_back( line );
+                        config.testsOrTags.push_back( "," );
+                        
                     }
                 }
+                //Remove comma in the end
+                if(!config.testsOrTags.empty())
+                    config.testsOrTags.erase( config.testsOrTags.end()-1 );
+                
                 return ParserResult::ok( ParseResultType::Matched );
             };
         auto const setTestOrder = [&]( std::string const& order ) {
@@ -196,11 +202,19 @@ namespace Catch {
             | Opt( setWaitForKeypress, "start|exit|both" )
                 ["--wait-for-keypress"]
                 ( "waits for a keypress before exiting" )
-            | Opt( config.benchmarkResolutionMultiple, "multiplier" )
-                ["--benchmark-resolution-multiple"]
-                ( "multiple of clock resolution to run benchmarks" )
-
-            | Arg( config.testsOrTags, "test name|pattern|tags" )
+            | Opt( config.benchmarkSamples, "samples" )
+                ["--benchmark-samples"]
+                ( "number of samples to collect (default: 100)" )
+            | Opt( config.benchmarkResamples, "resamples" )
+                ["--benchmark-resamples"]
+                ( "number of resamples for the bootstrap (default: 100000)" )
+            | Opt( config.benchmarkConfidenceInterval, "confidence interval" )
+                ["--benchmark-confidence-interval"]
+                ( "confidence interval for the bootstrap (between 0 and 1, default: 0.95)" )
+            | Opt( config.benchmarkNoAnalysis )
+                ["--benchmark-no-analysis"]
+                ( "perform only measurements; do not perform any analysis" )
+			| Arg( config.testsOrTags, "test name|pattern|tags" )
                 ( "which test or tests to use" );
 
         return cli;
diff --git a/packages/Catch2/include/internal/catch_common.cpp b/packages/Catch2/include/internal/catch_common.cpp
index b2fca4c4c330577952027458885a94b19f858b9b..790acbe5389e7dcaa97c688e646e168f2132da5b 100644
--- a/packages/Catch2/include/internal/catch_common.cpp
+++ b/packages/Catch2/include/internal/catch_common.cpp
@@ -15,9 +15,6 @@
 
 namespace Catch {
 
-    bool SourceLineInfo::empty() const noexcept {
-        return file[0] == '\0';
-    }
     bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {
         return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);
     }
diff --git a/packages/Catch2/include/internal/catch_common.h b/packages/Catch2/include/internal/catch_common.h
index e474562204e10e99fdd5b74db7ee0db4d275e555..5e097fbf83a98bb3ba5dac6a24572c717f06a7cc 100644
--- a/packages/Catch2/include/internal/catch_common.h
+++ b/packages/Catch2/include/internal/catch_common.h
@@ -57,7 +57,7 @@ namespace Catch {
         SourceLineInfo( SourceLineInfo&& )              noexcept = default;
         SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default;
 
-        bool empty() const noexcept;
+        bool empty() const noexcept { return file[0] == '\0'; }
         bool operator == ( SourceLineInfo const& other ) const noexcept;
         bool operator < ( SourceLineInfo const& other ) const noexcept;
 
diff --git a/packages/Catch2/include/internal/catch_compiler_capabilities.h b/packages/Catch2/include/internal/catch_compiler_capabilities.h
index 012bf462a8a5bb2ac0be0c229ab02a9f0b5e9507..4daa5e8ffaec9d07e0bdb2e296334ca8ba2928e8 100644
--- a/packages/Catch2/include/internal/catch_compiler_capabilities.h
+++ b/packages/Catch2/include/internal/catch_compiler_capabilities.h
@@ -64,6 +64,17 @@
 #       define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS \
             _Pragma( "clang diagnostic pop" )
 
+#       define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+            _Pragma( "clang diagnostic push" ) \
+            _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
+#       define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
+            _Pragma( "clang diagnostic pop" )
+
+#       define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+            _Pragma( "clang diagnostic push" ) \
+            _Pragma( "clang diagnostic ignored \"-Wunused-template\"" )
+#       define CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+            _Pragma( "clang diagnostic pop" )
 #endif // __clang__
 
 
@@ -88,6 +99,7 @@
 // Android somehow still does not support std::to_string
 #if defined(__ANDROID__)
 #    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
+#    define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE
 #endif
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -109,12 +121,12 @@
 // Required for some versions of Cygwin to declare gettimeofday
 // see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin
 #   define _BSD_SOURCE
-// some versions of cygwin (most) do not support std::to_string. Use the libstd check. 
+// some versions of cygwin (most) do not support std::to_string. Use the libstd check.
 // https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813
 # if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
-	       && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
+           && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
 
-#	define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
+#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
 
 # endif
 #endif // __CYGWIN__
@@ -142,7 +154,11 @@
 #  if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL)
 #    define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
 #  endif
+#endif // _MSC_VER
 
+#if defined(_REENTRANT) || defined(_MSC_VER)
+// Enable async processing, as -pthread is specified or no additional linking is required
+# define CATCH_INTERNAL_CONFIG_USE_ASYNC
 #endif // _MSC_VER
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -174,41 +190,55 @@
     #define CATCH_INTERNAL_CONFIG_COUNTER
 #endif
 
+
 ////////////////////////////////////////////////////////////////////////////////
-// Check if string_view is available and usable
-// The check is split apart to work around v140 (VS2015) preprocessor issue...
-#if defined(__has_include)
-#if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)
-#    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW
-#endif
+
+// RTX is a special version of Windows that is real time.
+// This means that it is detected as Windows, but does not provide
+// the same set of capabilities as real Windows does.
+#if defined(UNDER_RTSS) || defined(RTX64_BUILD)
+    #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH
+    #define CATCH_INTERNAL_CONFIG_NO_ASYNC
+    #define CATCH_CONFIG_COLOUR_NONE
 #endif
 
-////////////////////////////////////////////////////////////////////////////////
-// Check if optional is available and usable
-#if defined(__has_include)
-#  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
-#    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL
-#  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
-#endif // __has_include
+#if defined(__UCLIBC__)
+#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER
+#endif
 
-////////////////////////////////////////////////////////////////////////////////
-// Check if variant is available and usable
+// Various stdlib support checks that require __has_include
 #if defined(__has_include)
-#  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
-#    if defined(__clang__) && (__clang_major__ < 8)
-       // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852
-       // fix should be in clang 8, workaround in libstdc++ 8.2
-#      include <ciso646>
-#      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
-#        define CATCH_CONFIG_NO_CPP17_VARIANT
-#      else
-#        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
-#      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
-#    else
-#      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
-#    endif // defined(__clang__) && (__clang_major__ < 8)
-#  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
-#endif // __has_include
+  // Check if string_view is available and usable
+  #if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)
+  #    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW
+  #endif
+
+  // Check if optional is available and usable
+  #  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
+  #    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL
+  #  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
+
+  // Check if byte is available and usable
+  #  if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
+  #    define CATCH_INTERNAL_CONFIG_CPP17_BYTE
+  #  endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
+
+  // Check if variant is available and usable
+  #  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
+  #    if defined(__clang__) && (__clang_major__ < 8)
+         // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852
+         // fix should be in clang 8, workaround in libstdc++ 8.2
+  #      include <ciso646>
+  #      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
+  #        define CATCH_CONFIG_NO_CPP17_VARIANT
+  #      else
+  #        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
+  #      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
+  #    else
+  #      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
+  #    endif // defined(__clang__) && (__clang_major__ < 8)
+  #  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
+#endif // defined(__has_include)
 
 
 #if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER)
@@ -246,6 +276,11 @@
 #  define CATCH_CONFIG_CPP17_VARIANT
 #endif
 
+#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE)
+#  define CATCH_CONFIG_CPP17_BYTE
+#endif
+
+
 #if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
 #  define CATCH_INTERNAL_CONFIG_NEW_CAPTURE
 #endif
@@ -262,6 +297,18 @@
 #  define CATCH_CONFIG_POLYFILL_ISNAN
 #endif
 
+#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC)  && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC)
+#  define CATCH_CONFIG_USE_ASYNC
+#endif
+
+#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE)
+#  define CATCH_CONFIG_ANDROID_LOGWRITE
+#endif
+
+#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+#  define CATCH_CONFIG_GLOBAL_NEXTAFTER
+#endif
+
 #if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)
 #   define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
 #   define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
@@ -274,6 +321,23 @@
 #   define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS
 #   define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
 #endif
+#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS)
+#   define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS
+#   define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS
+#endif
+
+#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10)
+#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
+#   undef CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS
+#elif defined(__clang__) && (__clang_major__ < 5)
+#   undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
+#   undef CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS
+#endif
+
+#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS)
+#   define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
+#   define CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS
+#endif
 
 #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
 #define CATCH_TRY if ((true))
diff --git a/packages/Catch2/include/internal/catch_config.cpp b/packages/Catch2/include/internal/catch_config.cpp
index d9ee9182b2bd6f5e96b35c11023bed076df1f549..e222328b9790e3fe540252e6eee5b67806065ed6 100644
--- a/packages/Catch2/include/internal/catch_config.cpp
+++ b/packages/Catch2/include/internal/catch_config.cpp
@@ -15,11 +15,23 @@ namespace Catch {
     :   m_data( data ),
         m_stream( openStream() )
     {
+        // We need to trim filter specs to avoid trouble with superfluous
+        // whitespace (esp. important for bdd macros, as those are manually
+        // aligned with whitespace).
+
+        for (auto& elem : m_data.testsOrTags) {
+            elem = trim(elem);
+        }
+        for (auto& elem : m_data.sectionsToRun) {
+            elem = trim(elem);
+        }
+
         TestSpecParser parser(ITagAliasRegistry::get());
-        if (!data.testsOrTags.empty()) {
+        if (!m_data.testsOrTags.empty()) {
             m_hasTestFilters = true;
-            for( auto const& testOrTags : data.testsOrTags )
-                parser.parse( testOrTags );
+            for (auto const& testOrTags : m_data.testsOrTags) {
+                parser.parse(testOrTags);
+            }
         }
         m_testSpec = parser.testSpec();
     }
@@ -54,13 +66,17 @@ namespace Catch {
     ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; }
     RunTests::InWhatOrder Config::runOrder() const     { return m_data.runOrder; }
     unsigned int Config::rngSeed() const               { return m_data.rngSeed; }
-    int Config::benchmarkResolutionMultiple() const    { return m_data.benchmarkResolutionMultiple; }
     UseColour::YesOrNo Config::useColour() const       { return m_data.useColour; }
     bool Config::shouldDebugBreak() const              { return m_data.shouldDebugBreak; }
     int Config::abortAfter() const                     { return m_data.abortAfter; }
     bool Config::showInvisibles() const                { return m_data.showInvisibles; }
     Verbosity Config::verbosity() const                { return m_data.verbosity; }
 
+    bool Config::benchmarkNoAnalysis() const           { return m_data.benchmarkNoAnalysis; }
+    int Config::benchmarkSamples() const               { return m_data.benchmarkSamples; }
+    double Config::benchmarkConfidenceInterval() const { return m_data.benchmarkConfidenceInterval; }
+    unsigned int Config::benchmarkResamples() const    { return m_data.benchmarkResamples; }
+
     IStream const* Config::openStream() {
         return Catch::makeStream(m_data.outputFilename);
     }
diff --git a/packages/Catch2/include/internal/catch_config.hpp b/packages/Catch2/include/internal/catch_config.hpp
index 953badbdc6226c8068d789bc4f4654cd64748e9d..95b67d25fce0269424f8aaf9590d83066265fd29 100644
--- a/packages/Catch2/include/internal/catch_config.hpp
+++ b/packages/Catch2/include/internal/catch_config.hpp
@@ -42,7 +42,11 @@ namespace Catch {
 
         int abortAfter = -1;
         unsigned int rngSeed = 0;
-        int benchmarkResolutionMultiple = 100;
+
+        bool benchmarkNoAnalysis = false;
+        unsigned int benchmarkSamples = 100;
+        double benchmarkConfidenceInterval = 0.95;
+        unsigned int benchmarkResamples = 100000;
 
         Verbosity verbosity = Verbosity::Normal;
         WarnAbout::What warnings = WarnAbout::Nothing;
@@ -85,7 +89,7 @@ namespace Catch {
         std::vector<std::string> const& getTestsOrTags() const override;
         std::vector<std::string> const& getSectionsToRun() const override;
 
-        virtual TestSpec const& testSpec() const override;
+        TestSpec const& testSpec() const override;
         bool hasTestFilters() const override;
 
         bool showHelp() const;
@@ -100,12 +104,15 @@ namespace Catch {
         ShowDurations::OrNot showDurations() const override;
         RunTests::InWhatOrder runOrder() const override;
         unsigned int rngSeed() const override;
-        int benchmarkResolutionMultiple() const override;
         UseColour::YesOrNo useColour() const override;
         bool shouldDebugBreak() const override;
         int abortAfter() const override;
         bool showInvisibles() const override;
         Verbosity verbosity() const override;
+        bool benchmarkNoAnalysis() const override;
+        int benchmarkSamples() const override;
+        double benchmarkConfidenceInterval() const override;
+        unsigned int benchmarkResamples() const override;
 
     private:
 
diff --git a/packages/Catch2/include/internal/catch_console_colour.cpp b/packages/Catch2/include/internal/catch_console_colour.cpp
index 07072db6f95266e415d102973a2f8e433d9d03e1..1c4799f828d4c9b9e28c491ef0c7c67658520787 100644
--- a/packages/Catch2/include/internal/catch_console_colour.cpp
+++ b/packages/Catch2/include/internal/catch_console_colour.cpp
@@ -69,7 +69,7 @@ namespace {
             originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
         }
 
-        virtual void use( Colour::Code _colourCode ) override {
+        void use( Colour::Code _colourCode ) override {
             switch( _colourCode ) {
                 case Colour::None:      return setTextAttribute( originalForegroundAttributes );
                 case Colour::White:     return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );
@@ -132,7 +132,7 @@ namespace {
     // https://github.com/philsquared/Catch/pull/131
     class PosixColourImpl : public IColourImpl {
     public:
-        virtual void use( Colour::Code _colourCode ) override {
+        void use( Colour::Code _colourCode ) override {
             switch( _colourCode ) {
                 case Colour::None:
                 case Colour::White:     return setColour( "[0m" );
@@ -222,7 +222,13 @@ namespace Catch {
 
     void Colour::use( Code _colourCode ) {
         static IColourImpl* impl = platformColourInstance();
-        impl->use( _colourCode );
+        // Strictly speaking, this cannot possibly happen.
+        // However, under some conditions it does happen (see #1626),
+        // and this change is small enough that we can let practicality
+        // triumph over purity in this case.
+        if (impl != NULL) {
+            impl->use( _colourCode );
+        }
     }
 
     std::ostream& operator << ( std::ostream& os, Colour const& ) {
diff --git a/packages/Catch2/include/internal/catch_context.cpp b/packages/Catch2/include/internal/catch_context.cpp
index e116f28f57968010d14a24db89fabafe17f15117..e444a6b3f177a67bcc5301a3ac72956654144588 100644
--- a/packages/Catch2/include/internal/catch_context.cpp
+++ b/packages/Catch2/include/internal/catch_context.cpp
@@ -7,33 +7,34 @@
  */
 #include "catch_context.h"
 #include "catch_common.h"
+#include "catch_random_number_generator.h"
 
 namespace Catch {
 
     class Context : public IMutableContext, NonCopyable {
 
     public: // IContext
-        virtual IResultCapture* getResultCapture() override {
+        IResultCapture* getResultCapture() override {
             return m_resultCapture;
         }
-        virtual IRunner* getRunner() override {
+        IRunner* getRunner() override {
             return m_runner;
         }
 
-        virtual IConfigPtr const& getConfig() const override {
+        IConfigPtr const& getConfig() const override {
             return m_config;
         }
 
-        virtual ~Context() override;
+        ~Context() override;
 
     public: // IMutableContext
-        virtual void setResultCapture( IResultCapture* resultCapture ) override {
+        void setResultCapture( IResultCapture* resultCapture ) override {
             m_resultCapture = resultCapture;
         }
-        virtual void setRunner( IRunner* runner ) override {
+        void setRunner( IRunner* runner ) override {
             m_runner = runner;
         }
-        virtual void setConfig( IConfigPtr const& config ) override {
+        void setConfig( IConfigPtr const& config ) override {
             m_config = config;
         }
 
@@ -59,4 +60,11 @@ namespace Catch {
     IContext::~IContext() = default;
     IMutableContext::~IMutableContext() = default;
     Context::~Context() = default;
+
+
+    SimplePcg32& rng() {
+        static SimplePcg32 s_rng;
+        return s_rng;
+    }
+
 }
diff --git a/packages/Catch2/include/internal/catch_context.h b/packages/Catch2/include/internal/catch_context.h
index 3d3c6bad4638ad74744de4c071af3faef1d6b628..c579c3992f19724dd4a193400bee46076ddaab4e 100644
--- a/packages/Catch2/include/internal/catch_context.h
+++ b/packages/Catch2/include/internal/catch_context.h
@@ -46,6 +46,7 @@ namespace Catch {
     {
         if( !IMutableContext::currentContext )
             IMutableContext::createContext();
+        // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn)
         return *IMutableContext::currentContext;
     }
 
@@ -55,6 +56,9 @@ namespace Catch {
     }
 
     void cleanUpContext();
+
+    class SimplePcg32;
+    SimplePcg32& rng();
 }
 
 #endif // TWOBLUECUBES_CATCH_CONTEXT_H_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_debug_console.cpp b/packages/Catch2/include/internal/catch_debug_console.cpp
index 5d25f651c0a24fdceaec6fa2d288e86b33561315..a341d810897a55f3d5415849d31869865c2ba5e7 100644
--- a/packages/Catch2/include/internal/catch_debug_console.cpp
+++ b/packages/Catch2/include/internal/catch_debug_console.cpp
@@ -7,11 +7,21 @@
  */
 
 #include "catch_debug_console.h"
+#include "catch_compiler_capabilities.h"
 #include "catch_stream.h"
 #include "catch_platform.h"
 #include "catch_windows_h_proxy.h"
 
-#ifdef CATCH_PLATFORM_WINDOWS
+#if defined(CATCH_CONFIG_ANDROID_LOGWRITE)
+#include <android/log.h>
+
+    namespace Catch {
+        void writeToDebugConsole( std::string const& text ) {
+            __android_log_write( ANDROID_LOG_DEBUG, "Catch", text.c_str() );
+        }
+    }
+
+#elif defined(CATCH_PLATFORM_WINDOWS)
 
     namespace Catch {
         void writeToDebugConsole( std::string const& text ) {
diff --git a/packages/Catch2/include/internal/catch_enforce.cpp b/packages/Catch2/include/internal/catch_enforce.cpp
index f4db1c150b8e7c944422ca4236564709352bb523..903d43be233440766828518500c5e482f8470c22 100644
--- a/packages/Catch2/include/internal/catch_enforce.cpp
+++ b/packages/Catch2/include/internal/catch_enforce.cpp
@@ -7,6 +7,9 @@
 
 #include "catch_enforce.h"
 
+#include <stdexcept>
+
+
 namespace Catch {
 #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER)
     [[noreturn]]
@@ -16,4 +19,22 @@ namespace Catch {
         std::terminate();
     }
 #endif
+
+    [[noreturn]]
+    void throw_logic_error(std::string const& msg) {
+        throw_exception(std::logic_error(msg));
+    }
+
+    [[noreturn]]
+    void throw_domain_error(std::string const& msg) {
+        throw_exception(std::domain_error(msg));
+    }
+
+    [[noreturn]]
+    void throw_runtime_error(std::string const& msg) {
+        throw_exception(std::runtime_error(msg));
+    }
+
+
+
 } // namespace Catch;
diff --git a/packages/Catch2/include/internal/catch_enforce.h b/packages/Catch2/include/internal/catch_enforce.h
index 0069402302d910a4b4397f1bef76d5698af8b156..0484724d2af8109831e0098fd280b305defd88e5 100644
--- a/packages/Catch2/include/internal/catch_enforce.h
+++ b/packages/Catch2/include/internal/catch_enforce.h
@@ -11,8 +11,7 @@
 #include "catch_compiler_capabilities.h"
 #include "catch_stream.h"
 
-
-#include <stdexcept>
+#include <exception>
 
 namespace Catch {
 #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
@@ -25,18 +24,30 @@ namespace Catch {
     [[noreturn]]
     void throw_exception(std::exception const& e);
 #endif
+
+    [[noreturn]]
+    void throw_logic_error(std::string const& msg);
+    [[noreturn]]
+    void throw_domain_error(std::string const& msg);
+    [[noreturn]]
+    void throw_runtime_error(std::string const& msg);
+
 } // namespace Catch;
 
-#define CATCH_PREPARE_EXCEPTION( type, msg ) \
-    type( ( Catch::ReusableStringStream() << msg ).str() )
-#define CATCH_INTERNAL_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg))
-#define CATCH_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::domain_error, msg ))
-#define CATCH_RUNTIME_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg ))
-#define CATCH_ENFORCE( condition, msg ) \
-    do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false)
+#define CATCH_MAKE_MSG(...) \
+    (Catch::ReusableStringStream() << __VA_ARGS__).str()
+
+#define CATCH_INTERNAL_ERROR(...) \
+    Catch::throw_logic_error(CATCH_MAKE_MSG( CATCH_INTERNAL_LINEINFO << ": Internal Catch2 error: " << __VA_ARGS__))
+
+#define CATCH_ERROR(...) \
+    Catch::throw_domain_error(CATCH_MAKE_MSG( __VA_ARGS__ ))
+
+#define CATCH_RUNTIME_ERROR(...) \
+    Catch::throw_runtime_error(CATCH_MAKE_MSG( __VA_ARGS__ ))
+
+#define CATCH_ENFORCE( condition, ... ) \
+    do{ if( !(condition) ) CATCH_ERROR( __VA_ARGS__ ); } while(false)
 
 
 #endif // TWOBLUECUBES_CATCH_ENFORCE_H_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_enum_values_registry.cpp b/packages/Catch2/include/internal/catch_enum_values_registry.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fb060f5b477eeaaf85658f360ae0665920c7542c
--- /dev/null
+++ b/packages/Catch2/include/internal/catch_enum_values_registry.cpp
@@ -0,0 +1,75 @@
+/*
+ *  Created by Phil on 4/4/2019.
+ *  Copyright 2019 Two Blue Cubes Ltd. All rights reserved.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#include "catch_enum_values_registry.h"
+#include "catch_string_manip.h"
+#include "catch_stream.h"
+
+#include <map>
+#include <cassert>
+
+namespace Catch {
+
+    IMutableEnumValuesRegistry::~IMutableEnumValuesRegistry() {}
+
+    namespace Detail {
+
+        namespace {
+            // Extracts the actual name part of an enum instance
+            // In other words, it returns the Blue part of Bikeshed::Colour::Blue
+            StringRef extractInstanceName(StringRef enumInstance) {
+                // Find last occurence of ":"
+                size_t name_start = enumInstance.size();
+                while (name_start > 0 && enumInstance[name_start - 1] != ':') {
+                    --name_start;
+                }
+                return enumInstance.substr(name_start, enumInstance.size() - name_start);
+            }
+        }
+
+        std::vector<StringRef> parseEnums( StringRef enums ) {
+            auto enumValues = splitStringRef( enums, ',' );
+            std::vector<StringRef> parsed;
+            parsed.reserve( enumValues.size() );
+            for( auto const& enumValue : enumValues ) {
+                parsed.push_back(trim(extractInstanceName(enumValue)));
+            }
+            return parsed;
+        }
+
+        EnumInfo::~EnumInfo() {}
+
+        StringRef EnumInfo::lookup( int value ) const {
+            for( auto const& valueToName : m_values ) {
+                if( valueToName.first == value )
+                    return valueToName.second;
+            }
+            return "{** unexpected enum value **}"_sr;
+        }
+
+        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {
+            std::unique_ptr<EnumInfo> enumInfo( new EnumInfo );
+            enumInfo->m_name = enumName;
+            enumInfo->m_values.reserve( values.size() );
+
+            const auto valueNames = Catch::Detail::parseEnums( allValueNames );
+            assert( valueNames.size() == values.size() );
+            std::size_t i = 0;
+            for( auto value : values )
+                enumInfo->m_values.push_back({ value, valueNames[i++] });
+
+            return enumInfo;
+        }
+
+        EnumInfo const& EnumValuesRegistry::registerEnum( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {
+            m_enumInfos.push_back(makeEnumInfo(enumName, allValueNames, values));
+            return *m_enumInfos.back();
+        }
+
+    } // Detail
+} // Catch
+
diff --git a/packages/Catch2/include/internal/catch_enum_values_registry.h b/packages/Catch2/include/internal/catch_enum_values_registry.h
new file mode 100644
index 0000000000000000000000000000000000000000..ae252fbf32151acd802b2c13285c0a4610748f1f
--- /dev/null
+++ b/packages/Catch2/include/internal/catch_enum_values_registry.h
@@ -0,0 +1,35 @@
+/*
+ *  Created by Phil on 4/4/2019.
+ *  Copyright 2019 Two Blue Cubes Ltd. All rights reserved.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef TWOBLUECUBES_CATCH_ENUMVALUESREGISTRY_H_INCLUDED
+#define TWOBLUECUBES_CATCH_ENUMVALUESREGISTRY_H_INCLUDED
+
+#include "catch_interfaces_enum_values_registry.h"
+
+#include <vector>
+#include <memory>
+
+namespace Catch {
+
+    namespace Detail {
+
+        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values );
+
+        class EnumValuesRegistry : public IMutableEnumValuesRegistry {
+
+            std::vector<std::unique_ptr<EnumInfo>> m_enumInfos;
+
+            EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;
+        };
+
+        std::vector<StringRef> parseEnums( StringRef enums );
+
+    } // Detail
+
+} // Catch
+
+#endif //TWOBLUECUBES_CATCH_ENUMVALUESREGISTRY_H_INCLUDED
\ No newline at end of file
diff --git a/packages/Catch2/include/internal/catch_exception_translator_registry.h b/packages/Catch2/include/internal/catch_exception_translator_registry.h
index da2f4f12fba7d6c69f10769095ff260b95e09024..bb07c13133e65a7598d41519c75c9fd82f1076a3 100644
--- a/packages/Catch2/include/internal/catch_exception_translator_registry.h
+++ b/packages/Catch2/include/internal/catch_exception_translator_registry.h
@@ -19,7 +19,7 @@ namespace Catch {
     public:
         ~ExceptionTranslatorRegistry();
         virtual void registerTranslator( const IExceptionTranslator* translator );
-        virtual std::string translateActiveException() const override;
+        std::string translateActiveException() const override;
         std::string tryTranslators() const;
 
     private:
diff --git a/packages/Catch2/include/internal/catch_fatal_condition.cpp b/packages/Catch2/include/internal/catch_fatal_condition.cpp
index cea271f38499e32dc2d72795022c67d02b9f50cb..1eb6bb8754fdf0805680cd939b4784593795b4c9 100644
--- a/packages/Catch2/include/internal/catch_fatal_condition.cpp
+++ b/packages/Catch2/include/internal/catch_fatal_condition.cpp
@@ -97,7 +97,7 @@ namespace Catch {
     
     // 32kb for the alternate stack seems to be sufficient. However, this value
     // is experimentally determined, so that's not guaranteed.
-    constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
+    static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
 
     static SignalDefs signalDefs[] = {
         { SIGINT,  "SIGINT - Terminal interrupt signal" },
diff --git a/packages/Catch2/include/internal/catch_generators.hpp b/packages/Catch2/include/internal/catch_generators.hpp
index 8f06b8c6cd88333ee7d38601ac6ed2ca06686d29..ea575c85ce9f916795e3e9ecfb5af5201f20273c 100644
--- a/packages/Catch2/include/internal/catch_generators.hpp
+++ b/packages/Catch2/include/internal/catch_generators.hpp
@@ -70,6 +70,9 @@ namespace Generators {
 
     template<typename T>
     class FixedValuesGenerator final : public IGenerator<T> {
+        static_assert(!std::is_same<T, bool>::value,
+            "FixedValuesGenerator does not support bools because of std::vector<bool>"
+            "specialization, use SingleValue Generator instead.");
         std::vector<T> m_values;
         size_t m_idx = 0;
     public:
diff --git a/packages/Catch2/include/internal/catch_generators_generic.hpp b/packages/Catch2/include/internal/catch_generators_generic.hpp
index 2903ba69dd581c17e8d9519e556585b5fd170bd7..81fd38578834e5e8b5063acc75f3d609b8e68c92 100644
--- a/packages/Catch2/include/internal/catch_generators_generic.hpp
+++ b/packages/Catch2/include/internal/catch_generators_generic.hpp
@@ -91,6 +91,9 @@ namespace Generators {
 
     template <typename T>
     class RepeatGenerator : public IGenerator<T> {
+        static_assert(!std::is_same<T, bool>::value,
+            "RepeatGenerator currently does not support bools"
+            "because of std::vector<bool> specialization");
         GeneratorWrapper<T> m_generator;
         mutable std::vector<T> m_returned;
         size_t m_target_repeats;
@@ -205,12 +208,14 @@ namespace Generators {
             m_chunk_size(size), m_generator(std::move(generator))
         {
             m_chunk.reserve(m_chunk_size);
-            m_chunk.push_back(m_generator.get());
-            for (size_t i = 1; i < m_chunk_size; ++i) {
-                if (!m_generator.next()) {
-                    Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
-                }
+            if (m_chunk_size != 0) {
                 m_chunk.push_back(m_generator.get());
+                for (size_t i = 1; i < m_chunk_size; ++i) {
+                    if (!m_generator.next()) {
+                        Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
+                    }
+                    m_chunk.push_back(m_generator.get());
+                }
             }
         }
         std::vector<T> const& get() const override {
diff --git a/packages/Catch2/include/internal/catch_generators_specific.hpp b/packages/Catch2/include/internal/catch_generators_specific.hpp
index 7aae06bd5a875da8f4b4475bfdd4fcbb3e2a96f3..f57d29b6214063c2e672d1505bf68b26c696e78d 100644
--- a/packages/Catch2/include/internal/catch_generators_specific.hpp
+++ b/packages/Catch2/include/internal/catch_generators_specific.hpp
@@ -10,6 +10,7 @@
 #include "catch_context.h"
 #include "catch_generators.hpp"
 #include "catch_interfaces_config.h"
+#include "catch_random_number_generator.h"
 
 #include <random>
 
@@ -18,14 +19,13 @@ namespace Generators {
 
 template <typename Float>
 class RandomFloatingGenerator final : public IGenerator<Float> {
-    // FIXME: What is the right seed?
-    std::minstd_rand m_rand;
+    Catch::SimplePcg32& m_rng;
     std::uniform_real_distribution<Float> m_dist;
     Float m_current_number;
 public:
 
     RandomFloatingGenerator(Float a, Float b):
-        m_rand(getCurrentContext().getConfig()->rngSeed()),
+        m_rng(rng()),
         m_dist(a, b) {
         static_cast<void>(next());
     }
@@ -34,20 +34,20 @@ public:
         return m_current_number;
     }
     bool next() override {
-        m_current_number = m_dist(m_rand);
+        m_current_number = m_dist(m_rng);
         return true;
     }
 };
 
 template <typename Integer>
 class RandomIntegerGenerator final : public IGenerator<Integer> {
-    std::minstd_rand m_rand;
+    Catch::SimplePcg32& m_rng;
     std::uniform_int_distribution<Integer> m_dist;
     Integer m_current_number;
 public:
 
     RandomIntegerGenerator(Integer a, Integer b):
-        m_rand(getCurrentContext().getConfig()->rngSeed()),
+        m_rng(rng()),
         m_dist(a, b) {
         static_cast<void>(next());
     }
@@ -56,7 +56,7 @@ public:
         return m_current_number;
     }
     bool next() override {
-        m_current_number = m_dist(m_rand);
+        m_current_number = m_dist(m_rng);
         return true;
     }
 };
@@ -128,6 +128,46 @@ GeneratorWrapper<T> range(T const& start, T const& end) {
 }
 
 
+template <typename T>
+class IteratorGenerator final : public IGenerator<T> {
+    static_assert(!std::is_same<T, bool>::value,
+        "IteratorGenerator currently does not support bools"
+        "because of std::vector<bool> specialization");
+
+    std::vector<T> m_elems;
+    size_t m_current = 0;
+public:
+    template <typename InputIterator, typename InputSentinel>
+    IteratorGenerator(InputIterator first, InputSentinel last):m_elems(first, last) {
+        if (m_elems.empty()) {
+            Catch::throw_exception(GeneratorException("IteratorGenerator received no valid values"));
+        }
+    }
+
+    T const& get() const override {
+        return m_elems[m_current];
+    }
+
+    bool next() override {
+        ++m_current;
+        return m_current != m_elems.size();
+    }
+};
+
+template <typename InputIterator,
+          typename InputSentinel,
+          typename ResultType = typename std::iterator_traits<InputIterator>::value_type>
+GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) {
+    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(from, to));
+}
+
+template <typename Container,
+          typename ResultType = typename Container::value_type>
+GeneratorWrapper<ResultType> from_range(Container const& cnt) {
+    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end()));
+}
+
+
 } // namespace Generators
 } // namespace Catch
 
diff --git a/packages/Catch2/include/internal/catch_interfaces_capture.h b/packages/Catch2/include/internal/catch_interfaces_capture.h
index 36f27a331b9246558c3c95d0ac4d7ec12d918af7..8c25c8cf7659e9ccf326a452412b1728158aba24 100644
--- a/packages/Catch2/include/internal/catch_interfaces_capture.h
+++ b/packages/Catch2/include/internal/catch_interfaces_capture.h
@@ -9,6 +9,7 @@
 #define TWOBLUECUBES_CATCH_INTERFACES_CAPTURE_H_INCLUDED
 
 #include <string>
+#include <chrono>
 
 #include "catch_stringref.h"
 #include "catch_result_type.h"
@@ -22,14 +23,18 @@ namespace Catch {
     struct MessageInfo;
     struct MessageBuilder;
     struct Counts;
-    struct BenchmarkInfo;
-    struct BenchmarkStats;
     struct AssertionReaction;
     struct SourceLineInfo;
 
     struct ITransientExpression;
     struct IGeneratorTracker;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    struct BenchmarkInfo;
+    template <typename Duration = std::chrono::duration<double, std::nano>>
+    struct BenchmarkStats;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     struct IResultCapture {
 
         virtual ~IResultCapture();
@@ -41,8 +46,12 @@ namespace Catch {
 
         virtual auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        virtual void benchmarkPreparing( std::string const& name ) = 0;
         virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0;
-        virtual void benchmarkEnded( BenchmarkStats const& stats ) = 0;
+        virtual void benchmarkEnded( BenchmarkStats<> const& stats ) = 0;
+        virtual void benchmarkFailed( std::string const& error ) = 0;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         virtual void pushScopedMessage( MessageInfo const& message ) = 0;
         virtual void popScopedMessage( MessageInfo const& message ) = 0;
diff --git a/packages/Catch2/include/internal/catch_interfaces_config.cpp b/packages/Catch2/include/internal/catch_interfaces_config.cpp
index b6f5daa2de8c4ea000d24c1dc7b67d67a0603f9c..6617da691992a6ab79fe341cd0f445791cb550e0 100644
--- a/packages/Catch2/include/internal/catch_interfaces_config.cpp
+++ b/packages/Catch2/include/internal/catch_interfaces_config.cpp
@@ -1,4 +1,4 @@
-#include "internal/catch_interfaces_config.h"
+#include "catch_interfaces_config.h"
 
 namespace Catch {
     IConfig::~IConfig() = default;
diff --git a/packages/Catch2/include/internal/catch_interfaces_config.h b/packages/Catch2/include/internal/catch_interfaces_config.h
index 341bb7420501f70cdade5c570a49a8277b88e03d..f8cbf71c86b73c51139e8cfc9d152c2676e53097 100644
--- a/packages/Catch2/include/internal/catch_interfaces_config.h
+++ b/packages/Catch2/include/internal/catch_interfaces_config.h
@@ -9,6 +9,7 @@
 #define TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED
 
 #include "catch_common.h"
+#include "catch_option.hpp"
 
 #include <iosfwd>
 #include <string>
@@ -50,7 +51,7 @@ namespace Catch {
         BeforeExit = 2,
         BeforeStartAndExit = BeforeStart | BeforeExit
     }; };
-
+    
     class TestSpec;
 
     struct IConfig : NonCopyable {
@@ -72,10 +73,14 @@ namespace Catch {
         virtual std::vector<std::string> const& getTestsOrTags() const = 0;
         virtual RunTests::InWhatOrder runOrder() const = 0;
         virtual unsigned int rngSeed() const = 0;
-        virtual int benchmarkResolutionMultiple() const = 0;
         virtual UseColour::YesOrNo useColour() const = 0;
         virtual std::vector<std::string> const& getSectionsToRun() const = 0;
         virtual Verbosity verbosity() const = 0;
+
+        virtual bool benchmarkNoAnalysis() const = 0;
+        virtual int benchmarkSamples() const = 0;
+        virtual double benchmarkConfidenceInterval() const = 0;
+        virtual unsigned int benchmarkResamples() const = 0;
     };
 
     using IConfigPtr = std::shared_ptr<IConfig const>;
diff --git a/packages/Catch2/include/internal/catch_interfaces_enum_values_registry.h b/packages/Catch2/include/internal/catch_interfaces_enum_values_registry.h
new file mode 100644
index 0000000000000000000000000000000000000000..81592c9bd22421eb3bbece87800527925962274c
--- /dev/null
+++ b/packages/Catch2/include/internal/catch_interfaces_enum_values_registry.h
@@ -0,0 +1,46 @@
+/*
+ *  Created by Phil on 4/4/2019.
+ *  Copyright 2019 Two Blue Cubes Ltd. All rights reserved.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef TWOBLUECUBES_CATCH_INTERFACESENUMVALUESREGISTRY_H_INCLUDED
+#define TWOBLUECUBES_CATCH_INTERFACESENUMVALUESREGISTRY_H_INCLUDED
+
+#include "catch_stringref.h"
+
+#include <vector>
+
+namespace Catch {
+
+    namespace Detail {
+        struct EnumInfo {
+            StringRef m_name;
+            std::vector<std::pair<int, StringRef>> m_values;
+
+            ~EnumInfo();
+
+            StringRef lookup( int value ) const;
+        };
+    } // namespace Detail
+
+    struct IMutableEnumValuesRegistry {
+        virtual ~IMutableEnumValuesRegistry();
+
+        virtual Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values ) = 0;
+
+        template<typename E>
+        Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::initializer_list<E> values ) {
+            static_assert(sizeof(int) >= sizeof(E), "Cannot serialize enum to int");
+            std::vector<int> intValues;
+            intValues.reserve( values.size() );
+            for( auto enumValue : values )
+                intValues.push_back( static_cast<int>( enumValue ) );
+            return registerEnum( enumName, allEnums, intValues );
+        }
+    };
+
+} // Catch
+
+#endif //TWOBLUECUBES_CATCH_INTERFACESENUMVALUESREGISTRY_H_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_interfaces_exception.cpp b/packages/Catch2/include/internal/catch_interfaces_exception.cpp
index 8494a2ccdab25551b611c29674c693476ffa4677..705d8c87a66ba678cd8de2a92f97011406f193bc 100644
--- a/packages/Catch2/include/internal/catch_interfaces_exception.cpp
+++ b/packages/Catch2/include/internal/catch_interfaces_exception.cpp
@@ -1,4 +1,4 @@
-#include "internal/catch_interfaces_exception.h"
+#include "catch_interfaces_exception.h"
 
 namespace Catch {
     IExceptionTranslator::~IExceptionTranslator() = default;
diff --git a/packages/Catch2/include/internal/catch_interfaces_registry_hub.cpp b/packages/Catch2/include/internal/catch_interfaces_registry_hub.cpp
index bd5b8082c267ddfa6b36a3920da6250bb6063fae..7a22d649e95b5614dcc9bbb67ad78d74cfa87a06 100644
--- a/packages/Catch2/include/internal/catch_interfaces_registry_hub.cpp
+++ b/packages/Catch2/include/internal/catch_interfaces_registry_hub.cpp
@@ -1,4 +1,4 @@
-#include "internal/catch_interfaces_registry_hub.h"
+#include "catch_interfaces_registry_hub.h"
 
 namespace Catch {
     IRegistryHub::~IRegistryHub() = default;
diff --git a/packages/Catch2/include/internal/catch_interfaces_registry_hub.h b/packages/Catch2/include/internal/catch_interfaces_registry_hub.h
index 8e1da61e029bddca45776b673331aee267d943a9..19ffbf2635f5dd8696e8267f4c0e2f0c4cdd7abc 100644
--- a/packages/Catch2/include/internal/catch_interfaces_registry_hub.h
+++ b/packages/Catch2/include/internal/catch_interfaces_registry_hub.h
@@ -22,6 +22,8 @@ namespace Catch {
     struct IReporterRegistry;
     struct IReporterFactory;
     struct ITagAliasRegistry;
+    struct IMutableEnumValuesRegistry;
+
     class StartupExceptionRegistry;
 
     using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;
@@ -32,7 +34,6 @@ namespace Catch {
         virtual IReporterRegistry const& getReporterRegistry() const = 0;
         virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0;
         virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0;
-
         virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0;
 
 
@@ -47,6 +48,7 @@ namespace Catch {
         virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;
         virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0;
         virtual void registerStartupException() noexcept = 0;
+        virtual IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() = 0;
     };
 
     IRegistryHub const& getRegistryHub();
diff --git a/packages/Catch2/include/internal/catch_interfaces_reporter.h b/packages/Catch2/include/internal/catch_interfaces_reporter.h
index e5fbf8bb0710fc453ac072f057488cb04dbe38cb..751ef2c240b12e78269f4dd06132344e7deaef08 100644
--- a/packages/Catch2/include/internal/catch_interfaces_reporter.h
+++ b/packages/Catch2/include/internal/catch_interfaces_reporter.h
@@ -18,12 +18,18 @@
 #include "catch_option.hpp"
 #include "catch_stringref.h"
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+#include "benchmark/catch_estimate.hpp"
+#include "benchmark/catch_outlier_classification.hpp"
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
 
 #include <string>
 #include <iosfwd>
 #include <map>
 #include <set>
 #include <memory>
+#include <algorithm>
 
 namespace Catch {
 
@@ -159,14 +165,43 @@ namespace Catch {
         bool aborting;
     };
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
     struct BenchmarkInfo {
         std::string name;
+        double estimatedDuration;
+        int iterations;
+        int samples;
+        unsigned int resamples;
+        double clockResolution;
+        double clockCost;
     };
+
+    template <class Duration>
     struct BenchmarkStats {
         BenchmarkInfo info;
-        std::size_t iterations;
-        uint64_t elapsedTimeInNanoseconds;
+
+        std::vector<Duration> samples;
+        Benchmark::Estimate<Duration> mean;
+        Benchmark::Estimate<Duration> standardDeviation;
+        Benchmark::OutlierClassification outliers;
+        double outlierVariance;
+
+        template <typename Duration2>
+        operator BenchmarkStats<Duration2>() const {
+            std::vector<Duration2> samples2;
+            samples2.reserve(samples.size());
+            std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });
+            return {
+                info,
+                std::move(samples2),
+                mean,
+                standardDeviation,
+                outliers,
+                outlierVariance,
+            };
+        }
     };
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
     struct IStreamingReporter {
         virtual ~IStreamingReporter() = default;
@@ -179,23 +214,26 @@ namespace Catch {
 
         virtual void noMatchingTestCases( std::string const& spec ) = 0;
 
+        virtual void reportInvalidArguments(std::string const&) {}
+        
         virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0;
         virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0;
 
         virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;
         virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;
 
-        // *** experimental ***
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        virtual void benchmarkPreparing( std::string const& ) {}
         virtual void benchmarkStarting( BenchmarkInfo const& ) {}
+        virtual void benchmarkEnded( BenchmarkStats<> const& ) {}
+        virtual void benchmarkFailed( std::string const& ) {}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;
 
         // The return value indicates if the messages buffer should be cleared:
         virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;
 
-        // *** experimental ***
-        virtual void benchmarkEnded( BenchmarkStats const& ) {}
-
         virtual void sectionEnded( SectionStats const& sectionStats ) = 0;
         virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;
         virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;
diff --git a/packages/Catch2/include/internal/catch_interfaces_runner.cpp b/packages/Catch2/include/internal/catch_interfaces_runner.cpp
index 2b052eb80f80ac9ac8bb35e41ede513355eb19d0..8d419a1447cd29e401ad9dabf3515ffa3871e196 100644
--- a/packages/Catch2/include/internal/catch_interfaces_runner.cpp
+++ b/packages/Catch2/include/internal/catch_interfaces_runner.cpp
@@ -1,4 +1,4 @@
-#include "internal/catch_interfaces_runner.h"
+#include "catch_interfaces_runner.h"
 
 namespace Catch {
     IRunner::~IRunner() = default;
diff --git a/packages/Catch2/include/internal/catch_interfaces_testcase.cpp b/packages/Catch2/include/internal/catch_interfaces_testcase.cpp
index 35c3db0820a3126cce2edb655b71dfb40a33b920..9b35e0342fea2d70993beaa17589b5274c7ab0e8 100644
--- a/packages/Catch2/include/internal/catch_interfaces_testcase.cpp
+++ b/packages/Catch2/include/internal/catch_interfaces_testcase.cpp
@@ -1,4 +1,4 @@
-#include "internal/catch_interfaces_testcase.h"
+#include "catch_interfaces_testcase.h"
 
 namespace Catch {
     ITestInvoker::~ITestInvoker() = default;
diff --git a/packages/Catch2/include/internal/catch_interfaces_testcase.h b/packages/Catch2/include/internal/catch_interfaces_testcase.h
index f57cc8fe7c6dc566d3b208492a81f15ef59e4c31..2492c07de6c5e3857924b50ca7731c3f50a8b3c9 100644
--- a/packages/Catch2/include/internal/catch_interfaces_testcase.h
+++ b/packages/Catch2/include/internal/catch_interfaces_testcase.h
@@ -28,6 +28,7 @@ namespace Catch {
         virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0;
     };
 
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config );
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );
     std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );
     std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );
diff --git a/packages/Catch2/include/internal/catch_list.cpp b/packages/Catch2/include/internal/catch_list.cpp
index e1d99222e49180c69f4f72f0d37f3c2bfd3e82c0..11e55140444f5d070a820c043b7e5e4b7825b55a 100644
--- a/packages/Catch2/include/internal/catch_list.cpp
+++ b/packages/Catch2/include/internal/catch_list.cpp
@@ -84,9 +84,18 @@ namespace Catch {
     }
 
     std::string TagInfo::all() const {
-        std::string out;
-        for( auto const& spelling : spellings )
-            out += "[" + spelling + "]";
+        size_t size = 0;
+        for (auto const& spelling : spellings) {
+            // Add 2 for the brackes
+            size += spelling.size() + 2;
+        }
+
+        std::string out; out.reserve(size);
+        for (auto const& spelling : spellings) {
+            out += '[';
+            out += spelling;
+            out += ']';
+        }
         return out;
     }
 
diff --git a/packages/Catch2/include/internal/catch_matchers.h b/packages/Catch2/include/internal/catch_matchers.h
index aebd4c23948b120b0f9e8b961a149fac188fc4cf..5b69c4a82045a811d43a97e7a95fed75c32c27e7 100644
--- a/packages/Catch2/include/internal/catch_matchers.h
+++ b/packages/Catch2/include/internal/catch_matchers.h
@@ -44,6 +44,15 @@ namespace Matchers {
             virtual bool match( ObjectT const& arg ) const = 0;
         };
 
+#if defined(__OBJC__)
+        // Hack to fix Catch GH issue #1661. Could use id for generic Object support.
+        // use of const for Object pointers is very uncommon and under ARC it causes some kind of signature mismatch that breaks compilation
+        template<>
+        struct MatcherMethod<NSString*> {
+            virtual bool match( NSString* arg ) const = 0;
+        };
+#endif
+
 #ifdef __clang__
 #    pragma clang diagnostic pop
 #endif
diff --git a/packages/Catch2/include/internal/catch_matchers_exception.cpp b/packages/Catch2/include/internal/catch_matchers_exception.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b18810e828c2114561bd41170e173eac3951956e
--- /dev/null
+++ b/packages/Catch2/include/internal/catch_matchers_exception.cpp
@@ -0,0 +1,30 @@
+/*
+ *  Created by Martin HoΕ™eňovskΓ½ on 13/10/2019.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include "catch_matchers_exception.hpp"
+
+
+namespace Catch {
+namespace Matchers {
+namespace Exception {
+
+bool ExceptionMessageMatcher::match(std::exception const& ex) const {
+    return ex.what() == m_message;
+}
+
+std::string ExceptionMessageMatcher::describe() const {
+    return "exception message matches \"" + m_message + "\"";
+}
+
+}
+Exception::ExceptionMessageMatcher Message(std::string const& message) {
+    return Exception::ExceptionMessageMatcher(message);
+}
+
+// namespace Exception
+} // namespace Matchers
+} // namespace Catch
diff --git a/packages/Catch2/include/internal/catch_matchers_exception.hpp b/packages/Catch2/include/internal/catch_matchers_exception.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..a80b3607b155bd05c318167623a81bb11e0def8a
--- /dev/null
+++ b/packages/Catch2/include/internal/catch_matchers_exception.hpp
@@ -0,0 +1,36 @@
+/*
+ *  Created by Martin HoΕ™eňovskΓ½ on 13/10/2019.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef TWOBLUECUBES_CATCH_MATCHERS_EXCEPTION_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_MATCHERS_EXCEPTION_HPP_INCLUDED
+
+#include "catch_matchers.h"
+
+namespace Catch {
+namespace Matchers {
+namespace Exception {
+
+class ExceptionMessageMatcher : public MatcherBase<std::exception> {
+    std::string m_message;
+public:
+
+    ExceptionMessageMatcher(std::string const& message):
+        m_message(message)
+    {}
+
+    bool match(std::exception const& ex) const override;
+
+    std::string describe() const override;
+};
+
+} // namespace Exception
+
+Exception::ExceptionMessageMatcher Message(std::string const& message);
+
+} // namespace Matchers
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_MATCHERS_EXCEPTION_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_matchers_floating.cpp b/packages/Catch2/include/internal/catch_matchers_floating.cpp
index 9bc082edea23cba86d93603c411af6f4a439d2f6..68fd1bda0541b93bf62e4f04b1eaeb4cb4ddb340 100644
--- a/packages/Catch2/include/internal/catch_matchers_floating.cpp
+++ b/packages/Catch2/include/internal/catch_matchers_floating.cpp
@@ -11,75 +11,120 @@
 #include "catch_to_string.hpp"
 #include "catch_tostring.h"
 
+#include <algorithm>
+#include <cmath>
 #include <cstdlib>
 #include <cstdint>
 #include <cstring>
+#include <sstream>
+#include <type_traits>
+#include <iomanip>
+#include <limits>
 
-namespace Catch {
-namespace Matchers {
-namespace Floating {
-enum class FloatingPointKind : uint8_t {
-    Float,
-    Double
-};
-}
-}
-}
 
+namespace Catch {
 namespace {
 
-template <typename T>
-struct Converter;
-
-template <>
-struct Converter<float> {
-    static_assert(sizeof(float) == sizeof(int32_t), "Important ULP matcher assumption violated");
-    Converter(float f) {
+    int32_t convert(float f) {
+        static_assert(sizeof(float) == sizeof(int32_t), "Important ULP matcher assumption violated");
+        int32_t i;
         std::memcpy(&i, &f, sizeof(f));
+        return i;
     }
-    int32_t i;
-};
 
-template <>
-struct Converter<double> {
-    static_assert(sizeof(double) == sizeof(int64_t), "Important ULP matcher assumption violated");
-    Converter(double d) {
+    int64_t convert(double d) {
+        static_assert(sizeof(double) == sizeof(int64_t), "Important ULP matcher assumption violated");
+        int64_t i;
         std::memcpy(&i, &d, sizeof(d));
+        return i;
     }
-    int64_t i;
-};
 
-template <typename T>
-auto convert(T t) -> Converter<T> {
-    return Converter<T>(t);
-}
+    template <typename FP>
+    bool almostEqualUlps(FP lhs, FP rhs, uint64_t maxUlpDiff) {
+        // Comparison with NaN should always be false.
+        // This way we can rule it out before getting into the ugly details
+        if (Catch::isnan(lhs) || Catch::isnan(rhs)) {
+            return false;
+        }
 
-template <typename FP>
-bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) {
-    // Comparison with NaN should always be false.
-    // This way we can rule it out before getting into the ugly details
-    if (Catch::isnan(lhs) || Catch::isnan(rhs)) {
-        return false;
+        auto lc = convert(lhs);
+        auto rc = convert(rhs);
+
+        if ((lc < 0) != (rc < 0)) {
+            // Potentially we can have +0 and -0
+            return lhs == rhs;
+        }
+
+        auto ulpDiff = std::abs(lc - rc);
+        return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;
+    }
+
+} //end anonymous namespace
+
+#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+
+#if defined(__clang__)
+#pragma clang diagnostic push
+// The long double overload is currently unused
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
+    float nextafter(float x, float y) {
+        return ::nextafterf(x, y);
     }
 
-    auto lc = convert(lhs);
-    auto rc = convert(rhs);
+    double nextafter(double x, double y) {
+        return ::nextafter(x, y);
+    }
+
+    long double nextafter(long double x, long double y) {
+        return ::nextafterl(x, y);
+    }
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
+#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^
 
-    if ((lc.i < 0) != (rc.i < 0)) {
-        // Potentially we can have +0 and -0
-        return lhs == rhs;
+namespace {
+
+template <typename FP>
+FP step(FP start, FP direction, uint64_t steps) {
+    for (uint64_t i = 0; i < steps; ++i) {
+#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+        start = Catch::nextafter(start, direction);
+#else
+        start = std::nextafter(start, direction);
+#endif
     }
+    return start;
+}
 
-    auto ulpDiff = std::abs(lc.i - rc.i);
-    return ulpDiff <= maxUlpDiff;
+// Performs equivalent check of std::fabs(lhs - rhs) <= margin
+// But without the subtraction to allow for INFINITY in comparison
+bool marginComparison(double lhs, double rhs, double margin) {
+    return (lhs + margin >= rhs) && (rhs + margin >= lhs);
 }
 
+template <typename FloatingPoint>
+void write(std::ostream& out, FloatingPoint num) {
+    out << std::scientific
+        << std::setprecision(std::numeric_limits<FloatingPoint>::max_digits10 - 1)
+        << num;
 }
 
+} // end anonymous namespace
 
-namespace Catch {
 namespace Matchers {
 namespace Floating {
+
+    enum class FloatingPointKind : uint8_t {
+        Float,
+        Double
+    };
+
+
     WithinAbsMatcher::WithinAbsMatcher(double target, double margin)
         :m_target{ target }, m_margin{ margin } {
         CATCH_ENFORCE(margin >= 0, "Invalid margin: " << margin << '.'
@@ -97,10 +142,11 @@ namespace Floating {
     }
 
 
-    WithinUlpsMatcher::WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType)
+    WithinUlpsMatcher::WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType)
         :m_target{ target }, m_ulps{ ulps }, m_type{ baseType } {
-        CATCH_ENFORCE(ulps >= 0, "Invalid ULP setting: " << ulps << '.'
-            << " ULPs have to be non-negative.");
+        CATCH_ENFORCE(m_type == FloatingPointKind::Double
+                   || m_ulps < (std::numeric_limits<uint32_t>::max)(),
+            "Provided ULP is impossibly large for a float comparison.");
     }
 
 #if defined(__clang__)
@@ -125,18 +171,60 @@ namespace Floating {
 #endif
 
     std::string WithinUlpsMatcher::describe() const {
-        return "is within " + Catch::to_string(m_ulps) + " ULPs of " + ::Catch::Detail::stringify(m_target) + ((m_type == FloatingPointKind::Float)? "f" : "");
+        std::stringstream ret;
+
+        ret << "is within " << m_ulps << " ULPs of ";
+
+        if (m_type == FloatingPointKind::Float) {
+            write(ret, static_cast<float>(m_target));
+            ret << 'f';
+        } else {
+            write(ret, m_target);
+        }
+
+        ret << " ([";
+        if (m_type == FloatingPointKind::Double) {
+            write(ret, step(m_target, static_cast<double>(-INFINITY), m_ulps));
+            ret << ", ";
+            write(ret, step(m_target, static_cast<double>( INFINITY), m_ulps));
+        } else {
+            write(ret, step(static_cast<float>(m_target), -INFINITY, m_ulps));
+            ret << ", ";
+            write(ret, step(static_cast<float>(m_target),  INFINITY, m_ulps));
+        }
+        ret << "])";
+
+        return ret.str();
+    }
+
+    WithinRelMatcher::WithinRelMatcher(double target, double epsilon):
+        m_target(target),
+        m_epsilon(epsilon){
+        CATCH_ENFORCE(m_epsilon >= 0., "Relative comparison with epsilon <  0 does not make sense.");
+        CATCH_ENFORCE(m_epsilon  < 1., "Relative comparison with epsilon >= 1 does not make sense.");
+    }
+
+    bool WithinRelMatcher::match(double const& matchee) const {
+        const auto relMargin = m_epsilon * (std::max)(std::fabs(matchee), std::fabs(m_target));
+        return marginComparison(matchee, m_target,
+                                std::isinf(relMargin)? 0 : relMargin);
+    }
+
+    std::string WithinRelMatcher::describe() const {
+        Catch::ReusableStringStream sstr;
+        sstr << "and " << m_target << " are within " << m_epsilon * 100. << "% of each other";
+        return sstr.str();
     }
 
 }// namespace Floating
 
 
 
-Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff) {
+Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff) {
     return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Double);
 }
 
-Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff) {
+Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff) {
     return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Float);
 }
 
@@ -144,6 +232,23 @@ Floating::WithinAbsMatcher WithinAbs(double target, double margin) {
     return Floating::WithinAbsMatcher(target, margin);
 }
 
+Floating::WithinRelMatcher WithinRel(double target, double eps) {
+    return Floating::WithinRelMatcher(target, eps);
+}
+
+Floating::WithinRelMatcher WithinRel(double target) {
+    return Floating::WithinRelMatcher(target, std::numeric_limits<double>::epsilon() * 100);
+}
+
+Floating::WithinRelMatcher WithinRel(float target, float eps) {
+    return Floating::WithinRelMatcher(target, eps);
+}
+
+Floating::WithinRelMatcher WithinRel(float target) {
+    return Floating::WithinRelMatcher(target, std::numeric_limits<float>::epsilon() * 100);
+}
+
+
 } // namespace Matchers
 } // namespace Catch
 
diff --git a/packages/Catch2/include/internal/catch_matchers_floating.h b/packages/Catch2/include/internal/catch_matchers_floating.h
index ee077526b682770b42a95c40cbe5dfb93060202c..0f2ff49ff5940a998f14022746d07fe0c270150d 100644
--- a/packages/Catch2/include/internal/catch_matchers_floating.h
+++ b/packages/Catch2/include/internal/catch_matchers_floating.h
@@ -9,9 +9,6 @@
 
 #include "catch_matchers.h"
 
-#include <type_traits>
-#include <cmath>
-
 namespace Catch {
 namespace Matchers {
 
@@ -29,23 +26,43 @@ namespace Matchers {
         };
 
         struct WithinUlpsMatcher : MatcherBase<double> {
-            WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType);
+            WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType);
             bool match(double const& matchee) const override;
             std::string describe() const override;
         private:
             double m_target;
-            int m_ulps;
+            uint64_t m_ulps;
             FloatingPointKind m_type;
         };
 
+        // Given IEEE-754 format for floats and doubles, we can assume
+        // that float -> double promotion is lossless. Given this, we can
+        // assume that if we do the standard relative comparison of
+        // |lhs - rhs| <= epsilon * max(fabs(lhs), fabs(rhs)), then we get
+        // the same result if we do this for floats, as if we do this for
+        // doubles that were promoted from floats.
+        struct WithinRelMatcher : MatcherBase<double> {
+            WithinRelMatcher(double target, double epsilon);
+            bool match(double const& matchee) const override;
+            std::string describe() const override;
+        private:
+            double m_target;
+            double m_epsilon;
+        };
 
     } // namespace Floating
 
     // The following functions create the actual matcher objects.
     // This allows the types to be inferred
-    Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff);
-    Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff);
+    Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff);
+    Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff);
     Floating::WithinAbsMatcher WithinAbs(double target, double margin);
+    Floating::WithinRelMatcher WithinRel(double target, double eps);
+    // defaults epsilon to 100*numeric_limits<double>::epsilon()
+    Floating::WithinRelMatcher WithinRel(double target);
+    Floating::WithinRelMatcher WithinRel(float target, float eps);
+    // defaults epsilon to 100*numeric_limits<float>::epsilon()
+    Floating::WithinRelMatcher WithinRel(float target);
 
 } // namespace Matchers
 } // namespace Catch
diff --git a/packages/Catch2/include/internal/catch_matchers_vector.h b/packages/Catch2/include/internal/catch_matchers_vector.h
index 1e29cc940327629762d2fde514af142f658a9d1d..2dc8a7150c7d2cf51bdc413719f76cb4485bdcaf 100644
--- a/packages/Catch2/include/internal/catch_matchers_vector.h
+++ b/packages/Catch2/include/internal/catch_matchers_vector.h
@@ -9,6 +9,7 @@
 #define TWOBLUECUBES_CATCH_MATCHERS_VECTOR_H_INCLUDED
 
 #include "catch_matchers.h"
+#include "catch_approx.h"
 
 #include <algorithm>
 
@@ -16,28 +17,6 @@ namespace Catch {
 namespace Matchers {
 
     namespace Vector {
-        namespace Detail {
-            template <typename InputIterator, typename T>
-            size_t count(InputIterator first, InputIterator last, T const& item) {
-                size_t cnt = 0;
-                for (; first != last; ++first) {
-                    if (*first == item) {
-                        ++cnt;
-                    }
-                }
-                return cnt;
-            }
-            template <typename InputIterator, typename T>
-            bool contains(InputIterator first, InputIterator last, T const& item) {
-                for (; first != last; ++first) {
-                    if (*first == item) {
-                        return true;
-                    }
-                }
-                return false;
-            }
-        }
-
         template<typename T>
         struct ContainsElementMatcher : MatcherBase<std::vector<T>> {
 
@@ -112,6 +91,42 @@ namespace Matchers {
             std::vector<T> const& m_comparator;
         };
 
+        template<typename T>
+        struct ApproxMatcher : MatcherBase<std::vector<T>> {
+
+            ApproxMatcher(std::vector<T> const& comparator) : m_comparator( comparator ) {}
+
+            bool match(std::vector<T> const &v) const override {
+                if (m_comparator.size() != v.size())
+                    return false;
+                for (std::size_t i = 0; i < v.size(); ++i)
+                    if (m_comparator[i] != approx(v[i]))
+                        return false;
+                return true;
+            }
+            std::string describe() const override {
+                return "is approx: " + ::Catch::Detail::stringify( m_comparator );
+            }
+            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
+            ApproxMatcher& epsilon( T const& newEpsilon ) {
+                approx.epsilon(newEpsilon);
+                return *this;
+            }
+            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
+            ApproxMatcher& margin( T const& newMargin ) {
+                approx.margin(newMargin);
+                return *this;
+            }
+            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
+            ApproxMatcher& scale( T const& newScale ) {
+                approx.scale(newScale);
+                return *this;
+            }
+
+            std::vector<T> const& m_comparator;
+            mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom();
+        };
+
         template<typename T>
         struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>> {
             UnorderedEqualsMatcher(std::vector<T> const& target) : m_target(target) {}
@@ -121,28 +136,7 @@ namespace Matchers {
                 if (m_target.size() != vec.size()) {
                     return false;
                 }
-                auto lfirst = m_target.begin(), llast = m_target.end();
-                auto rfirst = vec.begin(), rlast = vec.end();
-                // Cut common prefix to optimize checking of permuted parts
-                while (lfirst != llast && *lfirst == *rfirst) {
-                    ++lfirst; ++rfirst;
-                }
-                if (lfirst == llast) {
-                    return true;
-                }
-
-                for (auto mid = lfirst; mid != llast; ++mid) {
-                    // Skip already counted items
-                    if (Detail::contains(lfirst, mid, *mid)) {
-                        continue;
-                    }
-                    size_t num_vec = Detail::count(rfirst, rlast, *mid);
-                    if (num_vec == 0 || Detail::count(lfirst, llast, *mid) != num_vec) {
-                        return false;
-                    }
-                }
-
-                return true;
+                return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());
             }
 
             std::string describe() const override {
@@ -172,6 +166,11 @@ namespace Matchers {
         return Vector::EqualsMatcher<T>( comparator );
     }
 
+    template<typename T>
+    Vector::ApproxMatcher<T> Approx( std::vector<T> const& comparator ) {
+        return Vector::ApproxMatcher<T>( comparator );
+    }
+
     template<typename T>
     Vector::UnorderedEqualsMatcher<T> UnorderedEquals(std::vector<T> const& target) {
         return Vector::UnorderedEqualsMatcher<T>(target);
diff --git a/packages/Catch2/include/internal/catch_message.cpp b/packages/Catch2/include/internal/catch_message.cpp
index fa7e874614414ef407be0279929a60d8b1b426cb..8f391bcb2b686e5ff90ecf574e0fbbcfa1e1a0d9 100644
--- a/packages/Catch2/include/internal/catch_message.cpp
+++ b/packages/Catch2/include/internal/catch_message.cpp
@@ -9,6 +9,7 @@
 #include "catch_message.h"
 #include "catch_interfaces_capture.h"
 #include "catch_uncaught_exceptions.h"
+#include "catch_enforce.h"
 
 #include <cassert>
 #include <stack>
@@ -76,6 +77,15 @@ namespace Catch {
             }
             return names.substr(start, end - start + 1);
         };
+        auto skipq = [&] (size_t start, char quote) {
+            for (auto i = start + 1; i < names.size() ; ++i) {
+                if (names[i] == quote)
+                    return i;
+                if (names[i] == '\\')
+                    ++i;
+            }
+            CATCH_INTERNAL_ERROR("CAPTURE parsing encountered unmatched quote");
+        };
 
         size_t start = 0;
         std::stack<char> openings;
@@ -96,10 +106,14 @@ namespace Catch {
 //           case '>':
                 openings.pop();
                 break;
+            case '"':
+            case '\'':
+                pos = skipq(pos, c);
+                break;
             case ',':
                 if (start != pos && openings.size() == 0) {
                     m_messages.emplace_back(macroName, lineInfo, resultType);
-                    m_messages.back().message = trimmed(start, pos);
+                    m_messages.back().message = static_cast<std::string>(trimmed(start, pos));
                     m_messages.back().message += " := ";
                     start = pos;
                 }
@@ -107,7 +121,7 @@ namespace Catch {
         }
         assert(openings.size() == 0 && "Mismatched openings");
         m_messages.emplace_back(macroName, lineInfo, resultType);
-        m_messages.back().message = trimmed(start, names.size() - 1);
+        m_messages.back().message = static_cast<std::string>(trimmed(start, names.size() - 1));
         m_messages.back().message += " := ";
     }
     Capturer::~Capturer() {
diff --git a/packages/Catch2/include/internal/catch_meta.hpp b/packages/Catch2/include/internal/catch_meta.hpp
index 3508a46f7612f407495436069cf86324d10e2c65..8529766da4ea576fb5fcafe700f0f61b9caaf9f3 100644
--- a/packages/Catch2/include/internal/catch_meta.hpp
+++ b/packages/Catch2/include/internal/catch_meta.hpp
@@ -12,66 +12,27 @@
 #include <type_traits>
 
 namespace Catch {
-template< typename... >
-struct TypeList {};
-
-template< typename... >
-struct append;
-
-template< template<typename...> class L1
-    , typename...E1
-    , template<typename...> class L2
-    , typename...E2
->
-struct append< L1<E1...>, L2<E2...> > {
-    using type = L1<E1..., E2...>;
-};
-
-template< template<typename...> class L1
-    , typename...E1
-    , template<typename...> class L2
-    , typename...E2
-    , typename...Rest
->
-struct append< L1<E1...>, L2<E2...>, Rest...> {
-    using type = typename append< L1<E1..., E2...>, Rest... >::type;
-};
-
-template< template<typename...> class
-    , typename...
->
-struct rewrap;
-
-template< template<typename...> class Container
-    , template<typename...> class List
-    , typename...elems
->
-struct rewrap<Container, List<elems...>> {
-    using type = TypeList< Container< elems... > >;
-};
+template<typename T>
+struct always_false : std::false_type {};
 
-template< template<typename...> class Container
-    , template<typename...> class List
-    , class...Elems
-    , typename...Elements>
-    struct rewrap<Container, List<Elems...>, Elements...> {
-    using type = typename append<TypeList<Container<Elems...>>, typename rewrap<Container, Elements...>::type>::type;
+template <typename> struct true_given : std::true_type {};
+struct is_callable_tester {
+    template <typename Fun, typename... Args>
+    true_given<decltype(std::declval<Fun>()(std::declval<Args>()...))> static test(int);
+    template <typename...>
+    std::false_type static test(...);
 };
 
-template< template<typename...> class...Containers >
-struct combine {
-    template< typename...Types >
-    struct with_types {
-        template< template <typename...> class Final >
-        struct into {
-            using type = typename append<Final<>, typename rewrap<Containers, Types...>::type...>::type;
-        };
-    };
-};
+template <typename T>
+struct is_callable;
 
-template<typename T>
-struct always_false : std::false_type {};
+template <typename Fun, typename... Args>
+struct is_callable<Fun(Args...)> : decltype(is_callable_tester::test<Fun, Args...>(0)) {};
 
 } // namespace Catch
 
+namespace mpl_{
+    struct na;
+}
+
 #endif // TWOBLUECUBES_CATCH_META_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_objc.hpp b/packages/Catch2/include/internal/catch_objc.hpp
index f927e0d3d6559abf9e8a7a58d862c6d635f1e00f..a1c8e0740fc781d65cefd54e5b0f98d598d26f87 100644
--- a/packages/Catch2/include/internal/catch_objc.hpp
+++ b/packages/Catch2/include/internal/catch_objc.hpp
@@ -116,7 +116,7 @@ namespace Catch {
                     arcSafeRelease( m_substr );
                 }
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return false;
                 }
 
@@ -126,7 +126,7 @@ namespace Catch {
             struct Equals : StringHolder {
                 Equals( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str isEqualToString:m_substr];
                 }
@@ -139,7 +139,7 @@ namespace Catch {
             struct Contains : StringHolder {
                 Contains( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location != NSNotFound;
                 }
@@ -152,7 +152,7 @@ namespace Catch {
             struct StartsWith : StringHolder {
                 StartsWith( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location == 0;
                 }
@@ -164,7 +164,7 @@ namespace Catch {
             struct EndsWith : StringHolder {
                 EndsWith( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location == [str length] - [m_substr length];
                 }
diff --git a/packages/Catch2/include/internal/catch_preprocessor.hpp b/packages/Catch2/include/internal/catch_preprocessor.hpp
index faf41e6b31fd009bb3125124c0908540d406645d..f1bd0905b05b3911ac94111c899600ac0e62e578 100644
--- a/packages/Catch2/include/internal/catch_preprocessor.hpp
+++ b/packages/Catch2/include/internal/catch_preprocessor.hpp
@@ -68,22 +68,169 @@
 #define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1)
 #endif
 
+#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__
+#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name)
+
 #define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__)
 
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name, __VA_ARGS__)
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name,...) Name " - " #__VA_ARGS__
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name,...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))
+#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>())
+#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))
 #else
-// MSVC is adding extra space and needs more calls to properly remove ()
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name,...) Name " -" #__VA_ARGS__
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME1(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, __VA_ARGS__)
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME1(Name, INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))
+#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>()))
+#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))
 #endif
 
-#define INTERNAL_CATCH_MAKE_TYPE_LIST(types) Catch::TypeList<INTERNAL_CATCH_REMOVE_PARENS(types)>
+#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\
+    CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__)
+
+#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0)
+#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1)
+#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2)
+#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3)
+#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4)
+#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5)
+#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6)
+#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7)
+#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8)
+#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9)
+#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10)
+
+#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N
+
+#define INTERNAL_CATCH_TYPE_GEN\
+    template<typename...> struct TypeList {};\
+    template<typename...Ts>\
+    constexpr auto get_wrapper() noexcept -> TypeList<Ts...> { return {}; }\
+    template<template<typename...> class...> struct TemplateTypeList{};\
+    template<template<typename...> class...Cs>\
+    constexpr auto get_wrapper() noexcept -> TemplateTypeList<Cs...> { return {}; }\
+    template<typename...>\
+    struct append;\
+    template<typename...>\
+    struct rewrap;\
+    template<template<typename...> class, typename...>\
+    struct create;\
+    template<template<typename...> class, typename>\
+    struct convert;\
+    \
+    template<typename T> \
+    struct append<T> { using type = T; };\
+    template< template<typename...> class L1, typename...E1, template<typename...> class L2, typename...E2, typename...Rest>\
+    struct append<L1<E1...>, L2<E2...>, Rest...> { using type = typename append<L1<E1...,E2...>, Rest...>::type; };\
+    template< template<typename...> class L1, typename...E1, typename...Rest>\
+    struct append<L1<E1...>, TypeList<mpl_::na>, Rest...> { using type = L1<E1...>; };\
+    \
+    template< template<typename...> class Container, template<typename...> class List, typename...elems>\
+    struct rewrap<TemplateTypeList<Container>, List<elems...>> { using type = TypeList<Container<elems...>>; };\
+    template< template<typename...> class Container, template<typename...> class List, class...Elems, typename...Elements>\
+    struct rewrap<TemplateTypeList<Container>, List<Elems...>, Elements...> { using type = typename append<TypeList<Container<Elems...>>, typename rewrap<TemplateTypeList<Container>, Elements...>::type>::type; };\
+    \
+    template<template <typename...> class Final, template< typename...> class...Containers, typename...Types>\
+    struct create<Final, TemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<TemplateTypeList<Containers>, Types...>::type...>::type; };\
+    template<template <typename...> class Final, template <typename...> class List, typename...Ts>\
+    struct convert<Final, List<Ts...>> { using type = typename append<Final<>,TypeList<Ts>...>::type; };
+
+#define INTERNAL_CATCH_NTTP_1(signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> struct Nttp{};\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    constexpr auto get_wrapper() noexcept -> Nttp<__VA_ARGS__> { return {}; } \
+    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...> struct NttpTemplateTypeList{};\
+    template<template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Cs>\
+    constexpr auto get_wrapper() noexcept -> NttpTemplateTypeList<Cs...> { return {}; } \
+    \
+    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>> { using type = TypeList<Container<__VA_ARGS__>>; };\
+    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature), typename...Elements>\
+    struct rewrap<NttpTemplateTypeList<Container>, List<__VA_ARGS__>, Elements...> { using type = typename append<TypeList<Container<__VA_ARGS__>>, typename rewrap<NttpTemplateTypeList<Container>, Elements...>::type>::type; };\
+    template<template <typename...> class Final, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Containers, typename...Types>\
+    struct create<Final, NttpTemplateTypeList<Containers...>, TypeList<Types...>> { using type = typename append<Final<>, typename rewrap<NttpTemplateTypeList<Containers>, Types...>::type...>::type; };
+
+#define INTERNAL_CATCH_DECLARE_SIG_TEST0(TestName)
+#define INTERNAL_CATCH_DECLARE_SIG_TEST1(TestName, signature)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    static void TestName()
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_X(TestName, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    static void TestName()
+
+#define INTERNAL_CATCH_DEFINE_SIG_TEST0(TestName)
+#define INTERNAL_CATCH_DEFINE_SIG_TEST1(TestName, signature)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    static void TestName()
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_X(TestName, signature,...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    static void TestName()
+
+#define INTERNAL_CATCH_NTTP_REGISTER0(TestFunc, signature)\
+    template<typename Type>\
+    void reg_test(TypeList<Type>, Catch::NameAndTags nameAndTags)\
+    {\
+        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<Type>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\
+    }
+
+#define INTERNAL_CATCH_NTTP_REGISTER(TestFunc, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    void reg_test(Nttp<__VA_ARGS__>, Catch::NameAndTags nameAndTags)\
+    {\
+        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<__VA_ARGS__>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\
+    }
+
+#define INTERNAL_CATCH_NTTP_REGISTER_METHOD0(TestName, signature, ...)\
+    template<typename Type>\
+    void reg_test(TypeList<Type>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\
+    {\
+        Catch::AutoReg( Catch::makeTestInvoker(&TestName<Type>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\
+    }
+
+#define INTERNAL_CATCH_NTTP_REGISTER_METHOD(TestName, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    void reg_test(Nttp<__VA_ARGS__>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\
+    {\
+        Catch::AutoReg( Catch::makeTestInvoker(&TestName<__VA_ARGS__>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\
+    }
+
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0(TestName, ClassName)
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1(TestName, ClassName, signature)\
+    template<typename TestType> \
+    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<TestType> { \
+        void test();\
+    }
+
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X(TestName, ClassName, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \
+    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<__VA_ARGS__> { \
+        void test();\
+    }
+
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0(TestName)
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1(TestName, signature)\
+    template<typename TestType> \
+    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<TestType>::test()
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X(TestName, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \
+    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<__VA_ARGS__>::test()
 
-#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(types)\
-    CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,INTERNAL_CATCH_REMOVE_PARENS(types))
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+#define INTERNAL_CATCH_NTTP_0
+#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__),INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_0)
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__)
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__)
+#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__)
+#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__)
+#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__)
+#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__)
+#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__)
+#else
+#define INTERNAL_CATCH_NTTP_0(signature)
+#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1,INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_0)( __VA_ARGS__))
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__))
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__))
+#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__))
+#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__))
+#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__))
+#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__))
+#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__))
+#endif
 
 #endif // TWOBLUECUBES_CATCH_PREPROCESSOR_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_random_number_generator.cpp b/packages/Catch2/include/internal/catch_random_number_generator.cpp
index ec8a5eb96f1f45fec312057959795843134a7dfb..1ef08d4c4d91f22c86eaca3d7c586178f7e80340 100644
--- a/packages/Catch2/include/internal/catch_random_number_generator.cpp
+++ b/packages/Catch2/include/internal/catch_random_number_generator.cpp
@@ -7,23 +7,67 @@
 
 #include "catch_random_number_generator.h"
 #include "catch_context.h"
+#include "catch_run_context.h"
 #include "catch_interfaces_config.h"
 
 namespace Catch {
 
-    std::mt19937& rng() {
-        static std::mt19937 s_rng;
-        return s_rng;
+namespace {
+
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4146) // we negate uint32 during the rotate
+#endif
+        // Safe rotr implementation thanks to John Regehr
+        uint32_t rotate_right(uint32_t val, uint32_t count) {
+            const uint32_t mask = 31;
+            count &= mask;
+            return (val >> count) | (val << (-count & mask));
+        }
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
+}
+
+
+    SimplePcg32::SimplePcg32(result_type seed_) {
+        seed(seed_);
+    }
+
+
+    void SimplePcg32::seed(result_type seed_) {
+        m_state = 0;
+        (*this)();
+        m_state += seed_;
+        (*this)();
     }
 
-    void seedRng( IConfig const& config ) {
-        if( config.rngSeed() != 0 ) {
-            std::srand( config.rngSeed() );
-            rng().seed( config.rngSeed() );
+    void SimplePcg32::discard(uint64_t skip) {
+        // We could implement this to run in O(log n) steps, but this
+        // should suffice for our use case.
+        for (uint64_t s = 0; s < skip; ++s) {
+            static_cast<void>((*this)());
         }
     }
 
-    unsigned int rngSeed() {
-        return getCurrentContext().getConfig()->rngSeed();
+    SimplePcg32::result_type SimplePcg32::operator()() {
+        // prepare the output value
+        const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);
+        const auto output = rotate_right(xorshifted, m_state >> 59u);
+
+        // advance state
+        m_state = m_state * 6364136223846793005ULL + s_inc;
+
+        return output;
+    }
+
+    bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {
+        return lhs.m_state == rhs.m_state;
+    }
+
+    bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {
+        return lhs.m_state != rhs.m_state;
     }
 }
diff --git a/packages/Catch2/include/internal/catch_random_number_generator.h b/packages/Catch2/include/internal/catch_random_number_generator.h
index 817b7841aef513bbeabc4e25ecd8e68990487c0d..79d6279411faafb7eb8be64fc233b130d2473871 100644
--- a/packages/Catch2/include/internal/catch_random_number_generator.h
+++ b/packages/Catch2/include/internal/catch_random_number_generator.h
@@ -7,17 +7,52 @@
 #ifndef TWOBLUECUBES_CATCH_RANDOM_NUMBER_GENERATOR_H_INCLUDED
 #define TWOBLUECUBES_CATCH_RANDOM_NUMBER_GENERATOR_H_INCLUDED
 
-#include <algorithm>
-#include <random>
+#include <cstdint>
 
 namespace Catch {
 
-    struct IConfig;
+    // This is a simple implementation of C++11 Uniform Random Number
+    // Generator. It does not provide all operators, because Catch2
+    // does not use it, but it should behave as expected inside stdlib's
+    // distributions.
+    // The implementation is based on the PCG family (http://pcg-random.org)
+    class SimplePcg32 {
+        using state_type = std::uint64_t;
+    public:
+        using result_type = std::uint32_t;
+        static constexpr result_type (min)() {
+            return 0;
+        }
+        static constexpr result_type (max)() {
+            return static_cast<result_type>(-1);
+        }
 
-    std::mt19937& rng();
-    void seedRng( IConfig const& config );
-    unsigned int rngSeed();
+        // Provide some default initial state for the default constructor
+        SimplePcg32():SimplePcg32(0xed743cc4U) {}
 
-}
+        explicit SimplePcg32(result_type seed_);
+
+        void seed(result_type seed_);
+        void discard(uint64_t skip);
+
+        result_type operator()();
+
+    private:
+        friend bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs);
+        friend bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs);
+
+        // In theory we also need operator<< and operator>>
+        // In practice we do not use them, so we will skip them for now
+
+
+        std::uint64_t m_state;
+        // This part of the state determines which "stream" of the numbers
+        // is chosen -- we take it as a constant for Catch2, so we only
+        // need to deal with seeding the main state.
+        // Picked by reading 8 bytes from `/dev/random` :-)
+        static const std::uint64_t s_inc = (0x13ed0cc53f939476ULL << 1ULL) | 1ULL;
+    };
+
+} // end namespace Catch
 
 #endif // TWOBLUECUBES_CATCH_RANDOM_NUMBER_GENERATOR_H_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_registry_hub.cpp b/packages/Catch2/include/internal/catch_registry_hub.cpp
index a5062398519ce923a4e4f0ad36f35a2e1f7bdfd1..8a3c7a9793843a908ff155ad1064bc7afc9a679f 100644
--- a/packages/Catch2/include/internal/catch_registry_hub.cpp
+++ b/packages/Catch2/include/internal/catch_registry_hub.cpp
@@ -15,6 +15,7 @@
 #include "catch_tag_alias_registry.h"
 #include "catch_startup_exception_registry.h"
 #include "catch_singletons.hpp"
+#include "catch_enum_values_registry.h"
 
 namespace Catch {
 
@@ -60,6 +61,9 @@ namespace Catch {
             void registerStartupException() noexcept override {
                 m_exceptionRegistry.add(std::current_exception());
             }
+            IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override {
+                return m_enumValuesRegistry;
+            }
 
         private:
             TestRegistry m_testCaseRegistry;
@@ -67,6 +71,7 @@ namespace Catch {
             ExceptionTranslatorRegistry m_exceptionTranslatorRegistry;
             TagAliasRegistry m_tagAliasRegistry;
             StartupExceptionRegistry m_exceptionRegistry;
+            Detail::EnumValuesRegistry m_enumValuesRegistry;
         };
     }
 
diff --git a/packages/Catch2/include/internal/catch_reporter_registrars.hpp b/packages/Catch2/include/internal/catch_reporter_registrars.hpp
index 943fba65146f6468b5fff3e36fde06b05b4fb4fd..660f554ababe5f2a9728126d80df2433f81c4134 100644
--- a/packages/Catch2/include/internal/catch_reporter_registrars.hpp
+++ b/packages/Catch2/include/internal/catch_reporter_registrars.hpp
@@ -18,11 +18,11 @@ namespace Catch {
 
         class ReporterFactory : public IReporterFactory {
 
-            virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override {
+            IStreamingReporterPtr create( ReporterConfig const& config ) const override {
                 return std::unique_ptr<T>( new T( config ) );
             }
 
-            virtual std::string getDescription() const override {
+            std::string getDescription() const override {
                 return T::getDescription();
             }
         };
@@ -39,10 +39,10 @@ namespace Catch {
 
         class ListenerFactory : public IReporterFactory {
 
-            virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override {
+            IStreamingReporterPtr create( ReporterConfig const& config ) const override {
                 return std::unique_ptr<T>( new T( config ) );
             }
-            virtual std::string getDescription() const override {
+            std::string getDescription() const override {
                 return std::string();
             }
         };
diff --git a/packages/Catch2/include/internal/catch_run_context.cpp b/packages/Catch2/include/internal/catch_run_context.cpp
index bc3a51512b09b2efa8f964e76f1eff95bb50e918..2eb84fb9afe0de0f97114bded95e2ddc6979a2db 100644
--- a/packages/Catch2/include/internal/catch_run_context.cpp
+++ b/packages/Catch2/include/internal/catch_run_context.cpp
@@ -230,12 +230,21 @@ namespace Catch {
 
         m_unfinishedSections.push_back(endInfo);
     }
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void RunContext::benchmarkPreparing(std::string const& name) {
+		m_reporter->benchmarkPreparing(name);
+	}
     void RunContext::benchmarkStarting( BenchmarkInfo const& info ) {
         m_reporter->benchmarkStarting( info );
     }
-    void RunContext::benchmarkEnded( BenchmarkStats const& stats ) {
+    void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) {
         m_reporter->benchmarkEnded( stats );
     }
+	void RunContext::benchmarkFailed(std::string const & error) {
+		m_reporter->benchmarkFailed(error);
+	}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
     void RunContext::pushScopedMessage(MessageInfo const & message) {
         m_messages.push_back(message);
@@ -270,7 +279,7 @@ namespace Catch {
         // Don't rebuild the result -- the stringification itself can cause more fatal errors
         // Instead, fake a result data.
         AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } );
-        tempResult.message = message;
+        tempResult.message = static_cast<std::string>(message);
         AssertionResult result(m_lastAssertionInfo, tempResult);
 
         assertionEnded(result);
@@ -433,7 +442,7 @@ namespace Catch {
         m_lastAssertionInfo = info;
 
         AssertionResultData data( resultType, LazyExpression( false ) );
-        data.message = message;
+        data.message = static_cast<std::string>(message);
         AssertionResult assertionResult{ m_lastAssertionInfo, data };
         assertionEnded( assertionResult );
         if( !assertionResult.isOk() )
@@ -497,4 +506,16 @@ namespace Catch {
         else
             CATCH_INTERNAL_ERROR("No result capture instance");
     }
+
+    void seedRng(IConfig const& config) {
+        if (config.rngSeed() != 0) {
+            std::srand(config.rngSeed());
+            rng().seed(config.rngSeed());
+        }
+    }
+
+    unsigned int rngSeed() {
+        return getCurrentContext().getConfig()->rngSeed();
+    }
+
 }
diff --git a/packages/Catch2/include/internal/catch_run_context.h b/packages/Catch2/include/internal/catch_run_context.h
index c530a7b2d9a6a5debd87e10e0c4add52dc30ec08..2a8e72dca8773519c8df3376b5e9f0224d8d25c3 100644
--- a/packages/Catch2/include/internal/catch_run_context.h
+++ b/packages/Catch2/include/internal/catch_run_context.h
@@ -82,8 +82,12 @@ namespace Catch {
 
         auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing( std::string const& name ) override;
         void benchmarkStarting( BenchmarkInfo const& info ) override;
-        void benchmarkEnded( BenchmarkStats const& stats ) override;
+        void benchmarkEnded( BenchmarkStats<> const& stats ) override;
+        void benchmarkFailed( std::string const& error ) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void pushScopedMessage( MessageInfo const& message ) override;
         void popScopedMessage( MessageInfo const& message ) override;
@@ -147,6 +151,8 @@ namespace Catch {
         bool m_includeSuccessfulResults;
     };
 
+    void seedRng(IConfig const& config);
+    unsigned int rngSeed();
 } // end namespace Catch
 
 #endif // TWOBLUECUBES_CATCH_RUNNER_IMPL_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_session.cpp b/packages/Catch2/include/internal/catch_session.cpp
index 38b74ef7297717f9c481e3537e7dfc8339b0d3d0..b1d7a404b19eec0a25de05a0718438274b819ee3 100644
--- a/packages/Catch2/include/internal/catch_session.cpp
+++ b/packages/Catch2/include/internal/catch_session.cpp
@@ -25,6 +25,8 @@
 
 #include <cstdlib>
 #include <iomanip>
+#include <set>
+#include <iterator>
 
 namespace Catch {
 
@@ -58,46 +60,61 @@ namespace Catch {
             return ret;
         }
 
-
-        Catch::Totals runTests(std::shared_ptr<Config> const& config) {
-            auto reporter = makeReporter(config);
-
-            RunContext context(config, std::move(reporter));
-
-            Totals totals;
-
-            context.testGroupStarting(config->name(), 1, 1);
-
-            TestSpec testSpec = config->testSpec();
-
-            auto const& allTestCases = getAllTestCasesSorted(*config);
-            for (auto const& testCase : allTestCases) {
-                bool matching = (!testSpec.hasFilters() && !testCase.isHidden()) ||
-                                 (testSpec.hasFilters() && matchTest(testCase, testSpec, *config));
-
-                if (!context.aborting() && matching)
-                    totals += context.runTest(testCase);
-                else
-                    context.reporter().skipTest(testCase);
+        class TestGroup {
+        public:
+            explicit TestGroup(std::shared_ptr<Config> const& config)
+            : m_config{config}
+            , m_context{config, makeReporter(config)}
+            {
+                auto const& allTestCases = getAllTestCasesSorted(*m_config);
+                m_matches = m_config->testSpec().matchesByFilter(allTestCases, *m_config);
+                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();
+                
+                if (m_matches.empty() && invalidArgs.empty()) {
+                    for (auto const& test : allTestCases)
+                        if (!test.isHidden())
+                            m_tests.emplace(&test);
+                } else {
+                    for (auto const& match : m_matches)
+                        m_tests.insert(match.tests.begin(), match.tests.end());
+                }
             }
 
-            if (config->warnAboutNoTests() && totals.testCases.total() == 0) {
-                ReusableStringStream testConfig;
-
-                bool first = true;
-                for (const auto& input : config->getTestsOrTags()) {
-                    if (!first) { testConfig << ' '; }
-                    first = false;
-                    testConfig << input;
+            Totals execute() {
+                auto const& invalidArgs = m_config->testSpec().getInvalidArgs();
+                Totals totals;
+                m_context.testGroupStarting(m_config->name(), 1, 1);
+                for (auto const& testCase : m_tests) {
+                    if (!m_context.aborting())
+                        totals += m_context.runTest(*testCase);
+                    else
+                        m_context.reporter().skipTest(*testCase);
                 }
 
-                context.reporter().noMatchingTestCases(testConfig.str());
-                totals.error = -1;
+                for (auto const& match : m_matches) {
+                    if (match.tests.empty()) {
+                        m_context.reporter().noMatchingTestCases(match.name);
+                        totals.error = -1;
+                    }
+                }
+                
+                if (!invalidArgs.empty()) {
+                    for (auto const& invalidArg: invalidArgs)                   
+                         m_context.reporter().reportInvalidArguments(invalidArg);
+                }   
+                
+                m_context.testGroupEnded(m_config->name(), totals, 1, 1);
+                return totals;
             }
 
-            context.testGroupEnded(config->name(), totals, 1, 1);
-            return totals;
-        }
+        private:
+            using Tests = std::set<TestCase const*>;
+
+            std::shared_ptr<Config> m_config;
+            RunContext m_context;
+            Tests m_tests;
+            TestSpec::Matches m_matches;
+        };
 
         void applyFilenamesAsTags(Catch::IConfig const& config) {
             auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));
@@ -134,6 +151,9 @@ namespace Catch {
 #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
         const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions();
         if ( !exceptions.empty() ) {
+            config();
+            getCurrentMutableContext().setConfig(m_config);
+
             m_startupExceptions = true;
             Colour colourGuard( Colour::Red );
             Catch::cerr() << "Errors occurred during startup!" << '\n';
@@ -163,7 +183,7 @@ namespace Catch {
     }
     void Session::libIdentify() {
         Catch::cout()
-                << std::left << std::setw(16) << "description: " << "A Catch test executable\n"
+                << std::left << std::setw(16) << "description: " << "A Catch2 test executable\n"
                 << std::left << std::setw(16) << "category: " << "testframework\n"
                 << std::left << std::setw(16) << "framework: " << "Catch Test\n"
                 << std::left << std::setw(16) << "version: " << libraryVersion() << std::endl;
@@ -194,7 +214,7 @@ namespace Catch {
         return 0;
     }
 
-#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
+#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
     int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {
 
         char **utf8Argv = new char *[ argc ];
@@ -271,7 +291,12 @@ namespace Catch {
             if( Option<std::size_t> listed = list( m_config ) )
                 return static_cast<int>( *listed );
 
-            auto totals = runTests( m_config );
+            TestGroup tests { m_config };
+            auto const totals = tests.execute();
+
+            if( m_config->warnAboutNoTests() && totals.error == -1 )
+                return 2;
+
             // Note that on unices only the lower 8 bits are usually used, clamping
             // the return value to 255 prevents false negative when some multiple
             // of 256 tests has failed
diff --git a/packages/Catch2/include/internal/catch_session.h b/packages/Catch2/include/internal/catch_session.h
index af820da44729926729d368a754445375593bf93a..4e83d5204858cadbcaa5937fb3bc0a78b4b73500 100644
--- a/packages/Catch2/include/internal/catch_session.h
+++ b/packages/Catch2/include/internal/catch_session.h
@@ -26,7 +26,7 @@ namespace Catch {
         void libIdentify();
 
         int applyCommandLine( int argc, char const * const * argv );
-    #if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
+    #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
         int applyCommandLine( int argc, wchar_t const * const * argv );
     #endif
 
diff --git a/packages/Catch2/include/internal/catch_stream.cpp b/packages/Catch2/include/internal/catch_stream.cpp
index ba2d2be253fc38572d517a3e682db78bf594b553..3e907c63b25da9937ad545ba22fb85d8f095f026 100644
--- a/packages/Catch2/include/internal/catch_stream.cpp
+++ b/packages/Catch2/include/internal/catch_stream.cpp
@@ -25,7 +25,7 @@ namespace Catch {
 
     Catch::IStream::~IStream() = default;
 
-    namespace detail { namespace {
+    namespace Detail { namespace {
         template<typename WriterF, std::size_t bufferSize=256>
         class StreamBufImpl : public std::streambuf {
             char data[bufferSize];
@@ -124,15 +124,15 @@ namespace Catch {
 
     auto makeStream( StringRef const &filename ) -> IStream const* {
         if( filename.empty() )
-            return new detail::CoutStream();
+            return new Detail::CoutStream();
         else if( filename[0] == '%' ) {
             if( filename == "%debug" )
-                return new detail::DebugOutStream();
+                return new Detail::DebugOutStream();
             else
                 CATCH_ERROR( "Unrecognised stream: '" << filename << "'" );
         }
         else
-            return new detail::FileStream( filename );
+            return new Detail::FileStream( filename );
     }
 
 
diff --git a/packages/Catch2/include/internal/catch_string_manip.cpp b/packages/Catch2/include/internal/catch_string_manip.cpp
index 904d10138ffe10ea6cd38ca1f6c1ea1331e6425d..65be34d037c96907943659d87655b45b842cd807 100644
--- a/packages/Catch2/include/internal/catch_string_manip.cpp
+++ b/packages/Catch2/include/internal/catch_string_manip.cpp
@@ -6,11 +6,13 @@
  */
 
 #include "catch_string_manip.h"
+#include "catch_stringref.h"
 
 #include <algorithm>
 #include <ostream>
 #include <cstring>
 #include <cctype>
+#include <vector>
 
 namespace Catch {
 
@@ -51,6 +53,18 @@ namespace Catch {
         return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string();
     }
 
+    StringRef trim(StringRef ref) {
+        const auto is_ws = [](char c) {
+            return c == ' ' || c == '\t' || c == '\n' || c == '\r';
+        };
+        size_t real_begin = 0;
+        while (real_begin < ref.size() && is_ws(ref[real_begin])) { ++real_begin; }
+        size_t real_end = ref.size();
+        while (real_end > real_begin && is_ws(ref[real_end - 1])) { --real_end; }
+
+        return ref.substr(real_begin, real_end - real_begin);
+    }
+
     bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {
         bool replaced = false;
         std::size_t i = str.find( replaceThis );
@@ -65,6 +79,21 @@ namespace Catch {
         return replaced;
     }
 
+    std::vector<StringRef> splitStringRef( StringRef str, char delimiter ) {
+        std::vector<StringRef> subStrings;
+        std::size_t start = 0;
+        for(std::size_t pos = 0; pos < str.size(); ++pos ) {
+            if( str[pos] == delimiter ) {
+                if( pos - start > 1 )
+                    subStrings.push_back( str.substr( start, pos-start ) );
+                start = pos+1;
+            }
+        }
+        if( start < str.size() )
+            subStrings.push_back( str.substr( start, str.size()-start ) );
+        return subStrings;
+    }
+
     pluralise::pluralise( std::size_t count, std::string const& label )
     :   m_count( count ),
         m_label( label )
diff --git a/packages/Catch2/include/internal/catch_string_manip.h b/packages/Catch2/include/internal/catch_string_manip.h
index 6292cd576ed3344c62185ca93c6e503e122d2b38..cdb7be5fee6986ef222c956b1bafa561dfa4f311 100644
--- a/packages/Catch2/include/internal/catch_string_manip.h
+++ b/packages/Catch2/include/internal/catch_string_manip.h
@@ -7,8 +7,11 @@
 #ifndef TWOBLUECUBES_CATCH_STRING_MANIP_H_INCLUDED
 #define TWOBLUECUBES_CATCH_STRING_MANIP_H_INCLUDED
 
+#include "catch_stringref.h"
+
 #include <string>
 #include <iosfwd>
+#include <vector>
 
 namespace Catch {
 
@@ -19,7 +22,13 @@ namespace Catch {
     bool contains( std::string const& s, std::string const& infix );
     void toLowerInPlace( std::string& s );
     std::string toLower( std::string const& s );
+    //! Returns a new string without whitespace at the start/end
     std::string trim( std::string const& str );
+    //! Returns a substring of the original ref without whitespace. Beware lifetimes!
+    StringRef trim(StringRef ref);
+
+    // !!! Be aware, returns refs into original string - make sure original string outlives them
+    std::vector<StringRef> splitStringRef( StringRef str, char delimiter );
     bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis );
 
     struct pluralise {
diff --git a/packages/Catch2/include/internal/catch_stringref.cpp b/packages/Catch2/include/internal/catch_stringref.cpp
index 9e9095e4bade81db5459b3a80206e0f31f4bbf47..b46414ac350455119e1e6781ba079ff108eeb634 100644
--- a/packages/Catch2/include/internal/catch_stringref.cpp
+++ b/packages/Catch2/include/internal/catch_stringref.cpp
@@ -17,21 +17,11 @@
 #include <cstring>
 #include <cstdint>
 
-namespace {
-    const uint32_t byte_2_lead = 0xC0;
-    const uint32_t byte_3_lead = 0xE0;
-    const uint32_t byte_4_lead = 0xF0;
-}
-
 namespace Catch {
     StringRef::StringRef( char const* rawChars ) noexcept
     : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
     {}
 
-    StringRef::operator std::string() const {
-        return std::string( m_start, m_size );
-    }
-
     void StringRef::swap( StringRef& other ) noexcept {
         std::swap( m_start, other.m_start );
         std::swap( m_size, other.m_size );
@@ -39,9 +29,11 @@ namespace Catch {
     }
 
     auto StringRef::c_str() const -> char const* {
-        if( isSubstring() )
-           const_cast<StringRef*>( this )->takeOwnership();
-        return m_start;
+        if( !isSubstring() )
+            return m_start;
+
+        const_cast<StringRef *>( this )->takeOwnership();
+        return m_data;
     }
     auto StringRef::currentData() const noexcept -> char const* {
         return m_start;
@@ -59,7 +51,6 @@ namespace Catch {
             m_data = new char[m_size+1];
             memcpy( m_data, m_start, m_size );
             m_data[m_size] = '\0';
-            m_start = m_data;
         }
     }
     auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef {
@@ -77,40 +68,6 @@ namespace Catch {
         return !operator==( other );
     }
 
-    auto StringRef::operator[](size_type index) const noexcept -> char {
-        return m_start[index];
-    }
-
-    auto StringRef::numberOfCharacters() const noexcept -> size_type {
-        size_type noChars = m_size;
-        // Make adjustments for uft encodings
-        for( size_type i=0; i < m_size; ++i ) {
-            char c = m_start[i];
-            if( ( c & byte_2_lead ) == byte_2_lead ) {
-                noChars--;
-                if (( c & byte_3_lead ) == byte_3_lead )
-                    noChars--;
-                if( ( c & byte_4_lead ) == byte_4_lead )
-                    noChars--;
-            }
-        }
-        return noChars;
-    }
-
-    auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string {
-        std::string str;
-        str.reserve( lhs.size() + rhs.size() );
-        str += lhs;
-        str += rhs;
-        return str;
-    }
-    auto operator + ( StringRef const& lhs, const char* rhs ) -> std::string {
-        return std::string( lhs ) + std::string( rhs );
-    }
-    auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string {
-        return std::string( lhs ) + std::string( rhs );
-    }
-
     auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& {
         return os.write(str.currentData(), str.size());
     }
diff --git a/packages/Catch2/include/internal/catch_stringref.h b/packages/Catch2/include/internal/catch_stringref.h
index 64f595b3682964cb15acf773b1fbceb105aa0edf..a45147da1d3b687233dd3d3c22a3ce5f0aa9f351 100644
--- a/packages/Catch2/include/internal/catch_stringref.h
+++ b/packages/Catch2/include/internal/catch_stringref.h
@@ -10,6 +10,7 @@
 #include <cstddef>
 #include <string>
 #include <iosfwd>
+#include <cassert>
 
 namespace Catch {
 
@@ -23,6 +24,7 @@ namespace Catch {
     class StringRef {
     public:
         using size_type = std::size_t;
+        using const_iterator = const char*;
 
     private:
         friend struct StringRefTestAccess;
@@ -78,7 +80,9 @@ namespace Catch {
             return *this;
         }
 
-        operator std::string() const;
+        explicit operator std::string() const {
+            return std::string(m_start, m_size);
+        }
 
         void swap( StringRef& other ) noexcept;
 
@@ -86,7 +90,10 @@ namespace Catch {
         auto operator == ( StringRef const& other ) const noexcept -> bool;
         auto operator != ( StringRef const& other ) const noexcept -> bool;
 
-        auto operator[] ( size_type index ) const noexcept -> char;
+        auto operator[] ( size_type index ) const noexcept -> char {
+            assert(index < m_size);
+            return m_start[index];
+        }
 
     public: // named queries
         auto empty() const noexcept -> bool {
@@ -96,7 +103,6 @@ namespace Catch {
             return m_size;
         }
 
-        auto numberOfCharacters() const noexcept -> size_type;
         auto c_str() const -> char const*;
 
     public: // substrings and searches
@@ -106,15 +112,15 @@ namespace Catch {
         // Note that the pointer can change when if the StringRef is a substring
         auto currentData() const noexcept -> char const*;
 
+    public: // iterators
+        const_iterator begin() const { return m_start; }
+        const_iterator end() const { return m_start + m_size; }
+
     private: // ownership queries - may not be consistent between calls
         auto isOwned() const noexcept -> bool;
         auto isSubstring() const noexcept -> bool;
     };
 
-    auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string;
-    auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string;
-    auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string;
-
     auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&;
     auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&;
 
diff --git a/packages/Catch2/include/internal/catch_test_case_info.cpp b/packages/Catch2/include/internal/catch_test_case_info.cpp
index 4baa9d4bd787645a3e46983767823f952d95cc4b..685ee30f3e6c39d66476caaf62abd100d7ebcf7d 100644
--- a/packages/Catch2/include/internal/catch_test_case_info.cpp
+++ b/packages/Catch2/include/internal/catch_test_case_info.cpp
@@ -59,8 +59,7 @@ namespace Catch {
         std::vector<std::string> tags;
         std::string desc, tag;
         bool inTag = false;
-        std::string _descOrTags = nameAndTags.tags;
-        for (char c : _descOrTags) {
+        for (char c : nameAndTags.tags) {
             if( !inTag ) {
                 if( c == '[' )
                     inTag = true;
@@ -93,7 +92,7 @@ namespace Catch {
             tags.push_back( "." );
         }
 
-        TestCaseInfo info( nameAndTags.name, _className, desc, tags, _lineInfo );
+        TestCaseInfo info( static_cast<std::string>(nameAndTags.name), _className, desc, tags, _lineInfo );
         return TestCase( _testCase, std::move(info) );
     }
 
diff --git a/packages/Catch2/include/internal/catch_test_case_registry_impl.cpp b/packages/Catch2/include/internal/catch_test_case_registry_impl.cpp
index a85d0edf6c834f8566f1e2803ba146c0949ad6b6..b254ca08e6910f411b46cbc8ddf7e57d0586f5c0 100644
--- a/packages/Catch2/include/internal/catch_test_case_registry_impl.cpp
+++ b/packages/Catch2/include/internal/catch_test_case_registry_impl.cpp
@@ -11,6 +11,7 @@
 #include "catch_enforce.h"
 #include "catch_interfaces_registry_hub.h"
 #include "catch_random_number_generator.h"
+#include "catch_run_context.h"
 #include "catch_string_manip.h"
 #include "catch_test_case_info.h"
 
@@ -36,8 +37,13 @@ namespace Catch {
         }
         return sorted;
     }
+
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config ) {
+        return !testCase.throws() || config.allowThrows();
+    }
+
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) {
-        return testSpec.matches( testCase ) && ( config.allowThrows() || !testCase.throws() );
+        return testSpec.matches( testCase ) && isThrowSafe( testCase, config );
     }
 
     void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions ) {
@@ -100,7 +106,7 @@ namespace Catch {
     }
 
     std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {
-        std::string className = classOrQualifiedMethodName;
+        std::string className(classOrQualifiedMethodName);
         if( startsWith( className, '&' ) )
         {
             std::size_t lastColons = className.rfind( "::" );
diff --git a/packages/Catch2/include/internal/catch_test_case_registry_impl.h b/packages/Catch2/include/internal/catch_test_case_registry_impl.h
index 8dc5b0fe3baaeb7a34a3bf3d5d7d1ac7b0e66d5d..359ac3e3803a7f1fd5d60c25f6870dfe5773e99c 100644
--- a/packages/Catch2/include/internal/catch_test_case_registry_impl.h
+++ b/packages/Catch2/include/internal/catch_test_case_registry_impl.h
@@ -23,6 +23,8 @@ namespace Catch {
     struct IConfig;
 
     std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases );
+
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config );
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );
 
     void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions );
diff --git a/packages/Catch2/include/internal/catch_test_case_tracker.cpp b/packages/Catch2/include/internal/catch_test_case_tracker.cpp
index 210f273052b5b495056a5ba3ae7e21e7a9d9e5d7..77bd65cbbf39c1ad0198b72db4e98a49b4181585 100644
--- a/packages/Catch2/include/internal/catch_test_case_tracker.cpp
+++ b/packages/Catch2/include/internal/catch_test_case_tracker.cpp
@@ -8,6 +8,7 @@
 #include "catch_test_case_tracker.h"
 
 #include "catch_enforce.h"
+#include "catch_string_manip.h"
 
 #include <algorithm>
 #include <cassert>
@@ -32,11 +33,6 @@ namespace TestCaseTracking {
     ITracker::~ITracker() = default;
 
 
-    TrackerContext& TrackerContext::instance() {
-        static TrackerContext s_instance;
-        return s_instance;
-    }
-
     ITracker& TrackerContext::startRun() {
         m_rootTracker = std::make_shared<SectionTracker>( NameAndLocation( "{root}", CATCH_INTERNAL_LINEINFO ), *this, nullptr );
         m_currentTracker = nullptr;
@@ -144,7 +140,7 @@ namespace TestCaseTracking {
                 m_runState = CompletedSuccessfully;
                 break;
             case ExecutingChildren:
-                if( m_children.empty() || m_children.back()->isComplete() )
+                if( std::all_of(m_children.begin(), m_children.end(), [](ITrackerPtr const& t){ return t->isComplete(); }) )
                     m_runState = CompletedSuccessfully;
                 break;
 
@@ -179,7 +175,8 @@ namespace TestCaseTracking {
     }
 
     SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )
-    :   TrackerBase( nameAndLocation, ctx, parent )
+    :   TrackerBase( nameAndLocation, ctx, parent ),
+        m_trimmed_name(trim(nameAndLocation.name))
     {
         if( parent ) {
             while( !parent->isSectionTracker() )
@@ -193,12 +190,11 @@ namespace TestCaseTracking {
     bool SectionTracker::isComplete() const {
         bool complete = true;
 
-        if ((m_filters.empty() || m_filters[0] == "") ||
-             std::find(m_filters.begin(), m_filters.end(),
-                       m_nameAndLocation.name) != m_filters.end())
+        if ((m_filters.empty() || m_filters[0] == "")
+            || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) {
             complete = TrackerBase::isComplete();
+        }
         return complete;
-
     }
 
     bool SectionTracker::isSectionTracker() const { return true; }
@@ -222,12 +218,13 @@ namespace TestCaseTracking {
     }
 
     void SectionTracker::tryOpen() {
-        if( !isComplete() && (m_filters.empty() || m_filters[0].empty() ||  m_filters[0] == m_nameAndLocation.name ) )
+        if( !isComplete() )
             open();
     }
 
     void SectionTracker::addInitialFilters( std::vector<std::string> const& filters ) {
         if( !filters.empty() ) {
+            m_filters.reserve( m_filters.size() + filters.size() + 2 );
             m_filters.push_back(""); // Root - should never be consulted
             m_filters.push_back(""); // Test Case - not a section filter
             m_filters.insert( m_filters.end(), filters.begin(), filters.end() );
@@ -235,7 +232,7 @@ namespace TestCaseTracking {
     }
     void SectionTracker::addNextFilters( std::vector<std::string> const& filters ) {
         if( filters.size() > 1 )
-            m_filters.insert( m_filters.end(), ++filters.begin(), filters.end() );
+            m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() );
     }
 
 } // namespace TestCaseTracking
diff --git a/packages/Catch2/include/internal/catch_test_case_tracker.h b/packages/Catch2/include/internal/catch_test_case_tracker.h
index 172760017d7794cffb128f98a4dc5489f78f770e..563dbef2c94b7ef9507b9c6f1bc77e99d1e98778 100644
--- a/packages/Catch2/include/internal/catch_test_case_tracker.h
+++ b/packages/Catch2/include/internal/catch_test_case_tracker.h
@@ -71,8 +71,6 @@ namespace TestCaseTracking {
 
     public:
 
-        static TrackerContext& instance();
-
         ITracker& startRun();
         void endRun();
 
@@ -135,6 +133,7 @@ namespace TestCaseTracking {
 
     class SectionTracker : public TrackerBase {
         std::vector<std::string> m_filters;
+        std::string m_trimmed_name;
     public:
         SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );
 
diff --git a/packages/Catch2/include/internal/catch_test_registry.h b/packages/Catch2/include/internal/catch_test_registry.h
index 0e7b53ded4f955f4eeaf331270a603b344db42d1..dd1ccfcc87daeded23775b90b9a021830923f0bd 100644
--- a/packages/Catch2/include/internal/catch_test_registry.h
+++ b/packages/Catch2/include/internal/catch_test_registry.h
@@ -12,7 +12,6 @@
 #include "catch_interfaces_testcase.h"
 #include "catch_compiler_capabilities.h"
 #include "catch_stringref.h"
-#include "catch_type_traits.hpp"
 #include "catch_preprocessor.hpp"
 #include "catch_meta.hpp"
 
@@ -60,18 +59,47 @@ struct AutoReg : NonCopyable {
             };                            \
         }                                 \
         void TestName::test()
-    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION( TestName, ... )  \
-        template<typename TestType>                                             \
-        static void TestName()
-    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... )    \
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( TestName, TestFunc, Name, Tags, Signature, ... )  \
+        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature))
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... )    \
         namespace{                                                                                  \
-            template<typename TestType>                                                             \
-            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) {     \
-                void test();                                                                        \
-            };                                                                                      \
+            namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                      \
+            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\
         }                                                                                           \
-        template<typename TestType>                                                                 \
-        void TestName::test()
+        }                                                                                           \
+        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))
+
+    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \
+            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
+    #else
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \
+            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) )
+    #endif  
+
+    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \
+            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ )
+    #else
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \
+            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) )
+    #endif
+
+    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \
+            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )
+    #else
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \
+            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )
+    #endif
+
+    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \
+            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )
+    #else
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \
+            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )
+    #endif
 #endif
 
     ///////////////////////////////////////////////////////////////////////////////
@@ -111,54 +139,64 @@ struct AutoReg : NonCopyable {
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
 
     ///////////////////////////////////////////////////////////////////////////////
-    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, ... )\
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, Signature, ... )\
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
-        template<typename TestType> \
-        static void TestFunc();\
+        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        INTERNAL_CATCH_DECLARE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature));\
         namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\
+            INTERNAL_CATCH_TYPE_GEN\
+            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\
+            INTERNAL_CATCH_NTTP_REG_GEN(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))\
             template<typename...Types> \
             struct TestName{\
-                template<typename...Ts> \
-                TestName(Ts...names){\
-                    CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
+                TestName(){\
+                    int index = 0;                                    \
+                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\
                     using expander = int[];\
-                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
+                    (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++, 0)... };/* NOLINT */ \
                 }\
             };\
-            INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, __VA_ARGS__) \
+            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
+            TestName<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\
+            return 0;\
+        }();\
+        }\
         }\
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
-        template<typename TestType> \
-        static void TestFunc()
-
-#if defined(CATCH_CPP17_OR_GREATER)
-#define CATCH_INTERNAL_CHECK_UNIQUE_TYPES(...) static_assert(Catch::is_unique<__VA_ARGS__>,"Duplicate type detected in declaration of template test case");
-#else
-#define CATCH_INTERNAL_CHECK_UNIQUE_TYPES(...) static_assert(Catch::is_unique<__VA_ARGS__>::value,"Duplicate type detected in declaration of template test case");
-#endif
+        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \
-        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ )
+        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
 #else
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \
-        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ ) )
-#endif
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) )
+#endif  
 
-    #define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, ...)\
-        static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
-            TestName<CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)>(CATCH_REC_LIST_UD(INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME,Name, __VA_ARGS__));\
-            return 0;\
-        }();
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \
+        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ )
+#else
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) )
+#endif
 
-    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList) \
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList) \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS                      \
+        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS                \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS                       \
         template<typename TestType> static void TestFuncName();       \
-        namespace {                                                   \
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                     \
+            INTERNAL_CATCH_TYPE_GEN                                                  \
+            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))         \
             template<typename... Types>                               \
             struct TestName {                                         \
-                TestName() {                                          \
-                    CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)       \
+                void reg_tests() {                                          \
                     int index = 0;                                    \
                     using expander = int[];                           \
                     constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
@@ -168,65 +206,127 @@ struct AutoReg : NonCopyable {
                 }                                                     \
             };                                                        \
             static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
-                using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)> \
-                            ::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestName>::type; \
-                TestInit();                                           \
+                using TestInit = typename create<TestName, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type; \
+                TestInit t;                                           \
+                t.reg_tests();                                        \
                 return 0;                                             \
             }();                                                      \
         }                                                             \
+        }                                                             \
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS                    \
+        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS              \
+        CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS                     \
         template<typename TestType>                                   \
         static void TestFuncName()
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\
-        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ),Name,Tags,__VA_ARGS__)
+        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename T,__VA_ARGS__)
 #else
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\
-        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ ) )
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename T, __VA_ARGS__ ) )
+#endif
+
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\
+        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__)
+#else
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) )
 #endif
 
-    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, ... ) \
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)\
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
-        namespace{ \
-            template<typename TestType> \
-            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
-                void test();\
-            };\
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        template<typename TestType> static void TestFunc();       \
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\
+        INTERNAL_CATCH_TYPE_GEN\
+        template<typename... Types>                               \
+        struct TestName {                                         \
+            void reg_tests() {                                          \
+                int index = 0;                                    \
+                using expander = int[];                           \
+                (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++, 0)... };/* NOLINT */\
+            }                                                     \
+        };\
+        static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
+                using TestInit = typename convert<TestName, TmplList>::type; \
+                TestInit t;                                           \
+                t.reg_tests();                                        \
+                return 0;                                             \
+            }();                                                        \
+        }}\
+        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS                    \
+        CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        template<typename TestType>                                   \
+        static void TestFunc()
+
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList) \
+        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, TmplList )
+
+
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... ) \
+        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \
+            INTERNAL_CATCH_TYPE_GEN\
+            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\
+            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\
+            INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\
             template<typename...Types> \
             struct TestNameClass{\
-                template<typename...Ts> \
-                TestNameClass(Ts...names){\
-                    CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
+                TestNameClass(){\
+                    int index = 0;                                    \
+                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\
                     using expander = int[];\
-                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
+                    (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++, 0)... };/* NOLINT */ \
                 }\
             };\
-            INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestNameClass, Name, __VA_ARGS__)\
+            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
+                TestNameClass<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\
+                return 0;\
+        }();\
+        }\
         }\
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS\
-        template<typename TestType> \
-        void TestName<TestType>::test()
+        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS\
+        CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS\
+        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \
-        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ )
+        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )
 #else
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \
-        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ ) )
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )
 #endif
 
-    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)\
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \
+        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )
+#else
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )
+#endif
+
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)\
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
         template<typename TestType> \
             struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
                 void test();\
             };\
         namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestNameClass) {\
+            INTERNAL_CATCH_TYPE_GEN                  \
+            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\
             template<typename...Types>\
             struct TestNameClass{\
-                TestNameClass(){\
-                    CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)\
+                void reg_tests(){\
                     int index = 0;\
                     using expander = int[];\
                     constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
@@ -236,22 +336,67 @@ struct AutoReg : NonCopyable {
                 }\
             };\
             static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
-                using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>\
-                            ::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestNameClass>::type;\
-                TestInit();\
+                using TestInit = typename create<TestNameClass, decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>()), TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>>::type;\
+                TestInit t;\
+                t.reg_tests();\
                 return 0;\
             }(); \
         }\
+        }\
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
+        CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS \
         template<typename TestType> \
         void TestName<TestType>::test()
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\
-        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ )
+        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, typename T, __VA_ARGS__ )
 #else
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\
-        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ ) )
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) )
+#endif
+
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\
+        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature, __VA_ARGS__ )
+#else
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) )
 #endif
 
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, TmplList) \
+        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        template<typename TestType> \
+        struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
+            void test();\
+        };\
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \
+            INTERNAL_CATCH_TYPE_GEN\
+            template<typename...Types>\
+            struct TestNameClass{\
+                void reg_tests(){\
+                    int index = 0;\
+                    using expander = int[];\
+                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++, 0)... };/* NOLINT */ \
+                }\
+            };\
+            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
+                using TestInit = typename convert<TestNameClass, TmplList>::type;\
+                TestInit t;\
+                t.reg_tests();\
+                return 0;\
+            }(); \
+        }}\
+        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS \
+        template<typename TestType> \
+        void TestName<TestType>::test()
+
+#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \
+        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, TmplList )
+
+
 #endif // TWOBLUECUBES_CATCH_TEST_REGISTRY_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_test_spec.cpp b/packages/Catch2/include/internal/catch_test_spec.cpp
index d9c149d501456667816ee5f91d243fd1f9104579..65d34d0e5d39095d481824228ab8b27072b24b54 100644
--- a/packages/Catch2/include/internal/catch_test_spec.cpp
+++ b/packages/Catch2/include/internal/catch_test_spec.cpp
@@ -7,6 +7,7 @@
 
 #include "catch_test_spec.h"
 #include "catch_string_manip.h"
+#include "catch_interfaces_config.h"
 
 #include <algorithm>
 #include <string>
@@ -15,45 +16,84 @@
 
 namespace Catch {
 
+    TestSpec::Pattern::Pattern( std::string const& name )
+    : m_name( name )
+    {}
+
     TestSpec::Pattern::~Pattern() = default;
-    TestSpec::NamePattern::~NamePattern() = default;
-    TestSpec::TagPattern::~TagPattern() = default;
-    TestSpec::ExcludedPattern::~ExcludedPattern() = default;
 
-    TestSpec::NamePattern::NamePattern( std::string const& name )
-    : m_wildcardPattern( toLower( name ), CaseSensitive::No )
+    std::string const& TestSpec::Pattern::name() const {
+        return m_name;
+    }
+
+
+    TestSpec::NamePattern::NamePattern( std::string const& name, std::string const& filterString )
+    : Pattern( filterString )
+    , m_wildcardPattern( toLower( name ), CaseSensitive::No )
     {}
+
     bool TestSpec::NamePattern::matches( TestCaseInfo const& testCase ) const {
-        return m_wildcardPattern.matches( toLower( testCase.name ) );
+        return m_wildcardPattern.matches( testCase.name );
     }
 
-    TestSpec::TagPattern::TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
+
+    TestSpec::TagPattern::TagPattern( std::string const& tag, std::string const& filterString )
+    : Pattern( filterString )
+    , m_tag( toLower( tag ) )
+    {}
+
     bool TestSpec::TagPattern::matches( TestCaseInfo const& testCase ) const {
         return std::find(begin(testCase.lcaseTags),
                          end(testCase.lcaseTags),
                          m_tag) != end(testCase.lcaseTags);
     }
 
-    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern ) : m_underlyingPattern( underlyingPattern ) {}
-    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const { return !m_underlyingPattern->matches( testCase ); }
+
+    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern )
+    : Pattern( underlyingPattern->name() )
+    , m_underlyingPattern( underlyingPattern )
+    {}
+
+    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const {
+        return !m_underlyingPattern->matches( testCase );
+    }
+
 
     bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const {
-        // All patterns in a filter must match for the filter to be a match
-        for( auto const& pattern : m_patterns ) {
-            if( !pattern->matches( testCase ) )
-                return false;
-        }
-        return true;
+        return std::all_of( m_patterns.begin(), m_patterns.end(), [&]( PatternPtr const& p ){ return p->matches( testCase ); } );
     }
 
+    std::string TestSpec::Filter::name() const {
+        std::string name;
+        for( auto const& p : m_patterns )
+            name += p->name();
+        return name;
+    }
+
+
     bool TestSpec::hasFilters() const {
         return !m_filters.empty();
     }
+
     bool TestSpec::matches( TestCaseInfo const& testCase ) const {
-        // A TestSpec matches if any filter matches
-        for( auto const& filter : m_filters )
-            if( filter.matches( testCase ) )
-                return true;
-        return false;
+        return std::any_of( m_filters.begin(), m_filters.end(), [&]( Filter const& f ){ return f.matches( testCase ); } );
+    }
+
+    TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const
+    {
+        Matches matches( m_filters.size() );
+        std::transform( m_filters.begin(), m_filters.end(), matches.begin(), [&]( Filter const& filter ){
+            std::vector<TestCase const*> currentMatches;
+            for( auto const& test : testCases )
+                if( isThrowSafe( test, config ) && filter.matches( test ) )
+                    currentMatches.emplace_back( &test );
+            return FilterMatch{ filter.name(), currentMatches };
+        } );
+        return matches;
     }
+    
+    const TestSpec::vectorStrings& TestSpec::getInvalidArgs() const{
+        return  (m_invalidArgs);
+    }
+
 }
diff --git a/packages/Catch2/include/internal/catch_test_spec.h b/packages/Catch2/include/internal/catch_test_spec.h
index baf8b0193b244ef5ed521fc4bc5ca19c6c4051fc..2e54646372802be1f6728d18e017661e7fe258c2 100644
--- a/packages/Catch2/include/internal/catch_test_spec.h
+++ b/packages/Catch2/include/internal/catch_test_spec.h
@@ -22,36 +22,40 @@
 
 namespace Catch {
 
+    struct IConfig;
+
     class TestSpec {
-        struct Pattern {
+        class Pattern {
+        public:
+            explicit Pattern( std::string const& name );
             virtual ~Pattern();
             virtual bool matches( TestCaseInfo const& testCase ) const = 0;
+            std::string const& name() const;
+        private:
+            std::string const m_name;
         };
         using PatternPtr = std::shared_ptr<Pattern>;
 
         class NamePattern : public Pattern {
         public:
-            NamePattern( std::string const& name );
-            virtual ~NamePattern();
-            virtual bool matches( TestCaseInfo const& testCase ) const override;
+            explicit NamePattern( std::string const& name, std::string const& filterString );
+            bool matches( TestCaseInfo const& testCase ) const override;
         private:
             WildcardPattern m_wildcardPattern;
         };
 
         class TagPattern : public Pattern {
         public:
-            TagPattern( std::string const& tag );
-            virtual ~TagPattern();
-            virtual bool matches( TestCaseInfo const& testCase ) const override;
+            explicit TagPattern( std::string const& tag, std::string const& filterString );
+            bool matches( TestCaseInfo const& testCase ) const override;
         private:
             std::string m_tag;
         };
 
         class ExcludedPattern : public Pattern {
         public:
-            ExcludedPattern( PatternPtr const& underlyingPattern );
-            virtual ~ExcludedPattern();
-            virtual bool matches( TestCaseInfo const& testCase ) const override;
+            explicit ExcludedPattern( PatternPtr const& underlyingPattern );
+            bool matches( TestCaseInfo const& testCase ) const override;
         private:
             PatternPtr m_underlyingPattern;
         };
@@ -60,15 +64,25 @@ namespace Catch {
             std::vector<PatternPtr> m_patterns;
 
             bool matches( TestCaseInfo const& testCase ) const;
+            std::string name() const;
         };
 
     public:
+        struct FilterMatch {
+            std::string name;
+            std::vector<TestCase const*> tests;
+        };
+        using Matches = std::vector<FilterMatch>;
+        using vectorStrings = std::vector<std::string>;
+
         bool hasFilters() const;
         bool matches( TestCaseInfo const& testCase ) const;
+        Matches matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const;
+        const vectorStrings & getInvalidArgs() const;
 
     private:
         std::vector<Filter> m_filters;
-
+        std::vector<std::string> m_invalidArgs;
         friend class TestSpecParser;
     };
 }
diff --git a/packages/Catch2/include/internal/catch_test_spec_parser.cpp b/packages/Catch2/include/internal/catch_test_spec_parser.cpp
index 61c9e4df029f3036bb1856d3c1eb39e8d6508198..b872b19163ac01742ecac05206b46919cb75c498 100644
--- a/packages/Catch2/include/internal/catch_test_spec_parser.cpp
+++ b/packages/Catch2/include/internal/catch_test_spec_parser.cpp
@@ -7,6 +7,7 @@
 
 #include "catch_test_spec_parser.h"
 
+
 namespace Catch {
 
     TestSpecParser::TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases( &tagAliases ) {}
@@ -14,64 +15,136 @@ namespace Catch {
     TestSpecParser& TestSpecParser::parse( std::string const& arg ) {
         m_mode = None;
         m_exclusion = false;
-        m_start = std::string::npos;
         m_arg = m_tagAliases->expandAliases( arg );
         m_escapeChars.clear();
+        m_substring.reserve(m_arg.size());
+        m_patternName.reserve(m_arg.size());
+        m_realPatternPos = 0;
+        
         for( m_pos = 0; m_pos < m_arg.size(); ++m_pos )
-            visitChar( m_arg[m_pos] );
-        if( m_mode == Name )
-            addPattern<TestSpec::NamePattern>();
+          //if visitChar fails
+           if( !visitChar( m_arg[m_pos] ) ){ 
+               m_testSpec.m_invalidArgs.push_back(arg);
+               break;
+           }
+        endMode();
         return *this;
     }
     TestSpec TestSpecParser::testSpec() {
         addFilter();
         return m_testSpec;
     }
+    bool TestSpecParser::visitChar( char c ) {
+        if( (m_mode != EscapedName) && (c == '\\') ) {
+            escape();
+            addCharToPattern(c);
+            return true;
+        }else if((m_mode != EscapedName) && (c == ',') )  {
+            return separate();
+        }
+
+        switch( m_mode ) {
+        case None:
+            if( processNoneChar( c ) )
+                return true;
+            break;
+        case Name:
+            processNameChar( c );
+            break;
+        case EscapedName:
+            endMode();
+            addCharToPattern(c);
+            return true;
+        default:
+        case Tag:
+        case QuotedName:
+            if( processOtherChar( c ) )
+                return true;
+            break;
+        }
 
-    void TestSpecParser::visitChar( char c ) {
-        if( m_mode == None ) {
-            switch( c ) {
-            case ' ': return;
-            case '~': m_exclusion = true; return;
-            case '[': return startNewMode( Tag, ++m_pos );
-            case '"': return startNewMode( QuotedName, ++m_pos );
-            case '\\': return escape();
-            default: startNewMode( Name, m_pos ); break;
-            }
+        m_substring += c;
+        if( !isControlChar( c ) ) {
+            m_patternName += c;
+            m_realPatternPos++;
         }
-        if( m_mode == Name ) {
-            if( c == ',' ) {
-                addPattern<TestSpec::NamePattern>();
-                addFilter();
-            }
-            else if( c == '[' ) {
-                if( subString() == "exclude:" )
-                    m_exclusion = true;
-                else
-                    addPattern<TestSpec::NamePattern>();
-                startNewMode( Tag, ++m_pos );
-            }
-            else if( c == '\\' )
-                escape();
+        return true;
+    }
+    // Two of the processing methods return true to signal the caller to return
+    // without adding the given character to the current pattern strings
+    bool TestSpecParser::processNoneChar( char c ) {
+        switch( c ) {
+        case ' ':
+            return true;
+        case '~':
+            m_exclusion = true;
+            return false;
+        case '[':
+            startNewMode( Tag );
+            return false;
+        case '"':
+            startNewMode( QuotedName );
+            return false;
+        default:
+            startNewMode( Name );
+            return false;
+        }
+    }
+    void TestSpecParser::processNameChar( char c ) {
+        if( c == '[' ) {
+            if( m_substring == "exclude:" )
+                m_exclusion = true;
+            else
+                endMode();
+            startNewMode( Tag );
         }
-        else if( m_mode == EscapedName )
-            m_mode = Name;
-        else if( m_mode == QuotedName && c == '"' )
-            addPattern<TestSpec::NamePattern>();
-        else if( m_mode == Tag && c == ']' )
-            addPattern<TestSpec::TagPattern>();
     }
-    void TestSpecParser::startNewMode( Mode mode, std::size_t start ) {
+    bool TestSpecParser::processOtherChar( char c ) {
+        if( !isControlChar( c ) )
+            return false;
+        m_substring += c;
+        endMode();
+        return true;
+    }
+    void TestSpecParser::startNewMode( Mode mode ) {
         m_mode = mode;
-        m_start = start;
+    }
+    void TestSpecParser::endMode() {
+        switch( m_mode ) {
+        case Name:
+        case QuotedName:
+            return addPattern<TestSpec::NamePattern>();
+        case Tag:
+            return addPattern<TestSpec::TagPattern>();
+        case EscapedName:
+            revertBackToLastMode();
+            return;
+        case None:
+        default:
+            return startNewMode( None );
+        }
     }
     void TestSpecParser::escape() {
-        if( m_mode == None )
-            m_start = m_pos;
+        saveLastMode();
         m_mode = EscapedName;
-        m_escapeChars.push_back( m_pos );
+        m_escapeChars.push_back(m_realPatternPos);
+    }
+    bool TestSpecParser::isControlChar( char c ) const {
+        switch( m_mode ) {
+            default:
+                return false;
+            case None:
+                return c == '~';
+            case Name:
+                return c == '[';
+            case EscapedName:
+                return true;
+            case QuotedName:
+                return c == '"';
+            case Tag:
+                return c == '[' || c == ']';
+        }
     }
-    std::string TestSpecParser::subString() const { return m_arg.substr( m_start, m_pos - m_start ); }
 
     void TestSpecParser::addFilter() {
         if( !m_currentFilter.m_patterns.empty() ) {
@@ -80,6 +153,28 @@ namespace Catch {
         }
     }
 
+    void TestSpecParser::saveLastMode() {
+      lastMode = m_mode;
+    }
+    
+    void TestSpecParser::revertBackToLastMode() {
+      m_mode = lastMode;
+    }
+    
+    bool TestSpecParser::separate() {  
+      if( (m_mode==QuotedName) || (m_mode==Tag) ){
+         //invalid argument, signal failure to previous scope.
+         m_mode = None;
+         m_pos = m_arg.size();
+         m_substring.clear();
+         m_patternName.clear();
+         return false;
+      }
+      endMode();
+      addFilter();
+      return true; //success
+    }
+    
     TestSpec parseTestSpec( std::string const& arg ) {
         return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();
     }
diff --git a/packages/Catch2/include/internal/catch_test_spec_parser.h b/packages/Catch2/include/internal/catch_test_spec_parser.h
index 79ce889885cf711aea786202090a5381d68a7d02..179d3532e56894a38350ef69ee02d231ddd52079 100644
--- a/packages/Catch2/include/internal/catch_test_spec_parser.h
+++ b/packages/Catch2/include/internal/catch_test_spec_parser.h
@@ -22,9 +22,13 @@ namespace Catch {
     class TestSpecParser {
         enum Mode{ None, Name, QuotedName, Tag, EscapedName };
         Mode m_mode = None;
+        Mode lastMode = None;
         bool m_exclusion = false;
-        std::size_t m_start = std::string::npos, m_pos = 0;
+        std::size_t m_pos = 0;
+        std::size_t m_realPatternPos = 0;
         std::string m_arg;
+        std::string m_substring;
+        std::string m_patternName;
         std::vector<std::size_t> m_escapeChars;
         TestSpec::Filter m_currentFilter;
         TestSpec m_testSpec;
@@ -37,32 +41,47 @@ namespace Catch {
         TestSpec testSpec();
 
     private:
-        void visitChar( char c );
-        void startNewMode( Mode mode, std::size_t start );
+        bool visitChar( char c );
+        void startNewMode( Mode mode );
+        bool processNoneChar( char c );
+        void processNameChar( char c );
+        bool processOtherChar( char c );
+        void endMode();
         void escape();
-        std::string subString() const;
-
+        bool isControlChar( char c ) const;
+        void saveLastMode();
+        void revertBackToLastMode();
+        void addFilter();
+        bool separate();
+        
         template<typename T>
         void addPattern() {
-            std::string token = subString();
+            std::string token = m_patternName;
             for( std::size_t i = 0; i < m_escapeChars.size(); ++i )
-                token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 );
+                token = token.substr( 0, m_escapeChars[i] - i ) + token.substr( m_escapeChars[i] -i +1 );
             m_escapeChars.clear();
             if( startsWith( token, "exclude:" ) ) {
                 m_exclusion = true;
                 token = token.substr( 8 );
             }
             if( !token.empty() ) {
-                TestSpec::PatternPtr pattern = std::make_shared<T>( token );
+                TestSpec::PatternPtr pattern = std::make_shared<T>( token, m_substring );
                 if( m_exclusion )
                     pattern = std::make_shared<TestSpec::ExcludedPattern>( pattern );
                 m_currentFilter.m_patterns.push_back( pattern );
             }
+            m_substring.clear();
+            m_patternName.clear();
             m_exclusion = false;
             m_mode = None;
         }
-
-        void addFilter();
+        
+        inline void addCharToPattern(char c) {
+            m_substring += c;
+            m_patternName += c;
+            m_realPatternPos++;
+        }
+        
     };
     TestSpec parseTestSpec( std::string const& arg );
 
@@ -72,4 +91,4 @@ namespace Catch {
 #pragma clang diagnostic pop
 #endif
 
-#endif // TWOBLUECUBES_CATCH_TEST_SPEC_PARSER_HPP_INCLUDED
+#endif // TWOBLUECUBES_CATCH_TEST_SPEC_PARSER_HPP_INCLUDED
\ No newline at end of file
diff --git a/packages/Catch2/include/internal/catch_tostring.cpp b/packages/Catch2/include/internal/catch_tostring.cpp
index b857d3fbcd1ef992968377847a5f96f404fa432e..2f66f49dc5cb9c08faf047e89eaadbd931f5f07f 100644
--- a/packages/Catch2/include/internal/catch_tostring.cpp
+++ b/packages/Catch2/include/internal/catch_tostring.cpp
@@ -170,6 +170,12 @@ std::string StringMaker<wchar_t *>::convert(wchar_t * str) {
 }
 #endif
 
+#if defined(CATCH_CONFIG_CPP17_BYTE)
+#include <cstddef>
+std::string StringMaker<std::byte>::convert(std::byte value) {
+    return ::Catch::Detail::stringify(std::to_integer<unsigned long long>(value));
+}
+#endif // defined(CATCH_CONFIG_CPP17_BYTE)
 
 std::string StringMaker<int>::convert(int value) {
     return ::Catch::Detail::stringify(static_cast<long long>(value));
@@ -234,11 +240,16 @@ std::string StringMaker<std::nullptr_t>::convert(std::nullptr_t) {
     return "nullptr";
 }
 
+int StringMaker<float>::precision = 5;
+   
 std::string StringMaker<float>::convert(float value) {
-    return fpToString(value, 5) + 'f';
+    return fpToString(value, precision) + 'f';
 }
+
+int StringMaker<double>::precision = 10;
+    
 std::string StringMaker<double>::convert(double value) {
-    return fpToString(value, 10);
+    return fpToString(value, precision);
 }
 
 std::string ratio_string<std::atto>::symbol() { return "a"; }
diff --git a/packages/Catch2/include/internal/catch_tostring.h b/packages/Catch2/include/internal/catch_tostring.h
index 13a43b0c8f40ed5c12c84c24bfe74e01df2fd2a5..640fc8cbd0492672588b59567d6bee77384c5a89 100644
--- a/packages/Catch2/include/internal/catch_tostring.h
+++ b/packages/Catch2/include/internal/catch_tostring.h
@@ -15,6 +15,7 @@
 #include <string>
 #include "catch_compiler_capabilities.h"
 #include "catch_stream.h"
+#include "catch_interfaces_enum_values_registry.h"
 
 #ifdef CATCH_CONFIG_CPP17_STRING_VIEW
 #include <string_view>
@@ -43,9 +44,9 @@ namespace Catch {
 
         template<typename T>
         class IsStreamInsertable {
-            template<typename SS, typename TT>
+            template<typename Stream, typename U>
             static auto test(int)
-                -> decltype(std::declval<SS&>() << std::declval<TT>(), std::true_type());
+                -> decltype(std::declval<Stream&>() << std::declval<U>(), std::true_type());
 
             template<typename, typename>
             static auto test(...)->std::false_type;
@@ -209,6 +210,12 @@ namespace Catch {
         }
     };
 
+#if defined(CATCH_CONFIG_CPP17_BYTE)
+    template<>
+    struct StringMaker<std::byte> {
+        static std::string convert(std::byte value);
+    };
+#endif // defined(CATCH_CONFIG_CPP17_BYTE)
     template<>
     struct StringMaker<int> {
         static std::string convert(int value);
@@ -260,10 +267,13 @@ namespace Catch {
     template<>
     struct StringMaker<float> {
         static std::string convert(float value);
+        static int precision;
     };
+
     template<>
     struct StringMaker<double> {
         static std::string convert(double value);
+        static int precision;
     };
 
     template <typename T>
@@ -639,6 +649,17 @@ struct ratio_string<std::milli> {
 }
 #endif // CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER
 
+#define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \
+namespace Catch { \
+    template<> struct StringMaker<enumName> { \
+        static std::string convert( enumName value ) { \
+            static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \
+            return static_cast<std::string>(enumInfo.lookup( static_cast<int>( value ) )); \
+        } \
+    }; \
+}
+
+#define CATCH_REGISTER_ENUM( enumName, ... ) INTERNAL_CATCH_REGISTER_ENUM( enumName, __VA_ARGS__ )
 
 #ifdef _MSC_VER
 #pragma warning(pop)
diff --git a/packages/Catch2/include/internal/catch_type_traits.hpp b/packages/Catch2/include/internal/catch_type_traits.hpp
deleted file mode 100644
index 8edb1ecf0a46e9ae8f20bf4077729dc62b3ebd7c..0000000000000000000000000000000000000000
--- a/packages/Catch2/include/internal/catch_type_traits.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  Created by Jozef on 12/11/2018.
- *  Copyright 2017 Two Blue Cubes Ltd. All rights reserved.
- *
- *  Distributed under the Boost Software License, Version 1.0. (See accompanying
- *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- */
-
-#ifndef TWOBLUECUBES_CATCH_TYPE_TRAITS_HPP_INCLUDED
-#define TWOBLUECUBES_CATCH_TYPE_TRAITS_HPP_INCLUDED
-
-#include <type_traits>
-
-namespace Catch{
-
-#ifdef CATCH_CPP17_OR_GREATER
-	template <typename...>
-	inline constexpr auto is_unique = std::true_type{};
-
-	template <typename T, typename... Rest>
-	inline constexpr auto is_unique<T, Rest...> = std::bool_constant<
-		(!std::is_same_v<T, Rest> && ...) && is_unique<Rest...>
-	>{};
-#else
-
-template <typename...>
-struct is_unique : std::true_type{};
-
-template <typename T0, typename T1, typename... Rest>
-struct is_unique<T0, T1, Rest...> : std::integral_constant
-<bool,
-     !std::is_same<T0, T1>::value 
-     && is_unique<T0, Rest...>::value 
-     && is_unique<T1, Rest...>::value
->{};
-
-#endif
-}
-
-#endif // TWOBLUECUBES_CATCH_TYPE_TRAITS_HPP_INCLUDED
diff --git a/packages/Catch2/include/internal/catch_version.cpp b/packages/Catch2/include/internal/catch_version.cpp
index 43832053c8bc1fdedb00499243461d69a524aa07..bb5b06163e67f1a8778324be1e679884fecb4b5f 100644
--- a/packages/Catch2/include/internal/catch_version.cpp
+++ b/packages/Catch2/include/internal/catch_version.cpp
@@ -37,7 +37,7 @@ namespace Catch {
     }
 
     Version const& libraryVersion() {
-        static Version version( 2, 7, 1, "", 0 );
+        static Version version( 2, 10, 0, "", 0 );
         return version;
     }
 
diff --git a/packages/Catch2/include/internal/catch_wildcard_pattern.cpp b/packages/Catch2/include/internal/catch_wildcard_pattern.cpp
index 9bf20f0440fb130440a5d2422ce6c8724af62085..95e5d3f0bd958fe094f65f2d8b2857fa6d1b14fd 100644
--- a/packages/Catch2/include/internal/catch_wildcard_pattern.cpp
+++ b/packages/Catch2/include/internal/catch_wildcard_pattern.cpp
@@ -9,14 +9,12 @@
 #include "catch_enforce.h"
 #include "catch_string_manip.h"
 
-#include <sstream>
-
 namespace Catch {
 
     WildcardPattern::WildcardPattern( std::string const& pattern,
                                       CaseSensitive::Choice caseSensitivity )
     :   m_caseSensitivity( caseSensitivity ),
-        m_pattern( adjustCase( pattern ) )
+        m_pattern( normaliseString( pattern ) )
     {
         if( startsWith( m_pattern, '*' ) ) {
             m_pattern = m_pattern.substr( 1 );
@@ -31,19 +29,19 @@ namespace Catch {
     bool WildcardPattern::matches( std::string const& str ) const {
         switch( m_wildcard ) {
             case NoWildcard:
-                return m_pattern == adjustCase( str );
+                return m_pattern == normaliseString( str );
             case WildcardAtStart:
-                return endsWith( adjustCase( str ), m_pattern );
+                return endsWith( normaliseString( str ), m_pattern );
             case WildcardAtEnd:
-                return startsWith( adjustCase( str ), m_pattern );
+                return startsWith( normaliseString( str ), m_pattern );
             case WildcardAtBothEnds:
-                return contains( adjustCase( str ), m_pattern );
+                return contains( normaliseString( str ), m_pattern );
             default:
                 CATCH_INTERNAL_ERROR( "Unknown enum" );
         }
     }
 
-    std::string WildcardPattern::adjustCase( std::string const& str ) const {
-        return m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str;
+    std::string WildcardPattern::normaliseString( std::string const& str ) const {
+        return trim( m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str );
     }
 }
diff --git a/packages/Catch2/include/internal/catch_wildcard_pattern.h b/packages/Catch2/include/internal/catch_wildcard_pattern.h
index 4dae717140649cf4c13affa21a9194f748e83a63..5d508f7ba36aeed640862421cd90c37a45f3f9c1 100644
--- a/packages/Catch2/include/internal/catch_wildcard_pattern.h
+++ b/packages/Catch2/include/internal/catch_wildcard_pattern.h
@@ -28,7 +28,7 @@ namespace Catch
         virtual bool matches( std::string const& str ) const;
 
     private:
-        std::string adjustCase( std::string const& str ) const;
+        std::string normaliseString( std::string const& str ) const;
         CaseSensitive::Choice m_caseSensitivity;
         WildcardPosition m_wildcard = NoWildcard;
         std::string m_pattern;
diff --git a/packages/Catch2/include/reporters/catch_reporter_bases.hpp b/packages/Catch2/include/reporters/catch_reporter_bases.hpp
index a9b0640c343057292efda19e833d6642096395d7..66a891ffd4cf56b30f69ba2e915757f221fc83e7 100644
--- a/packages/Catch2/include/reporters/catch_reporter_bases.hpp
+++ b/packages/Catch2/include/reporters/catch_reporter_bases.hpp
@@ -51,6 +51,8 @@ namespace Catch {
 
         void noMatchingTestCases(std::string const&) override {}
 
+        void reportInvalidArguments(std::string const&) override {}
+        
         void testRunStarting(TestRunInfo const& _testRunInfo) override {
             currentTestRunInfo = _testRunInfo;
         }
@@ -277,4 +279,4 @@ namespace Catch {
 
 } // end namespace Catch
 
-#endif // TWOBLUECUBES_CATCH_REPORTER_BASES_HPP_INCLUDED
+#endif // TWOBLUECUBES_CATCH_REPORTER_BASES_HPP_INCLUDED
\ No newline at end of file
diff --git a/packages/Catch2/include/reporters/catch_reporter_compact.cpp b/packages/Catch2/include/reporters/catch_reporter_compact.cpp
index 65f70266dd6503f61bcfaed651a944f8b28741ea..017f521f483a10126ca0cc12c8f6718f9e9b3779 100644
--- a/packages/Catch2/include/reporters/catch_reporter_compact.cpp
+++ b/packages/Catch2/include/reporters/catch_reporter_compact.cpp
@@ -8,7 +8,7 @@
 #include "catch_reporter_compact.h"
 
 #include "../internal/catch_reporter_registrars.hpp"
-#include "internal/catch_console_colour.h"
+#include "../internal/catch_console_colour.h"
 
 namespace {
 
@@ -209,24 +209,25 @@ private:
         if (itMessage == messages.end())
             return;
 
-        // using messages.end() directly yields (or auto) compilation error:
-        std::vector<MessageInfo>::const_iterator itEnd = messages.end();
-        const std::size_t N = static_cast<std::size_t>(std::distance(itMessage, itEnd));
+        const auto itEnd = messages.cend();
+        const auto N = static_cast<std::size_t>(std::distance(itMessage, itEnd));
 
         {
             Colour colourGuard(colour);
             stream << " with " << pluralise(N, "message") << ':';
         }
 
-        for (; itMessage != itEnd; ) {
+        while (itMessage != itEnd) {
             // If this assertion is a warning ignore any INFO messages
             if (printInfoMessages || itMessage->type != ResultWas::Info) {
-                stream << " '" << itMessage->message << '\'';
-                if (++itMessage != itEnd) {
+                printMessage();
+                if (itMessage != itEnd) {
                     Colour colourGuard(dimColour());
                     stream << " and";
                 }
+                continue;
             }
+            ++itMessage;
         }
     }
 
diff --git a/packages/Catch2/include/reporters/catch_reporter_console.cpp b/packages/Catch2/include/reporters/catch_reporter_console.cpp
index 53b977eb1fbc68ca64e645e46b16568fb6ab688a..be00d0bdf3b0db1e93bd1d62ae6c762f16dd283e 100644
--- a/packages/Catch2/include/reporters/catch_reporter_console.cpp
+++ b/packages/Catch2/include/reporters/catch_reporter_console.cpp
@@ -9,7 +9,7 @@
 #include "catch_reporter_console.h"
 
 #include "../internal/catch_reporter_registrars.hpp"
-#include "internal/catch_console_colour.h"
+#include "../internal/catch_console_colour.h"
 #include "../internal/catch_version.h"
 #include "../internal/catch_text.h"
 #include "../internal/catch_stringref.h"
@@ -20,11 +20,17 @@
 #if defined(_MSC_VER)
 #pragma warning(push)
 #pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch
- // Note that 4062 (not all labels are handled
- // and default is missing) is enabled
+ // Note that 4062 (not all labels are handled and default is missing) is enabled
+#endif
+
+#if defined(__clang__)
+#  pragma clang diagnostic push
+// For simplicity, benchmarking-only helpers are always enabled
+#  pragma clang diagnostic ignored "-Wunused-function"
 #endif
 
 
+
 namespace Catch {
 
 namespace {
@@ -208,6 +214,10 @@ class Duration {
     Unit m_units;
 
 public:
+	explicit Duration(double inNanoseconds, Unit units = Unit::Auto)
+        : Duration(static_cast<uint64_t>(inNanoseconds), units) {
+    }
+
     explicit Duration(uint64_t inNanoseconds, Unit units = Unit::Auto)
         : m_inNanoseconds(inNanoseconds),
         m_units(units) {
@@ -258,7 +268,7 @@ public:
 
     }
     friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {
-        return os << duration.value() << " " << duration.unitsAsString();
+        return os << duration.value() << ' ' << duration.unitsAsString();
     }
 };
 } // end anon namespace
@@ -283,10 +293,16 @@ public:
         if (!m_isOpen) {
             m_isOpen = true;
             *this << RowBreak();
-            for (auto const& info : m_columnInfos)
-                *this << info.name << ColumnBreak();
-            *this << RowBreak();
-            m_os << Catch::getLineOfChars<'-'>() << "\n";
+
+			Columns headerCols;
+			Spacer spacer(2);
+			for (auto const& info : m_columnInfos) {
+				headerCols += Column(info.name).width(static_cast<std::size_t>(info.width - 2));
+				headerCols += spacer;
+			}
+			m_os << headerCols << '\n';
+
+            m_os << Catch::getLineOfChars<'-'>() << '\n';
         }
     }
     void close() {
@@ -305,30 +321,29 @@ public:
 
     friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) {
         auto colStr = tp.m_oss.str();
-        // This takes account of utf8 encodings
-        auto strSize = Catch::StringRef(colStr).numberOfCharacters();
+        const auto strSize = colStr.size();
         tp.m_oss.str("");
         tp.open();
         if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {
             tp.m_currentColumn = -1;
-            tp.m_os << "\n";
+            tp.m_os << '\n';
         }
         tp.m_currentColumn++;
 
         auto colInfo = tp.m_columnInfos[tp.m_currentColumn];
-        auto padding = (strSize + 2 < static_cast<std::size_t>(colInfo.width))
-            ? std::string(colInfo.width - (strSize + 2), ' ')
+        auto padding = (strSize + 1 < static_cast<std::size_t>(colInfo.width))
+            ? std::string(colInfo.width - (strSize + 1), ' ')
             : std::string();
         if (colInfo.justification == ColumnInfo::Left)
-            tp.m_os << colStr << padding << " ";
+            tp.m_os << colStr << padding << ' ';
         else
-            tp.m_os << padding << colStr << " ";
+            tp.m_os << padding << colStr << ' ';
         return tp;
     }
 
     friend TablePrinter& operator << (TablePrinter& tp, RowBreak) {
         if (tp.m_currentColumn > 0) {
-            tp.m_os << "\n";
+            tp.m_os << '\n';
             tp.m_currentColumn = -1;
         }
         return tp;
@@ -338,12 +353,26 @@ public:
 ConsoleReporter::ConsoleReporter(ReporterConfig const& config)
     : StreamingReporterBase(config),
     m_tablePrinter(new TablePrinter(config.stream(),
-    {
-        { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left },
-        { "iters", 8, ColumnInfo::Right },
-        { "elapsed ns", 14, ColumnInfo::Right },
-        { "average", 14, ColumnInfo::Right }
-    })) {}
+        [&config]() -> std::vector<ColumnInfo> {
+        if (config.fullConfig()->benchmarkNoAnalysis())
+        {
+            return{
+                { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },
+                { "     samples", 14, ColumnInfo::Right },
+                { "  iterations", 14, ColumnInfo::Right },
+                { "        mean", 14, ColumnInfo::Right }
+            };
+        }
+        else
+        {
+            return{
+                { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left },
+                { "samples      mean       std dev", 14, ColumnInfo::Right },
+                { "iterations   low mean   low std dev", 14, ColumnInfo::Right },
+                { "estimated    high mean  high std dev", 14, ColumnInfo::Right }
+            };
+        }
+    }())) {}
 ConsoleReporter::~ConsoleReporter() = default;
 
 std::string ConsoleReporter::getDescription() {
@@ -354,6 +383,10 @@ void ConsoleReporter::noMatchingTestCases(std::string const& spec) {
     stream << "No test cases matched '" << spec << '\'' << std::endl;
 }
 
+void ConsoleReporter::reportInvalidArguments(std::string const&arg){
+    stream << "Invalid Filter: " << arg << std::endl;
+}
+
 void ConsoleReporter::assertionStarting(AssertionInfo const&) {}
 
 bool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) {
@@ -374,6 +407,7 @@ bool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) {
 }
 
 void ConsoleReporter::sectionStarting(SectionInfo const& _sectionInfo) {
+    m_tablePrinter->close();
     m_headerPrinted = false;
     StreamingReporterBase::sectionStarting(_sectionInfo);
 }
@@ -397,29 +431,53 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {
     StreamingReporterBase::sectionEnded(_sectionStats);
 }
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+void ConsoleReporter::benchmarkPreparing(std::string const& name) {
+	lazyPrintWithoutClosingBenchmarkTable();
 
-void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {
-    lazyPrintWithoutClosingBenchmarkTable();
+	auto nameCol = Column(name).width(static_cast<std::size_t>(m_tablePrinter->columnInfos()[0].width - 2));
 
-    auto nameCol = Column( info.name ).width( static_cast<std::size_t>( m_tablePrinter->columnInfos()[0].width - 2 ) );
+	bool firstLine = true;
+	for (auto line : nameCol) {
+		if (!firstLine)
+			(*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();
+		else
+			firstLine = false;
 
-    bool firstLine = true;
-    for (auto line : nameCol) {
-        if (!firstLine)
-            (*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();
-        else
-            firstLine = false;
+		(*m_tablePrinter) << line << ColumnBreak();
+	}
+}
 
-        (*m_tablePrinter) << line << ColumnBreak();
+void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {
+    (*m_tablePrinter) << info.samples << ColumnBreak()
+        << info.iterations << ColumnBreak();
+    if (!m_config->benchmarkNoAnalysis())
+        (*m_tablePrinter) << Duration(info.estimatedDuration) << ColumnBreak();
+}
+void ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) {
+    if (m_config->benchmarkNoAnalysis())
+    {
+        (*m_tablePrinter) << Duration(stats.mean.point.count()) << ColumnBreak();
+    }
+    else
+    {
+        (*m_tablePrinter) << ColumnBreak()
+            << Duration(stats.mean.point.count()) << ColumnBreak()
+            << Duration(stats.mean.lower_bound.count()) << ColumnBreak()
+            << Duration(stats.mean.upper_bound.count()) << ColumnBreak() << ColumnBreak()
+            << Duration(stats.standardDeviation.point.count()) << ColumnBreak()
+            << Duration(stats.standardDeviation.lower_bound.count()) << ColumnBreak()
+            << Duration(stats.standardDeviation.upper_bound.count()) << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak();
     }
 }
-void ConsoleReporter::benchmarkEnded(BenchmarkStats const& stats) {
-    Duration average(stats.elapsedTimeInNanoseconds / stats.iterations);
+
+void ConsoleReporter::benchmarkFailed(std::string const& error) {
+	Colour colour(Colour::Red);
     (*m_tablePrinter)
-        << stats.iterations << ColumnBreak()
-        << stats.elapsedTimeInNanoseconds << ColumnBreak()
-        << average << ColumnBreak();
+        << "Benchmark failed (" << error << ')'
+        << ColumnBreak() << RowBreak();
 }
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
 void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) {
     m_tablePrinter->close();
@@ -498,11 +556,10 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
 
     SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;
 
-    if (!lineInfo.empty()) {
-        stream << getLineOfChars<'-'>() << '\n';
-        Colour colourGuard(Colour::FileName);
-        stream << lineInfo << '\n';
-    }
+
+    stream << getLineOfChars<'-'>() << '\n';
+    Colour colourGuard(Colour::FileName);
+    stream << lineInfo << '\n';
     stream << getLineOfChars<'.'>() << '\n' << std::endl;
 }
 
@@ -638,3 +695,7 @@ CATCH_REGISTER_REPORTER("console", ConsoleReporter)
 #if defined(_MSC_VER)
 #pragma warning(pop)
 #endif
+
+#if defined(__clang__)
+#  pragma clang diagnostic pop
+#endif
\ No newline at end of file
diff --git a/packages/Catch2/include/reporters/catch_reporter_console.h b/packages/Catch2/include/reporters/catch_reporter_console.h
index effa58d3435adfd8b0d6d2dec609a30dc46d5ead..43024dafdbea6233158538a3ac0c4610da930acf 100644
--- a/packages/Catch2/include/reporters/catch_reporter_console.h
+++ b/packages/Catch2/include/reporters/catch_reporter_console.h
@@ -32,6 +32,8 @@ namespace Catch {
 
         void noMatchingTestCases(std::string const& spec) override;
 
+        void reportInvalidArguments(std::string const&arg) override;
+
         void assertionStarting(AssertionInfo const&) override;
 
         bool assertionEnded(AssertionStats const& _assertionStats) override;
@@ -39,9 +41,12 @@ namespace Catch {
         void sectionStarting(SectionInfo const& _sectionInfo) override;
         void sectionEnded(SectionStats const& _sectionStats) override;
 
-
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
         void benchmarkStarting(BenchmarkInfo const& info) override;
-        void benchmarkEnded(BenchmarkStats const& stats) override;
+        void benchmarkEnded(BenchmarkStats<> const& stats) override;
+        void benchmarkFailed(std::string const& error) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void testCaseEnded(TestCaseStats const& _testCaseStats) override;
         void testGroupEnded(TestGroupStats const& _testGroupStats) override;
@@ -81,4 +86,4 @@ namespace Catch {
 #pragma warning(pop)
 #endif
 
-#endif // TWOBLUECUBES_CATCH_REPORTER_CONSOLE_H_INCLUDED
+#endif // TWOBLUECUBES_CATCH_REPORTER_CONSOLE_H_INCLUDED
\ No newline at end of file
diff --git a/packages/Catch2/include/reporters/catch_reporter_listening.cpp b/packages/Catch2/include/reporters/catch_reporter_listening.cpp
index 9ddae2f2ed894fc75115bfa06287800dcaa2eeae..91e6b39a9b3842d4efdd3bfda25d6ebe75803d23 100644
--- a/packages/Catch2/include/reporters/catch_reporter_listening.cpp
+++ b/packages/Catch2/include/reporters/catch_reporter_listening.cpp
@@ -41,20 +41,42 @@ namespace Catch {
         }
         m_reporter->noMatchingTestCases( spec );
     }
-
+    
+    void ListeningReporter::reportInvalidArguments(std::string const&arg){
+        for ( auto const& listener : m_listeners ) {
+            listener->reportInvalidArguments( arg );
+        }
+        m_reporter->reportInvalidArguments( arg );
+    }    
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void ListeningReporter::benchmarkPreparing( std::string const& name ) {
+		for (auto const& listener : m_listeners) {
+			listener->benchmarkPreparing(name);
+		}
+		m_reporter->benchmarkPreparing(name);
+	}
     void ListeningReporter::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) {
         for ( auto const& listener : m_listeners ) {
             listener->benchmarkStarting( benchmarkInfo );
         }
         m_reporter->benchmarkStarting( benchmarkInfo );
     }
-    void ListeningReporter::benchmarkEnded( BenchmarkStats const& benchmarkStats ) {
+    void ListeningReporter::benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) {
         for ( auto const& listener : m_listeners ) {
             listener->benchmarkEnded( benchmarkStats );
         }
         m_reporter->benchmarkEnded( benchmarkStats );
     }
 
+	void ListeningReporter::benchmarkFailed( std::string const& error ) {
+		for (auto const& listener : m_listeners) {
+			listener->benchmarkFailed(error);
+		}
+		m_reporter->benchmarkFailed(error);
+	}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     void ListeningReporter::testRunStarting( TestRunInfo const& testRunInfo ) {
         for ( auto const& listener : m_listeners ) {
             listener->testRunStarting( testRunInfo );
@@ -139,4 +161,4 @@ namespace Catch {
         return true;
     }
 
-} // end namespace Catch
+} // end namespace Catch
\ No newline at end of file
diff --git a/packages/Catch2/include/reporters/catch_reporter_listening.h b/packages/Catch2/include/reporters/catch_reporter_listening.h
index dddd7a518664f9b38c52a2fbd83bfd91c32accda..bfaa3085e558a6afe0b78baeaa1345757979fdf3 100644
--- a/packages/Catch2/include/reporters/catch_reporter_listening.h
+++ b/packages/Catch2/include/reporters/catch_reporter_listening.h
@@ -28,11 +28,17 @@ namespace Catch {
         ReporterPreferences getPreferences() const override;
 
         void noMatchingTestCases( std::string const& spec ) override;
-
+        
+        void reportInvalidArguments(std::string const&arg) override;
+        
         static std::set<Verbosity> getSupportedVerbosities();
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
         void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;
-        void benchmarkEnded( BenchmarkStats const& benchmarkStats ) override;
+        void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) override;
+        void benchmarkFailed(std::string const&) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void testRunStarting( TestRunInfo const& testRunInfo ) override;
         void testGroupStarting( GroupInfo const& groupInfo ) override;
@@ -54,4 +60,4 @@ namespace Catch {
 
 } // end namespace Catch
 
-#endif // TWOBLUECUBES_CATCH_MULTI_REPORTER_H_INCLUDED
+#endif // TWOBLUECUBES_CATCH_MULTI_REPORTER_H_INCLUDED
\ No newline at end of file
diff --git a/packages/Catch2/include/reporters/catch_reporter_teamcity.hpp b/packages/Catch2/include/reporters/catch_reporter_teamcity.hpp
index eca2885cd4e9fde3b5e7008388f4b57f203ce9bc..47b7e4aac30f94370156d7be8b5424e9c51eeadb 100644
--- a/packages/Catch2/include/reporters/catch_reporter_teamcity.hpp
+++ b/packages/Catch2/include/reporters/catch_reporter_teamcity.hpp
@@ -183,8 +183,7 @@ namespace Catch {
 
             SourceLineInfo lineInfo = m_sectionStack.front().lineInfo;
 
-            if( !lineInfo.empty() )
-                os << lineInfo << "\n";
+            os << lineInfo << "\n";
             os << getLineOfChars<'.'>() << "\n\n";
         }
 
diff --git a/packages/Catch2/include/reporters/catch_reporter_xml.cpp b/packages/Catch2/include/reporters/catch_reporter_xml.cpp
index c7572d1ebe3c7f36d653f7ef9b839a5cde268f82..26ca8918ce51ad5e3b5fbce2708d7bb2f730815d 100644
--- a/packages/Catch2/include/reporters/catch_reporter_xml.cpp
+++ b/packages/Catch2/include/reporters/catch_reporter_xml.cpp
@@ -219,6 +219,51 @@ namespace Catch {
         m_xml.endElement();
     }
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void XmlReporter::benchmarkPreparing(std::string const& name) {
+        m_xml.startElement("BenchmarkResults")
+            .writeAttribute("name", name);
+    }
+
+    void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {
+        m_xml.writeAttribute("samples", info.samples)
+            .writeAttribute("resamples", info.resamples)
+            .writeAttribute("iterations", info.iterations)
+            .writeAttribute("clockResolution", static_cast<uint64_t>(info.clockResolution))
+            .writeAttribute("estimatedDuration", static_cast<uint64_t>(info.estimatedDuration))
+            .writeComment("All values in nano seconds");
+    }
+
+    void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) {
+        m_xml.startElement("mean")
+            .writeAttribute("value", static_cast<uint64_t>(benchmarkStats.mean.point.count()))
+            .writeAttribute("lowerBound", static_cast<uint64_t>(benchmarkStats.mean.lower_bound.count()))
+            .writeAttribute("upperBound", static_cast<uint64_t>(benchmarkStats.mean.upper_bound.count()))
+            .writeAttribute("ci", benchmarkStats.mean.confidence_interval);
+        m_xml.endElement();
+        m_xml.startElement("standardDeviation")
+            .writeAttribute("value", benchmarkStats.standardDeviation.point.count())
+            .writeAttribute("lowerBound", benchmarkStats.standardDeviation.lower_bound.count())
+            .writeAttribute("upperBound", benchmarkStats.standardDeviation.upper_bound.count())
+            .writeAttribute("ci", benchmarkStats.standardDeviation.confidence_interval);
+        m_xml.endElement();
+        m_xml.startElement("outliers")
+            .writeAttribute("variance", benchmarkStats.outlierVariance)
+            .writeAttribute("lowMild", benchmarkStats.outliers.low_mild)
+            .writeAttribute("lowSevere", benchmarkStats.outliers.low_severe)
+            .writeAttribute("highMild", benchmarkStats.outliers.high_mild)
+            .writeAttribute("highSevere", benchmarkStats.outliers.high_severe);
+        m_xml.endElement();
+        m_xml.endElement();
+    }
+
+    void XmlReporter::benchmarkFailed(std::string const &error) {
+        m_xml.scopedElement("failed").
+            writeAttribute("message", error);
+        m_xml.endElement();
+    }
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     CATCH_REGISTER_REPORTER( "xml", XmlReporter )
 
 } // end namespace Catch
diff --git a/packages/Catch2/include/reporters/catch_reporter_xml.h b/packages/Catch2/include/reporters/catch_reporter_xml.h
index 7926f93a858502f3b6d70027cf80441e3e674d93..5b6ba31059438ede4052fcff54a698b8654e7271 100644
--- a/packages/Catch2/include/reporters/catch_reporter_xml.h
+++ b/packages/Catch2/include/reporters/catch_reporter_xml.h
@@ -50,6 +50,13 @@ namespace Catch {
 
         void testRunEnded(TestRunStats const& testRunStats) override;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
+        void benchmarkStarting(BenchmarkInfo const&) override;
+        void benchmarkEnded(BenchmarkStats<> const&) override;
+        void benchmarkFailed(std::string const&) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     private:
         Timer m_testCaseTimer;
         XmlWriter m_xml;
diff --git a/packages/Catch2/misc/appveyorMergeCoverageScript.py b/packages/Catch2/misc/appveyorMergeCoverageScript.py
index a74e6e0e818a5977dc571a3b48f6987506d94d57..93a47fffe118ef1f1d02b77e7828fbd40605aaaf 100644
--- a/packages/Catch2/misc/appveyorMergeCoverageScript.py
+++ b/packages/Catch2/misc/appveyorMergeCoverageScript.py
@@ -4,6 +4,6 @@ import glob
 import subprocess
 
 if __name__ == '__main__':
-    cov_files = list(glob.glob('cov-report*.bin'))
+    cov_files = list(glob.glob('projects/cov-report*.bin'))
     base_cmd = ['OpenCppCoverage', '--quiet', '--export_type=cobertura:cobertura.xml'] + ['--input_coverage={}'.format(f) for f in cov_files]
-    subprocess.call(base_cmd)
+    subprocess.check_call(base_cmd)
diff --git a/packages/Catch2/misc/coverage-helper.cpp b/packages/Catch2/misc/coverage-helper.cpp
index a6643838f65961af447d40f59eae7cc3445bc4af..a31e927f590ce68a59c6ec87093c996168021f85 100644
--- a/packages/Catch2/misc/coverage-helper.cpp
+++ b/packages/Catch2/misc/coverage-helper.cpp
@@ -29,7 +29,8 @@ std::string escape_arg(const std::string& arg) {
             escaped.append(num_backslashes * 2, '\\');
             break;
         } else if (*it == '"') {
-            escaped.append(num_backslashes * 2 + 1, '\\');
+            escaped.append((num_backslashes + 1) * 2, '\\');
+            escaped.push_back('"');
             escaped.push_back(*it);
         } else {
             escaped.append(num_backslashes, '\\');
@@ -89,27 +90,30 @@ std::string windowsify_path(std::string path) {
     return path;
 }
 
-void exec_cmd(std::string const& cmd, int log_num, std::string const& path) {
+int exec_cmd(std::string const& cmd, int log_num, std::string const& path) {
     std::array<char, 128> buffer;
-#if defined(_WIN32)
+
     // cmd has already been escaped outside this function.
     auto real_cmd = "OpenCppCoverage --export_type binary:cov-report" + std::to_string(log_num)
         + ".bin --quiet " + "--sources " + escape_arg(path) + " --cover_children -- " + cmd;
     std::cout << "=== Marker ===: Cmd: " << real_cmd << '\n';
-    std::shared_ptr<FILE> pipe(_popen(real_cmd.c_str(), "r"), _pclose);
-#else // Just for testing, in the real world we will always work under WIN32
-    (void)log_num; (void)path;
-    std::shared_ptr<FILE> pipe(popen(cmd.c_str(), "r"), pclose);
-#endif
+    auto pipe = _popen(real_cmd.c_str(), "r");
 
     if (!pipe) {
         throw std::runtime_error("popen() failed!");
     }
-    while (!feof(pipe.get())) {
-        if (fgets(buffer.data(), 128, pipe.get()) != nullptr) {
+    while (!feof(pipe)) {
+        if (fgets(buffer.data(), 128, pipe) != nullptr) {
             std::cout << buffer.data();
         }
     }
+
+    auto ret = _pclose(pipe);
+    if (ret == -1) {
+        throw std::runtime_error("underlying error in pclose()");
+    }
+
+    return ret;
 }
 
 // argv should be:
@@ -124,7 +128,7 @@ int main(int argc, char** argv) {
     assert(sep - begin(args) == 2 && "Structure differs from expected!");
 
     auto num = parse_log_file_arg(args[1]);
-    
+
     auto cmdline = std::accumulate(++sep, end(args), std::string{}, [] (const std::string& lhs, const std::string& rhs) {
         return lhs + ' ' + escape_arg(rhs);
     });
diff --git a/packages/Catch2/projects/CMakeLists.txt b/packages/Catch2/projects/CMakeLists.txt
index 37b0865ae1c53a7068c5de26165f8c41b8de721e..cbe21fcff5a95649e6bbe283b6d9449dc3f9d9eb 100644
--- a/packages/Catch2/projects/CMakeLists.txt
+++ b/packages/Catch2/projects/CMakeLists.txt
@@ -17,11 +17,16 @@ endif(MSVC) #Temporary workaround
 set(TEST_SOURCES
         ${SELF_TEST_DIR}/TestMain.cpp
         ${SELF_TEST_DIR}/IntrospectiveTests/CmdLine.tests.cpp
+        ${SELF_TEST_DIR}/IntrospectiveTests/Details.tests.cpp
         ${SELF_TEST_DIR}/IntrospectiveTests/GeneratorsImpl.tests.cpp
+        ${SELF_TEST_DIR}/IntrospectiveTests/InternalBenchmark.tests.cpp
         ${SELF_TEST_DIR}/IntrospectiveTests/PartTracker.tests.cpp
+        ${SELF_TEST_DIR}/IntrospectiveTests/RandomNumberGeneration.tests.cpp
         ${SELF_TEST_DIR}/IntrospectiveTests/Tag.tests.cpp
         ${SELF_TEST_DIR}/IntrospectiveTests/String.tests.cpp
+        ${SELF_TEST_DIR}/IntrospectiveTests/StringManip.tests.cpp
         ${SELF_TEST_DIR}/IntrospectiveTests/Xml.tests.cpp
+        ${SELF_TEST_DIR}/IntrospectiveTests/ToString.tests.cpp
         ${SELF_TEST_DIR}/UsageTests/Approx.tests.cpp
         ${SELF_TEST_DIR}/UsageTests/BDD.tests.cpp
         ${SELF_TEST_DIR}/UsageTests/Benchmark.tests.cpp
@@ -34,6 +39,7 @@ set(TEST_SOURCES
         ${SELF_TEST_DIR}/UsageTests/Generators.tests.cpp
         ${SELF_TEST_DIR}/UsageTests/Message.tests.cpp
         ${SELF_TEST_DIR}/UsageTests/Misc.tests.cpp
+        ${SELF_TEST_DIR}/UsageTests/ToStringByte.tests.cpp
         ${SELF_TEST_DIR}/UsageTests/ToStringChrono.tests.cpp
         ${SELF_TEST_DIR}/UsageTests/ToStringGeneral.tests.cpp
         ${SELF_TEST_DIR}/UsageTests/ToStringOptional.tests.cpp
@@ -78,6 +84,33 @@ CheckFileList(EXTERNAL_HEADERS ${HEADER_DIR}/external)
 
 
 # Please keep these ordered alphabetically
+set(BENCHMARK_HEADERS
+		${HEADER_DIR}/internal/benchmark/catch_benchmark.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_chronometer.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_clock.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_constructor.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_environment.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_estimate.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_execution_plan.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_optimizer.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_outlier_classification.hpp
+        ${HEADER_DIR}/internal/benchmark/catch_sample_analysis.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_analyse.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_benchmark_function.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_complete_invoke.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_estimate_clock.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_measure.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_repeat.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_run_for_at_least.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_stats.hpp
+        ${HEADER_DIR}/internal/benchmark/detail/catch_timing.hpp
+)
+set(BENCHMARK_SOURCES
+    ${HEADER_DIR}/internal/benchmark/detail/catch_stats.cpp
+)
+
+SOURCE_GROUP("benchmark" FILES ${BENCHMARK_HEADERS} ${BENCHMARK_SOURCES})
+
 set(INTERNAL_HEADERS
         ${HEADER_DIR}/internal/catch_approx.h
         ${HEADER_DIR}/internal/catch_assertionhandler.h
@@ -97,6 +130,7 @@ set(INTERNAL_HEADERS
         ${HEADER_DIR}/internal/catch_decomposer.h
         ${HEADER_DIR}/internal/catch_default_main.hpp
         ${HEADER_DIR}/internal/catch_enforce.h
+        ${HEADER_DIR}/internal/catch_enum_values_registry.h
         ${HEADER_DIR}/internal/catch_errno_guard.h
         ${HEADER_DIR}/internal/catch_exception_translator_registry.h
         ${HEADER_DIR}/internal/catch_external_interfaces.h
@@ -107,6 +141,7 @@ set(INTERNAL_HEADERS
         ${HEADER_DIR}/internal/catch_impl.hpp
         ${HEADER_DIR}/internal/catch_interfaces_capture.h
         ${HEADER_DIR}/internal/catch_interfaces_config.h
+        ${HEADER_DIR}/internal/catch_interfaces_enum_values_registry.h
         ${HEADER_DIR}/internal/catch_interfaces_exception.h
         ${HEADER_DIR}/internal/catch_interfaces_registry_hub.h
         ${HEADER_DIR}/internal/catch_interfaces_reporter.h
@@ -116,6 +151,7 @@ set(INTERNAL_HEADERS
         ${HEADER_DIR}/internal/catch_leak_detector.h
         ${HEADER_DIR}/internal/catch_list.h
         ${HEADER_DIR}/internal/catch_matchers.h
+        ${HEADER_DIR}/internal/catch_matchers_exception.hpp
         ${HEADER_DIR}/internal/catch_matchers_floating.h
         ${HEADER_DIR}/internal/catch_matchers_generic.hpp
         ${HEADER_DIR}/internal/catch_matchers_string.h
@@ -135,7 +171,6 @@ set(INTERNAL_HEADERS
         ${HEADER_DIR}/internal/catch_reporter_registry.h
         ${HEADER_DIR}/internal/catch_result_type.h
         ${HEADER_DIR}/internal/catch_run_context.h
-        ${HEADER_DIR}/internal/catch_benchmark.h
         ${HEADER_DIR}/internal/catch_section.h
         ${HEADER_DIR}/internal/catch_section_info.h
         ${HEADER_DIR}/internal/catch_session.h
@@ -159,7 +194,6 @@ set(INTERNAL_HEADERS
         ${HEADER_DIR}/internal/catch_to_string.hpp
         ${HEADER_DIR}/internal/catch_tostring.h
         ${HEADER_DIR}/internal/catch_totals.h
-        ${HEADER_DIR}/internal/catch_type_traits.hpp
         ${HEADER_DIR}/internal/catch_uncaught_exceptions.h
         ${HEADER_DIR}/internal/catch_user_interfaces.h
         ${HEADER_DIR}/internal/catch_version.h
@@ -171,7 +205,6 @@ set(IMPL_SOURCES
         ${HEADER_DIR}/internal/catch_approx.cpp
         ${HEADER_DIR}/internal/catch_assertionhandler.cpp
         ${HEADER_DIR}/internal/catch_assertionresult.cpp
-        ${HEADER_DIR}/internal/catch_benchmark.cpp
         ${HEADER_DIR}/internal/catch_capture_matchers.cpp
         ${HEADER_DIR}/internal/catch_commandline.cpp
         ${HEADER_DIR}/internal/catch_common.cpp
@@ -182,6 +215,7 @@ set(IMPL_SOURCES
         ${HEADER_DIR}/internal/catch_debugger.cpp
         ${HEADER_DIR}/internal/catch_decomposer.cpp
         ${HEADER_DIR}/internal/catch_enforce.cpp
+        ${HEADER_DIR}/internal/catch_enum_values_registry.cpp
         ${HEADER_DIR}/internal/catch_errno_guard.cpp
         ${HEADER_DIR}/internal/catch_exception_translator_registry.cpp
         ${HEADER_DIR}/internal/catch_fatal_condition.cpp
@@ -196,6 +230,7 @@ set(IMPL_SOURCES
         ${HEADER_DIR}/internal/catch_list.cpp
         ${HEADER_DIR}/internal/catch_leak_detector.cpp
         ${HEADER_DIR}/internal/catch_matchers.cpp
+        ${HEADER_DIR}/internal/catch_matchers_exception.cpp
         ${HEADER_DIR}/internal/catch_matchers_floating.cpp
         ${HEADER_DIR}/internal/catch_matchers_generic.cpp
         ${HEADER_DIR}/internal/catch_matchers_string.cpp
@@ -265,7 +300,9 @@ set(HEADERS
         ${EXTERNAL_HEADERS}
         ${INTERNAL_HEADERS}
         ${REPORTER_HEADERS}
-        )
+		${BENCHMARK_HEADERS}
+        ${BENCHMARK_SOURCES}
+)
 
 # Provide some groupings for IDEs
 SOURCE_GROUP("Tests" FILES ${TEST_SOURCES})
@@ -276,19 +313,31 @@ include(CTest)
 add_executable(SelfTest ${TEST_SOURCES} ${IMPL_SOURCES} ${REPORTER_SOURCES} ${SURROGATE_SOURCES} ${HEADERS})
 target_include_directories(SelfTest PRIVATE ${HEADER_DIR})
 
-if(USE_CPP17)
-    message(STATUS "Enabling C++17")
-    set_property(TARGET SelfTest PROPERTY CXX_STANDARD 17)
-elseif(USE_CPP14)
-    message(STATUS "Enabling C++14")
-    set_property(TARGET SelfTest PROPERTY CXX_STANDARD 14)
-else()
-    message(STATUS "Enabling C++11")
-    set_property(TARGET SelfTest PROPERTY CXX_STANDARD 11)
-endif()
+# It took CMake until 3.8 to abandon the doomed approach of enumerating
+# required features so we just list C++11 features to support older ones.
+target_compile_features(SelfTest
+  PRIVATE
+    cxx_alignas
+    cxx_alignof
+    cxx_attributes
+    cxx_auto_type
+    cxx_constexpr
+    cxx_defaulted_functions
+    cxx_deleted_functions
+    cxx_final
+    cxx_lambdas
+    cxx_noexcept
+    cxx_override
+    cxx_range_for
+    cxx_rvalue_references
+    cxx_static_assert
+    cxx_strong_enums
+    cxx_trailing_return_types
+    cxx_unicode_literals
+    cxx_user_literals
+    cxx_variadic_macros
+)
 
-set_property(TARGET SelfTest PROPERTY CXX_STANDARD_REQUIRED ON)
-set_property(TARGET SelfTest PROPERTY CXX_EXTENSIONS OFF)
 
 if (CATCH_ENABLE_COVERAGE)
     set(ENABLE_COVERAGE ON CACHE BOOL "Enable coverage build." FORCE)
@@ -302,7 +351,7 @@ endif()
 if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
     target_compile_options( SelfTest PRIVATE -Wall -Wextra -Wunreachable-code -Wpedantic -Wmissing-declarations )
     if (CATCH_ENABLE_WERROR)
-        target_compile_options( SelfTest PRIVATE -Werror)
+        target_compile_options( SelfTest PRIVATE -Werror )
     endif()
 endif()
 # Clang specific options go here
@@ -322,6 +371,9 @@ endif()
 
 # configure unit tests via CTest
 add_test(NAME RunTests COMMAND $<TARGET_FILE:SelfTest>)
+set_tests_properties(RunTests PROPERTIES
+    FAIL_REGULAR_EXPRESSION "Filters:"
+)
 
 add_test(NAME ListTests COMMAND $<TARGET_FILE:SelfTest> --list-tests --verbosity high)
 set_tests_properties(ListTests PROPERTIES 
@@ -345,8 +397,19 @@ set_tests_properties(ListTestNamesOnly PROPERTIES
 add_test(NAME NoAssertions COMMAND $<TARGET_FILE:SelfTest> -w NoAssertions)
 set_tests_properties(NoAssertions PROPERTIES PASS_REGULAR_EXPRESSION "No assertions in test case")
 
-add_test(NAME NoTest COMMAND $<TARGET_FILE:SelfTest> -w NoTests "___nonexistent_test___")
-set_tests_properties(NoTest PROPERTIES PASS_REGULAR_EXPRESSION "No test cases matched")
+add_test(NAME NoTest COMMAND $<TARGET_FILE:SelfTest> Tracker, "___nonexistent_test___")
+set_tests_properties(NoTest PROPERTIES
+    PASS_REGULAR_EXPRESSION "No test cases matched '___nonexistent_test___'"
+    FAIL_REGULAR_EXPRESSION "No tests ran"
+)
+
+add_test(NAME WarnAboutNoTests COMMAND ${CMAKE_COMMAND} -P ${CATCH_DIR}/projects/SelfTest/WarnAboutNoTests.cmake $<TARGET_FILE:SelfTest>)
+
+add_test(NAME UnmatchedOutputFilter COMMAND $<TARGET_FILE:SelfTest> [this-tag-does-not-exist] -w NoTests)
+set_tests_properties(UnmatchedOutputFilter
+  PROPERTIES
+    PASS_REGULAR_EXPRESSION "No test cases matched '\\[this-tag-does-not-exist\\]'"
+)
 
 add_test(NAME FilteredSection-1 COMMAND $<TARGET_FILE:SelfTest> \#1394 -c RunSection)
 set_tests_properties(FilteredSection-1 PROPERTIES FAIL_REGULAR_EXPRESSION "No tests ran")
@@ -357,6 +420,36 @@ set_tests_properties(FilteredSection-2 PROPERTIES FAIL_REGULAR_EXPRESSION "No te
 add_test(NAME ApprovalTests COMMAND ${PYTHON_EXECUTABLE} ${CATCH_DIR}/scripts/approvalTests.py $<TARGET_FILE:SelfTest>)
 set_tests_properties(ApprovalTests PROPERTIES FAIL_REGULAR_EXPRESSION "Results differed")
 
+add_test(NAME RegressionCheck-1670 COMMAND $<TARGET_FILE:SelfTest> "#1670 regression check" -c A -r compact)
+set_tests_properties(RegressionCheck-1670 PROPERTIES PASS_REGULAR_EXPRESSION "Passed 1 test case with 2 assertions.")
+
+add_test(NAME VersionCheck COMMAND $<TARGET_FILE:SelfTest> -h)
+set_tests_properties(VersionCheck PROPERTIES PASS_REGULAR_EXPRESSION "Catch v${PROJECT_VERSION}")
+
+add_test(NAME LibIdentityTest COMMAND $<TARGET_FILE:SelfTest> --libidentify)
+set_tests_properties(LibIdentityTest PROPERTIES PASS_REGULAR_EXPRESSION "description:    A Catch2 test executable")
+
+add_test(NAME FilenameAsTagsTest COMMAND $<TARGET_FILE:SelfTest> -\# --list-tags)
+set_tests_properties(FilenameAsTagsTest PROPERTIES PASS_REGULAR_EXPRESSION "\\[#Approx.tests\\]")
+
+add_test(NAME EscapeSpecialCharactersInTestNames COMMAND $<TARGET_FILE:SelfTest> "Test with special\\, characters \"in name")
+set_tests_properties(EscapeSpecialCharactersInTestNames PROPERTIES PASS_REGULAR_EXPRESSION "1 assertion in 1 test case")
+
+add_test(NAME TestsInFile::SimpleSpecs COMMAND $<TARGET_FILE:SelfTest> "-f ${CATCH_DIR}/projects/SelfTest/Misc/plain-old-tests.input")
+set_tests_properties(TestsInFile::SimpleSpecs PROPERTIES PASS_REGULAR_EXPRESSION "6 assertions in 2 test cases")
+
+add_test(NAME TestsInFile::EscapeSpecialCharacters COMMAND $<TARGET_FILE:SelfTest> "-f ${CATCH_DIR}/projects/SelfTest/Misc/special-characters-in-file.input")
+set_tests_properties(TestsInFile::EscapeSpecialCharacters PROPERTIES PASS_REGULAR_EXPRESSION "1 assertion in 1 test case")
+
+# CTest does not allow us to create an AND of required regular expressions,
+# so we have to split the test into 2 parts and look for parts of the expected
+# output separately.
+add_test(NAME TestsInFile::InvalidTestNames-1 COMMAND $<TARGET_FILE:SelfTest> "-f ${CATCH_DIR}/projects/SelfTest/Misc/invalid-test-names.input")
+set_tests_properties(TestsInFile::InvalidTestNames-1 PROPERTIES PASS_REGULAR_EXPRESSION "Invalid Filter: \"Test with special, characters in \\\\\" name\"")
+
+add_test(NAME TestsInFile::InvalidTestNames-2 COMMAND $<TARGET_FILE:SelfTest> "-f ${CATCH_DIR}/projects/SelfTest/Misc/invalid-test-names.input")
+set_tests_properties(TestsInFile::InvalidTestNames-2 PROPERTIES PASS_REGULAR_EXPRESSION "No tests ran")
+
 
 if (CATCH_USE_VALGRIND)
     add_test(NAME ValgrindRunTests COMMAND valgrind --leak-check=full --error-exitcode=1 $<TARGET_FILE:SelfTest>)
diff --git a/packages/Catch2/projects/ExtraTests/CMakeLists.txt b/packages/Catch2/projects/ExtraTests/CMakeLists.txt
index c0dd82d8f07ab1087b712ff5db552238f6348ba9..13b02870d5385154e59773d72b2cf8d3205e4f9b 100644
--- a/packages/Catch2/projects/ExtraTests/CMakeLists.txt
+++ b/packages/Catch2/projects/ExtraTests/CMakeLists.txt
@@ -116,6 +116,27 @@ set_tests_properties(
 )
 
 
+add_executable(BenchmarkingMacros ${TESTS_DIR}/X20-BenchmarkingMacros.cpp)
+target_compile_definitions( BenchmarkingMacros PRIVATE CATCH_CONFIG_ENABLE_BENCHMARKING )
+
+add_test(NAME BenchmarkingMacros COMMAND BenchmarkingMacros -r console -s)
+set_tests_properties(
+    BenchmarkingMacros
+  PROPERTIES
+    PASS_REGULAR_EXPRESSION "benchmark name                                  samples       iterations    estimated"
+)
+
+# This test touches windows.h, so it should only be compiled under msvc
+if (MSVC)
+    # This test fails if it does not compile and succeeds otherwise
+    add_executable(WindowsHeader ${TESTS_DIR}/X90-WindowsHeaderInclusion.cpp)
+    set_property( TARGET WindowsHeader PROPERTY CXX_STANDARD 11 )
+    set_property( TARGET WindowsHeader PROPERTY CXX_STANDARD_REQUIRED ON )
+    set_property( TARGET WindowsHeader PROPERTY CXX_EXTENSIONS OFF )
+    target_include_directories( WindowsHeader PRIVATE ${SINGLE_INCLUDE_PATH} )
+    add_test(NAME WindowsHeader COMMAND WindowsHeader -r compact)
+endif()
+
 set( EXTRA_TEST_BINARIES
     PrefixedMacros
     DisabledMacros
@@ -123,6 +144,7 @@ set( EXTRA_TEST_BINARIES
     DisabledExceptions-CustomHandler
     FallbackStringifier
     DisableStringification
+    BenchmarkingMacros
 )
 
 # Shared config
@@ -133,3 +155,4 @@ foreach( test ${EXTRA_TEST_BINARIES} )
     target_include_directories( ${test} PRIVATE ${SINGLE_INCLUDE_PATH} )
 endforeach()
 
+
diff --git a/packages/Catch2/projects/ExtraTests/X01-PrefixedMacros.cpp b/packages/Catch2/projects/ExtraTests/X01-PrefixedMacros.cpp
index 7671cbc4dfefe762efaca7078501206b96df562e..3d2ab9c1619fea5ce46fb111b178953a7afdfea0 100644
--- a/packages/Catch2/projects/ExtraTests/X01-PrefixedMacros.cpp
+++ b/packages/Catch2/projects/ExtraTests/X01-PrefixedMacros.cpp
@@ -48,6 +48,7 @@ CATCH_TEST_CASE("PrefixedMacros") {
     CATCH_CHECK_THAT("bdef", Equals("bdef"));
 
     CATCH_INFO( "some info" );
+    CATCH_UNSCOPED_INFO( "some info" );
     CATCH_WARN( "some warn" );
     CATCH_SECTION("some section") {
         int i = 1;
diff --git a/packages/Catch2/projects/ExtraTests/X20-BenchmarkingMacros.cpp b/packages/Catch2/projects/ExtraTests/X20-BenchmarkingMacros.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e76af0c71ff901ff95021f097dcf3663431709c2
--- /dev/null
+++ b/packages/Catch2/projects/ExtraTests/X20-BenchmarkingMacros.cpp
@@ -0,0 +1,133 @@
+// X20-BenchmarkingMacros.cpp
+// Test that the benchmarking support macros compile properly with the single header
+
+#define CATCH_CONFIG_MAIN
+#include <catch2/catch.hpp>
+
+namespace {
+std::uint64_t factorial(std::uint64_t number) {
+    if (number < 2) {
+        return 1;
+    }
+    return number * factorial(number - 1);
+}
+}
+
+TEST_CASE("Benchmark factorial", "[benchmark]") {
+    CHECK(factorial(0) == 1);
+    // some more asserts..
+    CHECK(factorial(10) == 3628800);
+
+    BENCHMARK("factorial 10") {
+        return factorial(10);
+    };
+
+    CHECK(factorial(14) == 87178291200ull);
+    BENCHMARK("factorial 14") {
+        return factorial(14);
+    };
+//
+//    BENCHMARK("factorial 20") {
+//        return factorial(20);
+//    };
+//
+//    BENCHMARK("factorial 35") {
+//        return factorial(35);
+//    };
+}
+
+TEST_CASE("Benchmark containers", "[.][benchmark]") {
+    static const int size = 100;
+
+    std::vector<int> v;
+    std::map<int, int> m;
+
+    SECTION("without generator") {
+        BENCHMARK("Load up a vector") {
+            v = std::vector<int>();
+            for (int i = 0; i < size; ++i)
+                v.push_back(i);
+        };
+        REQUIRE(v.size() == size);
+
+        // test optimizer control
+        BENCHMARK("Add up a vector's content") {
+            uint64_t add = 0;
+            for (int i = 0; i < size; ++i)
+                add += v[i];
+            return add;
+        };
+
+        BENCHMARK("Load up a map") {
+            m = std::map<int, int>();
+            for (int i = 0; i < size; ++i)
+                m.insert({ i, i + 1 });
+        };
+        REQUIRE(m.size() == size);
+
+        BENCHMARK("Reserved vector") {
+            v = std::vector<int>();
+            v.reserve(size);
+            for (int i = 0; i < size; ++i)
+                v.push_back(i);
+        };
+        REQUIRE(v.size() == size);
+
+        BENCHMARK("Resized vector") {
+            v = std::vector<int>();
+            v.resize(size);
+            for (int i = 0; i < size; ++i)
+                v[i] = i;
+        };
+        REQUIRE(v.size() == size);
+
+        int array[size];
+        BENCHMARK("A fixed size array that should require no allocations") {
+            for (int i = 0; i < size; ++i)
+                array[i] = i;
+        };
+        int sum = 0;
+        for (int i = 0; i < size; ++i)
+            sum += array[i];
+        REQUIRE(sum > size);
+
+        SECTION("XYZ") {
+
+            BENCHMARK_ADVANCED("Load up vector with chronometer")(Catch::Benchmark::Chronometer meter) {
+                std::vector<int> k;
+                meter.measure([&](int idx) {
+                    k = std::vector<int>();
+                    for (int i = 0; i < size; ++i)
+                        k.push_back(idx);
+                });
+                REQUIRE(k.size() == size);
+            };
+
+            int runs = 0;
+            BENCHMARK("Fill vector indexed", benchmarkIndex) {
+                v = std::vector<int>();
+                v.resize(size);
+                for (int i = 0; i < size; ++i)
+                    v[i] = benchmarkIndex;
+                runs = benchmarkIndex;
+            };
+
+            for (size_t i = 0; i < v.size(); ++i) {
+                REQUIRE(v[i] == runs);
+            }
+        }
+    }
+
+    SECTION("with generator") {
+        auto generated = GENERATE(range(0, 10));
+        BENCHMARK("Fill vector generated") {
+            v = std::vector<int>();
+            v.resize(size);
+            for (int i = 0; i < size; ++i)
+                v[i] = generated;
+        };
+        for (size_t i = 0; i < v.size(); ++i) {
+            REQUIRE(v[i] == generated);
+        }
+    }
+}
diff --git a/packages/Catch2/projects/ExtraTests/X90-WindowsHeaderInclusion.cpp b/packages/Catch2/projects/ExtraTests/X90-WindowsHeaderInclusion.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2b7a074eeced074ed541e6a9a1426a4f5079e000
--- /dev/null
+++ b/packages/Catch2/projects/ExtraTests/X90-WindowsHeaderInclusion.cpp
@@ -0,0 +1,12 @@
+// X90-WindowsHeaderInclusion.cpp
+// Test that the Catch2 header compiles even after including windows.h
+// without defining NOMINMAX first. As an FYI, if you do that, you are
+// wrong.
+
+#include <windows.h>
+#define CATCH_CONFIG_MAIN
+#include <catch2/catch.hpp>
+
+TEST_CASE("Catch2 did survive compilation with windows.h", "[compile-test]") {
+    SUCCEED();
+}
diff --git a/packages/Catch2/projects/SelfTest/Baselines/compact.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/compact.sw.approved.txt
index 99eca94da36199cc4e5190b9e99142a69d41413a..311183bc753fda05eed786d21ab8af535ed03690 100644
--- a/packages/Catch2/projects/SelfTest/Baselines/compact.sw.approved.txt
+++ b/packages/Catch2/projects/SelfTest/Baselines/compact.sw.approved.txt
@@ -3,6 +3,8 @@ Decomposition.tests.cpp:<line number>: passed: fptr == 0 for: 0 == 0
 Decomposition.tests.cpp:<line number>: passed: fptr == 0l for: 0 == 0
 Compilation.tests.cpp:<line number>: passed: y.v == 0 for: 0 == 0
 Compilation.tests.cpp:<line number>: passed: 0 == y.v for: 0 == 0
+Compilation.tests.cpp:<line number>: passed: y.v == 0 for: 0 == 0
+Compilation.tests.cpp:<line number>: passed: 0 == y.v for: 0 == 0
 Compilation.tests.cpp:<line number>: passed: t1 == t2 for: {?} == {?}
 Compilation.tests.cpp:<line number>: passed: t1 != t2 for: {?} != {?}
 Compilation.tests.cpp:<line number>: passed: t1 < t2 for: {?} < {?}
@@ -155,18 +157,36 @@ Class.tests.cpp:<line number>: passed: Template_Fixture_2<TestType>::m_a.size()
 Class.tests.cpp:<line number>: passed: Template_Fixture_2<TestType>::m_a.size() == 0 for: 0 == 0
 Class.tests.cpp:<line number>: passed: Template_Fixture_2<TestType>::m_a.size() == 0 for: 0 == 0
 Class.tests.cpp:<line number>: passed: Template_Fixture_2<TestType>::m_a.size() == 0 for: 0 == 0
+Class.tests.cpp:<line number>: failed: Template_Fixture_2<TestType>{}.m_a.size() < 2 for: 6 < 2
+Class.tests.cpp:<line number>: failed: Template_Fixture_2<TestType>{}.m_a.size() < 2 for: 2 < 2
+Class.tests.cpp:<line number>: failed: Template_Fixture_2<TestType>{}.m_a.size() < 2 for: 6 < 2
+Class.tests.cpp:<line number>: failed: Template_Fixture_2<TestType>{}.m_a.size() < 2 for: 2 < 2
+Class.tests.cpp:<line number>: passed: Template_Fixture_2<TestType>{}.m_a.size() >= 2 for: 6 >= 2
+Class.tests.cpp:<line number>: passed: Template_Fixture_2<TestType>{}.m_a.size() >= 2 for: 2 >= 2
+Class.tests.cpp:<line number>: passed: Template_Fixture_2<TestType>{}.m_a.size() >= 2 for: 6 >= 2
+Class.tests.cpp:<line number>: passed: Template_Fixture_2<TestType>{}.m_a.size() >= 2 for: 2 >= 2
 Class.tests.cpp:<line number>: failed: Template_Fixture<TestType>::m_a == 2 for: 1.0 == 2
 Class.tests.cpp:<line number>: failed: Template_Fixture<TestType>::m_a == 2 for: 1.0f == 2
 Class.tests.cpp:<line number>: failed: Template_Fixture<TestType>::m_a == 2 for: 1 == 2
 Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1.0 == 1
 Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1.0f == 1
 Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1 == 1
+Class.tests.cpp:<line number>: failed: Nttp_Fixture<V>::value == 0 for: 1 == 0
+Class.tests.cpp:<line number>: failed: Nttp_Fixture<V>::value == 0 for: 3 == 0
+Class.tests.cpp:<line number>: failed: Nttp_Fixture<V>::value == 0 for: 6 == 0
+Class.tests.cpp:<line number>: passed: Nttp_Fixture<V>::value > 0 for: 1 > 0
+Class.tests.cpp:<line number>: passed: Nttp_Fixture<V>::value > 0 for: 3 > 0
+Class.tests.cpp:<line number>: passed: Nttp_Fixture<V>::value > 0 for: 6 > 0
 Class.tests.cpp:<line number>: failed: m_a == 2 for: 1 == 2
 Class.tests.cpp:<line number>: passed: m_a == 1 for: 1 == 1
 Misc.tests.cpp:<line number>: passed: x.size() == 0 for: 0 == 0
 Misc.tests.cpp:<line number>: passed: x.size() == 0 for: 0 == 0
 Misc.tests.cpp:<line number>: passed: x.size() == 0 for: 0 == 0
 Misc.tests.cpp:<line number>: passed: x.size() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: x.size() > 0 for: 42 > 0
+Misc.tests.cpp:<line number>: passed: x.size() > 0 for: 9 > 0
+Misc.tests.cpp:<line number>: passed: x.size() > 0 for: 42 > 0
+Misc.tests.cpp:<line number>: passed: x.size() > 0 for: 9 > 0
 Approx.tests.cpp:<line number>: passed: d == 1.23_a for: 1.23 == Approx( 1.23 )
 Approx.tests.cpp:<line number>: passed: d != 1.22_a for: 1.23 != Approx( 1.22 )
 Approx.tests.cpp:<line number>: passed: -d == -1.23_a for: -1.23 == Approx( -1.23 )
@@ -223,13 +243,9 @@ Tricky.tests.cpp:<line number>: passed: true
 Tricky.tests.cpp:<line number>: passed: true
 Tricky.tests.cpp:<line number>: passed: true
 Tricky.tests.cpp:<line number>: passed: true
-Approx.tests.cpp:<line number>: passed: INFINITY == Approx(INFINITY) for: inff == Approx( inf )
-Approx.tests.cpp:<line number>: passed: NAN != Approx(NAN) for: nanf != Approx( nan )
-Approx.tests.cpp:<line number>: passed: !(NAN == Approx(NAN)) for: !(nanf == Approx( nan ))
-Tricky.tests.cpp:<line number>: passed: y.v == 0 for: 0 == 0
-Tricky.tests.cpp:<line number>: passed: 0 == y.v for: 0 == 0
 Message.tests.cpp:<line number>: passed: with 7 messages: 'a := 1' and 'b := 2' and 'c := 3' and 'a + b := 3' and 'a+b := 3' and 'c > b := true' and 'a == 1 := true'
 Message.tests.cpp:<line number>: passed: with 7 messages: 'std::vector<int>{1, 2, 3}[0, 1, 2] := 3' and 'std::vector<int>{1, 2, 3}[(0, 1)] := 2' and 'std::vector<int>{1, 2, 3}[0] := 1' and '(helper_1436<int, int>{12, -12}) := { 12, -12 }' and '(helper_1436<int, int>(-12, 12)) := { -12, 12 }' and '(1, 2) := 2' and '(2, 3) := 3'
+Message.tests.cpp:<line number>: passed: with 11 messages: '("comma, in string", "escaped, \", ") := "escaped, ", "' and '"single quote in string,'," := "single quote in string,',"' and '"some escapes, \\,\\\\" := "some escapes, \,\\"' and '"some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[<"' and ''"' := '"'' and ''\'' := '''' and '',' := ','' and ''}' := '}'' and '')' := ')'' and ''(' := '('' and ''{' := '{''
 ToStringGeneral.tests.cpp:<line number>: passed: true with 1 message: 'i := 2'
 ToStringGeneral.tests.cpp:<line number>: passed: true with 1 message: '3'
 ToStringGeneral.tests.cpp:<line number>: passed: tab == '\t' for: '\t' == '\t'
@@ -260,6 +276,10 @@ Tricky.tests.cpp:<line number>: passed: true
 Tricky.tests.cpp:<line number>: passed: std::vector<int>{1, 2} == std::vector<int>{1, 2} for: { 1, 2 } == { 1, 2 }
 Tricky.tests.cpp:<line number>: passed: a for: 0x<hex digits>
 Tricky.tests.cpp:<line number>: passed: a == &foo for: 0x<hex digits> == 0x<hex digits>
+RandomNumberGeneration.tests.cpp:<line number>: passed: SimplePcg32{} == SimplePcg32{} for: {?} == {?}
+RandomNumberGeneration.tests.cpp:<line number>: passed: SimplePcg32{ 0 } != SimplePcg32{} for: {?} != {?}
+RandomNumberGeneration.tests.cpp:<line number>: passed: !(SimplePcg32{ 1 } == SimplePcg32{ 2 }) for: !({?} == {?})
+RandomNumberGeneration.tests.cpp:<line number>: passed: !(SimplePcg32{ 1 } != SimplePcg32{ 1 }) for: !({?} != {?})
 Approx.tests.cpp:<line number>: passed: td == Approx(10.0) for: StrongDoubleTypedef(10) == Approx( 10.0 )
 Approx.tests.cpp:<line number>: passed: Approx(10.0) == td for: Approx( 10.0 ) == StrongDoubleTypedef(10)
 Approx.tests.cpp:<line number>: passed: td != Approx(11.0) for: StrongDoubleTypedef(10) != Approx( 11.0 )
@@ -294,13 +314,41 @@ Condition.tests.cpp:<line number>: passed: 6 == uc for: 6 == 6
 Condition.tests.cpp:<line number>: passed: (std::numeric_limits<uint32_t>::max)() > ul for: 4294967295 (0x<hex digits>) > 4
 Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Contains("not there", Catch::CaseSensitive::No) for: "this string contains 'abc' as a substring" contains: "not there" (case insensitive)
 Matchers.tests.cpp:<line number>: failed: testStringForMatching(), Contains("STRING") for: "this string contains 'abc' as a substring" contains: "STRING"
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: elem % 2 == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: call_count == 1 for: 1 == 1
+Generators.tests.cpp:<line number>: passed: make_data().size() == test_count for: 6 == 6
 Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom()
 Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom exception - not std'; expression was: throwCustom(), std::exception
 Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'custom std exception'
 Approx.tests.cpp:<line number>: passed: 101.000001 != Approx(100).epsilon(0.01) for: 101.000001 != Approx( 100.0 )
 Approx.tests.cpp:<line number>: passed: std::pow(10, -5) != Approx(std::pow(10, -7)) for: 0.00001 != Approx( 0.0000001 )
+ToString.tests.cpp:<line number>: passed: enumInfo->lookup(0) == "Value1" for: Value1 == "Value1"
+ToString.tests.cpp:<line number>: passed: enumInfo->lookup(1) == "Value2" for: Value2 == "Value2"
+ToString.tests.cpp:<line number>: passed: enumInfo->lookup(3) == "{** unexpected enum value **}" for: {** unexpected enum value **}
+==
+"{** unexpected enum value **}"
 Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith("Substring") for: "this string contains 'abc' as a substring" ends with: "Substring"
 Matchers.tests.cpp:<line number>: failed: testStringForMatching(), EndsWith("this", Catch::CaseSensitive::No) for: "this string contains 'abc' as a substring" ends with: "this" (case insensitive)
+EnumToString.tests.cpp:<line number>: passed: stringify( EnumClass3::Value1 ) == "Value1" for: "Value1" == "Value1"
+EnumToString.tests.cpp:<line number>: passed: stringify( EnumClass3::Value2 ) == "Value2" for: "Value2" == "Value2"
+EnumToString.tests.cpp:<line number>: passed: stringify( EnumClass3::Value3 ) == "Value3" for: "Value3" == "Value3"
+EnumToString.tests.cpp:<line number>: passed: stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" for: "{** unexpected enum value **}"
+==
+"{** unexpected enum value **}"
+EnumToString.tests.cpp:<line number>: passed: stringify( ec3 ) == "Value2" for: "Value2" == "Value2"
+EnumToString.tests.cpp:<line number>: passed: stringify( Bikeshed::Colours::Red ) == "Red" for: "Red" == "Red"
+EnumToString.tests.cpp:<line number>: passed: stringify( Bikeshed::Colours::Blue ) == "Blue" for: "Blue" == "Blue"
 Approx.tests.cpp:<line number>: passed: 101.01 != Approx(100).epsilon(0.01) for: 101.01 != Approx( 100.0 )
 Condition.tests.cpp:<line number>: failed: data.int_seven == 6 for: 7 == 6
 Condition.tests.cpp:<line number>: failed: data.int_seven == 8 for: 7 == 8
@@ -337,16 +385,20 @@ Matchers.tests.cpp:<line number>: failed: expected exception, got none; expressi
 Matchers.tests.cpp:<line number>: failed: expected exception, got none; expression was: doesNotThrow(), SpecialException, ExceptionMatcher{1}
 Matchers.tests.cpp:<line number>: failed: unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt(1), SpecialException, ExceptionMatcher{1}
 Matchers.tests.cpp:<line number>: failed: unexpected exception with message: 'Unknown exception'; expression was: throwsAsInt(1), SpecialException, ExceptionMatcher{1}
-Matchers.tests.cpp:<line number>: failed: throws(3), SpecialException, ExceptionMatcher{1} for: SpecialException::what special exception has value of 1
-Matchers.tests.cpp:<line number>: failed: throws(4), SpecialException, ExceptionMatcher{1} for: SpecialException::what special exception has value of 1
-Matchers.tests.cpp:<line number>: passed: throws(1), SpecialException, ExceptionMatcher{1} for: SpecialException::what special exception has value of 1
-Matchers.tests.cpp:<line number>: passed: throws(2), SpecialException, ExceptionMatcher{2} for: SpecialException::what special exception has value of 2
+Matchers.tests.cpp:<line number>: failed: throwsSpecialException(3), SpecialException, ExceptionMatcher{1} for: SpecialException::what special exception has value of 1
+Matchers.tests.cpp:<line number>: failed: throwsSpecialException(4), SpecialException, ExceptionMatcher{1} for: SpecialException::what special exception has value of 1
+Matchers.tests.cpp:<line number>: passed: throwsSpecialException(1), SpecialException, ExceptionMatcher{1} for: SpecialException::what special exception has value of 1
+Matchers.tests.cpp:<line number>: passed: throwsSpecialException(2), SpecialException, ExceptionMatcher{2} for: SpecialException::what special exception has value of 2
 Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
 Exception.tests.cpp:<line number>: passed: thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) for: "expected exception" equals: "expected exception" (case insensitive)
 Exception.tests.cpp:<line number>: passed: thisThrows(), StartsWith( "expected" ) for: "expected exception" starts with: "expected"
 Exception.tests.cpp:<line number>: passed: thisThrows(), EndsWith( "exception" ) for: "expected exception" ends with: "exception"
 Exception.tests.cpp:<line number>: passed: thisThrows(), Contains( "except" ) for: "expected exception" contains: "except"
 Exception.tests.cpp:<line number>: passed: thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) for: "expected exception" contains: "except" (case insensitive)
+Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, Message("DerivedException::what") for: DerivedException::what exception message matches "DerivedException::what"
+Matchers.tests.cpp:<line number>: passed: throwsDerivedException(), DerivedException, !Message("derivedexception::what") for: DerivedException::what not exception message matches "derivedexception::what"
+Matchers.tests.cpp:<line number>: passed: throwsSpecialException(2), SpecialException, !Message("DerivedException::what") for: SpecialException::what not exception message matches "DerivedException::what"
+Matchers.tests.cpp:<line number>: passed: throwsSpecialException(2), SpecialException, Message("SpecialException::what") for: SpecialException::what exception message matches "SpecialException::what"
 Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows(), std::string
 Exception.tests.cpp:<line number>: failed: expected exception, got none; expression was: thisDoesntThrow(), std::domain_error
 Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows()
@@ -359,53 +411,66 @@ Misc.tests.cpp:<line number>: passed: Factorial(1) == 1 for: 1 == 1
 Misc.tests.cpp:<line number>: passed: Factorial(2) == 2 for: 2 == 2
 Misc.tests.cpp:<line number>: passed: Factorial(3) == 6 for: 6 == 6
 Misc.tests.cpp:<line number>: passed: Factorial(10) == 3628800 for: 3628800 (0x<hex digits>) == 3628800 (0x<hex digits>)
+Matchers.tests.cpp:<line number>: passed: 10., WithinRel(11.1, 0.1) for: 10.0 and 11.1 are within 10% of each other
+Matchers.tests.cpp:<line number>: passed: 10., !WithinRel(11.2, 0.1) for: 10.0 not and 11.2 are within 10% of each other
+Matchers.tests.cpp:<line number>: passed: 1., !WithinRel(0., 0.99) for: 1.0 not and 0 are within 99% of each other
+Matchers.tests.cpp:<line number>: passed: -0., WithinRel(0.) for: -0.0 and 0 are within 2.22045e-12% of each other
+Matchers.tests.cpp:<line number>: passed: v1, WithinRel(v2) for: 0.0 and 2.22507e-308 are within 2.22045e-12% of each other
 Matchers.tests.cpp:<line number>: passed: 1., WithinAbs(1., 0) for: 1.0 is within 0.0 of 1.0
 Matchers.tests.cpp:<line number>: passed: 0., WithinAbs(1., 1) for: 0.0 is within 1.0 of 1.0
 Matchers.tests.cpp:<line number>: passed: 0., !WithinAbs(1., 0.99) for: 0.0 not is within 0.99 of 1.0
 Matchers.tests.cpp:<line number>: passed: 0., !WithinAbs(1., 0.99) for: 0.0 not is within 0.99 of 1.0
-Matchers.tests.cpp:<line number>: passed: NAN, !WithinAbs(NAN, 0) for: nanf not is within 0.0 of nan
 Matchers.tests.cpp:<line number>: passed: 11., !WithinAbs(10., 0.5) for: 11.0 not is within 0.5 of 10.0
 Matchers.tests.cpp:<line number>: passed: 10., !WithinAbs(11., 0.5) for: 10.0 not is within 0.5 of 11.0
 Matchers.tests.cpp:<line number>: passed: -10., WithinAbs(-10., 0.5) for: -10.0 is within 0.5 of -10.0
 Matchers.tests.cpp:<line number>: passed: -10., WithinAbs(-9.6, 0.5) for: -10.0 is within 0.5 of -9.6
-Matchers.tests.cpp:<line number>: passed: 1., WithinULP(1., 0) for: 1.0 is within 0 ULPs of 1.0
-Matchers.tests.cpp:<line number>: passed: nextafter(1., 2.), WithinULP(1., 1) for: 1.0 is within 1 ULPs of 1.0
-Matchers.tests.cpp:<line number>: passed: nextafter(1., 0.), WithinULP(1., 1) for: 1.0 is within 1 ULPs of 1.0
-Matchers.tests.cpp:<line number>: passed: nextafter(1., 2.), !WithinULP(1., 0) for: 1.0 not is within 0 ULPs of 1.0
-Matchers.tests.cpp:<line number>: passed: 1., WithinULP(1., 0) for: 1.0 is within 0 ULPs of 1.0
-Matchers.tests.cpp:<line number>: passed: -0., WithinULP(0., 0) for: -0.0 is within 0 ULPs of 0.0
-Matchers.tests.cpp:<line number>: passed: NAN, !WithinULP(NAN, 123) for: nanf not is within 123 ULPs of nanf
-Matchers.tests.cpp:<line number>: passed: 1., WithinAbs(1., 0.5) || WithinULP(2., 1) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 )
-Matchers.tests.cpp:<line number>: passed: 1., WithinAbs(2., 0.5) || WithinULP(1., 0) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 )
-Matchers.tests.cpp:<line number>: passed: NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) for: nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf )
+Matchers.tests.cpp:<line number>: passed: 1., WithinULP(1., 0) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00])
+Matchers.tests.cpp:<line number>: passed: nextafter(1., 2.), WithinULP(1., 1) for: 1.0 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00])
+Matchers.tests.cpp:<line number>: passed: 0., WithinULP(nextafter(0., 1.), 1) for: 0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324])
+Matchers.tests.cpp:<line number>: passed: 1., WithinULP(nextafter(1., 0.), 1) for: 1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00])
+Matchers.tests.cpp:<line number>: passed: 1., !WithinULP(nextafter(1., 2.), 0) for: 1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00])
+Matchers.tests.cpp:<line number>: passed: 1., WithinULP(1., 0) for: 1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00])
+Matchers.tests.cpp:<line number>: passed: -0., WithinULP(0., 0) for: -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00])
+Matchers.tests.cpp:<line number>: passed: 1., WithinAbs(1., 0.5) || WithinULP(2., 1) for: 1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) )
+Matchers.tests.cpp:<line number>: passed: 1., WithinAbs(2., 0.5) || WithinULP(1., 0) for: 1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) )
+Matchers.tests.cpp:<line number>: passed: 0.0001, WithinAbs(0., 0.001) || WithinRel(0., 0.1) for: 0.0001 ( is within 0.001 of 0.0 or and 0 are within 10% of each other )
 Matchers.tests.cpp:<line number>: passed: WithinAbs(1., 0.)
 Matchers.tests.cpp:<line number>: passed: WithinAbs(1., -1.), std::domain_error
 Matchers.tests.cpp:<line number>: passed: WithinULP(1., 0)
-Matchers.tests.cpp:<line number>: passed: WithinULP(1., -1), std::domain_error
+Matchers.tests.cpp:<line number>: passed: WithinRel(1., 0.)
+Matchers.tests.cpp:<line number>: passed: WithinRel(1., -0.2), std::domain_error
+Matchers.tests.cpp:<line number>: passed: WithinRel(1., 1.), std::domain_error
+Matchers.tests.cpp:<line number>: passed: 10.f, WithinRel(11.1f, 0.1f) for: 10.0f and 11.1 are within 10% of each other
+Matchers.tests.cpp:<line number>: passed: 10.f, !WithinRel(11.2f, 0.1f) for: 10.0f not and 11.2 are within 10% of each other
+Matchers.tests.cpp:<line number>: passed: 1.f, !WithinRel(0.f, 0.99f) for: 1.0f not and 0 are within 99% of each other
+Matchers.tests.cpp:<line number>: passed: -0.f, WithinRel(0.f) for: -0.0f and 0 are within 0.00119209% of each other
+Matchers.tests.cpp:<line number>: passed: v1, WithinRel(v2) for: 0.0f and 1.17549e-38 are within 0.00119209% of each other
 Matchers.tests.cpp:<line number>: passed: 1.f, WithinAbs(1.f, 0) for: 1.0f is within 0.0 of 1.0
 Matchers.tests.cpp:<line number>: passed: 0.f, WithinAbs(1.f, 1) for: 0.0f is within 1.0 of 1.0
 Matchers.tests.cpp:<line number>: passed: 0.f, !WithinAbs(1.f, 0.99f) for: 0.0f not is within 0.9900000095 of 1.0
 Matchers.tests.cpp:<line number>: passed: 0.f, !WithinAbs(1.f, 0.99f) for: 0.0f not is within 0.9900000095 of 1.0
 Matchers.tests.cpp:<line number>: passed: 0.f, WithinAbs(-0.f, 0) for: 0.0f is within 0.0 of -0.0
-Matchers.tests.cpp:<line number>: passed: NAN, !WithinAbs(NAN, 0) for: nanf not is within 0.0 of nan
 Matchers.tests.cpp:<line number>: passed: 11.f, !WithinAbs(10.f, 0.5f) for: 11.0f not is within 0.5 of 10.0
 Matchers.tests.cpp:<line number>: passed: 10.f, !WithinAbs(11.f, 0.5f) for: 10.0f not is within 0.5 of 11.0
 Matchers.tests.cpp:<line number>: passed: -10.f, WithinAbs(-10.f, 0.5f) for: -10.0f is within 0.5 of -10.0
 Matchers.tests.cpp:<line number>: passed: -10.f, WithinAbs(-9.6f, 0.5f) for: -10.0f is within 0.5 of -9.6000003815
-Matchers.tests.cpp:<line number>: passed: 1.f, WithinULP(1.f, 0) for: 1.0f is within 0 ULPs of 1.0f
-Matchers.tests.cpp:<line number>: passed: nextafter(1.f, 2.f), WithinULP(1.f, 1) for: 1.0f is within 1 ULPs of 1.0f
-Matchers.tests.cpp:<line number>: passed: nextafter(1.f, 0.f), WithinULP(1.f, 1) for: 1.0f is within 1 ULPs of 1.0f
-Matchers.tests.cpp:<line number>: passed: nextafter(1.f, 2.f), !WithinULP(1.f, 0) for: 1.0f not is within 0 ULPs of 1.0f
-Matchers.tests.cpp:<line number>: passed: 1.f, WithinULP(1.f, 0) for: 1.0f is within 0 ULPs of 1.0f
-Matchers.tests.cpp:<line number>: passed: -0.f, WithinULP(0.f, 0) for: -0.0f is within 0 ULPs of 0.0f
-Matchers.tests.cpp:<line number>: passed: NAN, !WithinULP(NAN, 123) for: nanf not is within 123 ULPs of nanf
-Matchers.tests.cpp:<line number>: passed: 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f )
-Matchers.tests.cpp:<line number>: passed: 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f )
-Matchers.tests.cpp:<line number>: passed: NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) for: nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf )
+Matchers.tests.cpp:<line number>: passed: 1.f, WithinULP(1.f, 0) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00])
+Matchers.tests.cpp:<line number>: passed: nextafter(1.f, 2.f), WithinULP(1.f, 1) for: 1.0f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00])
+Matchers.tests.cpp:<line number>: passed: 0.f, WithinULP(nextafter(0.f, 1.f), 1) for: 0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45])
+Matchers.tests.cpp:<line number>: passed: 1.f, WithinULP(nextafter(1.f, 0.f), 1) for: 1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00])
+Matchers.tests.cpp:<line number>: passed: 1.f, !WithinULP(nextafter(1.f, 2.f), 0) for: 1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00])
+Matchers.tests.cpp:<line number>: passed: 1.f, WithinULP(1.f, 0) for: 1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00])
+Matchers.tests.cpp:<line number>: passed: -0.f, WithinULP(0.f, 0) for: -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00])
+Matchers.tests.cpp:<line number>: passed: 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) for: 1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) )
+Matchers.tests.cpp:<line number>: passed: 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) for: 1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) )
+Matchers.tests.cpp:<line number>: passed: 0.0001f, WithinAbs(0.f, 0.001f) || WithinRel(0.f, 0.1f) for: 0.0001f ( is within 0.001 of 0.0 or and 0 are within 10% of each other )
 Matchers.tests.cpp:<line number>: passed: WithinAbs(1.f, 0.f)
 Matchers.tests.cpp:<line number>: passed: WithinAbs(1.f, -1.f), std::domain_error
 Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, 0)
-Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, -1), std::domain_error
+Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, static_cast<uint64_t>(-1)), std::domain_error
+Matchers.tests.cpp:<line number>: passed: WithinRel(1.f, 0.f)
+Matchers.tests.cpp:<line number>: passed: WithinRel(1.f, -0.2f), std::domain_error
+Matchers.tests.cpp:<line number>: passed: WithinRel(1.f, 1.f), std::domain_error
 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
 Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
@@ -440,6 +505,9 @@ Generators.tests.cpp:<line number>: passed: chunk2.front() < 3 for: 1 < 3
 Generators.tests.cpp:<line number>: passed: chunk2.size() == 2 for: 2 == 2
 Generators.tests.cpp:<line number>: passed: chunk2.front() == chunk2.back() for: 2 == 2
 Generators.tests.cpp:<line number>: passed: chunk2.front() < 3 for: 2 < 3
+Generators.tests.cpp:<line number>: passed: chunk2.size() == 0 for: 0 == 0
+Generators.tests.cpp:<line number>: passed: chunk2.size() == 0 for: 0 == 0
+Generators.tests.cpp:<line number>: passed: chunk2.size() == 0 for: 0 == 0
 Generators.tests.cpp:<line number>: passed: chunk(2, value(1)), Catch::GeneratorException
 Generators.tests.cpp:<line number>: passed: j < i for: -3 < 1
 Generators.tests.cpp:<line number>: passed: j < i for: -2 < 1
@@ -699,6 +767,51 @@ Condition.tests.cpp:<line number>: passed: data.str_hello < "hellp" for: "hello"
 Condition.tests.cpp:<line number>: passed: data.str_hello < "zebra" for: "hello" < "zebra"
 Condition.tests.cpp:<line number>: passed: data.str_hello > "hellm" for: "hello" > "hellm"
 Condition.tests.cpp:<line number>: passed: data.str_hello > "a" for: "hello" > "a"
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 4242248763 (0x<hex digits>)
+==
+4242248763 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 1867888929 (0x<hex digits>)
+==
+1867888929 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 1276619030 (0x<hex digits>)
+==
+1276619030 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 1911218783 (0x<hex digits>)
+==
+1911218783 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 1827115164 (0x<hex digits>)
+==
+1827115164 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 1472234645 (0x<hex digits>)
+==
+1472234645 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 868832940 (0x<hex digits>)
+==
+868832940 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 570883446 (0x<hex digits>)
+==
+570883446 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 889299803 (0x<hex digits>)
+==
+889299803 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 4261393167 (0x<hex digits>)
+==
+4261393167 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 1472234645 (0x<hex digits>)
+==
+1472234645 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 868832940 (0x<hex digits>)
+==
+868832940 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 570883446 (0x<hex digits>)
+==
+570883446 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 889299803 (0x<hex digits>)
+==
+889299803 (0x<hex digits>)
+RandomNumberGeneration.tests.cpp:<line number>: passed: rng() == 0x<hex digits> for: 4261393167 (0x<hex digits>)
+==
+4261393167 (0x<hex digits>)
 Message.tests.cpp:<line number>: failed: explicitly with 1 message: 'Message from section one'
 Message.tests.cpp:<line number>: failed: explicitly with 1 message: 'Message from section two'
 CmdLine.tests.cpp:<line number>: passed: spec.hasFilters() == false for: false == false
@@ -836,6 +949,16 @@ CmdLine.tests.cpp:<line number>: passed: spec.matches( tcA ) == false for: false
 CmdLine.tests.cpp:<line number>: passed: spec.matches( tcB ) == false for: false == false
 CmdLine.tests.cpp:<line number>: passed: spec.matches( tcC ) == false for: false == false
 CmdLine.tests.cpp:<line number>: passed: spec.matches( tcD ) == true for: true == true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( "  aardvark " ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( "  aardvark" ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( " aardvark " ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( "aardvark " ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( "aardvark" ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( "  aardvark " ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( "  aardvark" ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( " aardvark " ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( "aardvark " ) ) for: true
+CmdLine.tests.cpp:<line number>: passed: spec.matches( fakeTestCase( "aardvark" ) ) for: true
 Condition.tests.cpp:<line number>: passed: p == 0 for: 0 == 0
 Condition.tests.cpp:<line number>: passed: p == pNULL for: 0 == 0
 Condition.tests.cpp:<line number>: passed: p != 0 for: 0x<hex digits> != 0
@@ -844,6 +967,10 @@ Condition.tests.cpp:<line number>: passed: cpc != 0 for: 0x<hex digits> != 0
 Condition.tests.cpp:<line number>: passed: returnsNull() == 0 for: {null string} == 0
 Condition.tests.cpp:<line number>: passed: returnsConstNull() == 0 for: {null string} == 0
 Condition.tests.cpp:<line number>: passed: 0 != p for: 0 != 0x<hex digits>
+ToStringGeneral.tests.cpp:<line number>: passed: str1.size() == 3 + 5 for: 8 == 8
+ToStringGeneral.tests.cpp:<line number>: passed: str2.size() == 3 + 10 for: 13 == 13
+ToStringGeneral.tests.cpp:<line number>: passed: str1.size() == 2 + 5 for: 7 == 7
+ToStringGeneral.tests.cpp:<line number>: passed: str2.size() == 2 + 15 for: 17 == 17
 Matchers.tests.cpp:<line number>: passed: "foo", Predicate<const char*>([] (const char* const&) { return true; }) for: "foo" matches undescribed predicate
 CmdLine.tests.cpp:<line number>: passed: result for: {?}
 CmdLine.tests.cpp:<line number>: passed: config.processName == "" for: "" == ""
@@ -907,6 +1034,14 @@ CmdLine.tests.cpp:<line number>: passed: cli.parse({"test", "--use-colour", "no"
 CmdLine.tests.cpp:<line number>: passed: config.useColour == UseColour::No for: 2 == 2
 CmdLine.tests.cpp:<line number>: passed: !result for: true
 CmdLine.tests.cpp:<line number>: passed: result.errorMessage(), Contains( "colour mode must be one of" ) for: "colour mode must be one of: auto, yes or no. 'wrong' not recognised" contains: "colour mode must be one of"
+CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-samples=200" }) for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.benchmarkSamples == 200 for: 200 == 200
+CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-resamples=20000" }) for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.benchmarkResamples == 20000 for: 20000 (0x<hex digits>) == 20000 (0x<hex digits>)
+CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.benchmarkConfidenceInterval == Catch::Detail::Approx(0.99) for: 0.99 == Approx( 0.99 )
+CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--benchmark-no-analysis" }) for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.benchmarkNoAnalysis for: true
 Misc.tests.cpp:<line number>: passed: std::tuple_size<TestType>::value >= 1 for: 3 >= 1
 Misc.tests.cpp:<line number>: passed: std::tuple_size<TestType>::value >= 1 for: 2 >= 1
 Misc.tests.cpp:<line number>: passed: std::tuple_size<TestType>::value >= 1 for: 1 >= 1
@@ -941,7 +1076,6 @@ Approx.tests.cpp:<line number>: passed: d != 1.22_a for: 1.23 != Approx( 1.22 )
 Approx.tests.cpp:<line number>: passed: Approx( d ) == 1.23 for: Approx( 1.23 ) == 1.23
 Approx.tests.cpp:<line number>: passed: Approx( d ) != 1.22 for: Approx( 1.23 ) != 1.22
 Approx.tests.cpp:<line number>: passed: Approx( d ) != 1.24 for: Approx( 1.23 ) != 1.24
-Approx.tests.cpp:<line number>: passed: INFINITY == Approx(INFINITY) for: inff == Approx( inf )
 Message from section one
 Message from section two
 Matchers.tests.cpp:<line number>: failed: testStringForMatching(), StartsWith("This String") for: "this string contains 'abc' as a substring" starts with: "This String"
@@ -972,7 +1106,6 @@ String.tests.cpp:<line number>: passed: isOwned( s ) == false for: false == fals
 String.tests.cpp:<line number>: passed: original == "original"
 String.tests.cpp:<line number>: passed: isSubstring( original ) for: true
 String.tests.cpp:<line number>: passed: isOwned( original ) == false for: false == false
-String.tests.cpp:<line number>: passed: isSubstring( original ) == false for: false == false
 String.tests.cpp:<line number>: passed: isOwned( original ) for: true
 String.tests.cpp:<line number>: passed: ss.empty() == false for: false == false
 String.tests.cpp:<line number>: passed: ss.size() == 5 for: 5 == 5
@@ -982,13 +1115,15 @@ String.tests.cpp:<line number>: passed: isSubstring( ss ) for: true
 String.tests.cpp:<line number>: passed: isOwned( ss ) == false for: false == false
 String.tests.cpp:<line number>: passed: rawChars == s.currentData() for: "hello world!" == "hello world!"
 String.tests.cpp:<line number>: passed: ss.c_str() != rawChars for: "hello" != "hello world!"
-String.tests.cpp:<line number>: passed: isSubstring( ss ) == false for: false == false
 String.tests.cpp:<line number>: passed: isOwned( ss ) for: true
-String.tests.cpp:<line number>: passed: ss.currentData() != s.currentData() for: "hello" != "hello world!"
+String.tests.cpp:<line number>: passed: isOwned(ss) == false for: false == false
+String.tests.cpp:<line number>: passed: ss == "hello" for: hello == "hello"
+String.tests.cpp:<line number>: passed: rawChars == ss.currentData() for: "hello world!" == "hello world!"
 String.tests.cpp:<line number>: passed: ss.size() == 6 for: 6 == 6
 String.tests.cpp:<line number>: passed: std::strcmp( ss.c_str(), "world!" ) == 0 for: 0 == 0
 String.tests.cpp:<line number>: passed: s.c_str() == s2.c_str() for: "hello world!" == "hello world!"
 String.tests.cpp:<line number>: passed: s.c_str() != ss.c_str() for: "hello world!" != "hello"
+String.tests.cpp:<line number>: passed: s.substr(s.size() + 1, 123).empty() for: true
 String.tests.cpp:<line number>: passed: StringRef("hello") == StringRef("hello") for: hello == hello
 String.tests.cpp:<line number>: passed: StringRef("hello") != StringRef("cello") for: hello != cello
 String.tests.cpp:<line number>: passed: sr == "a standard string" for: a standard string == "a standard string"
@@ -1001,11 +1136,6 @@ String.tests.cpp:<line number>: passed: stdStr == "a stringref" for: "a stringre
 String.tests.cpp:<line number>: passed: stdStr.size() == sr.size() for: 11 == 11
 String.tests.cpp:<line number>: passed: stdStr == "a stringref" for: "a stringref" == "a stringref"
 String.tests.cpp:<line number>: passed: stdStr.size() == sr.size() for: 11 == 11
-String.tests.cpp:<line number>: passed: stdStr == "a stringref" for: "a stringref" == "a stringref"
-String.tests.cpp:<line number>: passed: stdStr.size() == sr.size() for: 11 == 11
-String.tests.cpp:<line number>: passed: ascii.numberOfCharacters() == ascii.size() for: 39 == 39
-String.tests.cpp:<line number>: passed: simpleu8.numberOfCharacters() == 30 for: 30 == 30
-String.tests.cpp:<line number>: passed: emojis.numberOfCharacters() == 9 for: 9 == 9
 ToStringChrono.tests.cpp:<line number>: passed: minute == seconds for: 1 m == 60 s
 ToStringChrono.tests.cpp:<line number>: passed: hour != seconds for: 1 h != 60 s
 ToStringChrono.tests.cpp:<line number>: passed: micro != milli for: 1 us != 1 ms
@@ -1039,6 +1169,16 @@ Tag.tests.cpp:<line number>: passed: registry.add( "[no ampersat]", "", Catch::S
 Tag.tests.cpp:<line number>: passed: registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) )
 Tag.tests.cpp:<line number>: passed: registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) )
 Tag.tests.cpp:<line number>: passed: registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) )
+Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1 == 1
+Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1 == 1
+Class.tests.cpp:<line number>: passed: Template_Fixture<TestType>::m_a == 1 for: 1.0 == 1
+Misc.tests.cpp:<line number>: passed: sizeof(TestType) > 0 for: 1 > 0
+Misc.tests.cpp:<line number>: passed: sizeof(TestType) > 0 for: 4 > 0
+Misc.tests.cpp:<line number>: passed: sizeof(TestType) > 0 for: 1 > 0
+Misc.tests.cpp:<line number>: passed: sizeof(TestType) > 0 for: 4 > 0
+Misc.tests.cpp:<line number>: passed: sizeof(TestType) > 0 for: 4 > 0
+Misc.tests.cpp:<line number>: passed: sizeof(TestType) > 0 for: 1 > 0
+Misc.tests.cpp:<line number>: passed: sizeof(TestType) > 0 for: 4 > 0
 Misc.tests.cpp:<line number>: passed: v.size() == 5 for: 5 == 5
 Misc.tests.cpp:<line number>: passed: v.capacity() >= 5 for: 5 >= 5
 Misc.tests.cpp:<line number>: passed: v.size() == 10 for: 10 == 10
@@ -1107,8 +1247,77 @@ Misc.tests.cpp:<line number>: passed: v.size() == 5 for: 5 == 5
 Misc.tests.cpp:<line number>: passed: v.capacity() >= 5 for: 5 >= 5
 Misc.tests.cpp:<line number>: passed: v.size() == 5 for: 5 == 5
 Misc.tests.cpp:<line number>: passed: v.capacity() >= 5 for: 5 >= 5
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 6 == 6
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 6 >= 6
+Misc.tests.cpp:<line number>: passed: v.size() == 2 * V for: 12 == 12
+Misc.tests.cpp:<line number>: passed: v.capacity() >= 2 * V for: 12 >= 12
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 6 == 6
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 6 >= 6
+Misc.tests.cpp:<line number>: passed: v.size() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 6 >= 6
+Misc.tests.cpp:<line number>: passed: v.capacity() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 6 == 6
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 6 >= 6
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 6 == 6
+Misc.tests.cpp:<line number>: passed: v.capacity() >= 2 * V for: 12 >= 12
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 6 == 6
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 6 >= 6
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 6 == 6
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 6 >= 6
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 4 == 4
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 4 >= 4
+Misc.tests.cpp:<line number>: passed: v.size() == 2 * V for: 8 == 8
+Misc.tests.cpp:<line number>: passed: v.capacity() >= 2 * V for: 8 >= 8
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 4 == 4
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 4 >= 4
+Misc.tests.cpp:<line number>: passed: v.size() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 4 >= 4
+Misc.tests.cpp:<line number>: passed: v.capacity() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 4 == 4
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 4 >= 4
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 4 == 4
+Misc.tests.cpp:<line number>: passed: v.capacity() >= 2 * V for: 8 >= 8
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 4 == 4
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 4 >= 4
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 4 == 4
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 4 >= 4
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 5 == 5
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 5 >= 5
+Misc.tests.cpp:<line number>: passed: v.size() == 2 * V for: 10 == 10
+Misc.tests.cpp:<line number>: passed: v.capacity() >= 2 * V for: 10 >= 10
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 5 == 5
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 5 >= 5
+Misc.tests.cpp:<line number>: passed: v.size() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 5 >= 5
+Misc.tests.cpp:<line number>: passed: v.capacity() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 5 == 5
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 5 >= 5
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 5 == 5
+Misc.tests.cpp:<line number>: passed: v.capacity() >= 2 * V for: 10 >= 10
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 5 == 5
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 5 >= 5
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 5 == 5
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 5 >= 5
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 15 == 15
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 15 >= 15
+Misc.tests.cpp:<line number>: passed: v.size() == 2 * V for: 30 == 30
+Misc.tests.cpp:<line number>: passed: v.capacity() >= 2 * V for: 30 >= 30
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 15 == 15
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 15 >= 15
+Misc.tests.cpp:<line number>: passed: v.size() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 15 >= 15
+Misc.tests.cpp:<line number>: passed: v.capacity() == 0 for: 0 == 0
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 15 == 15
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 15 >= 15
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 15 == 15
+Misc.tests.cpp:<line number>: passed: v.capacity() >= 2 * V for: 30 >= 30
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 15 == 15
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 15 >= 15
+Misc.tests.cpp:<line number>: passed: v.size() == V for: 15 == 15
+Misc.tests.cpp:<line number>: passed: v.capacity() >= V for: 15 >= 15
 VariadicMacros.tests.cpp:<line number>: passed: with 1 message: 'no assertions'
 Tricky.tests.cpp:<line number>: passed: 0x<hex digits> == bit30and31 for: 3221225472 (0x<hex digits>) == 3221225472
+CmdLine.tests.cpp:<line number>: passed:
 Message.tests.cpp:<line number>: failed - but was ok: 1 == 2
 Misc.tests.cpp:<line number>: passed: with 1 message: 'oops!'
 Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'For some reason someone is throwing a string literal!'
@@ -1179,6 +1388,30 @@ PartTracker.tests.cpp:<line number>: passed: s1.isComplete() == false for: false
 PartTracker.tests.cpp:<line number>: passed: s1.isComplete() for: true
 PartTracker.tests.cpp:<line number>: passed: testCase.isComplete() == false for: false == false
 PartTracker.tests.cpp:<line number>: passed: testCase.isComplete() for: true
+StringManip.tests.cpp:<line number>: passed: trim(std::string(no_whitespace)) == no_whitespace for: "There is no extra whitespace here"
+==
+"There is no extra whitespace here"
+StringManip.tests.cpp:<line number>: passed: trim(std::string(leading_whitespace)) == no_whitespace for: "There is no extra whitespace here"
+==
+"There is no extra whitespace here"
+StringManip.tests.cpp:<line number>: passed: trim(std::string(trailing_whitespace)) == no_whitespace for: "There is no extra whitespace here"
+==
+"There is no extra whitespace here"
+StringManip.tests.cpp:<line number>: passed: trim(std::string(whitespace_at_both_ends)) == no_whitespace for: "There is no extra whitespace here"
+==
+"There is no extra whitespace here"
+StringManip.tests.cpp:<line number>: passed: trim(StringRef(no_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
+==
+There is no extra whitespace here
+StringManip.tests.cpp:<line number>: passed: trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
+==
+There is no extra whitespace here
+StringManip.tests.cpp:<line number>: passed: trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) for: There is no extra whitespace here
+==
+There is no extra whitespace here
+StringManip.tests.cpp:<line number>: passed: trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) for: There is no extra whitespace here
+==
+There is no extra whitespace here
 Exception.tests.cpp:<line number>: failed: unexpected exception with message: '3.14'
 Approx.tests.cpp:<line number>: passed: d == approx( 1.23 ) for: 1.23 == Approx( 1.23 )
 Approx.tests.cpp:<line number>: passed: d == approx( 1.22 ) for: 1.23 == Approx( 1.22 )
@@ -1189,6 +1422,15 @@ Approx.tests.cpp:<line number>: passed: approx( d ) == 1.22 for: Approx( 1.23 )
 Approx.tests.cpp:<line number>: passed: approx( d ) == 1.24 for: Approx( 1.23 ) == 1.24
 Approx.tests.cpp:<line number>: passed: approx( d ) != 1.25 for: Approx( 1.23 ) != 1.25
 VariadicMacros.tests.cpp:<line number>: passed: with 1 message: 'no assertions'
+Matchers.tests.cpp:<line number>: passed: empty, Approx(empty) for: {  } is approx: {  }
+Matchers.tests.cpp:<line number>: passed: v1, Approx(v1) for: { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 }
+Matchers.tests.cpp:<line number>: passed: v1, !Approx(temp) for: { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 }
+Matchers.tests.cpp:<line number>: passed: v1, !Approx(v2) for: { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 }
+Matchers.tests.cpp:<line number>: passed: v1, Approx(v2).margin(0.5) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+Matchers.tests.cpp:<line number>: passed: v1, Approx(v2).epsilon(0.5) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+Matchers.tests.cpp:<line number>: passed: v1, Approx(v2).epsilon(0.1).scale(500) for: { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+Matchers.tests.cpp:<line number>: failed: empty, Approx(t1) for: {  } is approx: { 1.0, 2.0 }
+Matchers.tests.cpp:<line number>: failed: v1, Approx(v2) for: { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }
 Matchers.tests.cpp:<line number>: passed: v, VectorContains(1) for: { 1, 2, 3 } Contains: 1
 Matchers.tests.cpp:<line number>: passed: v, VectorContains(2) for: { 1, 2, 3 } Contains: 2
 Matchers.tests.cpp:<line number>: passed: v, Contains(v2) for: { 1, 2, 3 } Contains: { 1, 2 }
@@ -1355,6 +1597,13 @@ Tricky.tests.cpp:<line number>: passed: ptr.get() == 0 for: 0 == 0
 ToStringPair.tests.cpp:<line number>: passed: ::Catch::Detail::stringify( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" for: "{ { 42, "Arthur" }, { "Ford", 24 } }"
 ==
 "{ { 42, "Arthur" }, { "Ford", 24 } }"
+ToString.tests.cpp:<line number>: passed: parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) for: {  } Equals: {  }
+ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
+ToString.tests.cpp:<line number>: passed: parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
+ToString.tests.cpp:<line number>: passed: parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) for: { Value1 } Equals: { Value1 }
+ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) for: { Value1, Value2 } Equals: { Value1, Value2 }
+ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
+ToString.tests.cpp:<line number>: passed: parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) for: { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
 Tricky.tests.cpp:<line number>: passed: p == 0 for: 0 == 0
 Message.tests.cpp:<line number>: passed: true with 1 message: 'this MAY be seen IF info is printed for passing assertions'
 Message.tests.cpp:<line number>: failed: false with 2 messages: 'this SHOULD be seen' and 'this SHOULD also be seen'
@@ -1365,23 +1614,26 @@ Message.tests.cpp:<line number>: passed: true
 Misc.tests.cpp:<line number>: passed: a != b for: 1 != 2
 Misc.tests.cpp:<line number>: passed: b != a for: 2 != 1
 Misc.tests.cpp:<line number>: passed: a != b for: 1 != 2
-String.tests.cpp:<line number>: passed: Catch::replaceInPlace( letters, "b", "z" ) for: true
-String.tests.cpp:<line number>: passed: letters == "azcdefcg" for: "azcdefcg" == "azcdefcg"
-String.tests.cpp:<line number>: passed: Catch::replaceInPlace( letters, "c", "z" ) for: true
-String.tests.cpp:<line number>: passed: letters == "abzdefzg" for: "abzdefzg" == "abzdefzg"
-String.tests.cpp:<line number>: passed: Catch::replaceInPlace( letters, "a", "z" ) for: true
-String.tests.cpp:<line number>: passed: letters == "zbcdefcg" for: "zbcdefcg" == "zbcdefcg"
-String.tests.cpp:<line number>: passed: Catch::replaceInPlace( letters, "g", "z" ) for: true
-String.tests.cpp:<line number>: passed: letters == "abcdefcz" for: "abcdefcz" == "abcdefcz"
-String.tests.cpp:<line number>: passed: Catch::replaceInPlace( letters, letters, "replaced" ) for: true
-String.tests.cpp:<line number>: passed: letters == "replaced" for: "replaced" == "replaced"
-String.tests.cpp:<line number>: passed: !(Catch::replaceInPlace( letters, "x", "z" )) for: !false
-String.tests.cpp:<line number>: passed: letters == letters for: "abcdefcg" == "abcdefcg"
-String.tests.cpp:<line number>: passed: Catch::replaceInPlace( s, "'", "|'" ) for: true
-String.tests.cpp:<line number>: passed: s == "didn|'t" for: "didn|'t" == "didn|'t"
+StringManip.tests.cpp:<line number>: passed: Catch::replaceInPlace(letters, "b", "z") for: true
+StringManip.tests.cpp:<line number>: passed: letters == "azcdefcg" for: "azcdefcg" == "azcdefcg"
+StringManip.tests.cpp:<line number>: passed: Catch::replaceInPlace(letters, "c", "z") for: true
+StringManip.tests.cpp:<line number>: passed: letters == "abzdefzg" for: "abzdefzg" == "abzdefzg"
+StringManip.tests.cpp:<line number>: passed: Catch::replaceInPlace(letters, "a", "z") for: true
+StringManip.tests.cpp:<line number>: passed: letters == "zbcdefcg" for: "zbcdefcg" == "zbcdefcg"
+StringManip.tests.cpp:<line number>: passed: Catch::replaceInPlace(letters, "g", "z") for: true
+StringManip.tests.cpp:<line number>: passed: letters == "abcdefcz" for: "abcdefcz" == "abcdefcz"
+StringManip.tests.cpp:<line number>: passed: Catch::replaceInPlace(letters, letters, "replaced") for: true
+StringManip.tests.cpp:<line number>: passed: letters == "replaced" for: "replaced" == "replaced"
+StringManip.tests.cpp:<line number>: passed: !(Catch::replaceInPlace(letters, "x", "z")) for: !false
+StringManip.tests.cpp:<line number>: passed: letters == letters for: "abcdefcg" == "abcdefcg"
+StringManip.tests.cpp:<line number>: passed: Catch::replaceInPlace(s, "'", "|'") for: true
+StringManip.tests.cpp:<line number>: passed: s == "didn|'t" for: "didn|'t" == "didn|'t"
 Misc.tests.cpp:<line number>: failed: false with 1 message: '3'
 Message.tests.cpp:<line number>: failed: false with 2 messages: 'hi' and 'i := 7'
 Tag.tests.cpp:<line number>: passed: testcase.tags, Catch::VectorContains(std::string("magic-tag")) && Catch::VectorContains(std::string(".")) for: { ".", "magic-tag" } ( Contains: "magic-tag" and Contains: "." )
+StringManip.tests.cpp:<line number>: passed: splitStringRef("", ','), Equals(std::vector<StringRef>()) for: {  } Equals: {  }
+StringManip.tests.cpp:<line number>: passed: splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) for: { abc } Equals: { abc }
+StringManip.tests.cpp:<line number>: passed: splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) for: { abc, def } Equals: { abc, def }
 Message.tests.cpp:<line number>: failed: false with 4 messages: 'Count 1 to 3...' and '1' and '2' and '3'
 Message.tests.cpp:<line number>: failed: false with 4 messages: 'Count 4 to 6...' and '4' and '5' and '6'
 ToStringGeneral.tests.cpp:<line number>: passed: Catch::Detail::stringify( emptyMap ) == "{  }" for: "{  }" == "{  }"
@@ -1505,5 +1757,5 @@ Misc.tests.cpp:<line number>: passed: v.size() == 5 for: 5 == 5
 Misc.tests.cpp:<line number>: passed: v.capacity() >= 5 for: 5 >= 5
 Misc.tests.cpp:<line number>: passed:
 Misc.tests.cpp:<line number>: passed:
-Failed 78 test cases, failed 139 assertions.
+Failed 86 test cases, failed 148 assertions.
 
diff --git a/packages/Catch2/projects/SelfTest/Baselines/console.std.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/console.std.approved.txt
index 3b6f20684ca511b645ccbe5223b7e5fb763de138..fd405a84ffaa0c93c475e7a9523155630d1056bb 100644
--- a/packages/Catch2/projects/SelfTest/Baselines/console.std.approved.txt
+++ b/packages/Catch2/projects/SelfTest/Baselines/console.std.approved.txt
@@ -163,6 +163,54 @@ Class.tests.cpp:<line number>: FAILED:
 with expansion:
   0 == 1
 
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails -
+Template_Foo_2<float, 6>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
+with expansion:
+  6 < 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails -
+Template_Foo_2<int, 2>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
+with expansion:
+  2 < 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array
+<float, 6>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
+with expansion:
+  6 < 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array
+<int, 2>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
+with expansion:
+  2 < 2
+
 -------------------------------------------------------------------------------
 A TEMPLATE_TEST_CASE_METHOD based test run that fails - double
 -------------------------------------------------------------------------------
@@ -196,6 +244,39 @@ Class.tests.cpp:<line number>: FAILED:
 with expansion:
   1 == 2
 
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Nttp_Fixture<V>::value == 0 )
+with expansion:
+  1 == 0
+
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Nttp_Fixture<V>::value == 0 )
+with expansion:
+  3 == 0
+
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Nttp_Fixture<V>::value == 0 )
+with expansion:
+  6 == 0
+
 -------------------------------------------------------------------------------
 A TEST_CASE_METHOD based test run that fails
 -------------------------------------------------------------------------------
@@ -439,12 +520,12 @@ Matchers.tests.cpp:<line number>
 ...............................................................................
 
 Matchers.tests.cpp:<line number>: FAILED:
-  CHECK_THROWS_MATCHES( throws(3), SpecialException, ExceptionMatcher{1} )
+  CHECK_THROWS_MATCHES( throwsSpecialException(3), SpecialException, ExceptionMatcher{1} )
 with expansion:
   SpecialException::what special exception has value of 1
 
 Matchers.tests.cpp:<line number>: FAILED:
-  REQUIRE_THROWS_MATCHES( throws(4), SpecialException, ExceptionMatcher{1} )
+  REQUIRE_THROWS_MATCHES( throwsSpecialException(4), SpecialException, ExceptionMatcher{1} )
 with expansion:
   SpecialException::what special exception has value of 1
 
@@ -861,6 +942,30 @@ Exception.tests.cpp:<line number>: FAILED:
 due to unexpected exception with message:
   3.14
 
+-------------------------------------------------------------------------------
+Vector Approx matcher -- failing
+  Empty and non empty vectors are not approx equal
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: FAILED:
+  CHECK_THAT( empty, Approx(t1) )
+with expansion:
+  {  } is approx: { 1.0, 2.0 }
+
+-------------------------------------------------------------------------------
+Vector Approx matcher -- failing
+  Just different vectors
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: FAILED:
+  CHECK_THAT( v1, Approx(v2) )
+with expansion:
+  { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }
+
 -------------------------------------------------------------------------------
 Vector matchers that fail
   Contains (element)
@@ -1275,6 +1380,6 @@ due to unexpected exception with message:
   Why would you throw a std::string?
 
 ===============================================================================
-test cases:  258 |  192 passed |  62 failed |  4 failed as expected
-assertions: 1419 | 1276 passed | 122 failed | 21 failed as expected
+test cases:  304 |  230 passed |  70 failed |  4 failed as expected
+assertions: 1621 | 1469 passed | 131 failed | 21 failed as expected
 
diff --git a/packages/Catch2/projects/SelfTest/Baselines/console.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/console.sw.approved.txt
index c63de78ac30a769ae440254baf3dbe9cdbfae747..f234f88243245082c1a01e2162daaedaa23fa748 100644
--- a/packages/Catch2/projects/SelfTest/Baselines/console.sw.approved.txt
+++ b/packages/Catch2/projects/SelfTest/Baselines/console.sw.approved.txt
@@ -39,6 +39,22 @@ with expansion:
 Compilation.tests.cpp:<line number>
 ...............................................................................
 
+Compilation.tests.cpp:<line number>: PASSED:
+  REQUIRE( y.v == 0 )
+with expansion:
+  0 == 0
+
+Compilation.tests.cpp:<line number>: PASSED:
+  REQUIRE( 0 == y.v )
+with expansion:
+  0 == 0
+
+-------------------------------------------------------------------------------
+#1027: Bitfields can be captured
+-------------------------------------------------------------------------------
+Compilation.tests.cpp:<line number>
+...............................................................................
+
 Compilation.tests.cpp:<line number>: PASSED:
   REQUIRE( y.v == 0 )
 with expansion:
@@ -1179,6 +1195,102 @@ Class.tests.cpp:<line number>: PASSED:
 with expansion:
   0 == 0
 
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails -
+Template_Foo_2<float, 6>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
+with expansion:
+  6 < 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails -
+Template_Foo_2<int, 2>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
+with expansion:
+  2 < 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array
+<float, 6>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
+with expansion:
+  6 < 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array
+<int, 2>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() < 2 )
+with expansion:
+  2 < 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds -
+Template_Foo_2<float,6>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() >= 2 )
+with expansion:
+  6 >= 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds -
+Template_Foo_2<int,2>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() >= 2 )
+with expansion:
+  2 >= 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::
+array<float,6>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() >= 2 )
+with expansion:
+  6 >= 2
+
+-------------------------------------------------------------------------------
+A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::
+array<int,2>
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Template_Fixture_2<TestType>{}.m_a.size() >= 2 )
+with expansion:
+  2 >= 2
+
 -------------------------------------------------------------------------------
 A TEMPLATE_TEST_CASE_METHOD based test run that fails - double
 -------------------------------------------------------------------------------
@@ -1245,6 +1357,72 @@ Class.tests.cpp:<line number>: PASSED:
 with expansion:
   1 == 1
 
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Nttp_Fixture<V>::value == 0 )
+with expansion:
+  1 == 0
+
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Nttp_Fixture<V>::value == 0 )
+with expansion:
+  3 == 0
+
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: FAILED:
+  REQUIRE( Nttp_Fixture<V>::value == 0 )
+with expansion:
+  6 == 0
+
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Nttp_Fixture<V>::value > 0 )
+with expansion:
+  1 > 0
+
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Nttp_Fixture<V>::value > 0 )
+with expansion:
+  3 > 0
+
+-------------------------------------------------------------------------------
+A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Nttp_Fixture<V>::value > 0 )
+with expansion:
+  6 > 0
+
 -------------------------------------------------------------------------------
 A TEST_CASE_METHOD based test run that fails
 -------------------------------------------------------------------------------
@@ -1311,6 +1489,50 @@ Misc.tests.cpp:<line number>: PASSED:
 with expansion:
   0 == 0
 
+-------------------------------------------------------------------------------
+A Template product test case with array signature - Bar<float, 42>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( x.size() > 0 )
+with expansion:
+  42 > 0
+
+-------------------------------------------------------------------------------
+A Template product test case with array signature - Bar<int, 9>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( x.size() > 0 )
+with expansion:
+  9 > 0
+
+-------------------------------------------------------------------------------
+A Template product test case with array signature - std::array<float, 42>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( x.size() > 0 )
+with expansion:
+  42 > 0
+
+-------------------------------------------------------------------------------
+A Template product test case with array signature - std::array<int, 9>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( x.size() > 0 )
+with expansion:
+  9 > 0
+
 -------------------------------------------------------------------------------
 A comparison that uses literals instead of the normal constructor
 -------------------------------------------------------------------------------
@@ -1717,43 +1939,6 @@ Tricky.tests.cpp:<line number>
 Tricky.tests.cpp:<line number>: PASSED:
   REQUIRE( true )
 
--------------------------------------------------------------------------------
-Assorted miscellaneous tests
--------------------------------------------------------------------------------
-Approx.tests.cpp:<line number>
-...............................................................................
-
-Approx.tests.cpp:<line number>: PASSED:
-  REQUIRE( INFINITY == Approx(INFINITY) )
-with expansion:
-  inff == Approx( inf )
-
-Approx.tests.cpp:<line number>: PASSED:
-  REQUIRE( NAN != Approx(NAN) )
-with expansion:
-  nanf != Approx( nan )
-
-Approx.tests.cpp:<line number>: PASSED:
-  REQUIRE_FALSE( NAN == Approx(NAN) )
-with expansion:
-  !(nanf == Approx( nan ))
-
--------------------------------------------------------------------------------
-Bitfields can be captured (#1027)
--------------------------------------------------------------------------------
-Tricky.tests.cpp:<line number>
-...............................................................................
-
-Tricky.tests.cpp:<line number>: PASSED:
-  REQUIRE( y.v == 0 )
-with expansion:
-  0 == 0
-
-Tricky.tests.cpp:<line number>: PASSED:
-  REQUIRE( 0 == y.v )
-with expansion:
-  0 == 0
-
 -------------------------------------------------------------------------------
 CAPTURE can deal with complex expressions
 -------------------------------------------------------------------------------
@@ -1786,6 +1971,27 @@ with messages:
   (1, 2) := 2
   (2, 3) := 3
 
+-------------------------------------------------------------------------------
+CAPTURE parses string and character constants
+-------------------------------------------------------------------------------
+Message.tests.cpp:<line number>
+...............................................................................
+
+Message.tests.cpp:<line number>: PASSED:
+with messages:
+  ("comma, in string", "escaped, \", ") := "escaped, ", "
+  "single quote in string,'," := "single quote in string,',"
+  "some escapes, \\,\\\\" := "some escapes, \,\\"
+  "some, ), unmatched, } prenheses {[<" := "some, ), unmatched, } prenheses {[
+  <"
+  '"' := '"'
+  '\'' := '''
+  ',' := ','
+  '}' := '}'
+  ')' := ')'
+  '(' := '('
+  '{' := '{'
+
 -------------------------------------------------------------------------------
 Capture and info messages
   Capture should stringify like assertions
@@ -1973,6 +2179,32 @@ Tricky.tests.cpp:<line number>: PASSED:
 with expansion:
   0x<hex digits> == 0x<hex digits>
 
+-------------------------------------------------------------------------------
+Comparison ops
+-------------------------------------------------------------------------------
+RandomNumberGeneration.tests.cpp:<line number>
+...............................................................................
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( SimplePcg32{} == SimplePcg32{} )
+with expansion:
+  {?} == {?}
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( SimplePcg32{ 0 } != SimplePcg32{} )
+with expansion:
+  {?} != {?}
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE_FALSE( SimplePcg32{ 1 } == SimplePcg32{ 2 } )
+with expansion:
+  !({?} == {?})
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE_FALSE( SimplePcg32{ 1 } != SimplePcg32{ 1 } )
+with expansion:
+  !({?} != {?})
+
 -------------------------------------------------------------------------------
 Comparison with explicitly convertible types
 -------------------------------------------------------------------------------
@@ -2176,55 +2408,239 @@ with expansion:
   "this string contains 'abc' as a substring" contains: "STRING"
 
 -------------------------------------------------------------------------------
-Custom exceptions can be translated when testing for nothrow
+Copy and then generate a range
+  from var and iterators
 -------------------------------------------------------------------------------
-Exception.tests.cpp:<line number>
+Generators.tests.cpp:<line number>
 ...............................................................................
 
-Exception.tests.cpp:<line number>: FAILED:
-  REQUIRE_NOTHROW( throwCustom() )
-due to unexpected exception with message:
-  custom exception - not std
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
 
 -------------------------------------------------------------------------------
-Custom exceptions can be translated when testing for throwing as something else
+Copy and then generate a range
+  from var and iterators
 -------------------------------------------------------------------------------
-Exception.tests.cpp:<line number>
+Generators.tests.cpp:<line number>
 ...............................................................................
 
-Exception.tests.cpp:<line number>: FAILED:
-  REQUIRE_THROWS_AS( throwCustom(), std::exception )
-due to unexpected exception with message:
-  custom exception - not std
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
 
 -------------------------------------------------------------------------------
-Custom std-exceptions can be custom translated
+Copy and then generate a range
+  from var and iterators
 -------------------------------------------------------------------------------
-Exception.tests.cpp:<line number>
+Generators.tests.cpp:<line number>
 ...............................................................................
 
-Exception.tests.cpp:<line number>: FAILED:
-due to unexpected exception with message:
-  custom std exception
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
 
 -------------------------------------------------------------------------------
-Default scale is invisible to comparison
+Copy and then generate a range
+  from var and iterators
 -------------------------------------------------------------------------------
-Approx.tests.cpp:<line number>
+Generators.tests.cpp:<line number>
 ...............................................................................
 
-Approx.tests.cpp:<line number>: PASSED:
-  REQUIRE( 101.000001 != Approx(100).epsilon(0.01) )
-with expansion:
-  101.000001 != Approx( 100.0 )
-
-Approx.tests.cpp:<line number>: PASSED:
-  REQUIRE( std::pow(10, -5) != Approx(std::pow(10, -7)) )
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
 with expansion:
-  0.00001 != Approx( 0.0000001 )
+  1 == 1
 
 -------------------------------------------------------------------------------
-EndsWith string matcher
+Copy and then generate a range
+  from var and iterators
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Copy and then generate a range
+  from var and iterators
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Copy and then generate a range
+  From a temporary container
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Copy and then generate a range
+  From a temporary container
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Copy and then generate a range
+  From a temporary container
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Copy and then generate a range
+  From a temporary container
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Copy and then generate a range
+  From a temporary container
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Copy and then generate a range
+  From a temporary container
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( elem % 2 == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Copy and then generate a range
+  Final validation
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( call_count == 1 )
+with expansion:
+  1 == 1
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( make_data().size() == test_count )
+with expansion:
+  6 == 6
+
+-------------------------------------------------------------------------------
+Custom exceptions can be translated when testing for nothrow
+-------------------------------------------------------------------------------
+Exception.tests.cpp:<line number>
+...............................................................................
+
+Exception.tests.cpp:<line number>: FAILED:
+  REQUIRE_NOTHROW( throwCustom() )
+due to unexpected exception with message:
+  custom exception - not std
+
+-------------------------------------------------------------------------------
+Custom exceptions can be translated when testing for throwing as something else
+-------------------------------------------------------------------------------
+Exception.tests.cpp:<line number>
+...............................................................................
+
+Exception.tests.cpp:<line number>: FAILED:
+  REQUIRE_THROWS_AS( throwCustom(), std::exception )
+due to unexpected exception with message:
+  custom exception - not std
+
+-------------------------------------------------------------------------------
+Custom std-exceptions can be custom translated
+-------------------------------------------------------------------------------
+Exception.tests.cpp:<line number>
+...............................................................................
+
+Exception.tests.cpp:<line number>: FAILED:
+due to unexpected exception with message:
+  custom std exception
+
+-------------------------------------------------------------------------------
+Default scale is invisible to comparison
+-------------------------------------------------------------------------------
+Approx.tests.cpp:<line number>
+...............................................................................
+
+Approx.tests.cpp:<line number>: PASSED:
+  REQUIRE( 101.000001 != Approx(100).epsilon(0.01) )
+with expansion:
+  101.000001 != Approx( 100.0 )
+
+Approx.tests.cpp:<line number>: PASSED:
+  REQUIRE( std::pow(10, -5) != Approx(std::pow(10, -7)) )
+with expansion:
+  0.00001 != Approx( 0.0000001 )
+
+-------------------------------------------------------------------------------
+Directly creating an EnumInfo
+-------------------------------------------------------------------------------
+ToString.tests.cpp:<line number>
+...............................................................................
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK( enumInfo->lookup(0) == "Value1" )
+with expansion:
+  Value1 == "Value1"
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK( enumInfo->lookup(1) == "Value2" )
+with expansion:
+  Value2 == "Value2"
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK( enumInfo->lookup(3) == "{** unexpected enum value **}" )
+with expansion:
+  {** unexpected enum value **}
+  ==
+  "{** unexpected enum value **}"
+
+-------------------------------------------------------------------------------
+EndsWith string matcher
 -------------------------------------------------------------------------------
 Matchers.tests.cpp:<line number>
 ...............................................................................
@@ -2240,6 +2656,56 @@ with expansion:
   "this string contains 'abc' as a substring" ends with: "this" (case
   insensitive)
 
+-------------------------------------------------------------------------------
+Enums can quickly have stringification enabled using REGISTER_ENUM
+-------------------------------------------------------------------------------
+EnumToString.tests.cpp:<line number>
+...............................................................................
+
+EnumToString.tests.cpp:<line number>: PASSED:
+  REQUIRE( stringify( EnumClass3::Value1 ) == "Value1" )
+with expansion:
+  "Value1" == "Value1"
+
+EnumToString.tests.cpp:<line number>: PASSED:
+  REQUIRE( stringify( EnumClass3::Value2 ) == "Value2" )
+with expansion:
+  "Value2" == "Value2"
+
+EnumToString.tests.cpp:<line number>: PASSED:
+  REQUIRE( stringify( EnumClass3::Value3 ) == "Value3" )
+with expansion:
+  "Value3" == "Value3"
+
+EnumToString.tests.cpp:<line number>: PASSED:
+  REQUIRE( stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" )
+with expansion:
+  "{** unexpected enum value **}"
+  ==
+  "{** unexpected enum value **}"
+
+EnumToString.tests.cpp:<line number>: PASSED:
+  REQUIRE( stringify( ec3 ) == "Value2" )
+with expansion:
+  "Value2" == "Value2"
+
+-------------------------------------------------------------------------------
+Enums in namespaces can quickly have stringification enabled using
+REGISTER_ENUM
+-------------------------------------------------------------------------------
+EnumToString.tests.cpp:<line number>
+...............................................................................
+
+EnumToString.tests.cpp:<line number>: PASSED:
+  REQUIRE( stringify( Bikeshed::Colours::Red ) == "Red" )
+with expansion:
+  "Red" == "Red"
+
+EnumToString.tests.cpp:<line number>: PASSED:
+  REQUIRE( stringify( Bikeshed::Colours::Blue ) == "Blue" )
+with expansion:
+  "Blue" == "Blue"
+
 -------------------------------------------------------------------------------
 Epsilon only applies to Approx's value
 -------------------------------------------------------------------------------
@@ -2464,12 +2930,12 @@ Matchers.tests.cpp:<line number>
 ...............................................................................
 
 Matchers.tests.cpp:<line number>: FAILED:
-  CHECK_THROWS_MATCHES( throws(3), SpecialException, ExceptionMatcher{1} )
+  CHECK_THROWS_MATCHES( throwsSpecialException(3), SpecialException, ExceptionMatcher{1} )
 with expansion:
   SpecialException::what special exception has value of 1
 
 Matchers.tests.cpp:<line number>: FAILED:
-  REQUIRE_THROWS_MATCHES( throws(4), SpecialException, ExceptionMatcher{1} )
+  REQUIRE_THROWS_MATCHES( throwsSpecialException(4), SpecialException, ExceptionMatcher{1} )
 with expansion:
   SpecialException::what special exception has value of 1
 
@@ -2480,12 +2946,12 @@ Matchers.tests.cpp:<line number>
 ...............................................................................
 
 Matchers.tests.cpp:<line number>: PASSED:
-  CHECK_THROWS_MATCHES( throws(1), SpecialException, ExceptionMatcher{1} )
+  CHECK_THROWS_MATCHES( throwsSpecialException(1), SpecialException, ExceptionMatcher{1} )
 with expansion:
   SpecialException::what special exception has value of 1
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THROWS_MATCHES( throws(2), SpecialException, ExceptionMatcher{2} )
+  REQUIRE_THROWS_MATCHES( throwsSpecialException(2), SpecialException, ExceptionMatcher{2} )
 with expansion:
   SpecialException::what special exception has value of 2
 
@@ -2540,6 +3006,32 @@ Exception.tests.cpp:<line number>: PASSED:
 with expansion:
   "expected exception" contains: "except" (case insensitive)
 
+-------------------------------------------------------------------------------
+Exceptions matchers
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, Message("DerivedException::what") )
+with expansion:
+  DerivedException::what exception message matches "DerivedException::what"
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THROWS_MATCHES( throwsDerivedException(), DerivedException, !Message("derivedexception::what") )
+with expansion:
+  DerivedException::what not exception message matches "derivedexception::what"
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THROWS_MATCHES( throwsSpecialException(2), SpecialException, !Message("DerivedException::what") )
+with expansion:
+  SpecialException::what not exception message matches "DerivedException::what"
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THROWS_MATCHES( throwsSpecialException(2), SpecialException, Message("SpecialException::what") )
+with expansion:
+  SpecialException::what exception message matches "SpecialException::what"
+
 -------------------------------------------------------------------------------
 Expected exceptions that don't throw or unexpected exceptions fail the test
 -------------------------------------------------------------------------------
@@ -2622,6 +3114,46 @@ Misc.tests.cpp:<line number>: PASSED:
 with expansion:
   3628800 (0x<hex digits>) == 3628800 (0x<hex digits>)
 
+-------------------------------------------------------------------------------
+Floating point matchers: double
+  Relative
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 10., WithinRel(11.1, 0.1) )
+with expansion:
+  10.0 and 11.1 are within 10% of each other
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 10., !WithinRel(11.2, 0.1) )
+with expansion:
+  10.0 not and 11.2 are within 10% of each other
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 1., !WithinRel(0., 0.99) )
+with expansion:
+  1.0 not and 0 are within 99% of each other
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( -0., WithinRel(0.) )
+with expansion:
+  -0.0 and 0 are within 2.22045e-12% of each other
+
+-------------------------------------------------------------------------------
+Floating point matchers: double
+  Relative
+  Some subnormal values
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( v1, WithinRel(v2) )
+with expansion:
+  0.0 and 2.22507e-308 are within 2.22045e-12% of each other
+
 -------------------------------------------------------------------------------
 Floating point matchers: double
   Margin
@@ -2649,11 +3181,6 @@ Matchers.tests.cpp:<line number>: PASSED:
 with expansion:
   0.0 not is within 0.99 of 1.0
 
-Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( NAN, !WithinAbs(NAN, 0) )
-with expansion:
-  nanf not is within 0.0 of nan
-
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( 11., !WithinAbs(10., 0.5) )
 with expansion:
@@ -2684,37 +3211,44 @@ Matchers.tests.cpp:<line number>
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( 1., WithinULP(1., 0) )
 with expansion:
-  1.0 is within 0 ULPs of 1.0
+  1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.
+  0000000000000000e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( nextafter(1., 2.), WithinULP(1., 1) )
 with expansion:
-  1.0 is within 1 ULPs of 1.0
+  1.0 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.
+  0000000000000002e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( nextafter(1., 0.), WithinULP(1., 1) )
+  REQUIRE_THAT( 0., WithinULP(nextafter(0., 1.), 1) )
 with expansion:
-  1.0 is within 1 ULPs of 1.0
+  0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.
+  8813129168249309e-324])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( nextafter(1., 2.), !WithinULP(1., 0) )
+  REQUIRE_THAT( 1., WithinULP(nextafter(1., 0.), 1) )
 with expansion:
-  1.0 not is within 0 ULPs of 1.0
+  1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.
+  0000000000000000e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( 1., WithinULP(1., 0) )
+  REQUIRE_THAT( 1., !WithinULP(nextafter(1., 2.), 0) )
 with expansion:
-  1.0 is within 0 ULPs of 1.0
+  1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00,
+  1.0000000000000002e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( -0., WithinULP(0., 0) )
+  REQUIRE_THAT( 1., WithinULP(1., 0) )
 with expansion:
-  -0.0 is within 0 ULPs of 0.0
+  1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.
+  0000000000000000e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( NAN, !WithinULP(NAN, 123) )
+  REQUIRE_THAT( -0., WithinULP(0., 0) )
 with expansion:
-  nanf not is within 123 ULPs of nanf
+  -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.
+  0000000000000000e+00])
 
 -------------------------------------------------------------------------------
 Floating point matchers: double
@@ -2726,17 +3260,19 @@ Matchers.tests.cpp:<line number>
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( 1., WithinAbs(1., 0.5) || WithinULP(2., 1) )
 with expansion:
-  1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 )
+  1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.
+  9999999999999998e+00, 2.0000000000000004e+00]) )
 
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( 1., WithinAbs(2., 0.5) || WithinULP(1., 0) )
 with expansion:
-  1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 )
+  1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.
+  0000000000000000e+00, 1.0000000000000000e+00]) )
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) )
+  REQUIRE_THAT( 0.0001, WithinAbs(0., 0.001) || WithinRel(0., 0.1) )
 with expansion:
-  nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf )
+  0.0001 ( is within 0.001 of 0.0 or and 0 are within 10% of each other )
 
 -------------------------------------------------------------------------------
 Floating point matchers: double
@@ -2755,51 +3291,92 @@ Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_NOTHROW( WithinULP(1., 0) )
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THROWS_AS( WithinULP(1., -1), std::domain_error )
+  REQUIRE_NOTHROW( WithinRel(1., 0.) )
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THROWS_AS( WithinRel(1., -0.2), std::domain_error )
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THROWS_AS( WithinRel(1., 1.), std::domain_error )
 
 -------------------------------------------------------------------------------
 Floating point matchers: float
-  Margin
+  Relative
 -------------------------------------------------------------------------------
 Matchers.tests.cpp:<line number>
 ...............................................................................
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( 1.f, WithinAbs(1.f, 0) )
-with expansion:
-  1.0f is within 0.0 of 1.0
-
-Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( 0.f, WithinAbs(1.f, 1) )
+  REQUIRE_THAT( 10.f, WithinRel(11.1f, 0.1f) )
 with expansion:
-  0.0f is within 1.0 of 1.0
+  10.0f and 11.1 are within 10% of each other
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( 0.f, !WithinAbs(1.f, 0.99f) )
+  REQUIRE_THAT( 10.f, !WithinRel(11.2f, 0.1f) )
 with expansion:
-  0.0f not is within 0.9900000095 of 1.0
+  10.0f not and 11.2 are within 10% of each other
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( 0.f, !WithinAbs(1.f, 0.99f) )
+  REQUIRE_THAT( 1.f, !WithinRel(0.f, 0.99f) )
 with expansion:
-  0.0f not is within 0.9900000095 of 1.0
+  1.0f not and 0 are within 99% of each other
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( 0.f, WithinAbs(-0.f, 0) )
+  REQUIRE_THAT( -0.f, WithinRel(0.f) )
 with expansion:
-  0.0f is within 0.0 of -0.0
+  -0.0f and 0 are within 0.00119209% of each other
 
-Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( NAN, !WithinAbs(NAN, 0) )
-with expansion:
-  nanf not is within 0.0 of nan
+-------------------------------------------------------------------------------
+Floating point matchers: float
+  Relative
+  Some subnormal values
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( 11.f, !WithinAbs(10.f, 0.5f) )
+  REQUIRE_THAT( v1, WithinRel(v2) )
 with expansion:
-  11.0f not is within 0.5 of 10.0
+  0.0f and 1.17549e-38 are within 0.00119209% of each other
 
-Matchers.tests.cpp:<line number>: PASSED:
+-------------------------------------------------------------------------------
+Floating point matchers: float
+  Margin
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 1.f, WithinAbs(1.f, 0) )
+with expansion:
+  1.0f is within 0.0 of 1.0
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 0.f, WithinAbs(1.f, 1) )
+with expansion:
+  0.0f is within 1.0 of 1.0
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 0.f, !WithinAbs(1.f, 0.99f) )
+with expansion:
+  0.0f not is within 0.9900000095 of 1.0
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 0.f, !WithinAbs(1.f, 0.99f) )
+with expansion:
+  0.0f not is within 0.9900000095 of 1.0
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 0.f, WithinAbs(-0.f, 0) )
+with expansion:
+  0.0f is within 0.0 of -0.0
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( 11.f, !WithinAbs(10.f, 0.5f) )
+with expansion:
+  11.0f not is within 0.5 of 10.0
+
+Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( 10.f, !WithinAbs(11.f, 0.5f) )
 with expansion:
   10.0f not is within 0.5 of 11.0
@@ -2824,37 +3401,38 @@ Matchers.tests.cpp:<line number>
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( 1.f, WithinULP(1.f, 0) )
 with expansion:
-  1.0f is within 0 ULPs of 1.0f
+  1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( nextafter(1.f, 2.f), WithinULP(1.f, 1) )
 with expansion:
-  1.0f is within 1 ULPs of 1.0f
+  1.0f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( nextafter(1.f, 0.f), WithinULP(1.f, 1) )
+  REQUIRE_THAT( 0.f, WithinULP(nextafter(0.f, 1.f), 1) )
 with expansion:
-  1.0f is within 1 ULPs of 1.0f
+  0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( nextafter(1.f, 2.f), !WithinULP(1.f, 0) )
+  REQUIRE_THAT( 1.f, WithinULP(nextafter(1.f, 0.f), 1) )
 with expansion:
-  1.0f not is within 0 ULPs of 1.0f
+  1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( 1.f, WithinULP(1.f, 0) )
+  REQUIRE_THAT( 1.f, !WithinULP(nextafter(1.f, 2.f), 0) )
 with expansion:
-  1.0f is within 0 ULPs of 1.0f
+  1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+
+  00])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( -0.f, WithinULP(0.f, 0) )
+  REQUIRE_THAT( 1.f, WithinULP(1.f, 0) )
 with expansion:
-  -0.0f is within 0 ULPs of 0.0f
+  1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00])
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( NAN, !WithinULP(NAN, 123) )
+  REQUIRE_THAT( -0.f, WithinULP(0.f, 0) )
 with expansion:
-  nanf not is within 123 ULPs of nanf
+  -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00])
 
 -------------------------------------------------------------------------------
 Floating point matchers: float
@@ -2866,17 +3444,19 @@ Matchers.tests.cpp:<line number>
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( 1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1) )
 with expansion:
-  1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f )
+  1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.
+  99999940e-01, 1.00000012e+00]) )
 
 Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_THAT( 1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0) )
 with expansion:
-  1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f )
+  1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.
+  00000000e+00, 1.00000000e+00]) )
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THAT( NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)) )
+  REQUIRE_THAT( 0.0001f, WithinAbs(0.f, 0.001f) || WithinRel(0.f, 0.1f) )
 with expansion:
-  nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf )
+  0.0001f ( is within 0.001 of 0.0 or and 0 are within 10% of each other )
 
 -------------------------------------------------------------------------------
 Floating point matchers: float
@@ -2895,7 +3475,16 @@ Matchers.tests.cpp:<line number>: PASSED:
   REQUIRE_NOTHROW( WithinULP(1.f, 0) )
 
 Matchers.tests.cpp:<line number>: PASSED:
-  REQUIRE_THROWS_AS( WithinULP(1.f, -1), std::domain_error )
+  REQUIRE_THROWS_AS( WithinULP(1.f, static_cast<uint64_t>(-1)), std::domain_error )
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_NOTHROW( WithinRel(1.f, 0.f) )
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THROWS_AS( WithinRel(1.f, -0.2f), std::domain_error )
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THROWS_AS( WithinRel(1.f, 1.f), std::domain_error )
 
 -------------------------------------------------------------------------------
 Generators -- adapters
@@ -3272,6 +3861,45 @@ Generators.tests.cpp:<line number>: PASSED:
 with expansion:
   2 < 3
 
+-------------------------------------------------------------------------------
+Generators -- adapters
+  Chunking a generator into sized pieces
+  Chunk size of zero
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( chunk2.size() == 0 )
+with expansion:
+  0 == 0
+
+-------------------------------------------------------------------------------
+Generators -- adapters
+  Chunking a generator into sized pieces
+  Chunk size of zero
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( chunk2.size() == 0 )
+with expansion:
+  0 == 0
+
+-------------------------------------------------------------------------------
+Generators -- adapters
+  Chunking a generator into sized pieces
+  Chunk size of zero
+-------------------------------------------------------------------------------
+Generators.tests.cpp:<line number>
+...............................................................................
+
+Generators.tests.cpp:<line number>: PASSED:
+  REQUIRE( chunk2.size() == 0 )
+with expansion:
+  0 == 0
+
 -------------------------------------------------------------------------------
 Generators -- adapters
   Chunking a generator into sized pieces
@@ -5138,6 +5766,125 @@ Condition.tests.cpp:<line number>: PASSED:
 with expansion:
   "hello" > "a"
 
+-------------------------------------------------------------------------------
+Our PCG implementation provides expected results for known seeds
+  Default seeded
+-------------------------------------------------------------------------------
+RandomNumberGeneration.tests.cpp:<line number>
+...............................................................................
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  4242248763 (0x<hex digits>)
+  ==
+  4242248763 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  1867888929 (0x<hex digits>)
+  ==
+  1867888929 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  1276619030 (0x<hex digits>)
+  ==
+  1276619030 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  1911218783 (0x<hex digits>)
+  ==
+  1911218783 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  1827115164 (0x<hex digits>)
+  ==
+  1827115164 (0x<hex digits>)
+
+-------------------------------------------------------------------------------
+Our PCG implementation provides expected results for known seeds
+  Specific seed
+-------------------------------------------------------------------------------
+RandomNumberGeneration.tests.cpp:<line number>
+...............................................................................
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  1472234645 (0x<hex digits>)
+  ==
+  1472234645 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  868832940 (0x<hex digits>)
+  ==
+  868832940 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  570883446 (0x<hex digits>)
+  ==
+  570883446 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  889299803 (0x<hex digits>)
+  ==
+  889299803 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  4261393167 (0x<hex digits>)
+  ==
+  4261393167 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  1472234645 (0x<hex digits>)
+  ==
+  1472234645 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  868832940 (0x<hex digits>)
+  ==
+  868832940 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  570883446 (0x<hex digits>)
+  ==
+  570883446 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  889299803 (0x<hex digits>)
+  ==
+  889299803 (0x<hex digits>)
+
+RandomNumberGeneration.tests.cpp:<line number>: PASSED:
+  REQUIRE( rng() == 0x<hex digits> )
+with expansion:
+  4261393167 (0x<hex digits>)
+  ==
+  4261393167 (0x<hex digits>)
+
 -------------------------------------------------------------------------------
 Output from all sections is reported
   one
@@ -6052,6 +6799,70 @@ CmdLine.tests.cpp:<line number>: PASSED:
 with expansion:
   true == true
 
+-------------------------------------------------------------------------------
+Parse test names and tags
+  Leading and trailing spaces in test spec
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( "  aardvark " ) ) )
+with expansion:
+  true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( "  aardvark" ) ) )
+with expansion:
+  true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( " aardvark " ) ) )
+with expansion:
+  true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( "aardvark " ) ) )
+with expansion:
+  true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( "aardvark" ) ) )
+with expansion:
+  true
+
+-------------------------------------------------------------------------------
+Parse test names and tags
+  Leading and trailing spaces in test name
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( "  aardvark " ) ) )
+with expansion:
+  true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( "  aardvark" ) ) )
+with expansion:
+  true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( " aardvark " ) ) )
+with expansion:
+  true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( "aardvark " ) ) )
+with expansion:
+  true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( spec.matches( fakeTestCase( "aardvark" ) ) )
+with expansion:
+  true
+
 -------------------------------------------------------------------------------
 Pointers can be compared to null
 -------------------------------------------------------------------------------
@@ -6098,6 +6909,40 @@ Condition.tests.cpp:<line number>: PASSED:
 with expansion:
   0 != 0x<hex digits>
 
+-------------------------------------------------------------------------------
+Precision of floating point stringification can be set
+  Floats
+-------------------------------------------------------------------------------
+ToStringGeneral.tests.cpp:<line number>
+...............................................................................
+
+ToStringGeneral.tests.cpp:<line number>: PASSED:
+  CHECK( str1.size() == 3 + 5 )
+with expansion:
+  8 == 8
+
+ToStringGeneral.tests.cpp:<line number>: PASSED:
+  REQUIRE( str2.size() == 3 + 10 )
+with expansion:
+  13 == 13
+
+-------------------------------------------------------------------------------
+Precision of floating point stringification can be set
+  Double
+-------------------------------------------------------------------------------
+ToStringGeneral.tests.cpp:<line number>
+...............................................................................
+
+ToStringGeneral.tests.cpp:<line number>: PASSED:
+  CHECK( str1.size() == 2 + 5 )
+with expansion:
+  7 == 7
+
+ToStringGeneral.tests.cpp:<line number>: PASSED:
+  REQUIRE( str2.size() == 2 + 15 )
+with expansion:
+  17 == 17
+
 -------------------------------------------------------------------------------
 Predicate matcher can accept const char*
 -------------------------------------------------------------------------------
@@ -6621,48 +7466,120 @@ with expansion:
   contains: "colour mode must be one of"
 
 -------------------------------------------------------------------------------
-Product with differing arities - std::tuple<int, double, float>
+Process can be configured on command line
+  Benchmark options
+  samples
 -------------------------------------------------------------------------------
-Misc.tests.cpp:<line number>
+CmdLine.tests.cpp:<line number>
 ...............................................................................
 
-Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( std::tuple_size<TestType>::value >= 1 )
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( cli.parse({ "test", "--benchmark-samples=200" }) )
 with expansion:
-  3 >= 1
+  {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  REQUIRE( config.benchmarkSamples == 200 )
+with expansion:
+  200 == 200
 
 -------------------------------------------------------------------------------
-Product with differing arities - std::tuple<int, double>
+Process can be configured on command line
+  Benchmark options
+  resamples
 -------------------------------------------------------------------------------
-Misc.tests.cpp:<line number>
+CmdLine.tests.cpp:<line number>
 ...............................................................................
 
-Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( std::tuple_size<TestType>::value >= 1 )
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( cli.parse({ "test", "--benchmark-resamples=20000" }) )
 with expansion:
-  2 >= 1
+  {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  REQUIRE( config.benchmarkResamples == 20000 )
+with expansion:
+  20000 (0x<hex digits>) == 20000 (0x<hex digits>)
 
 -------------------------------------------------------------------------------
-Product with differing arities - std::tuple<int>
+Process can be configured on command line
+  Benchmark options
+  resamples
 -------------------------------------------------------------------------------
-Misc.tests.cpp:<line number>
+CmdLine.tests.cpp:<line number>
 ...............................................................................
 
-Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( std::tuple_size<TestType>::value >= 1 )
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( cli.parse({ "test", "--benchmark-confidence-interval=0.99" }) )
 with expansion:
-  1 >= 1
+  {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  REQUIRE( config.benchmarkConfidenceInterval == Catch::Detail::Approx(0.99) )
+with expansion:
+  0.99 == Approx( 0.99 )
 
 -------------------------------------------------------------------------------
-Reconstruction should be based on stringification: #914
+Process can be configured on command line
+  Benchmark options
+  resamples
 -------------------------------------------------------------------------------
-Decomposition.tests.cpp:<line number>
+CmdLine.tests.cpp:<line number>
 ...............................................................................
 
-Decomposition.tests.cpp:<line number>: FAILED:
-  CHECK( truthy(false) )
+CmdLine.tests.cpp:<line number>: PASSED:
+  CHECK( cli.parse({ "test", "--benchmark-no-analysis" }) )
 with expansion:
-  Hey, its truthy!
+  {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+  REQUIRE( config.benchmarkNoAnalysis )
+with expansion:
+  true
+
+-------------------------------------------------------------------------------
+Product with differing arities - std::tuple<int, double, float>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( std::tuple_size<TestType>::value >= 1 )
+with expansion:
+  3 >= 1
+
+-------------------------------------------------------------------------------
+Product with differing arities - std::tuple<int, double>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( std::tuple_size<TestType>::value >= 1 )
+with expansion:
+  2 >= 1
+
+-------------------------------------------------------------------------------
+Product with differing arities - std::tuple<int>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( std::tuple_size<TestType>::value >= 1 )
+with expansion:
+  1 >= 1
+
+-------------------------------------------------------------------------------
+Reconstruction should be based on stringification: #914
+-------------------------------------------------------------------------------
+Decomposition.tests.cpp:<line number>
+...............................................................................
+
+Decomposition.tests.cpp:<line number>: FAILED:
+  CHECK( truthy(false) )
+with expansion:
+  Hey, its truthy!
 
 -------------------------------------------------------------------------------
 Regex string matcher
@@ -6934,11 +7851,6 @@ Approx.tests.cpp:<line number>: PASSED:
 with expansion:
   Approx( 1.23 ) != 1.24
 
-Approx.tests.cpp:<line number>: PASSED:
-  REQUIRE( INFINITY == Approx(INFINITY) )
-with expansion:
-  inff == Approx( inf )
-
 Message from section one
 -------------------------------------------------------------------------------
 Standard output from all sections is reported
@@ -7158,11 +8070,6 @@ String.tests.cpp:<line number>: PASSED:
 with expansion:
   false == false
 
-String.tests.cpp:<line number>: PASSED:
-  REQUIRE( isSubstring( original ) == false )
-with expansion:
-  false == false
-
 String.tests.cpp:<line number>: PASSED:
   REQUIRE( isOwned( original ) )
 with expansion:
@@ -7225,19 +8132,33 @@ with expansion:
   "hello" != "hello world!"
 
 String.tests.cpp:<line number>: PASSED:
-  REQUIRE( isSubstring( ss ) == false )
+  REQUIRE( isOwned( ss ) )
+with expansion:
+  true
+
+-------------------------------------------------------------------------------
+StringRef
+  Substrings
+  c_str() causes copy
+  Self-assignment after substring
+-------------------------------------------------------------------------------
+String.tests.cpp:<line number>
+...............................................................................
+
+String.tests.cpp:<line number>: PASSED:
+  REQUIRE( isOwned(ss) == false )
 with expansion:
   false == false
 
 String.tests.cpp:<line number>: PASSED:
-  REQUIRE( isOwned( ss ) )
+  REQUIRE( ss == "hello" )
 with expansion:
-  true
+  hello == "hello"
 
 String.tests.cpp:<line number>: PASSED:
-  REQUIRE( ss.currentData() != s.currentData() )
+  REQUIRE( rawChars == ss.currentData() )
 with expansion:
-  "hello" != "hello world!"
+  "hello world!" == "hello world!"
 
 -------------------------------------------------------------------------------
 StringRef
@@ -7283,6 +8204,19 @@ String.tests.cpp:<line number>: PASSED:
 with expansion:
   "hello world!" != "hello"
 
+-------------------------------------------------------------------------------
+StringRef
+  Substrings
+  Past the end substring
+-------------------------------------------------------------------------------
+String.tests.cpp:<line number>
+...............................................................................
+
+String.tests.cpp:<line number>: PASSED:
+  REQUIRE( s.substr(s.size() + 1, 123).empty() )
+with expansion:
+  true
+
 -------------------------------------------------------------------------------
 StringRef
   Comparisons
@@ -7354,24 +8288,6 @@ String.tests.cpp:<line number>: PASSED:
 with expansion:
   17 == 17
 
--------------------------------------------------------------------------------
-StringRef
-  to std::string
-  implicitly constructed
--------------------------------------------------------------------------------
-String.tests.cpp:<line number>
-...............................................................................
-
-String.tests.cpp:<line number>: PASSED:
-  REQUIRE( stdStr == "a stringref" )
-with expansion:
-  "a stringref" == "a stringref"
-
-String.tests.cpp:<line number>: PASSED:
-  REQUIRE( stdStr.size() == sr.size() )
-with expansion:
-  11 == 11
-
 -------------------------------------------------------------------------------
 StringRef
   to std::string
@@ -7408,28 +8324,6 @@ String.tests.cpp:<line number>: PASSED:
 with expansion:
   11 == 11
 
--------------------------------------------------------------------------------
-StringRef
-  Counting utf-8 codepoints
--------------------------------------------------------------------------------
-String.tests.cpp:<line number>
-...............................................................................
-
-String.tests.cpp:<line number>: PASSED:
-  REQUIRE( ascii.numberOfCharacters() == ascii.size() )
-with expansion:
-  39 == 39
-
-String.tests.cpp:<line number>: PASSED:
-  REQUIRE( simpleu8.numberOfCharacters() == 30 )
-with expansion:
-  30 == 30
-
-String.tests.cpp:<line number>: PASSED:
-  REQUIRE( emojis.numberOfCharacters() == 9 )
-with expansion:
-  9 == 9
-
 -------------------------------------------------------------------------------
 Stringifying std::chrono::duration helpers
 -------------------------------------------------------------------------------
@@ -7557,6 +8451,123 @@ Tag.tests.cpp:<line number>: PASSED:
 Tag.tests.cpp:<line number>: PASSED:
   CHECK_THROWS( registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) )
 
+-------------------------------------------------------------------------------
+Template test case method with test types specified inside std::tuple - MyTypes
+- 0
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Template_Fixture<TestType>::m_a == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Template test case method with test types specified inside std::tuple - MyTypes
+- 1
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Template_Fixture<TestType>::m_a == 1 )
+with expansion:
+  1 == 1
+
+-------------------------------------------------------------------------------
+Template test case method with test types specified inside std::tuple - MyTypes
+- 2
+-------------------------------------------------------------------------------
+Class.tests.cpp:<line number>
+...............................................................................
+
+Class.tests.cpp:<line number>: PASSED:
+  REQUIRE( Template_Fixture<TestType>::m_a == 1 )
+with expansion:
+  1.0 == 1
+
+-------------------------------------------------------------------------------
+Template test case with test types specified inside non-copyable and non-
+movable std::tuple - NonCopyableAndNonMovableTypes - 0
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( sizeof(TestType) > 0 )
+with expansion:
+  1 > 0
+
+-------------------------------------------------------------------------------
+Template test case with test types specified inside non-copyable and non-
+movable std::tuple - NonCopyableAndNonMovableTypes - 1
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( sizeof(TestType) > 0 )
+with expansion:
+  4 > 0
+
+-------------------------------------------------------------------------------
+Template test case with test types specified inside non-default-constructible
+std::tuple - MyNonDefaultConstructibleTypes - 0
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( sizeof(TestType) > 0 )
+with expansion:
+  1 > 0
+
+-------------------------------------------------------------------------------
+Template test case with test types specified inside non-default-constructible
+std::tuple - MyNonDefaultConstructibleTypes - 1
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( sizeof(TestType) > 0 )
+with expansion:
+  4 > 0
+
+-------------------------------------------------------------------------------
+Template test case with test types specified inside std::tuple - MyTypes - 0
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( sizeof(TestType) > 0 )
+with expansion:
+  4 > 0
+
+-------------------------------------------------------------------------------
+Template test case with test types specified inside std::tuple - MyTypes - 1
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( sizeof(TestType) > 0 )
+with expansion:
+  1 > 0
+
+-------------------------------------------------------------------------------
+Template test case with test types specified inside std::tuple - MyTypes - 2
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( sizeof(TestType) > 0 )
+with expansion:
+  4 > 0
+
 -------------------------------------------------------------------------------
 TemplateTest: vectors can be sized and resized - float
 -------------------------------------------------------------------------------
@@ -7716,43 +8727,623 @@ with expansion:
 Misc.tests.cpp:<line number>: PASSED:
   REQUIRE( v.capacity() >= 5 )
 with expansion:
-  5 >= 5
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - int
+  resizing bigger changes size and capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 10 )
+with expansion:
+  10 == 10
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 10 )
+with expansion:
+  10 >= 10
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - int
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - int
+  resizing smaller changes size but not capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 0 )
+with expansion:
+  0 == 0
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - int
+  resizing smaller changes size but not capacity
+  We can use the 'swap trick' to reset the capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() == 0 )
+with expansion:
+  0 == 0
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - int
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - int
+  reserving bigger changes capacity but not size
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 10 )
+with expansion:
+  10 >= 10
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - int
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - int
+  reserving smaller does not change size or capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+  resizing bigger changes size and capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 10 )
+with expansion:
+  10 == 10
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 10 )
+with expansion:
+  10 >= 10
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+  resizing smaller changes size but not capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 0 )
+with expansion:
+  0 == 0
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+  resizing smaller changes size but not capacity
+  We can use the 'swap trick' to reset the capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() == 0 )
+with expansion:
+  0 == 0
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+  reserving bigger changes capacity but not size
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 10 )
+with expansion:
+  10 >= 10
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::string
+  reserving smaller does not change size or capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+  resizing bigger changes size and capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 10 )
+with expansion:
+  10 == 10
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 10 )
+with expansion:
+  10 >= 10
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+  resizing smaller changes size but not capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 0 )
+with expansion:
+  0 == 0
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+  resizing smaller changes size but not capacity
+  We can use the 'swap trick' to reset the capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() == 0 )
+with expansion:
+  0 == 0
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+  reserving bigger changes capacity but not size
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 10 )
+with expansion:
+  10 >= 10
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+  reserving smaller does not change size or capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 5 )
+with expansion:
+  5 == 5
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 5 )
+with expansion:
+  5 >= 5
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == V )
+with expansion:
+  6 == 6
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= V )
+with expansion:
+  6 >= 6
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+  resizing bigger changes size and capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 2 * V )
+with expansion:
+  12 == 12
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 2 * V )
+with expansion:
+  12 >= 12
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == V )
+with expansion:
+  6 == 6
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= V )
+with expansion:
+  6 >= 6
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+  resizing smaller changes size but not capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == 0 )
+with expansion:
+  0 == 0
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= V )
+with expansion:
+  6 >= 6
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+  resizing smaller changes size but not capacity
+  We can use the 'swap trick' to reset the capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() == 0 )
+with expansion:
+  0 == 0
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == V )
+with expansion:
+  6 == 6
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= V )
+with expansion:
+  6 >= 6
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+  reserving bigger changes capacity but not size
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == V )
+with expansion:
+  6 == 6
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= 2 * V )
+with expansion:
+  12 >= 12
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == V )
+with expansion:
+  6 == 6
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= V )
+with expansion:
+  6 >= 6
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - (std::tuple<int, float>), 6
+  reserving smaller does not change size or capacity
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == V )
+with expansion:
+  6 == 6
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= V )
+with expansion:
+  6 >= 6
+
+-------------------------------------------------------------------------------
+TemplateTestSig: vectors can be sized and resized - float,4
+-------------------------------------------------------------------------------
+Misc.tests.cpp:<line number>
+...............................................................................
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.size() == V )
+with expansion:
+  4 == 4
+
+Misc.tests.cpp:<line number>: PASSED:
+  REQUIRE( v.capacity() >= V )
+with expansion:
+  4 >= 4
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - int
+TemplateTestSig: vectors can be sized and resized - float,4
   resizing bigger changes size and capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 10 )
+  REQUIRE( v.size() == 2 * V )
 with expansion:
-  10 == 10
+  8 == 8
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 10 )
+  REQUIRE( v.capacity() >= 2 * V )
 with expansion:
-  10 >= 10
+  8 >= 8
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - int
+TemplateTestSig: vectors can be sized and resized - float,4
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  4 == 4
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  4 >= 4
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - int
+TemplateTestSig: vectors can be sized and resized - float,4
   resizing smaller changes size but not capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
@@ -7764,12 +9355,12 @@ with expansion:
   0 == 0
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  4 >= 4
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - int
+TemplateTestSig: vectors can be sized and resized - float,4
   resizing smaller changes size but not capacity
   We can use the 'swap trick' to reset the capacity
 -------------------------------------------------------------------------------
@@ -7782,122 +9373,122 @@ with expansion:
   0 == 0
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - int
+TemplateTestSig: vectors can be sized and resized - float,4
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  4 == 4
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  4 >= 4
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - int
+TemplateTestSig: vectors can be sized and resized - float,4
   reserving bigger changes capacity but not size
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  4 == 4
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 10 )
+  REQUIRE( v.capacity() >= 2 * V )
 with expansion:
-  10 >= 10
+  8 >= 8
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - int
+TemplateTestSig: vectors can be sized and resized - float,4
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  4 == 4
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  4 >= 4
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - int
+TemplateTestSig: vectors can be sized and resized - float,4
   reserving smaller does not change size or capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  4 == 4
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  4 >= 4
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
   5 == 5
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
   5 >= 5
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
   resizing bigger changes size and capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 10 )
+  REQUIRE( v.size() == 2 * V )
 with expansion:
   10 == 10
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 10 )
+  REQUIRE( v.capacity() >= 2 * V )
 with expansion:
   10 >= 10
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
   5 == 5
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
   5 >= 5
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
   resizing smaller changes size but not capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
@@ -7909,12 +9500,12 @@ with expansion:
   0 == 0
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
   5 >= 5
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
   resizing smaller changes size but not capacity
   We can use the 'swap trick' to reset the capacity
 -------------------------------------------------------------------------------
@@ -7927,122 +9518,122 @@ with expansion:
   0 == 0
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
   5 == 5
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
   5 >= 5
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
   reserving bigger changes capacity but not size
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
   5 == 5
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 10 )
+  REQUIRE( v.capacity() >= 2 * V )
 with expansion:
   10 >= 10
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
   5 == 5
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
   5 >= 5
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::string
+TemplateTestSig: vectors can be sized and resized - int,5
   reserving smaller does not change size or capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
   5 == 5
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
   5 >= 5
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  15 == 15
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  15 >= 15
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
   resizing bigger changes size and capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 10 )
+  REQUIRE( v.size() == 2 * V )
 with expansion:
-  10 == 10
+  30 == 30
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 10 )
+  REQUIRE( v.capacity() >= 2 * V )
 with expansion:
-  10 >= 10
+  30 >= 30
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  15 == 15
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  15 >= 15
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
   resizing smaller changes size but not capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
@@ -8054,12 +9645,12 @@ with expansion:
   0 == 0
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  15 >= 15
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
   resizing smaller changes size but not capacity
   We can use the 'swap trick' to reset the capacity
 -------------------------------------------------------------------------------
@@ -8072,70 +9663,70 @@ with expansion:
   0 == 0
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  15 == 15
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  15 >= 15
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
   reserving bigger changes capacity but not size
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  15 == 15
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 10 )
+  REQUIRE( v.capacity() >= 2 * V )
 with expansion:
-  10 >= 10
+  30 >= 30
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  15 == 15
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  15 >= 15
 
 -------------------------------------------------------------------------------
-TemplateTest: vectors can be sized and resized - std::tuple<int,float>
+TemplateTestSig: vectors can be sized and resized - std::string,15
   reserving smaller does not change size or capacity
 -------------------------------------------------------------------------------
 Misc.tests.cpp:<line number>
 ...............................................................................
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.size() == 5 )
+  REQUIRE( v.size() == V )
 with expansion:
-  5 == 5
+  15 == 15
 
 Misc.tests.cpp:<line number>: PASSED:
-  REQUIRE( v.capacity() >= 5 )
+  REQUIRE( v.capacity() >= V )
 with expansion:
-  5 >= 5
+  15 >= 15
 
 -------------------------------------------------------------------------------
 Test case with one argument
@@ -8158,6 +9749,14 @@ Tricky.tests.cpp:<line number>: PASSED:
 with expansion:
   3221225472 (0x<hex digits>) == 3221225472
 
+-------------------------------------------------------------------------------
+Test with special, characters "in name
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+
 -------------------------------------------------------------------------------
 The NO_FAIL macro reports a failure but does not fail the test
 -------------------------------------------------------------------------------
@@ -8653,6 +10252,68 @@ PartTracker.tests.cpp:<line number>: PASSED:
 with expansion:
   true
 
+-------------------------------------------------------------------------------
+Trim strings
+-------------------------------------------------------------------------------
+StringManip.tests.cpp:<line number>
+...............................................................................
+
+StringManip.tests.cpp:<line number>: PASSED:
+  REQUIRE( trim(std::string(no_whitespace)) == no_whitespace )
+with expansion:
+  "There is no extra whitespace here"
+  ==
+  "There is no extra whitespace here"
+
+StringManip.tests.cpp:<line number>: PASSED:
+  REQUIRE( trim(std::string(leading_whitespace)) == no_whitespace )
+with expansion:
+  "There is no extra whitespace here"
+  ==
+  "There is no extra whitespace here"
+
+StringManip.tests.cpp:<line number>: PASSED:
+  REQUIRE( trim(std::string(trailing_whitespace)) == no_whitespace )
+with expansion:
+  "There is no extra whitespace here"
+  ==
+  "There is no extra whitespace here"
+
+StringManip.tests.cpp:<line number>: PASSED:
+  REQUIRE( trim(std::string(whitespace_at_both_ends)) == no_whitespace )
+with expansion:
+  "There is no extra whitespace here"
+  ==
+  "There is no extra whitespace here"
+
+StringManip.tests.cpp:<line number>: PASSED:
+  REQUIRE( trim(StringRef(no_whitespace)) == StringRef(no_whitespace) )
+with expansion:
+  There is no extra whitespace here
+  ==
+  There is no extra whitespace here
+
+StringManip.tests.cpp:<line number>: PASSED:
+  REQUIRE( trim(StringRef(leading_whitespace)) == StringRef(no_whitespace) )
+with expansion:
+  There is no extra whitespace here
+  ==
+  There is no extra whitespace here
+
+StringManip.tests.cpp:<line number>: PASSED:
+  REQUIRE( trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace) )
+with expansion:
+  There is no extra whitespace here
+  ==
+  There is no extra whitespace here
+
+StringManip.tests.cpp:<line number>: PASSED:
+  REQUIRE( trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace) )
+with expansion:
+  There is no extra whitespace here
+  ==
+  There is no extra whitespace here
+
 -------------------------------------------------------------------------------
 Unexpected exceptions can be translated
 -------------------------------------------------------------------------------
@@ -8720,6 +10381,96 @@ VariadicMacros.tests.cpp:<line number>: PASSED:
 with message:
   no assertions
 
+-------------------------------------------------------------------------------
+Vector Approx matcher
+  Empty vector is roughly equal to an empty vector
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( empty, Approx(empty) )
+with expansion:
+  {  } is approx: {  }
+
+-------------------------------------------------------------------------------
+Vector Approx matcher
+  Vectors with elements
+  A vector is approx equal to itself
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( v1, Approx(v1) )
+with expansion:
+  { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 }
+
+-------------------------------------------------------------------------------
+Vector Approx matcher
+  Vectors with elements
+  Different length
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( v1, !Approx(temp) )
+with expansion:
+  { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 }
+
+-------------------------------------------------------------------------------
+Vector Approx matcher
+  Vectors with elements
+  Same length, different elements
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( v1, !Approx(v2) )
+with expansion:
+  { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 }
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( v1, Approx(v2).margin(0.5) )
+with expansion:
+  { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( v1, Approx(v2).epsilon(0.5) )
+with expansion:
+  { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+
+Matchers.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( v1, Approx(v2).epsilon(0.1).scale(500) )
+with expansion:
+  { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+
+-------------------------------------------------------------------------------
+Vector Approx matcher -- failing
+  Empty and non empty vectors are not approx equal
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: FAILED:
+  CHECK_THAT( empty, Approx(t1) )
+with expansion:
+  {  } is approx: { 1.0, 2.0 }
+
+-------------------------------------------------------------------------------
+Vector Approx matcher -- failing
+  Just different vectors
+-------------------------------------------------------------------------------
+Matchers.tests.cpp:<line number>
+...............................................................................
+
+Matchers.tests.cpp:<line number>: FAILED:
+  CHECK_THAT( v1, Approx(v2) )
+with expansion:
+  { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }
+
 -------------------------------------------------------------------------------
 Vector matchers
   Contains (element)
@@ -10040,6 +11791,62 @@ with expansion:
   ==
   "{ { 42, "Arthur" }, { "Ford", 24 } }"
 
+-------------------------------------------------------------------------------
+parseEnums
+  No enums
+-------------------------------------------------------------------------------
+ToString.tests.cpp:<line number>
+...............................................................................
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) )
+with expansion:
+  {  } Equals: {  }
+
+-------------------------------------------------------------------------------
+parseEnums
+  One enum value
+-------------------------------------------------------------------------------
+ToString.tests.cpp:<line number>
+...............................................................................
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) )
+with expansion:
+  { Value1 } Equals: { Value1 }
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( parseEnums( "Value1" ), Equals( std::vector<Catch::StringRef>{"Value1"} ) )
+with expansion:
+  { Value1 } Equals: { Value1 }
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( parseEnums( "EnumName::Value1" ), Equals(std::vector<Catch::StringRef>{"Value1"} ) )
+with expansion:
+  { Value1 } Equals: { Value1 }
+
+-------------------------------------------------------------------------------
+parseEnums
+  Multiple enum values
+-------------------------------------------------------------------------------
+ToString.tests.cpp:<line number>
+...............................................................................
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) )
+with expansion:
+  { Value1, Value2 } Equals: { Value1, Value2 }
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) )
+with expansion:
+  { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
+
+ToString.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) )
+with expansion:
+  { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
+
 -------------------------------------------------------------------------------
 pointer to class
 -------------------------------------------------------------------------------
@@ -10129,15 +11936,15 @@ with expansion:
 replaceInPlace
   replace single char
 -------------------------------------------------------------------------------
-String.tests.cpp:<line number>
+StringManip.tests.cpp:<line number>
 ...............................................................................
 
-String.tests.cpp:<line number>: PASSED:
-  CHECK( Catch::replaceInPlace( letters, "b", "z" ) )
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK( Catch::replaceInPlace(letters, "b", "z") )
 with expansion:
   true
 
-String.tests.cpp:<line number>: PASSED:
+StringManip.tests.cpp:<line number>: PASSED:
   CHECK( letters == "azcdefcg" )
 with expansion:
   "azcdefcg" == "azcdefcg"
@@ -10146,15 +11953,15 @@ with expansion:
 replaceInPlace
   replace two chars
 -------------------------------------------------------------------------------
-String.tests.cpp:<line number>
+StringManip.tests.cpp:<line number>
 ...............................................................................
 
-String.tests.cpp:<line number>: PASSED:
-  CHECK( Catch::replaceInPlace( letters, "c", "z" ) )
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK( Catch::replaceInPlace(letters, "c", "z") )
 with expansion:
   true
 
-String.tests.cpp:<line number>: PASSED:
+StringManip.tests.cpp:<line number>: PASSED:
   CHECK( letters == "abzdefzg" )
 with expansion:
   "abzdefzg" == "abzdefzg"
@@ -10163,15 +11970,15 @@ with expansion:
 replaceInPlace
   replace first char
 -------------------------------------------------------------------------------
-String.tests.cpp:<line number>
+StringManip.tests.cpp:<line number>
 ...............................................................................
 
-String.tests.cpp:<line number>: PASSED:
-  CHECK( Catch::replaceInPlace( letters, "a", "z" ) )
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK( Catch::replaceInPlace(letters, "a", "z") )
 with expansion:
   true
 
-String.tests.cpp:<line number>: PASSED:
+StringManip.tests.cpp:<line number>: PASSED:
   CHECK( letters == "zbcdefcg" )
 with expansion:
   "zbcdefcg" == "zbcdefcg"
@@ -10180,15 +11987,15 @@ with expansion:
 replaceInPlace
   replace last char
 -------------------------------------------------------------------------------
-String.tests.cpp:<line number>
+StringManip.tests.cpp:<line number>
 ...............................................................................
 
-String.tests.cpp:<line number>: PASSED:
-  CHECK( Catch::replaceInPlace( letters, "g", "z" ) )
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK( Catch::replaceInPlace(letters, "g", "z") )
 with expansion:
   true
 
-String.tests.cpp:<line number>: PASSED:
+StringManip.tests.cpp:<line number>: PASSED:
   CHECK( letters == "abcdefcz" )
 with expansion:
   "abcdefcz" == "abcdefcz"
@@ -10197,15 +12004,15 @@ with expansion:
 replaceInPlace
   replace all chars
 -------------------------------------------------------------------------------
-String.tests.cpp:<line number>
+StringManip.tests.cpp:<line number>
 ...............................................................................
 
-String.tests.cpp:<line number>: PASSED:
-  CHECK( Catch::replaceInPlace( letters, letters, "replaced" ) )
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK( Catch::replaceInPlace(letters, letters, "replaced") )
 with expansion:
   true
 
-String.tests.cpp:<line number>: PASSED:
+StringManip.tests.cpp:<line number>: PASSED:
   CHECK( letters == "replaced" )
 with expansion:
   "replaced" == "replaced"
@@ -10214,15 +12021,15 @@ with expansion:
 replaceInPlace
   replace no chars
 -------------------------------------------------------------------------------
-String.tests.cpp:<line number>
+StringManip.tests.cpp:<line number>
 ...............................................................................
 
-String.tests.cpp:<line number>: PASSED:
-  CHECK_FALSE( Catch::replaceInPlace( letters, "x", "z" ) )
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK_FALSE( Catch::replaceInPlace(letters, "x", "z") )
 with expansion:
   !false
 
-String.tests.cpp:<line number>: PASSED:
+StringManip.tests.cpp:<line number>: PASSED:
   CHECK( letters == letters )
 with expansion:
   "abcdefcg" == "abcdefcg"
@@ -10231,15 +12038,15 @@ with expansion:
 replaceInPlace
   escape '
 -------------------------------------------------------------------------------
-String.tests.cpp:<line number>
+StringManip.tests.cpp:<line number>
 ...............................................................................
 
-String.tests.cpp:<line number>: PASSED:
-  CHECK( Catch::replaceInPlace( s, "'", "|'" ) )
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK( Catch::replaceInPlace(s, "'", "|'") )
 with expansion:
   true
 
-String.tests.cpp:<line number>: PASSED:
+StringManip.tests.cpp:<line number>: PASSED:
   CHECK( s == "didn|'t" )
 with expansion:
   "didn|'t" == "didn|'t"
@@ -10287,6 +12094,27 @@ Tag.tests.cpp:<line number>: PASSED:
 with expansion:
   { ".", "magic-tag" } ( Contains: "magic-tag" and Contains: "." )
 
+-------------------------------------------------------------------------------
+splitString
+-------------------------------------------------------------------------------
+StringManip.tests.cpp:<line number>
+...............................................................................
+
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( splitStringRef("", ','), Equals(std::vector<StringRef>()) )
+with expansion:
+  {  } Equals: {  }
+
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}) )
+with expansion:
+  { abc } Equals: { abc }
+
+StringManip.tests.cpp:<line number>: PASSED:
+  CHECK_THAT( splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}) )
+with expansion:
+  { abc, def } Equals: { abc, def }
+
 -------------------------------------------------------------------------------
 stacks unscoped info in loops
 -------------------------------------------------------------------------------
@@ -11128,6 +12956,6 @@ Misc.tests.cpp:<line number>
 Misc.tests.cpp:<line number>: PASSED:
 
 ===============================================================================
-test cases:  258 |  176 passed |  78 failed |  4 failed as expected
-assertions: 1436 | 1276 passed | 139 failed | 21 failed as expected
+test cases:  304 |  214 passed |  86 failed |  4 failed as expected
+assertions: 1638 | 1469 passed | 148 failed | 21 failed as expected
 
diff --git a/packages/Catch2/projects/SelfTest/Baselines/console.swa4.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/console.swa4.approved.txt
index bfa66750661d05ab76a9b1dba33b40d9d8cc10f7..322b815864edddca2a52a477c7038de176f52385 100644
--- a/packages/Catch2/projects/SelfTest/Baselines/console.swa4.approved.txt
+++ b/packages/Catch2/projects/SelfTest/Baselines/console.swa4.approved.txt
@@ -39,6 +39,22 @@ with expansion:
 Compilation.tests.cpp:<line number>
 ...............................................................................
 
+Compilation.tests.cpp:<line number>: PASSED:
+  REQUIRE( y.v == 0 )
+with expansion:
+  0 == 0
+
+Compilation.tests.cpp:<line number>: PASSED:
+  REQUIRE( 0 == y.v )
+with expansion:
+  0 == 0
+
+-------------------------------------------------------------------------------
+#1027: Bitfields can be captured
+-------------------------------------------------------------------------------
+Compilation.tests.cpp:<line number>
+...............................................................................
+
 Compilation.tests.cpp:<line number>: PASSED:
   REQUIRE( y.v == 0 )
 with expansion:
@@ -352,6 +368,6 @@ Condition.tests.cpp:<line number>: FAILED:
   CHECK( true != true )
 
 ===============================================================================
-test cases: 18 | 13 passed | 3 failed | 2 failed as expected
-assertions: 40 | 33 passed | 4 failed | 3 failed as expected
+test cases: 19 | 14 passed | 3 failed | 2 failed as expected
+assertions: 42 | 35 passed | 4 failed | 3 failed as expected
 
diff --git a/packages/Catch2/projects/SelfTest/Baselines/junit.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/junit.sw.approved.txt
index 43c78d7ea777f0cf733c69de6a254ed571e125bf..bfacb0330b8a0c2613e11e391ba2ca57808c06c0 100644
--- a/packages/Catch2/projects/SelfTest/Baselines/junit.sw.approved.txt
+++ b/packages/Catch2/projects/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <testsuitesloose text artifact
 >
-  <testsuite name="<exe-name>" errors="17" failures="123" tests="1437" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+  <testsuite name="<exe-name>" errors="17" failures="132" tests="1639" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
     <properties>
       <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals]"/>
       <property name="random-seed" value="1"/>
@@ -9,6 +9,7 @@
     <testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="#1027" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="#1027: Bitfields can be captured" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="#1147" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="#1175 - Hidden Test" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="#1238" time="{duration}"/>
@@ -119,6 +120,30 @@ Class.tests.cpp:<line number>
     <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - Template_Foo&lt;int>" time="{duration}"/>
     <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector&lt;float>" time="{duration}"/>
     <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds - std::vector&lt;int>" time="{duration}"/>
+    <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2&lt;float, 6>" time="{duration}">
+      <failure message="6 &lt; 2" type="REQUIRE">
+Class.tests.cpp:<line number>
+      </failure>
+    </testcase>
+    <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2&lt;int, 2>" time="{duration}">
+      <failure message="2 &lt; 2" type="REQUIRE">
+Class.tests.cpp:<line number>
+      </failure>
+    </testcase>
+    <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array&lt;float, 6>" time="{duration}">
+      <failure message="6 &lt; 2" type="REQUIRE">
+Class.tests.cpp:<line number>
+      </failure>
+    </testcase>
+    <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array&lt;int, 2>" time="{duration}">
+      <failure message="2 &lt; 2" type="REQUIRE">
+Class.tests.cpp:<line number>
+      </failure>
+    </testcase>
+    <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2&lt;float,6>" time="{duration}"/>
+    <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2&lt;int,2>" time="{duration}"/>
+    <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array&lt;float,6>" time="{duration}"/>
+    <testcase classname="<exe-name>.Template_Fixture_2" name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array&lt;int,2>" time="{duration}"/>
     <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - double" time="{duration}">
       <failure message="1.0 == 2" type="REQUIRE">
 Class.tests.cpp:<line number>
@@ -137,6 +162,24 @@ Class.tests.cpp:<line number>
     <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - double" time="{duration}"/>
     <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - float" time="{duration}"/>
     <testcase classname="<exe-name>.Template_Fixture" name="A TEMPLATE_TEST_CASE_METHOD based test run that succeeds - int" time="{duration}"/>
+    <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1" time="{duration}">
+      <failure message="1 == 0" type="REQUIRE">
+Class.tests.cpp:<line number>
+      </failure>
+    </testcase>
+    <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3" time="{duration}">
+      <failure message="3 == 0" type="REQUIRE">
+Class.tests.cpp:<line number>
+      </failure>
+    </testcase>
+    <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6" time="{duration}">
+      <failure message="6 == 0" type="REQUIRE">
+Class.tests.cpp:<line number>
+      </failure>
+    </testcase>
+    <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1" time="{duration}"/>
+    <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3" time="{duration}"/>
+    <testcase classname="<exe-name>.Nttp_Fixture" name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6" time="{duration}"/>
     <testcase classname="<exe-name>.Fixture" name="A TEST_CASE_METHOD based test run that fails" time="{duration}">
       <failure message="1 == 2" type="REQUIRE">
 Class.tests.cpp:<line number>
@@ -147,6 +190,10 @@ Class.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="A Template product test case - Foo&lt;int>" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="A Template product test case - std::vector&lt;float>" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="A Template product test case - std::vector&lt;int>" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="A Template product test case with array signature - Bar&lt;float, 42>" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="A Template product test case with array signature - Bar&lt;int, 9>" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="A Template product test case with array signature - std::array&lt;float, 42>" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="A Template product test case with array signature - std::array&lt;int, 9>" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="A comparison that uses literals instead of the normal constructor" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="A couple of nested sections followed by a failure" time="{duration}">
       <failure type="FAIL">
@@ -185,10 +232,9 @@ Exception.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Assertions then sections/A section" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Assertions then sections/A section/Another section" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Assertions then sections/A section/Another other section" time="{duration}"/>
-    <testcase classname="<exe-name>.global" name="Assorted miscellaneous tests" time="{duration}"/>
-    <testcase classname="<exe-name>.global" name="Bitfields can be captured (#1027)" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="CAPTURE can deal with complex expressions" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="CAPTURE can deal with complex expressions involving commas" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="CAPTURE parses string and character constants" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Capture and info messages/Capture should stringify like assertions" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Capture and info messages/Info should NOT stringify the way assertions do" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Character pretty printing/Specifically escaped" time="{duration}"/>
@@ -196,6 +242,7 @@ Exception.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Character pretty printing/Low ASCII" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Commas in various macros are allowed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Comparing function pointers" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Comparison ops" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Comparison with explicitly convertible types" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Comparisons between ints where one side is computed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Comparisons between unsigned ints and negative signed ints match c++ standard behaviour" time="{duration}"/>
@@ -208,6 +255,9 @@ Matchers.tests.cpp:<line number>
 Matchers.tests.cpp:<line number>
       </failure>
     </testcase>
+    <testcase classname="<exe-name>.global" name="Copy and then generate a range/from var and iterators" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Copy and then generate a range/From a temporary container" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Copy and then generate a range/Final validation" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Custom exceptions can be translated when testing for nothrow" time="{duration}">
       <error message="throwCustom()" type="REQUIRE_NOTHROW">
 custom exception - not std
@@ -227,6 +277,7 @@ Exception.tests.cpp:<line number>
       </error>
     </testcase>
     <testcase classname="<exe-name>.global" name="Default scale is invisible to comparison" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Directly creating an EnumInfo" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="EndsWith string matcher" time="{duration}">
       <failure message="&quot;this string contains 'abc' as a substring&quot; ends with: &quot;Substring&quot;" type="CHECK_THAT">
 Matchers.tests.cpp:<line number>
@@ -235,6 +286,8 @@ Matchers.tests.cpp:<line number>
 Matchers.tests.cpp:<line number>
       </failure>
     </testcase>
+    <testcase classname="<exe-name>.global" name="Enums can quickly have stringification enabled using REGISTER_ENUM" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Epsilon only applies to Approx's value" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Equality checks that should fail" time="{duration}">
       <failure message="7 == 6" type="CHECK">
@@ -318,6 +371,7 @@ Matchers.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Exception messages can be tested for/exact match" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Exception messages can be tested for/different case" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Exception messages can be tested for/wildcarded" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Exceptions matchers" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Expected exceptions that don't throw or unexpected exceptions fail the test" time="{duration}">
       <error message="thisThrows(), std::string" type="CHECK_THROWS_AS">
 expected exception
@@ -349,10 +403,14 @@ Message.tests.cpp:<line number>
       </failure>
     </testcase>
     <testcase classname="<exe-name>.global" name="Factorials are computed" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Floating point matchers: double/Relative" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Floating point matchers: double/Relative/Some subnormal values" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Floating point matchers: double/Margin" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Floating point matchers: double/ULPs" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Floating point matchers: double/Composed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Floating point matchers: double/Constructor validation" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Floating point matchers: float/Relative" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Floating point matchers: float/Relative/Some subnormal values" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Floating point matchers: float/Margin" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Floating point matchers: float/ULPs" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Floating point matchers: float/Composed" time="{duration}"/>
@@ -366,6 +424,7 @@ Message.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Generators -- adapters/Repeating a generator" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Number of elements in source is divisible by chunk size" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Number of elements in source is not divisible by chunk size" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Chunk size of zero" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Generators -- adapters/Chunking a generator into sized pieces/Throws on too small generators" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Generators -- simple/one" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Generators -- simple/two" time="{duration}"/>
@@ -526,6 +585,8 @@ Condition.tests.cpp:<line number>
       </failure>
     </testcase>
     <testcase classname="<exe-name>.global" name="Ordering comparison checks that should succeed" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Our PCG implementation provides expected results for known seeds/Default seeded" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Our PCG implementation provides expected results for known seeds/Specific seed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Output from all sections is reported/one" time="{duration}">
       <failure type="FAIL">
 Message from section one
@@ -569,7 +630,11 @@ Message.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Parse test names and tags/empty tag" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Parse test names and tags/empty quoted name" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Parse test names and tags/quoted string followed by tag exclusion" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Parse test names and tags/Leading and trailing spaces in test spec" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Parse test names and tags/Leading and trailing spaces in test name" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Pointers can be compared to null" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Precision of floating point stringification can be set/Floats" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Precision of floating point stringification can be set/Double" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Predicate matcher can accept const char*" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/empty args don't cause a crash" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/default - no arguments" time="{duration}"/>
@@ -596,6 +661,10 @@ Message.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/yes" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/no" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Process can be configured on command line/use-colour/error" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/samples" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/resamples" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/resamples" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Process can be configured on command line/Benchmark options/resamples" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple&lt;int, double, float>" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple&lt;int, double>" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Product with differing arities - std::tuple&lt;int>" time="{duration}"/>
@@ -661,17 +730,17 @@ Matchers.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="StringRef/From sub-string" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/Substrings/zero-based substring" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/Substrings/c_str() causes copy" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="StringRef/Substrings/c_str() causes copy/Self-assignment after substring" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/Substrings/non-zero-based substring" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of full refs should match" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/Substrings/Pointer values of substring refs should not match" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="StringRef/Substrings/Past the end substring" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/Comparisons" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/from std::string/implicitly constructed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/from std::string/explicitly constructed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/from std::string/assigned" time="{duration}"/>
-    <testcase classname="<exe-name>.global" name="StringRef/to std::string/implicitly constructed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/to std::string/explicitly constructed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="StringRef/to std::string/assigned" time="{duration}"/>
-    <testcase classname="<exe-name>.global" name="StringRef/Counting utf-8 codepoints" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Stringifying std::chrono::duration helpers" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Stringifying std::chrono::duration with weird ratios" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Stringifying std::chrono::time_point&lt;system_clock>" time="{duration}"/>
@@ -689,6 +758,16 @@ Misc.tests.cpp:<line number>
     </testcase>
     <testcase classname="<exe-name>.global" name="Tag alias can be registered against tag patterns/The same tag alias can only be registered once" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Tag alias can be registered against tag patterns/Tag aliases must be of the form [@name]" time="{duration}"/>
+    <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 0" time="{duration}"/>
+    <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 1" time="{duration}"/>
+    <testcase classname="<exe-name>.Template_Fixture" name="Template test case method with test types specified inside std::tuple - MyTypes - 2" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 0" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 1" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Template test case with test types specified inside std::tuple - MyTypes - 2" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/resizing bigger changes size and capacity" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - float/resizing smaller changes size but not capacity" time="{duration}"/>
@@ -713,8 +792,33 @@ Misc.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple&lt;int,float>/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple&lt;int,float>/reserving bigger changes capacity but not size" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="TemplateTest: vectors can be sized and resized - std::tuple&lt;int,float>/reserving smaller does not change size or capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple&lt;int, float>), 6" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple&lt;int, float>), 6/resizing bigger changes size and capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple&lt;int, float>), 6/resizing smaller changes size but not capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple&lt;int, float>), 6/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple&lt;int, float>), 6/reserving bigger changes capacity but not size" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - (std::tuple&lt;int, float>), 6/reserving smaller does not change size or capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing bigger changes size and capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing smaller changes size but not capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/reserving bigger changes capacity but not size" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - float,4/reserving smaller does not change size or capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing bigger changes size and capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing smaller changes size but not capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/reserving bigger changes capacity but not size" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - int,5/reserving smaller does not change size or capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing bigger changes size and capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing smaller changes size but not capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/resizing smaller changes size but not capacity/We can use the 'swap trick' to reset the capacity" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/reserving bigger changes capacity but not size" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="TemplateTestSig: vectors can be sized and resized - std::string,15/reserving smaller does not change size or capacity" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Test case with one argument" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Test enum bit values" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Test with special, characters &quot;in name" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="The NO_FAIL macro reports a failure but does not fail the test" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="This test 'should' fail but doesn't" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Thrown string literals are translated" time="{duration}">
@@ -733,6 +837,7 @@ Exception.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2/Successfully close S2" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Tracker/successfully close one section, then find another/Re-enter - skips S1 and enters S2/fail S2" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Tracker/open a nested section" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Trim strings" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Unexpected exceptions can be translated" time="{duration}">
       <error type="TEST_CASE">
 3.14
@@ -741,6 +846,20 @@ Exception.tests.cpp:<line number>
     </testcase>
     <testcase classname="<exe-name>.global" name="Use a custom approx" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Variadic macros/Section with one argument" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Vector Approx matcher/Empty vector is roughly equal to an empty vector" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/A vector is approx equal to itself" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/Different length" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Vector Approx matcher/Vectors with elements/Same length, different elements" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="Vector Approx matcher -- failing/Empty and non empty vectors are not approx equal" time="{duration}">
+      <failure message="{  } is approx: { 1.0, 2.0 }" type="CHECK_THAT">
+Matchers.tests.cpp:<line number>
+      </failure>
+    </testcase>
+    <testcase classname="<exe-name>.global" name="Vector Approx matcher -- failing/Just different vectors" time="{duration}">
+      <failure message="{ 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }" type="CHECK_THAT">
+Matchers.tests.cpp:<line number>
+      </failure>
+    </testcase>
     <testcase classname="<exe-name>.global" name="Vector matchers/Contains (element)" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Vector matchers/Contains (vector)" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="Vector matchers/Contains (element), composed" time="{duration}"/>
@@ -946,6 +1065,9 @@ Message.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="null strings" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="null_ptr" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="pair&lt;pair&lt;int,const char *,pair&lt;std::string,int> > -> toString" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="parseEnums/No enums" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="parseEnums/One enum value" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="parseEnums/Multiple enum values" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="pointer to class" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="print unscoped info if passing unscoped info is printed" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="prints unscoped info on failure" time="{duration}">
@@ -984,6 +1106,7 @@ Message.tests.cpp:<line number>
       </failure>
     </testcase>
     <testcase classname="<exe-name>.global" name="shortened hide tags are split apart" time="{duration}"/>
+    <testcase classname="<exe-name>.global" name="splitString" time="{duration}"/>
     <testcase classname="<exe-name>.global" name="stacks unscoped info in loops" time="{duration}">
       <failure message="false" type="CHECK">
 Count 1 to 3...
diff --git a/packages/Catch2/projects/SelfTest/Baselines/xml.sw.approved.txt b/packages/Catch2/projects/SelfTest/Baselines/xml.sw.approved.txt
index b526a5f7f69f411cf079aa5ea1e0bb9b9f2e67c0..6193dfb3c18174a1a5706eb50dc02597fdd37660 100644
--- a/packages/Catch2/projects/SelfTest/Baselines/xml.sw.approved.txt
+++ b/packages/Catch2/projects/SelfTest/Baselines/xml.sw.approved.txt
@@ -43,6 +43,25 @@
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="#1027: Bitfields can be captured" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" >
+        <Original>
+          y.v == 0
+        </Original>
+        <Expanded>
+          0 == 0
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" >
+        <Original>
+          0 == y.v
+        </Original>
+        <Expanded>
+          0 == 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="#1147" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" >
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Compilation.tests.cpp" >
         <Original>
@@ -1318,6 +1337,94 @@ Nor would this
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2&lt;float, 6>" tags="[.][class][failing][nttp][product][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture_2&lt;TestType>{}.m_a.size() &lt; 2
+        </Original>
+        <Expanded>
+          6 &lt; 2
+        </Expanded>
+      </Expression>
+      <OverallResult success="false"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - Template_Foo_2&lt;int, 2>" tags="[.][class][failing][nttp][product][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture_2&lt;TestType>{}.m_a.size() &lt; 2
+        </Original>
+        <Expanded>
+          2 &lt; 2
+        </Expanded>
+      </Expression>
+      <OverallResult success="false"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array&lt;float, 6>" tags="[.][class][failing][nttp][product][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture_2&lt;TestType>{}.m_a.size() &lt; 2
+        </Original>
+        <Expanded>
+          6 &lt; 2
+        </Expanded>
+      </Expression>
+      <OverallResult success="false"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails - std::array&lt;int, 2>" tags="[.][class][failing][nttp][product][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture_2&lt;TestType>{}.m_a.size() &lt; 2
+        </Original>
+        <Expanded>
+          2 &lt; 2
+        </Expanded>
+      </Expression>
+      <OverallResult success="false"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2&lt;float,6>" tags="[class][nttp][product][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture_2&lt;TestType>{}.m_a.size() >= 2
+        </Original>
+        <Expanded>
+          6 >= 2
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - Template_Foo_2&lt;int,2>" tags="[class][nttp][product][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture_2&lt;TestType>{}.m_a.size() >= 2
+        </Original>
+        <Expanded>
+          2 >= 2
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array&lt;float,6>" tags="[class][nttp][product][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture_2&lt;TestType>{}.m_a.size() >= 2
+        </Original>
+        <Expanded>
+          6 >= 2
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds - std::array&lt;int,2>" tags="[class][nttp][product][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture_2&lt;TestType>{}.m_a.size() >= 2
+        </Original>
+        <Expanded>
+          2 >= 2
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="A TEMPLATE_TEST_CASE_METHOD based test run that fails - double" tags="[.][class][failing][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
       <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
         <Original>
@@ -1384,6 +1491,72 @@ Nor would this
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 1" tags="[.][class][failing][nttp][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Nttp_Fixture&lt;V>::value == 0
+        </Original>
+        <Expanded>
+          1 == 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="false"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 3" tags="[.][class][failing][nttp][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Nttp_Fixture&lt;V>::value == 0
+        </Original>
+        <Expanded>
+          3 == 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="false"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails - 6" tags="[.][class][failing][nttp][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Nttp_Fixture&lt;V>::value == 0
+        </Original>
+        <Expanded>
+          6 == 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="false"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 1" tags="[class][nttp][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Nttp_Fixture&lt;V>::value > 0
+        </Original>
+        <Expanded>
+          1 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 3" tags="[class][nttp][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Nttp_Fixture&lt;V>::value > 0
+        </Original>
+        <Expanded>
+          3 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds - 6" tags="[class][nttp][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Nttp_Fixture&lt;V>::value > 0
+        </Original>
+        <Expanded>
+          6 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="A TEST_CASE_METHOD based test run that fails" tags="[.][class][failing]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
       <Expression success="false" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
         <Original>
@@ -1450,6 +1623,50 @@ Nor would this
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="A Template product test case with array signature - Bar&lt;float, 42>" tags="[nttp][product][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          x.size() > 0
+        </Original>
+        <Expanded>
+          42 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="A Template product test case with array signature - Bar&lt;int, 9>" tags="[nttp][product][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          x.size() > 0
+        </Original>
+        <Expanded>
+          9 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="A Template product test case with array signature - std::array&lt;float, 42>" tags="[nttp][product][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          x.size() > 0
+        </Original>
+        <Expanded>
+          42 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="A Template product test case with array signature - std::array&lt;int, 9>" tags="[nttp][product][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          x.size() > 0
+        </Original>
+        <Expanded>
+          9 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="A comparison that uses literals instead of the normal constructor" tags="[Approx]" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
         <Original>
@@ -1955,52 +2172,6 @@ Nor would this
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <TestCase name="Assorted miscellaneous tests" tags="[Approx]" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
-        <Original>
-          INFINITY == Approx(INFINITY)
-        </Original>
-        <Expanded>
-          inff == Approx( inf )
-        </Expanded>
-      </Expression>
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
-        <Original>
-          NAN != Approx(NAN)
-        </Original>
-        <Expanded>
-          nanf != Approx( nan )
-        </Expanded>
-      </Expression>
-      <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
-        <Original>
-          !(NAN == Approx(NAN))
-        </Original>
-        <Expanded>
-          !(nanf == Approx( nan ))
-        </Expanded>
-      </Expression>
-      <OverallResult success="true"/>
-    </TestCase>
-    <TestCase name="Bitfields can be captured (#1027)" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
-        <Original>
-          y.v == 0
-        </Original>
-        <Expanded>
-          0 == 0
-        </Expanded>
-      </Expression>
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
-        <Original>
-          0 == y.v
-        </Original>
-        <Expanded>
-          0 == 0
-        </Expanded>
-      </Expression>
-      <OverallResult success="true"/>
-    </TestCase>
     <TestCase name="CAPTURE can deal with complex expressions" tags="[capture][messages]" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
       <Info>
         a := 1
@@ -2049,6 +2220,42 @@ Nor would this
       </Info>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="CAPTURE parses string and character constants" tags="[capture][messages]" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
+      <Info>
+        ("comma, in string", "escaped, \", ") := "escaped, ", "
+      </Info>
+      <Info>
+        "single quote in string,'," := "single quote in string,',"
+      </Info>
+      <Info>
+        "some escapes, \\,\\\\" := "some escapes, \,\\"
+      </Info>
+      <Info>
+        "some, ), unmatched, } prenheses {[&lt;" := "some, ), unmatched, } prenheses {[&lt;"
+      </Info>
+      <Info>
+        '"' := '"'
+      </Info>
+      <Info>
+        '\'' := '''
+      </Info>
+      <Info>
+        ',' := ','
+      </Info>
+      <Info>
+        '}' := '}'
+      </Info>
+      <Info>
+        ')' := ')'
+      </Info>
+      <Info>
+        '(' := '('
+      </Info>
+      <Info>
+        '{' := '{'
+      </Info>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="Capture and info messages" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
       <Section name="Capture should stringify like assertions" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
         <Info>
@@ -2322,6 +2529,41 @@ Nor would this
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Comparison ops" tags="[rng]" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+        <Original>
+          SimplePcg32{} == SimplePcg32{}
+        </Original>
+        <Expanded>
+          {?} == {?}
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+        <Original>
+          SimplePcg32{ 0 } != SimplePcg32{}
+        </Original>
+        <Expanded>
+          {?} != {?}
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+        <Original>
+          !(SimplePcg32{ 1 } == SimplePcg32{ 2 })
+        </Original>
+        <Expanded>
+          !({?} == {?})
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE_FALSE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+        <Original>
+          !(SimplePcg32{ 1 } != SimplePcg32{ 1 })
+        </Original>
+        <Expanded>
+          !({?} != {?})
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="Comparison with explicitly convertible types" tags="[Approx]" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
         <Original>
@@ -2609,13 +2851,167 @@ Nor would this
       </Expression>
       <OverallResult success="false"/>
     </TestCase>
-    <TestCase name="Custom exceptions can be translated when testing for nothrow" tags="[!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
-      <Expression success="false" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
-        <Original>
-          throwCustom()
-        </Original>
-        <Expanded>
-          throwCustom()
+    <TestCase name="Copy and then generate a range" tags="[generators]" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+      <Section name="from var and iterators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="from var and iterators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="from var and iterators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="from var and iterators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="from var and iterators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="from var and iterators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="From a temporary container" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="From a temporary container" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="From a temporary container" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="From a temporary container" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="From a temporary container" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="From a temporary container" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            elem % 2 == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Final validation" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            call_count == 1
+          </Original>
+          <Expanded>
+            1 == 1
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Original>
+            make_data().size() == test_count
+          </Original>
+          <Expanded>
+            6 == 6
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Custom exceptions can be translated when testing for nothrow" tags="[!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
+      <Expression success="false" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
+        <Original>
+          throwCustom()
+        </Original>
+        <Expanded>
+          throwCustom()
         </Expanded>
         <Exception filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
           custom exception - not std
@@ -2662,6 +3058,35 @@ Nor would this
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Directly creating an EnumInfo" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+      <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+        <Original>
+          enumInfo->lookup(0) == "Value1"
+        </Original>
+        <Expanded>
+          Value1 == "Value1"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+        <Original>
+          enumInfo->lookup(1) == "Value2"
+        </Original>
+        <Expanded>
+          Value2 == "Value2"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+        <Original>
+          enumInfo->lookup(3) == "{** unexpected enum value **}"
+        </Original>
+        <Expanded>
+          {** unexpected enum value **}
+==
+"{** unexpected enum value **}"
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="EndsWith string matcher" tags="[.][failing][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
       <Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Original>
@@ -2681,6 +3106,70 @@ Nor would this
       </Expression>
       <OverallResult success="false"/>
     </TestCase>
+    <TestCase name="Enums can quickly have stringification enabled using REGISTER_ENUM" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+        <Original>
+          stringify( EnumClass3::Value1 ) == "Value1"
+        </Original>
+        <Expanded>
+          "Value1" == "Value1"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+        <Original>
+          stringify( EnumClass3::Value2 ) == "Value2"
+        </Original>
+        <Expanded>
+          "Value2" == "Value2"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+        <Original>
+          stringify( EnumClass3::Value3 ) == "Value3"
+        </Original>
+        <Expanded>
+          "Value3" == "Value3"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+        <Original>
+          stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}"
+        </Original>
+        <Expanded>
+          "{** unexpected enum value **}"
+==
+"{** unexpected enum value **}"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+        <Original>
+          stringify( ec3 ) == "Value2"
+        </Original>
+        <Expanded>
+          "Value2" == "Value2"
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+        <Original>
+          stringify( Bikeshed::Colours::Red ) == "Red"
+        </Original>
+        <Expanded>
+          "Red" == "Red"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/EnumToString.tests.cpp" >
+        <Original>
+          stringify( Bikeshed::Colours::Blue ) == "Blue"
+        </Original>
+        <Expanded>
+          "Blue" == "Blue"
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="Epsilon only applies to Approx's value" tags="[Approx]" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
         <Original>
@@ -2975,7 +3464,7 @@ Nor would this
       <Section name="Contents are wrong" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Expression success="false" type="CHECK_THROWS_MATCHES" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            throws(3), SpecialException, ExceptionMatcher{1}
+            throwsSpecialException(3), SpecialException, ExceptionMatcher{1}
           </Original>
           <Expanded>
             SpecialException::what special exception has value of 1
@@ -2983,7 +3472,7 @@ Nor would this
         </Expression>
         <Expression success="false" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            throws(4), SpecialException, ExceptionMatcher{1}
+            throwsSpecialException(4), SpecialException, ExceptionMatcher{1}
           </Original>
           <Expanded>
             SpecialException::what special exception has value of 1
@@ -2996,7 +3485,7 @@ Nor would this
     <TestCase name="Exception matchers that succeed" tags="[!throws][exceptions][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
       <Expression success="true" type="CHECK_THROWS_MATCHES" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Original>
-          throws(1), SpecialException, ExceptionMatcher{1}
+          throwsSpecialException(1), SpecialException, ExceptionMatcher{1}
         </Original>
         <Expanded>
           SpecialException::what special exception has value of 1
@@ -3004,7 +3493,7 @@ Nor would this
       </Expression>
       <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Original>
-          throws(2), SpecialException, ExceptionMatcher{2}
+          throwsSpecialException(2), SpecialException, ExceptionMatcher{2}
         </Original>
         <Expanded>
           SpecialException::what special exception has value of 2
@@ -3072,6 +3561,41 @@ Nor would this
       </Section>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Exceptions matchers" tags="[!throws][exceptions][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+      <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Original>
+          throwsDerivedException(), DerivedException, Message("DerivedException::what")
+        </Original>
+        <Expanded>
+          DerivedException::what exception message matches "DerivedException::what"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Original>
+          throwsDerivedException(), DerivedException, !Message("derivedexception::what")
+        </Original>
+        <Expanded>
+          DerivedException::what not exception message matches "derivedexception::what"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Original>
+          throwsSpecialException(2), SpecialException, !Message("DerivedException::what")
+        </Original>
+        <Expanded>
+          SpecialException::what not exception message matches "DerivedException::what"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE_THROWS_MATCHES" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Original>
+          throwsSpecialException(2), SpecialException, Message("SpecialException::what")
+        </Original>
+        <Expanded>
+          SpecialException::what exception message matches "SpecialException::what"
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="Expected exceptions that don't throw or unexpected exceptions fail the test" tags="[!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
       <Expression success="false" type="CHECK_THROWS_AS" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
         <Original>
@@ -3168,6 +3692,52 @@ Nor would this
       <OverallResult success="true"/>
     </TestCase>
     <TestCase name="Floating point matchers: double" tags="[floating-point][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+      <Section name="Relative" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            10., WithinRel(11.1, 0.1)
+          </Original>
+          <Expanded>
+            10.0 and 11.1 are within 10% of each other
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            10., !WithinRel(11.2, 0.1)
+          </Original>
+          <Expanded>
+            10.0 not and 11.2 are within 10% of each other
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            1., !WithinRel(0., 0.99)
+          </Original>
+          <Expanded>
+            1.0 not and 0 are within 99% of each other
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            -0., WithinRel(0.)
+          </Original>
+          <Expanded>
+            -0.0 and 0 are within 2.22045e-12% of each other
+          </Expanded>
+        </Expression>
+        <Section name="Some subnormal values" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+            <Original>
+              v1, WithinRel(v2)
+            </Original>
+            <Expanded>
+              0.0 and 2.22507e-308 are within 2.22045e-12% of each other
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="5" failures="0" expectedFailures="0"/>
+      </Section>
       <Section name="Margin" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
@@ -3201,14 +3771,6 @@ Nor would this
             0.0 not is within 0.99 of 1.0
           </Expanded>
         </Expression>
-        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
-          <Original>
-            NAN, !WithinAbs(NAN, 0)
-          </Original>
-          <Expanded>
-            nanf not is within 0.0 of nan
-          </Expanded>
-        </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
             11., !WithinAbs(10., 0.5)
@@ -3241,7 +3803,7 @@ Nor would this
             -10.0 is within 0.5 of -9.6
           </Expanded>
         </Expression>
-        <OverallResults successes="9" failures="0" expectedFailures="0"/>
+        <OverallResults successes="8" failures="0" expectedFailures="0"/>
       </Section>
       <Section name="ULPs" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
@@ -3249,7 +3811,7 @@ Nor would this
             1., WithinULP(1., 0)
           </Original>
           <Expanded>
-            1.0 is within 0 ULPs of 1.0
+            1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
@@ -3257,47 +3819,47 @@ Nor would this
             nextafter(1., 2.), WithinULP(1., 1)
           </Original>
           <Expanded>
-            1.0 is within 1 ULPs of 1.0
+            1.0 is within 1 ULPs of 1.0000000000000000e+00 ([9.9999999999999989e-01, 1.0000000000000002e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            nextafter(1., 0.), WithinULP(1., 1)
+            0., WithinULP(nextafter(0., 1.), 1)
           </Original>
           <Expanded>
-            1.0 is within 1 ULPs of 1.0
+            0.0 is within 1 ULPs of 4.9406564584124654e-324 ([0.0000000000000000e+00, 9.8813129168249309e-324])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            nextafter(1., 2.), !WithinULP(1., 0)
+            1., WithinULP(nextafter(1., 0.), 1)
           </Original>
           <Expanded>
-            1.0 not is within 0 ULPs of 1.0
+            1.0 is within 1 ULPs of 9.9999999999999989e-01 ([9.9999999999999978e-01, 1.0000000000000000e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            1., WithinULP(1., 0)
+            1., !WithinULP(nextafter(1., 2.), 0)
           </Original>
           <Expanded>
-            1.0 is within 0 ULPs of 1.0
+            1.0 not is within 0 ULPs of 1.0000000000000002e+00 ([1.0000000000000002e+00, 1.0000000000000002e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            -0., WithinULP(0., 0)
+            1., WithinULP(1., 0)
           </Original>
           <Expanded>
-            -0.0 is within 0 ULPs of 0.0
+            1.0 is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            NAN, !WithinULP(NAN, 123)
+            -0., WithinULP(0., 0)
           </Original>
           <Expanded>
-            nanf not is within 123 ULPs of nanf
+            -0.0 is within 0 ULPs of 0.0000000000000000e+00 ([0.0000000000000000e+00, 0.0000000000000000e+00])
           </Expanded>
         </Expression>
         <OverallResults successes="7" failures="0" expectedFailures="0"/>
@@ -3308,7 +3870,7 @@ Nor would this
             1., WithinAbs(1., 0.5) || WithinULP(2., 1)
           </Original>
           <Expanded>
-            1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0 )
+            1.0 ( is within 0.5 of 1.0 or is within 1 ULPs of 2.0000000000000000e+00 ([1.9999999999999998e+00, 2.0000000000000004e+00]) )
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
@@ -3316,15 +3878,15 @@ Nor would this
             1., WithinAbs(2., 0.5) || WithinULP(1., 0)
           </Original>
           <Expanded>
-            1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0 )
+            1.0 ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0000000000000000e+00 ([1.0000000000000000e+00, 1.0000000000000000e+00]) )
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123))
+            0.0001, WithinAbs(0., 0.001) || WithinRel(0., 0.1)
           </Original>
           <Expanded>
-            nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf )
+            0.0001 ( is within 0.001 of 0.0 or and 0 are within 10% of each other )
           </Expanded>
         </Expression>
         <OverallResults successes="3" failures="0" expectedFailures="0"/>
@@ -3354,19 +3916,81 @@ Nor would this
             WithinULP(1., 0)
           </Expanded>
         </Expression>
+        <Expression success="true" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            WithinRel(1., 0.)
+          </Original>
+          <Expanded>
+            WithinRel(1., 0.)
+          </Expanded>
+        </Expression>
         <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            WithinULP(1., -1), std::domain_error
+            WithinRel(1., -0.2), std::domain_error
           </Original>
           <Expanded>
-            WithinULP(1., -1), std::domain_error
+            WithinRel(1., -0.2), std::domain_error
           </Expanded>
         </Expression>
-        <OverallResults successes="4" failures="0" expectedFailures="0"/>
+        <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            WithinRel(1., 1.), std::domain_error
+          </Original>
+          <Expanded>
+            WithinRel(1., 1.), std::domain_error
+          </Expanded>
+        </Expression>
+        <OverallResults successes="6" failures="0" expectedFailures="0"/>
       </Section>
       <OverallResult success="true"/>
     </TestCase>
     <TestCase name="Floating point matchers: float" tags="[floating-point][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+      <Section name="Relative" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            10.f, WithinRel(11.1f, 0.1f)
+          </Original>
+          <Expanded>
+            10.0f and 11.1 are within 10% of each other
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            10.f, !WithinRel(11.2f, 0.1f)
+          </Original>
+          <Expanded>
+            10.0f not and 11.2 are within 10% of each other
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            1.f, !WithinRel(0.f, 0.99f)
+          </Original>
+          <Expanded>
+            1.0f not and 0 are within 99% of each other
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            -0.f, WithinRel(0.f)
+          </Original>
+          <Expanded>
+            -0.0f and 0 are within 0.00119209% of each other
+          </Expanded>
+        </Expression>
+        <Section name="Some subnormal values" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+            <Original>
+              v1, WithinRel(v2)
+            </Original>
+            <Expanded>
+              0.0f and 1.17549e-38 are within 0.00119209% of each other
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="5" failures="0" expectedFailures="0"/>
+      </Section>
       <Section name="Margin" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
@@ -3408,14 +4032,6 @@ Nor would this
             0.0f is within 0.0 of -0.0
           </Expanded>
         </Expression>
-        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
-          <Original>
-            NAN, !WithinAbs(NAN, 0)
-          </Original>
-          <Expanded>
-            nanf not is within 0.0 of nan
-          </Expanded>
-        </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
             11.f, !WithinAbs(10.f, 0.5f)
@@ -3448,7 +4064,7 @@ Nor would this
             -10.0f is within 0.5 of -9.6000003815
           </Expanded>
         </Expression>
-        <OverallResults successes="10" failures="0" expectedFailures="0"/>
+        <OverallResults successes="9" failures="0" expectedFailures="0"/>
       </Section>
       <Section name="ULPs" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
@@ -3456,7 +4072,7 @@ Nor would this
             1.f, WithinULP(1.f, 0)
           </Original>
           <Expanded>
-            1.0f is within 0 ULPs of 1.0f
+            1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
@@ -3464,47 +4080,47 @@ Nor would this
             nextafter(1.f, 2.f), WithinULP(1.f, 1)
           </Original>
           <Expanded>
-            1.0f is within 1 ULPs of 1.0f
+            1.0f is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            nextafter(1.f, 0.f), WithinULP(1.f, 1)
+            0.f, WithinULP(nextafter(0.f, 1.f), 1)
           </Original>
           <Expanded>
-            1.0f is within 1 ULPs of 1.0f
+            0.0f is within 1 ULPs of 1.40129846e-45f ([0.00000000e+00, 2.80259693e-45])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            nextafter(1.f, 2.f), !WithinULP(1.f, 0)
+            1.f, WithinULP(nextafter(1.f, 0.f), 1)
           </Original>
           <Expanded>
-            1.0f not is within 0 ULPs of 1.0f
+            1.0f is within 1 ULPs of 9.99999940e-01f ([9.99999881e-01, 1.00000000e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            1.f, WithinULP(1.f, 0)
+            1.f, !WithinULP(nextafter(1.f, 2.f), 0)
           </Original>
           <Expanded>
-            1.0f is within 0 ULPs of 1.0f
+            1.0f not is within 0 ULPs of 1.00000012e+00f ([1.00000012e+00, 1.00000012e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            -0.f, WithinULP(0.f, 0)
+            1.f, WithinULP(1.f, 0)
           </Original>
           <Expanded>
-            -0.0f is within 0 ULPs of 0.0f
+            1.0f is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00])
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            NAN, !WithinULP(NAN, 123)
+            -0.f, WithinULP(0.f, 0)
           </Original>
           <Expanded>
-            nanf not is within 123 ULPs of nanf
+            -0.0f is within 0 ULPs of 0.00000000e+00f ([0.00000000e+00, 0.00000000e+00])
           </Expanded>
         </Expression>
         <OverallResults successes="7" failures="0" expectedFailures="0"/>
@@ -3515,7 +4131,7 @@ Nor would this
             1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1)
           </Original>
           <Expanded>
-            1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.0f )
+            1.0f ( is within 0.5 of 1.0 or is within 1 ULPs of 1.00000000e+00f ([9.99999940e-01, 1.00000012e+00]) )
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
@@ -3523,15 +4139,15 @@ Nor would this
             1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0)
           </Original>
           <Expanded>
-            1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.0f )
+            1.0f ( is within 0.5 of 2.0 or is within 0 ULPs of 1.00000000e+00f ([1.00000000e+00, 1.00000000e+00]) )
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123))
+            0.0001f, WithinAbs(0.f, 0.001f) || WithinRel(0.f, 0.1f)
           </Original>
           <Expanded>
-            nanf not ( is within 100.0 of nan or is within 123 ULPs of nanf )
+            0.0001f ( is within 0.001 of 0.0 or and 0 are within 10% of each other )
           </Expanded>
         </Expression>
         <OverallResults successes="3" failures="0" expectedFailures="0"/>
@@ -3563,13 +4179,37 @@ Nor would this
         </Expression>
         <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
           <Original>
-            WithinULP(1.f, -1), std::domain_error
+            WithinULP(1.f, static_cast&lt;uint64_t>(-1)), std::domain_error
           </Original>
           <Expanded>
-            WithinULP(1.f, -1), std::domain_error
+            WithinULP(1.f, static_cast&lt;uint64_t>(-1)), std::domain_error
           </Expanded>
         </Expression>
-        <OverallResults successes="4" failures="0" expectedFailures="0"/>
+        <Expression success="true" type="REQUIRE_NOTHROW" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            WithinRel(1.f, 0.f)
+          </Original>
+          <Expanded>
+            WithinRel(1.f, 0.f)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            WithinRel(1.f, -0.2f), std::domain_error
+          </Original>
+          <Expanded>
+            WithinRel(1.f, -0.2f), std::domain_error
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            WithinRel(1.f, 1.f), std::domain_error
+          </Original>
+          <Expanded>
+            WithinRel(1.f, 1.f), std::domain_error
+          </Expanded>
+        </Expression>
+        <OverallResults successes="7" failures="0" expectedFailures="0"/>
       </Section>
       <OverallResult success="true"/>
     </TestCase>
@@ -3981,6 +4621,48 @@ Nor would this
         </Section>
         <OverallResults successes="3" failures="0" expectedFailures="0"/>
       </Section>
+      <Section name="Chunking a generator into sized pieces" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Section name="Chunk size of zero" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+            <Original>
+              chunk2.size() == 0
+            </Original>
+            <Expanded>
+              0 == 0
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Chunking a generator into sized pieces" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Section name="Chunk size of zero" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+            <Original>
+              chunk2.size() == 0
+            </Original>
+            <Expanded>
+              0 == 0
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Chunking a generator into sized pieces" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+        <Section name="Chunk size of zero" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
+            <Original>
+              chunk2.size() == 0
+            </Original>
+            <Expanded>
+              0 == 0
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
       <Section name="Chunking a generator into sized pieces" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
         <Section name="Throws on too small generators" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
           <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Generators.tests.cpp" >
@@ -6391,6 +7073,165 @@ Nor would this
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Our PCG implementation provides expected results for known seeds" tags="[rng]" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+      <Section name="Default seeded" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            4242248763 (0x<hex digits>)
+==
+4242248763 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            1867888929 (0x<hex digits>)
+==
+1867888929 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            1276619030 (0x<hex digits>)
+==
+1276619030 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            1911218783 (0x<hex digits>)
+==
+1911218783 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            1827115164 (0x<hex digits>)
+==
+1827115164 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <OverallResults successes="5" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Specific seed" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            1472234645 (0x<hex digits>)
+==
+1472234645 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            868832940 (0x<hex digits>)
+==
+868832940 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            570883446 (0x<hex digits>)
+==
+570883446 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            889299803 (0x<hex digits>)
+==
+889299803 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            4261393167 (0x<hex digits>)
+==
+4261393167 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            1472234645 (0x<hex digits>)
+==
+1472234645 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            868832940 (0x<hex digits>)
+==
+868832940 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            570883446 (0x<hex digits>)
+==
+570883446 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            889299803 (0x<hex digits>)
+==
+889299803 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/RandomNumberGeneration.tests.cpp" >
+          <Original>
+            rng() == 0x<hex digits>
+          </Original>
+          <Expanded>
+            4261393167 (0x<hex digits>)
+==
+4261393167 (0x<hex digits>)
+          </Expanded>
+        </Expression>
+        <OverallResults successes="10" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="Output from all sections is reported" tags="[.][failing][messages]" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
       <Section name="one" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
         <Failure filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
@@ -7580,46 +8421,132 @@ Nor would this
         </Expression>
         <OverallResults successes="5" failures="0" expectedFailures="0"/>
       </Section>
-      <OverallResult success="true"/>
-    </TestCase>
-    <TestCase name="Pointers can be compared to null" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
-        <Original>
-          p == 0
-        </Original>
-        <Expanded>
-          0 == 0
-        </Expanded>
-      </Expression>
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
-        <Original>
-          p == pNULL
-        </Original>
-        <Expanded>
-          0 == 0
-        </Expanded>
-      </Expression>
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
-        <Original>
-          p != 0
-        </Original>
-        <Expanded>
-          0x<hex digits> != 0
-        </Expanded>
-      </Expression>
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
-        <Original>
-          cp != 0
-        </Original>
-        <Expanded>
-          0x<hex digits> != 0
-        </Expanded>
-      </Expression>
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
-        <Original>
-          cpc != 0
-        </Original>
-        <Expanded>
+      <Section name="Leading and trailing spaces in test spec" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( "  aardvark " ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( "  aardvark" ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( " aardvark " ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( "aardvark " ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( "aardvark" ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <OverallResults successes="5" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Leading and trailing spaces in test name" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( "  aardvark " ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( "  aardvark" ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( " aardvark " ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( "aardvark " ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Original>
+            spec.matches( fakeTestCase( "aardvark" ) )
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <OverallResults successes="5" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Pointers can be compared to null" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
+        <Original>
+          p == 0
+        </Original>
+        <Expanded>
+          0 == 0
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
+        <Original>
+          p == pNULL
+        </Original>
+        <Expanded>
+          0 == 0
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
+        <Original>
+          p != 0
+        </Original>
+        <Expanded>
+          0x<hex digits> != 0
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
+        <Original>
+          cp != 0
+        </Original>
+        <Expanded>
+          0x<hex digits> != 0
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Condition.tests.cpp" >
+        <Original>
+          cpc != 0
+        </Original>
+        <Expanded>
           0x<hex digits> != 0
         </Expanded>
       </Expression>
@@ -7649,6 +8576,47 @@ Nor would this
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Precision of floating point stringification can be set" tags="[floatingPoint][toString]" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
+      <Section name="Floats" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
+          <Original>
+            str1.size() == 3 + 5
+          </Original>
+          <Expanded>
+            8 == 8
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
+          <Original>
+            str2.size() == 3 + 10
+          </Original>
+          <Expanded>
+            13 == 13
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Double" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
+          <Original>
+            str1.size() == 2 + 5
+          </Original>
+          <Expanded>
+            7 == 7
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/ToStringGeneral.tests.cpp" >
+          <Original>
+            str2.size() == 2 + 15
+          </Original>
+          <Expanded>
+            17 == 17
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="Predicate matcher can accept const char*" tags="[compilation][matchers]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
       <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Original>
@@ -8301,6 +9269,94 @@ Nor would this
         </Section>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
+      <Section name="Benchmark options" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+        <Section name="samples" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+            <Original>
+              cli.parse({ "test", "--benchmark-samples=200" })
+            </Original>
+            <Expanded>
+              {?}
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+            <Original>
+              config.benchmarkSamples == 200
+            </Original>
+            <Expanded>
+              200 == 200
+            </Expanded>
+          </Expression>
+          <OverallResults successes="2" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Benchmark options" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+        <Section name="resamples" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+            <Original>
+              cli.parse({ "test", "--benchmark-resamples=20000" })
+            </Original>
+            <Expanded>
+              {?}
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+            <Original>
+              config.benchmarkResamples == 20000
+            </Original>
+            <Expanded>
+              20000 (0x<hex digits>) == 20000 (0x<hex digits>)
+            </Expanded>
+          </Expression>
+          <OverallResults successes="2" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Benchmark options" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+        <Section name="resamples" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+            <Original>
+              cli.parse({ "test", "--benchmark-confidence-interval=0.99" })
+            </Original>
+            <Expanded>
+              {?}
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+            <Original>
+              config.benchmarkConfidenceInterval == Catch::Detail::Approx(0.99)
+            </Original>
+            <Expanded>
+              0.99 == Approx( 0.99 )
+            </Expanded>
+          </Expression>
+          <OverallResults successes="2" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Benchmark options" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+        <Section name="resamples" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+          <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+            <Original>
+              cli.parse({ "test", "--benchmark-no-analysis" })
+            </Original>
+            <Expanded>
+              {?}
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+            <Original>
+              config.benchmarkNoAnalysis
+            </Original>
+            <Expanded>
+              true
+            </Expanded>
+          </Expression>
+          <OverallResults successes="2" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
       <OverallResult success="true"/>
     </TestCase>
     <TestCase name="Product with differing arities - std::tuple&lt;int, double, float>" tags="[product][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
@@ -8632,14 +9688,6 @@ A string sent to stderr via clog
           Approx( 1.23 ) != 1.24
         </Expanded>
       </Expression>
-      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Approx.tests.cpp" >
-        <Original>
-          INFINITY == Approx(INFINITY)
-        </Original>
-        <Expanded>
-          inff == Approx( inf )
-        </Expanded>
-      </Expression>
       <OverallResult success="true"/>
     </TestCase>
     <TestCase name="Standard output from all sections is reported" tags="[.][messages]" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
@@ -8895,14 +9943,6 @@ Message from section two
             false == false
           </Expanded>
         </Expression>
-        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-          <Original>
-            isSubstring( original ) == false
-          </Original>
-          <Expanded>
-            false == false
-          </Expanded>
-        </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
           <Original>
             isOwned( original )
@@ -8911,7 +9951,7 @@ Message from section two
             true
           </Expanded>
         </Expression>
-        <OverallResults successes="5" failures="0" expectedFailures="0"/>
+        <OverallResults successes="4" failures="0" expectedFailures="0"/>
       </Section>
       <Section name="Substrings" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
         <Section name="zero-based substring" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
@@ -8987,37 +10027,48 @@ Message from section two
           </Expression>
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
             <Original>
-              isSubstring( ss ) == false
+              isOwned( ss )
             </Original>
             <Expanded>
-              false == false
+              true
             </Expanded>
           </Expression>
+          <Section name="Self-assignment after substring" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+            <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+              <Original>
+                isOwned(ss) == false
+              </Original>
+              <Expanded>
+                false == false
+              </Expanded>
+            </Expression>
+            <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+              <Original>
+                ss == "hello"
+              </Original>
+              <Expanded>
+                hello == "hello"
+              </Expanded>
+            </Expression>
+            <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+              <Original>
+                rawChars == ss.currentData()
+              </Original>
+              <Expanded>
+                "hello world!" == "hello world!"
+              </Expanded>
+            </Expression>
+            <OverallResults successes="3" failures="0" expectedFailures="0"/>
+          </Section>
+          <OverallResults successes="8" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="8" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Substrings" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Section name="non-zero-based substring" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
             <Original>
-              isOwned( ss )
-            </Original>
-            <Expanded>
-              true
-            </Expanded>
-          </Expression>
-          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-            <Original>
-              ss.currentData() != s.currentData()
-            </Original>
-            <Expanded>
-              "hello" != "hello world!"
-            </Expanded>
-          </Expression>
-          <OverallResults successes="7" failures="0" expectedFailures="0"/>
-        </Section>
-        <OverallResults successes="7" failures="0" expectedFailures="0"/>
-      </Section>
-      <Section name="Substrings" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Section name="non-zero-based substring" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-            <Original>
-              ss.size() == 6
+              ss.size() == 6
             </Original>
             <Expanded>
               6 == 6
@@ -9063,6 +10114,20 @@ Message from section two
         </Section>
         <OverallResults successes="1" failures="0" expectedFailures="0"/>
       </Section>
+      <Section name="Substrings" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Section name="Past the end substring" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+            <Original>
+              s.substr(s.size() + 1, 123).empty()
+            </Original>
+            <Expanded>
+              true
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
       <Section name="Comparisons" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
           <Original>
@@ -9148,28 +10213,6 @@ Message from section two
         </Section>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
-      <Section name="to std::string" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Section name="implicitly constructed" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-            <Original>
-              stdStr == "a stringref"
-            </Original>
-            <Expanded>
-              "a stringref" == "a stringref"
-            </Expanded>
-          </Expression>
-          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-            <Original>
-              stdStr.size() == sr.size()
-            </Original>
-            <Expanded>
-              11 == 11
-            </Expanded>
-          </Expression>
-          <OverallResults successes="2" failures="0" expectedFailures="0"/>
-        </Section>
-        <OverallResults successes="2" failures="0" expectedFailures="0"/>
-      </Section>
       <Section name="to std::string" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
         <Section name="explicitly constructed" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
           <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
@@ -9214,33 +10257,6 @@ Message from section two
         </Section>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
-      <Section name="Counting utf-8 codepoints" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-          <Original>
-            ascii.numberOfCharacters() == ascii.size()
-          </Original>
-          <Expanded>
-            39 == 39
-          </Expanded>
-        </Expression>
-        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-          <Original>
-            simpleu8.numberOfCharacters() == 30
-          </Original>
-          <Expanded>
-            30 == 30
-          </Expanded>
-        </Expression>
-        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-          <Original>
-            emojis.numberOfCharacters() == 9
-          </Original>
-          <Expanded>
-            9 == 9
-          </Expanded>
-        </Expression>
-        <OverallResults successes="3" failures="0" expectedFailures="0"/>
-      </Section>
       <OverallResult success="true"/>
     </TestCase>
     <TestCase name="Stringifying std::chrono::duration helpers" tags="[chrono][toString]" filename="projects/<exe-name>/UsageTests/ToStringChrono.tests.cpp" >
@@ -9409,6 +10425,116 @@ Message from section two
       </Section>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 0" tags="[class][list][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture&lt;TestType>::m_a == 1
+        </Original>
+        <Expanded>
+          1 == 1
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 1" tags="[class][list][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture&lt;TestType>::m_a == 1
+        </Original>
+        <Expanded>
+          1 == 1
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case method with test types specified inside std::tuple - MyTypes - 2" tags="[class][list][template]" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Class.tests.cpp" >
+        <Original>
+          Template_Fixture&lt;TestType>::m_a == 1
+        </Original>
+        <Expanded>
+          1.0 == 1
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 0" tags="[list][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          sizeof(TestType) > 0
+        </Original>
+        <Expanded>
+          1 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case with test types specified inside non-copyable and non-movable std::tuple - NonCopyableAndNonMovableTypes - 1" tags="[list][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          sizeof(TestType) > 0
+        </Original>
+        <Expanded>
+          4 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 0" tags="[list][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          sizeof(TestType) > 0
+        </Original>
+        <Expanded>
+          1 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case with test types specified inside non-default-constructible std::tuple - MyNonDefaultConstructibleTypes - 1" tags="[list][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          sizeof(TestType) > 0
+        </Original>
+        <Expanded>
+          4 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 0" tags="[list][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          sizeof(TestType) > 0
+        </Original>
+        <Expanded>
+          4 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 1" tags="[list][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          sizeof(TestType) > 0
+        </Original>
+        <Expanded>
+          1 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Template test case with test types specified inside std::tuple - MyTypes - 2" tags="[list][template]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          sizeof(TestType) > 0
+        </Original>
+        <Expanded>
+          4 > 0
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="TemplateTest: vectors can be sized and resized - float" tags="[template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
@@ -9609,10 +10735,626 @@ Message from section two
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="resizing smaller changes size but not capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 0
+          </Original>
+          <Expanded>
+            0 == 0
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 5
+          </Original>
+          <Expanded>
+            5 >= 5
+          </Expanded>
+        </Expression>
+        <Section name="We can use the 'swap trick' to reset the capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+            <Original>
+              v.capacity() == 0
+            </Original>
+            <Expanded>
+              0 == 0
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="3" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="reserving bigger changes capacity but not size" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 5
+          </Original>
+          <Expanded>
+            5 == 5
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 10
+          </Original>
+          <Expanded>
+            10 >= 10
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="reserving smaller does not change size or capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 5
+          </Original>
+          <Expanded>
+            5 == 5
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 5
+          </Original>
+          <Expanded>
+            5 >= 5
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="TemplateTest: vectors can be sized and resized - std::string" tags="[template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="resizing bigger changes size and capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 10
+          </Original>
+          <Expanded>
+            10 == 10
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 10
+          </Original>
+          <Expanded>
+            10 >= 10
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="resizing smaller changes size but not capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 0
+          </Original>
+          <Expanded>
+            0 == 0
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 5
+          </Original>
+          <Expanded>
+            5 >= 5
+          </Expanded>
+        </Expression>
+        <Section name="We can use the 'swap trick' to reset the capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+            <Original>
+              v.capacity() == 0
+            </Original>
+            <Expanded>
+              0 == 0
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="3" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="reserving bigger changes capacity but not size" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 5
+          </Original>
+          <Expanded>
+            5 == 5
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 10
+          </Original>
+          <Expanded>
+            10 >= 10
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="reserving smaller does not change size or capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 5
+          </Original>
+          <Expanded>
+            5 == 5
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 5
+          </Original>
+          <Expanded>
+            5 >= 5
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="TemplateTest: vectors can be sized and resized - std::tuple&lt;int,float>" tags="[template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="resizing bigger changes size and capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 10
+          </Original>
+          <Expanded>
+            10 == 10
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 10
+          </Original>
+          <Expanded>
+            10 >= 10
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="resizing smaller changes size but not capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 0
+          </Original>
+          <Expanded>
+            0 == 0
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 5
+          </Original>
+          <Expanded>
+            5 >= 5
+          </Expanded>
+        </Expression>
+        <Section name="We can use the 'swap trick' to reset the capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+            <Original>
+              v.capacity() == 0
+            </Original>
+            <Expanded>
+              0 == 0
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="3" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="reserving bigger changes capacity but not size" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 5
+          </Original>
+          <Expanded>
+            5 == 5
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 10
+          </Original>
+          <Expanded>
+            10 >= 10
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == 5
+        </Original>
+        <Expanded>
+          5 == 5
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= 5
+        </Original>
+        <Expanded>
+          5 >= 5
+        </Expanded>
+      </Expression>
+      <Section name="reserving smaller does not change size or capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 5
+          </Original>
+          <Expanded>
+            5 == 5
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 5
+          </Original>
+          <Expanded>
+            5 >= 5
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="TemplateTestSig: vectors can be sized and resized - (std::tuple&lt;int, float>), 6" tags="[nttp][template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == V
+        </Original>
+        <Expanded>
+          6 == 6
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= V
+        </Original>
+        <Expanded>
+          6 >= 6
+        </Expanded>
+      </Expression>
+      <Section name="resizing bigger changes size and capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 2 * V
+          </Original>
+          <Expanded>
+            12 == 12
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 2 * V
+          </Original>
+          <Expanded>
+            12 >= 12
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == V
+        </Original>
+        <Expanded>
+          6 == 6
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= V
+        </Original>
+        <Expanded>
+          6 >= 6
+        </Expanded>
+      </Expression>
+      <Section name="resizing smaller changes size but not capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 0
+          </Original>
+          <Expanded>
+            0 == 0
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= V
+          </Original>
+          <Expanded>
+            6 >= 6
+          </Expanded>
+        </Expression>
+        <Section name="We can use the 'swap trick' to reset the capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+            <Original>
+              v.capacity() == 0
+            </Original>
+            <Expanded>
+              0 == 0
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="3" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == V
+        </Original>
+        <Expanded>
+          6 == 6
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= V
+        </Original>
+        <Expanded>
+          6 >= 6
+        </Expanded>
+      </Expression>
+      <Section name="reserving bigger changes capacity but not size" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == V
+          </Original>
+          <Expanded>
+            6 == 6
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 2 * V
+          </Original>
+          <Expanded>
+            12 >= 12
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == V
+        </Original>
+        <Expanded>
+          6 == 6
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= V
+        </Original>
+        <Expanded>
+          6 >= 6
+        </Expanded>
+      </Expression>
+      <Section name="reserving smaller does not change size or capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == V
+          </Original>
+          <Expanded>
+            6 == 6
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= V
+          </Original>
+          <Expanded>
+            6 >= 6
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="TemplateTestSig: vectors can be sized and resized - float,4" tags="[nttp][template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == V
+        </Original>
+        <Expanded>
+          4 == 4
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= V
+        </Original>
+        <Expanded>
+          4 >= 4
+        </Expanded>
+      </Expression>
+      <Section name="resizing bigger changes size and capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.size() == 2 * V
+          </Original>
+          <Expanded>
+            8 == 8
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+          <Original>
+            v.capacity() >= 2 * V
+          </Original>
+          <Expanded>
+            8 >= 8
+          </Expanded>
+        </Expression>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.size() == V
+        </Original>
+        <Expanded>
+          4 == 4
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+        <Original>
+          v.capacity() >= V
         </Original>
         <Expanded>
-          5 >= 5
+          4 >= 4
         </Expanded>
       </Expression>
       <Section name="resizing smaller changes size but not capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
@@ -9626,10 +11368,10 @@ Message from section two
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 5
+            v.capacity() >= V
           </Original>
           <Expanded>
-            5 >= 5
+            4 >= 4
           </Expanded>
         </Expression>
         <Section name="We can use the 'swap trick' to reset the capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
@@ -9647,80 +11389,80 @@ Message from section two
       </Section>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
-          5 == 5
+          4 == 4
         </Expanded>
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
-          5 >= 5
+          4 >= 4
         </Expanded>
       </Expression>
       <Section name="reserving bigger changes capacity but not size" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.size() == 5
+            v.size() == V
           </Original>
           <Expanded>
-            5 == 5
+            4 == 4
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 10
+            v.capacity() >= 2 * V
           </Original>
           <Expanded>
-            10 >= 10
+            8 >= 8
           </Expanded>
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
-          5 == 5
+          4 == 4
         </Expanded>
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
-          5 >= 5
+          4 >= 4
         </Expanded>
       </Expression>
       <Section name="reserving smaller does not change size or capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.size() == 5
+            v.size() == V
           </Original>
           <Expanded>
-            5 == 5
+            4 == 4
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 5
+            v.capacity() >= V
           </Original>
           <Expanded>
-            5 >= 5
+            4 >= 4
           </Expanded>
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <TestCase name="TemplateTest: vectors can be sized and resized - std::string" tags="[template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+    <TestCase name="TemplateTestSig: vectors can be sized and resized - int,5" tags="[nttp][template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
           5 == 5
@@ -9728,7 +11470,7 @@ Message from section two
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
           5 >= 5
@@ -9737,7 +11479,7 @@ Message from section two
       <Section name="resizing bigger changes size and capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.size() == 10
+            v.size() == 2 * V
           </Original>
           <Expanded>
             10 == 10
@@ -9745,7 +11487,7 @@ Message from section two
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 10
+            v.capacity() >= 2 * V
           </Original>
           <Expanded>
             10 >= 10
@@ -9755,7 +11497,7 @@ Message from section two
       </Section>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
           5 == 5
@@ -9763,7 +11505,7 @@ Message from section two
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
           5 >= 5
@@ -9780,7 +11522,7 @@ Message from section two
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 5
+            v.capacity() >= V
           </Original>
           <Expanded>
             5 >= 5
@@ -9801,7 +11543,7 @@ Message from section two
       </Section>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
           5 == 5
@@ -9809,7 +11551,7 @@ Message from section two
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
           5 >= 5
@@ -9818,7 +11560,7 @@ Message from section two
       <Section name="reserving bigger changes capacity but not size" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.size() == 5
+            v.size() == V
           </Original>
           <Expanded>
             5 == 5
@@ -9826,7 +11568,7 @@ Message from section two
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 10
+            v.capacity() >= 2 * V
           </Original>
           <Expanded>
             10 >= 10
@@ -9836,7 +11578,7 @@ Message from section two
       </Section>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
           5 == 5
@@ -9844,7 +11586,7 @@ Message from section two
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
           5 >= 5
@@ -9853,7 +11595,7 @@ Message from section two
       <Section name="reserving smaller does not change size or capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.size() == 5
+            v.size() == V
           </Original>
           <Expanded>
             5 == 5
@@ -9861,7 +11603,7 @@ Message from section two
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 5
+            v.capacity() >= V
           </Original>
           <Expanded>
             5 >= 5
@@ -9871,56 +11613,56 @@ Message from section two
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <TestCase name="TemplateTest: vectors can be sized and resized - std::tuple&lt;int,float>" tags="[template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
+    <TestCase name="TemplateTestSig: vectors can be sized and resized - std::string,15" tags="[nttp][template][vector]" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
-          5 == 5
+          15 == 15
         </Expanded>
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
-          5 >= 5
+          15 >= 15
         </Expanded>
       </Expression>
       <Section name="resizing bigger changes size and capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.size() == 10
+            v.size() == 2 * V
           </Original>
           <Expanded>
-            10 == 10
+            30 == 30
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 10
+            v.capacity() >= 2 * V
           </Original>
           <Expanded>
-            10 >= 10
+            30 >= 30
           </Expanded>
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
-          5 == 5
+          15 == 15
         </Expanded>
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
-          5 >= 5
+          15 >= 15
         </Expanded>
       </Expression>
       <Section name="resizing smaller changes size but not capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
@@ -9934,10 +11676,10 @@ Message from section two
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 5
+            v.capacity() >= V
           </Original>
           <Expanded>
-            5 >= 5
+            15 >= 15
           </Expanded>
         </Expression>
         <Section name="We can use the 'swap trick' to reset the capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
@@ -9955,70 +11697,70 @@ Message from section two
       </Section>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
-          5 == 5
+          15 == 15
         </Expanded>
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
-          5 >= 5
+          15 >= 15
         </Expanded>
       </Expression>
       <Section name="reserving bigger changes capacity but not size" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.size() == 5
+            v.size() == V
           </Original>
           <Expanded>
-            5 == 5
+            15 == 15
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 10
+            v.capacity() >= 2 * V
           </Original>
           <Expanded>
-            10 >= 10
+            30 >= 30
           </Expanded>
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.size() == 5
+          v.size() == V
         </Original>
         <Expanded>
-          5 == 5
+          15 == 15
         </Expanded>
       </Expression>
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Original>
-          v.capacity() >= 5
+          v.capacity() >= V
         </Original>
         <Expanded>
-          5 >= 5
+          15 >= 15
         </Expanded>
       </Expression>
       <Section name="reserving smaller does not change size or capacity" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.size() == 5
+            v.size() == V
           </Original>
           <Expanded>
-            5 == 5
+            15 == 15
           </Expanded>
         </Expression>
         <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Misc.tests.cpp" >
           <Original>
-            v.capacity() >= 5
+            v.capacity() >= V
           </Original>
           <Expanded>
-            5 >= 5
+            15 >= 15
           </Expanded>
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
@@ -10039,6 +11781,9 @@ Message from section two
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Test with special, characters &quot;in name" tags="[cli][regression]" filename="projects/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="The NO_FAIL macro reports a failure but does not fail the test" tags="[messages]" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
       <Expression success="false" type="CHECK_NOFAIL" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
         <Original>
@@ -10634,6 +12379,89 @@ Message from section two
       </Section>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Trim strings" tags="[string-manip]" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          trim(std::string(no_whitespace)) == no_whitespace
+        </Original>
+        <Expanded>
+          "There is no extra whitespace here"
+==
+"There is no extra whitespace here"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          trim(std::string(leading_whitespace)) == no_whitespace
+        </Original>
+        <Expanded>
+          "There is no extra whitespace here"
+==
+"There is no extra whitespace here"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          trim(std::string(trailing_whitespace)) == no_whitespace
+        </Original>
+        <Expanded>
+          "There is no extra whitespace here"
+==
+"There is no extra whitespace here"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          trim(std::string(whitespace_at_both_ends)) == no_whitespace
+        </Original>
+        <Expanded>
+          "There is no extra whitespace here"
+==
+"There is no extra whitespace here"
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          trim(StringRef(no_whitespace)) == StringRef(no_whitespace)
+        </Original>
+        <Expanded>
+          There is no extra whitespace here
+==
+There is no extra whitespace here
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          trim(StringRef(leading_whitespace)) == StringRef(no_whitespace)
+        </Original>
+        <Expanded>
+          There is no extra whitespace here
+==
+There is no extra whitespace here
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace)
+        </Original>
+        <Expanded>
+          There is no extra whitespace here
+==
+There is no extra whitespace here
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace)
+        </Original>
+        <Expanded>
+          There is no extra whitespace here
+==
+There is no extra whitespace here
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="Unexpected exceptions can be translated" tags="[!throws][.][failing]" filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
       <Exception filename="projects/<exe-name>/UsageTests/Exception.tests.cpp" >
         3.14
@@ -10713,6 +12541,111 @@ Message from section two
       </Section>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="Vector Approx matcher" tags="[approx][matchers][vector]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+      <Section name="Empty vector is roughly equal to an empty vector" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            empty, Approx(empty)
+          </Original>
+          <Expanded>
+            {  } is approx: {  }
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Vectors with elements" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Section name="A vector is approx equal to itself" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+            <Original>
+              v1, Approx(v1)
+            </Original>
+            <Expanded>
+              { 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 }
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Vectors with elements" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Section name="Different length" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+            <Original>
+              v1, !Approx(temp)
+            </Original>
+            <Expanded>
+              { 1.0, 2.0, 3.0 } not is approx: { 1.0, 2.0, 3.0, 4.0 }
+            </Expanded>
+          </Expression>
+          <OverallResults successes="1" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Vectors with elements" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Section name="Same length, different elements" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+            <Original>
+              v1, !Approx(v2)
+            </Original>
+            <Expanded>
+              { 1.0, 2.0, 3.0 } not is approx: { 1.5, 2.5, 3.5 }
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+            <Original>
+              v1, Approx(v2).margin(0.5)
+            </Original>
+            <Expanded>
+              { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+            <Original>
+              v1, Approx(v2).epsilon(0.5)
+            </Original>
+            <Expanded>
+              { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+            <Original>
+              v1, Approx(v2).epsilon(0.1).scale(500)
+            </Original>
+            <Expanded>
+              { 1.0, 2.0, 3.0 } is approx: { 1.5, 2.5, 3.5 }
+            </Expanded>
+          </Expression>
+          <OverallResults successes="4" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="4" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
+    <TestCase name="Vector Approx matcher -- failing" tags="[.][approx][failing][matchers][vector]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+      <Section name="Empty and non empty vectors are not approx equal" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            empty, Approx(t1)
+          </Original>
+          <Expanded>
+            {  } is approx: { 1.0, 2.0 }
+          </Expanded>
+        </Expression>
+        <OverallResults successes="0" failures="1" expectedFailures="0"/>
+      </Section>
+      <Section name="Just different vectors" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+        <Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
+          <Original>
+            v1, Approx(v2)
+          </Original>
+          <Expanded>
+            { 2.0, 4.0, 6.0 } is approx: { 1.0, 3.0, 5.0 }
+          </Expanded>
+        </Expression>
+        <OverallResults successes="0" failures="1" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="false"/>
+    </TestCase>
     <TestCase name="Vector matchers" tags="[matchers][vector]" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
       <Section name="Contains (element)" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
         <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
@@ -12208,6 +14141,74 @@ loose text artifact
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="parseEnums" tags="[Strings][enums]" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+      <Section name="No enums" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+        <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+          <Original>
+            parseEnums( "" ), Equals( std::vector&lt;Catch::StringRef>{} )
+          </Original>
+          <Expanded>
+            {  } Equals: {  }
+          </Expanded>
+        </Expression>
+        <OverallResults successes="1" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="One enum value" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+        <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+          <Original>
+            parseEnums( "ClassName::EnumName::Value1" ), Equals(std::vector&lt;Catch::StringRef>{"Value1"} )
+          </Original>
+          <Expanded>
+            { Value1 } Equals: { Value1 }
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+          <Original>
+            parseEnums( "Value1" ), Equals( std::vector&lt;Catch::StringRef>{"Value1"} )
+          </Original>
+          <Expanded>
+            { Value1 } Equals: { Value1 }
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+          <Original>
+            parseEnums( "EnumName::Value1" ), Equals(std::vector&lt;Catch::StringRef>{"Value1"} )
+          </Original>
+          <Expanded>
+            { Value1 } Equals: { Value1 }
+          </Expanded>
+        </Expression>
+        <OverallResults successes="3" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="Multiple enum values" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+        <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+          <Original>
+            parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2"} )
+          </Original>
+          <Expanded>
+            { Value1, Value2 } Equals: { Value1, Value2 }
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+          <Original>
+            parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2", "Value3"} )
+          </Original>
+          <Expanded>
+            { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/ToString.tests.cpp" >
+          <Original>
+            parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ), Equals( std::vector&lt;Catch::StringRef>{"Value1", "Value2", "Value3"} )
+          </Original>
+          <Expanded>
+            { Value1, Value2, Value3 } Equals: { Value1, Value2, Value3 }
+          </Expanded>
+        </Expression>
+        <OverallResults successes="3" failures="0" expectedFailures="0"/>
+      </Section>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="pointer to class" tags="[Tricky]" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
         <Original>
@@ -12324,17 +14325,17 @@ loose text artifact
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <TestCase name="replaceInPlace" tags="[StringManip][Strings]" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-      <Section name="replace single char" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+    <TestCase name="replaceInPlace" tags="[string-manip]" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+      <Section name="replace single char" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
-            Catch::replaceInPlace( letters, "b", "z" )
+            Catch::replaceInPlace(letters, "b", "z")
           </Original>
           <Expanded>
             true
           </Expanded>
         </Expression>
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
             letters == "azcdefcg"
           </Original>
@@ -12344,16 +14345,16 @@ loose text artifact
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
-      <Section name="replace two chars" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+      <Section name="replace two chars" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
-            Catch::replaceInPlace( letters, "c", "z" )
+            Catch::replaceInPlace(letters, "c", "z")
           </Original>
           <Expanded>
             true
           </Expanded>
         </Expression>
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
             letters == "abzdefzg"
           </Original>
@@ -12363,16 +14364,16 @@ loose text artifact
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
-      <Section name="replace first char" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+      <Section name="replace first char" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
-            Catch::replaceInPlace( letters, "a", "z" )
+            Catch::replaceInPlace(letters, "a", "z")
           </Original>
           <Expanded>
             true
           </Expanded>
         </Expression>
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
             letters == "zbcdefcg"
           </Original>
@@ -12382,16 +14383,16 @@ loose text artifact
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
-      <Section name="replace last char" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+      <Section name="replace last char" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
-            Catch::replaceInPlace( letters, "g", "z" )
+            Catch::replaceInPlace(letters, "g", "z")
           </Original>
           <Expanded>
             true
           </Expanded>
         </Expression>
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
             letters == "abcdefcz"
           </Original>
@@ -12401,16 +14402,16 @@ loose text artifact
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
-      <Section name="replace all chars" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+      <Section name="replace all chars" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
-            Catch::replaceInPlace( letters, letters, "replaced" )
+            Catch::replaceInPlace(letters, letters, "replaced")
           </Original>
           <Expanded>
             true
           </Expanded>
         </Expression>
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
             letters == "replaced"
           </Original>
@@ -12420,16 +14421,16 @@ loose text artifact
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
-      <Section name="replace no chars" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Expression success="true" type="CHECK_FALSE" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+      <Section name="replace no chars" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Expression success="true" type="CHECK_FALSE" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
-            !(Catch::replaceInPlace( letters, "x", "z" ))
+            !(Catch::replaceInPlace(letters, "x", "z"))
           </Original>
           <Expanded>
             !false
           </Expanded>
         </Expression>
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
             letters == letters
           </Original>
@@ -12439,16 +14440,16 @@ loose text artifact
         </Expression>
         <OverallResults successes="2" failures="0" expectedFailures="0"/>
       </Section>
-      <Section name="escape '" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+      <Section name="escape '" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
-            Catch::replaceInPlace( s, "'", "|'" )
+            Catch::replaceInPlace(s, "'", "|'")
           </Original>
           <Expanded>
             true
           </Expanded>
         </Expression>
-        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/String.tests.cpp" >
+        <Expression success="true" type="CHECK" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
           <Original>
             s == "didn|'t"
           </Original>
@@ -12505,6 +14506,33 @@ loose text artifact
       </Expression>
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="splitString" tags="[string-manip]" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+      <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          splitStringRef("", ','), Equals(std::vector&lt;StringRef>())
+        </Original>
+        <Expanded>
+          {  } Equals: {  }
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          splitStringRef("abc", ','), Equals(std::vector&lt;StringRef>{"abc"})
+        </Original>
+        <Expanded>
+          { abc } Equals: { abc }
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="CHECK_THAT" filename="projects/<exe-name>/IntrospectiveTests/StringManip.tests.cpp" >
+        <Original>
+          splitStringRef("abc,def", ','), Equals(std::vector&lt;StringRef>{"abc", "def"})
+        </Original>
+        <Expanded>
+          { abc, def } Equals: { abc, def }
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="stacks unscoped info in loops" tags="[.][failing][info][unscoped]" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
       <Info>
         Count 1 to 3...
@@ -13399,7 +15427,7 @@ loose text artifact
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <OverallResults successes="1276" failures="140" expectedFailures="21"/>
+    <OverallResults successes="1469" failures="149" expectedFailures="21"/>
   </Group>
-  <OverallResults successes="1276" failures="139" expectedFailures="21"/>
+  <OverallResults successes="1469" failures="148" expectedFailures="21"/>
 </Catch>
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp
index 9b5b0ed7c89985fd1aa3d44e6c9dc3f00dc55531..60eb97af9ae8701c52d23bab0bac6a298cf07ec2 100644
--- a/packages/Catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp
@@ -262,7 +262,24 @@ TEST_CASE( "Parse test names and tags" ) {
         CHECK( spec.matches( tcC ) == false );
         CHECK( spec.matches( tcD ) == true );
     }
+    SECTION( "Leading and trailing spaces in test spec" ) {
+        TestSpec spec = parseTestSpec( "\"  aardvark \"" );
+        CHECK( spec.matches( fakeTestCase( "  aardvark " ) ) );
+        CHECK( spec.matches( fakeTestCase( "  aardvark" ) ) );
+        CHECK( spec.matches( fakeTestCase( " aardvark " ) ) );
+        CHECK( spec.matches( fakeTestCase( "aardvark " ) ) );
+        CHECK( spec.matches( fakeTestCase( "aardvark" ) ) );
 
+    }
+    SECTION( "Leading and trailing spaces in test name" ) {
+        TestSpec spec = parseTestSpec( "aardvark" );
+        CHECK( spec.matches( fakeTestCase( "  aardvark " ) ) );
+        CHECK( spec.matches( fakeTestCase( "  aardvark" ) ) );
+        CHECK( spec.matches( fakeTestCase( " aardvark " ) ) );
+        CHECK( spec.matches( fakeTestCase( "aardvark " ) ) );
+        CHECK( spec.matches( fakeTestCase( "aardvark" ) ) );
+
+    }
 }
 
 TEST_CASE( "Process can be configured on command line", "[config][command-line]" ) {
@@ -462,4 +479,35 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]"
 #endif
         }
     }
+
+    SECTION("Benchmark options") {
+        SECTION("samples") {
+            CHECK(cli.parse({ "test", "--benchmark-samples=200" }));
+
+            REQUIRE(config.benchmarkSamples == 200);
+        }
+        
+        SECTION("resamples") {
+            CHECK(cli.parse({ "test", "--benchmark-resamples=20000" }));
+
+            REQUIRE(config.benchmarkResamples == 20000);
+        }
+
+        SECTION("resamples") {
+            CHECK(cli.parse({ "test", "--benchmark-confidence-interval=0.99" }));
+
+            REQUIRE(config.benchmarkConfidenceInterval == Catch::Detail::Approx(0.99));
+        }
+
+        SECTION("resamples") {
+            CHECK(cli.parse({ "test", "--benchmark-no-analysis" }));
+
+            REQUIRE(config.benchmarkNoAnalysis);
+        }
+    }
+}
+
+TEST_CASE("Test with special, characters \"in name", "[cli][regression]") {
+    // This test case succeeds if we can invoke it from the CLI
+    SUCCEED();
 }
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/Details.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/Details.tests.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..75054fb3b706c8acfd137b4e3a70a237b6b7efb1
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/Details.tests.cpp
@@ -0,0 +1,23 @@
+/*
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include "catch.hpp"
+
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4702) // unreachable code in the macro expansions
+#endif
+
+TEST_CASE("Check that our error handling macros throw the right exceptions", "[!throws][internals][approvals]") {
+    REQUIRE_THROWS_AS(CATCH_INTERNAL_ERROR(""), std::logic_error);
+    REQUIRE_THROWS_AS(CATCH_ERROR(""), std::domain_error);
+    REQUIRE_THROWS_AS(CATCH_RUNTIME_ERROR(""), std::runtime_error);
+    REQUIRE_THROWS_AS([](){CATCH_ENFORCE(false, "");}(), std::domain_error);
+    REQUIRE_NOTHROW([](){CATCH_ENFORCE(true, "");}());
+}
+
+#if defined(_MSC_VER)
+#pragma warning(pop) // unreachable code in the macro expansions
+#endif
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp
index dbc1d957855f3f1bdd293bd44a2efc98691c82a2..076c91a9b1cd9be77938ad392e6c2326d9b5e891 100644
--- a/packages/Catch2/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp
@@ -250,7 +250,7 @@ int const& TestGen::get() const {
 
 }
 
-TEST_CASE("GENERATE capture macros", "[generators][internals][.approvals]") {
+TEST_CASE("GENERATE capture macros", "[generators][internals][approvals]") {
     auto value = GENERATE(take(10, random(0, 10)));
 
     non_copyable nc; nc.value = value;
@@ -258,3 +258,28 @@ TEST_CASE("GENERATE capture macros", "[generators][internals][.approvals]") {
     auto value2 = GENERATE_REF(Catch::Generators::GeneratorWrapper<int>(std::unique_ptr<Catch::Generators::IGenerator<int>>(new TestGen(nc))));
     REQUIRE(value == value2);
 }
+
+TEST_CASE("Multiple random generators in one test case output different values", "[generators][internals][approvals]") {
+    SECTION("Integer") {
+        auto random1 = Catch::Generators::random(0, 1000);
+        auto random2 = Catch::Generators::random(0, 1000);
+        size_t same = 0;
+        for (size_t i = 0; i < 1000; ++i) {
+            same += random1.get() == random2.get();
+            random1.next(); random2.next();
+        }
+        // 0.5% seems like a sane bound for random identical elements within 1000 runs
+        REQUIRE(same < 5);
+    }
+    SECTION("Float") {
+        auto random1 = Catch::Generators::random(0., 1000.);
+        auto random2 = Catch::Generators::random(0., 1000.);
+        size_t same = 0;
+        for (size_t i = 0; i < 1000; ++i) {
+            same += random1.get() == random2.get();
+            random1.next(); random2.next();
+        }
+        // 0.5% seems like a sane bound for random identical elements within 1000 runs
+        REQUIRE(same < 5);
+    }
+}
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d17998d8707fff184e1066d6d4ca9c2b54e08414
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp
@@ -0,0 +1,405 @@
+/*
+ *  Created by Joachim on 16/04/2019.
+ *  Adapted from donated nonius code.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include "catch.hpp"
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+namespace {
+    struct manual_clock {
+    public:
+        using duration = std::chrono::nanoseconds;
+        using time_point = std::chrono::time_point<manual_clock, duration>;
+        using rep = duration::rep;
+        using period = duration::period;
+        enum { is_steady = true };
+
+        static time_point now() {
+            return time_point(duration(tick()));
+        }
+
+        static void advance(int ticks = 1) {
+            tick() += ticks;
+        }
+
+    private:
+        static rep& tick() {
+            static rep the_tick = 0;
+            return the_tick;
+        }
+    };
+
+    struct counting_clock {
+    public:
+        using duration = std::chrono::nanoseconds;
+        using time_point = std::chrono::time_point<counting_clock, duration>;
+        using rep = duration::rep;
+        using period = duration::period;
+        enum { is_steady = true };
+
+        static time_point now() {
+            static rep ticks = 0;
+            return time_point(duration(ticks += rate()));
+        }
+
+        static void set_rate(rep new_rate) { rate() = new_rate; }
+
+    private:
+        static rep& rate() {
+            static rep the_rate = 1;
+            return the_rate;
+        }
+    };
+
+    struct TestChronometerModel : Catch::Benchmark::Detail::ChronometerConcept {
+        int started = 0;
+        int finished = 0;
+
+        void start() override { ++started; }
+        void finish() override { ++finished; }
+    };
+} // namespace
+
+TEST_CASE("warmup", "[benchmark]") {
+    auto rate = 1000;
+    counting_clock::set_rate(rate);
+
+    auto start = counting_clock::now();
+    auto iterations = Catch::Benchmark::Detail::warmup<counting_clock>();
+    auto end = counting_clock::now();
+
+    REQUIRE((iterations * rate) > Catch::Benchmark::Detail::warmup_time.count());
+    REQUIRE((end - start) > Catch::Benchmark::Detail::warmup_time);
+}
+
+TEST_CASE("resolution", "[benchmark]") {
+    auto rate = 1000;
+    counting_clock::set_rate(rate);
+
+    size_t count = 10;
+    auto res = Catch::Benchmark::Detail::resolution<counting_clock>(static_cast<int>(count));
+
+    REQUIRE(res.size() == count);
+
+    for (size_t i = 1; i < count; ++i) {
+        REQUIRE(res[i] == rate);
+    }
+}
+
+TEST_CASE("estimate_clock_resolution", "[benchmark]") {
+    auto rate = 1000;
+    counting_clock::set_rate(rate);
+
+    int iters = 160000;
+    auto res = Catch::Benchmark::Detail::estimate_clock_resolution<counting_clock>(iters);
+
+    REQUIRE(res.mean.count() == rate);
+    REQUIRE(res.outliers.total() == 0);
+}
+
+TEST_CASE("benchmark function call", "[benchmark]") {
+    SECTION("without chronometer") {
+        auto called = 0;
+        auto model = TestChronometerModel{};
+        auto meter = Catch::Benchmark::Chronometer{ model, 1 };
+        auto fn = Catch::Benchmark::Detail::BenchmarkFunction{ [&] {
+                CHECK(model.started == 1);
+                CHECK(model.finished == 0);
+                ++called;
+            } };
+
+        fn(meter);
+
+        CHECK(model.started == 1);
+        CHECK(model.finished == 1);
+        CHECK(called == 1);
+    }
+
+    SECTION("with chronometer") {
+        auto called = 0;
+        auto model = TestChronometerModel{};
+        auto meter = Catch::Benchmark::Chronometer{ model, 1 };
+        auto fn = Catch::Benchmark::Detail::BenchmarkFunction{ [&](Catch::Benchmark::Chronometer) {
+                CHECK(model.started == 0);
+                CHECK(model.finished == 0);
+                ++called;
+            } };
+
+        fn(meter);
+
+        CHECK(model.started == 0);
+        CHECK(model.finished == 0);
+        CHECK(called == 1);
+    }
+}
+
+TEST_CASE("uniform samples", "[benchmark]") {
+    std::vector<double> samples(100);
+    std::fill(samples.begin(), samples.end(), 23);
+
+    using it = std::vector<double>::iterator;
+    auto e = Catch::Benchmark::Detail::bootstrap(0.95, samples.begin(), samples.end(), samples, [](it a, it b) {
+        auto sum = std::accumulate(a, b, 0.);
+        return sum / (b - a);
+    });
+    CHECK(e.point == 23);
+    CHECK(e.upper_bound == 23);
+    CHECK(e.lower_bound == 23);
+    CHECK(e.confidence_interval == 0.95);
+}
+
+
+TEST_CASE("normal_cdf", "[benchmark]") {
+    using Catch::Benchmark::Detail::normal_cdf;
+    CHECK(normal_cdf(0.000000) == Approx(0.50000000000000000));
+    CHECK(normal_cdf(1.000000) == Approx(0.84134474606854293));
+    CHECK(normal_cdf(-1.000000) == Approx(0.15865525393145705));
+    CHECK(normal_cdf(2.809729) == Approx(0.99752083845315409));
+    CHECK(normal_cdf(-1.352570) == Approx(0.08809652095066035));
+}
+
+TEST_CASE("erfc_inv", "[benchmark]") {
+    using Catch::Benchmark::Detail::erfc_inv;
+    CHECK(erfc_inv(1.103560) == Approx(-0.09203687623843015));
+    CHECK(erfc_inv(1.067400) == Approx(-0.05980291115763361));
+    CHECK(erfc_inv(0.050000) == Approx(1.38590382434967796));
+}
+
+TEST_CASE("normal_quantile", "[benchmark]") {
+    using Catch::Benchmark::Detail::normal_quantile;
+    CHECK(normal_quantile(0.551780) == Approx(0.13015979861484198));
+    CHECK(normal_quantile(0.533700) == Approx(0.08457408802851875));
+    CHECK(normal_quantile(0.025000) == Approx(-1.95996398454005449));
+}
+
+
+TEST_CASE("mean", "[benchmark]") {
+    std::vector<double> x{ 10., 20., 14., 16., 30., 24. };
+
+    auto m = Catch::Benchmark::Detail::mean(x.begin(), x.end());
+
+    REQUIRE(m == 19.);
+}
+
+TEST_CASE("weighted_average_quantile", "[benchmark]") {
+    std::vector<double> x{ 10., 20., 14., 16., 30., 24. };
+
+    auto q1 = Catch::Benchmark::Detail::weighted_average_quantile(1, 4, x.begin(), x.end());
+    auto med = Catch::Benchmark::Detail::weighted_average_quantile(1, 2, x.begin(), x.end());
+    auto q3 = Catch::Benchmark::Detail::weighted_average_quantile(3, 4, x.begin(), x.end());
+
+    REQUIRE(q1 == 14.5);
+    REQUIRE(med == 18.);
+    REQUIRE(q3 == 23.);
+}
+
+TEST_CASE("classify_outliers", "[benchmark]") {
+    auto require_outliers = [](Catch::Benchmark::OutlierClassification o, int los, int lom, int him, int his) {
+        REQUIRE(o.low_severe == los);
+        REQUIRE(o.low_mild == lom);
+        REQUIRE(o.high_mild == him);
+        REQUIRE(o.high_severe == his);
+        REQUIRE(o.total() == los + lom + him + his);
+    };
+
+    SECTION("none") {
+        std::vector<double> x{ 10., 20., 14., 16., 30., 24. };
+
+        auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end());
+
+        REQUIRE(o.samples_seen == static_cast<int>(x.size()));
+        require_outliers(o, 0, 0, 0, 0);
+    }
+    SECTION("low severe") {
+        std::vector<double> x{ -12., 20., 14., 16., 30., 24. };
+
+        auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end());
+
+        REQUIRE(o.samples_seen == static_cast<int>(x.size()));
+        require_outliers(o, 1, 0, 0, 0);
+    }
+    SECTION("low mild") {
+        std::vector<double> x{ 1., 20., 14., 16., 30., 24. };
+
+        auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end());
+
+        REQUIRE(o.samples_seen == static_cast<int>(x.size()));
+        require_outliers(o, 0, 1, 0, 0);
+    }
+    SECTION("high mild") {
+        std::vector<double> x{ 10., 20., 14., 16., 36., 24. };
+
+        auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end());
+
+        REQUIRE(o.samples_seen == static_cast<int>(x.size()));
+        require_outliers(o, 0, 0, 1, 0);
+    }
+    SECTION("high severe") {
+        std::vector<double> x{ 10., 20., 14., 16., 49., 24. };
+
+        auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end());
+
+        REQUIRE(o.samples_seen == static_cast<int>(x.size()));
+        require_outliers(o, 0, 0, 0, 1);
+    }
+    SECTION("mixed") {
+        std::vector<double> x{ -20., 20., 14., 16., 39., 24. };
+
+        auto o = Catch::Benchmark::Detail::classify_outliers(x.begin(), x.end());
+
+        REQUIRE(o.samples_seen == static_cast<int>(x.size()));
+        require_outliers(o, 1, 0, 1, 0);
+    }
+}
+
+TEST_CASE("analyse", "[benchmark]") {
+    Catch::ConfigData data{};
+    data.benchmarkConfidenceInterval = 0.95;
+    data.benchmarkNoAnalysis = false;
+    data.benchmarkResamples = 1000;
+    data.benchmarkSamples = 99;
+    Catch::Config config{data};
+
+    using Duration = Catch::Benchmark::FloatDuration<Catch::Benchmark::default_clock>;
+
+    Catch::Benchmark::Environment<Duration> env;
+    std::vector<Duration> samples(99);
+    for (size_t i = 0; i < samples.size(); ++i) {
+        samples[i] = Duration(23 + (i % 3 - 1));
+    }
+
+    auto analysis = Catch::Benchmark::Detail::analyse(config, env, samples.begin(), samples.end());
+    CHECK(analysis.mean.point.count() == 23);
+    CHECK(analysis.mean.lower_bound.count() < 23);
+    CHECK(analysis.mean.lower_bound.count() > 22);
+    CHECK(analysis.mean.upper_bound.count() > 23);
+    CHECK(analysis.mean.upper_bound.count() < 24);
+
+    CHECK(analysis.standard_deviation.point.count() > 0.5);
+    CHECK(analysis.standard_deviation.point.count() < 1);
+    CHECK(analysis.standard_deviation.lower_bound.count() > 0.5);
+    CHECK(analysis.standard_deviation.lower_bound.count() < 1);
+    CHECK(analysis.standard_deviation.upper_bound.count() > 0.5);
+    CHECK(analysis.standard_deviation.upper_bound.count() < 1);
+
+    CHECK(analysis.outliers.total() == 0);
+    CHECK(analysis.outliers.low_mild == 0);
+    CHECK(analysis.outliers.low_severe == 0);
+    CHECK(analysis.outliers.high_mild == 0);
+    CHECK(analysis.outliers.high_severe == 0);
+    CHECK(analysis.outliers.samples_seen == samples.size());
+
+    CHECK(analysis.outlier_variance < 0.5);
+    CHECK(analysis.outlier_variance > 0);
+}
+
+TEST_CASE("analyse no analysis", "[benchmark]") {
+    Catch::ConfigData data{};
+    data.benchmarkConfidenceInterval = 0.95;
+    data.benchmarkNoAnalysis = true;
+    data.benchmarkResamples = 1000;
+    data.benchmarkSamples = 99;
+    Catch::Config config{ data };
+
+    using Duration = Catch::Benchmark::FloatDuration<Catch::Benchmark::default_clock>;
+
+    Catch::Benchmark::Environment<Duration> env;
+    std::vector<Duration> samples(99);
+    for (size_t i = 0; i < samples.size(); ++i) {
+        samples[i] = Duration(23 + (i % 3 - 1));
+    }
+
+    auto analysis = Catch::Benchmark::Detail::analyse(config, env, samples.begin(), samples.end());
+    CHECK(analysis.mean.point.count() == 23);
+    CHECK(analysis.mean.lower_bound.count() == 23);
+    CHECK(analysis.mean.upper_bound.count() == 23);
+
+    CHECK(analysis.standard_deviation.point.count() == 0);
+    CHECK(analysis.standard_deviation.lower_bound.count() == 0);
+    CHECK(analysis.standard_deviation.upper_bound.count() == 0);
+
+    CHECK(analysis.outliers.total() == 0);
+    CHECK(analysis.outliers.low_mild == 0);
+    CHECK(analysis.outliers.low_severe == 0);
+    CHECK(analysis.outliers.high_mild == 0);
+    CHECK(analysis.outliers.high_severe == 0);
+    CHECK(analysis.outliers.samples_seen == 0);
+
+    CHECK(analysis.outlier_variance == 0);
+}
+
+TEST_CASE("run_for_at_least, int", "[benchmark]") {
+    manual_clock::duration time(100);
+
+    int old_x = 1;
+    auto Timing = Catch::Benchmark::Detail::run_for_at_least<manual_clock>(time, 1, [&old_x](int x) -> int {
+        CHECK(x >= old_x);
+        manual_clock::advance(x);
+        old_x = x;
+        return x + 17;
+    });
+
+    REQUIRE(Timing.elapsed >= time);
+    REQUIRE(Timing.result == Timing.iterations + 17);
+    REQUIRE(Timing.iterations >= time.count());
+}
+
+TEST_CASE("run_for_at_least, chronometer", "[benchmark]") {
+    manual_clock::duration time(100);
+
+    int old_runs = 1;
+    auto Timing = Catch::Benchmark::Detail::run_for_at_least<manual_clock>(time, 1, [&old_runs](Catch::Benchmark::Chronometer meter) -> int {
+        CHECK(meter.runs() >= old_runs);
+        manual_clock::advance(100);
+        meter.measure([] {
+            manual_clock::advance(1);
+        });
+        old_runs = meter.runs();
+        return meter.runs() + 17;
+    });
+
+    REQUIRE(Timing.elapsed >= time);
+    REQUIRE(Timing.result == Timing.iterations + 17);
+    REQUIRE(Timing.iterations >= time.count());
+}
+
+
+TEST_CASE("measure", "[benchmark]") {
+    auto r = Catch::Benchmark::Detail::measure<manual_clock>([](int x) -> int {
+        CHECK(x == 17);
+        manual_clock::advance(42);
+        return 23;
+    }, 17);
+    auto s = Catch::Benchmark::Detail::measure<manual_clock>([](int x) -> int {
+        CHECK(x == 23);
+        manual_clock::advance(69);
+        return 17;
+    }, 23);
+
+    CHECK(r.elapsed.count() == 42);
+    CHECK(r.result == 23);
+    CHECK(r.iterations == 1);
+
+    CHECK(s.elapsed.count() == 69);
+    CHECK(s.result == 17);
+    CHECK(s.iterations == 1);
+}
+
+TEST_CASE("run benchmark", "[benchmark]") {
+    counting_clock::set_rate(1000);
+    auto start = counting_clock::now();
+    
+    Catch::Benchmark::Benchmark bench{ "Test Benchmark", [](Catch::Benchmark::Chronometer meter) {
+        counting_clock::set_rate(100000);
+        meter.measure([] { return counting_clock::now(); });
+    } };
+
+    bench.run<counting_clock>();
+    auto end = counting_clock::now();
+
+    CHECK((end - start).count() == 2867251000);
+}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp
index 9372b1c3b18b6ad708dd779593283f0541164ef8..837d3661b1be400ff7342ffd188e40e83058c968 100644
--- a/packages/Catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp
@@ -8,21 +8,6 @@
 #include "internal/catch_suppress_warnings.h"
 #include "internal/catch_test_case_tracker.h"
 
-
-namespace Catch
-{
-    class LocalContext {
-
-    public:
-        TrackerContext& operator()() const {
-            return TrackerContext::instance();
-        }
-    };
-
-} // namespace Catch
-
-// -------------------
-
 #include "catch.hpp"
 
 using namespace Catch;
@@ -204,3 +189,18 @@ TEST_CASE( "#1394 nested", "[.][approvals][tracker]" ) {
         REQUIRE(1 == 0);
     }
 }
+
+// Selecting a "not last" section inside a test case via -c "section" would
+// previously only run the first subsection, instead of running all of them.
+// This allows us to check that `"#1670 regression check" -c A` leads to
+// 2 successful assertions.
+TEST_CASE("#1670 regression check", "[.approvals][tracker]") {
+    SECTION("A") {
+        SECTION("1") SUCCEED();
+        SECTION("2") SUCCEED();
+    }
+    SECTION("B") {
+        SECTION("1") SUCCEED();
+        SECTION("2") SUCCEED();
+    }
+}
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f8085dbf28aae3d1b5e07647b5942b0ff5f9243b
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp
@@ -0,0 +1,45 @@
+/*
+ *  Created by Martin on 06/10/2019.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include "catch.hpp"
+
+#include "internal/catch_random_number_generator.h"
+
+TEST_CASE("Our PCG implementation provides expected results for known seeds", "[rng]") {
+    Catch::SimplePcg32 rng;
+    SECTION("Default seeded") {
+        REQUIRE(rng() == 0xfcdb943b);
+        REQUIRE(rng() == 0x6f55b921);
+        REQUIRE(rng() == 0x4c17a916);
+        REQUIRE(rng() == 0x71eae25f);
+        REQUIRE(rng() == 0x6ce7909c);
+    }
+    SECTION("Specific seed") {
+        rng.seed(0xabcd1234);
+        REQUIRE(rng() == 0x57c08495);
+        REQUIRE(rng() == 0x33c956ac);
+        REQUIRE(rng() == 0x2206fd76);
+        REQUIRE(rng() == 0x3501a35b);
+        REQUIRE(rng() == 0xfdffb30f);
+
+        // Also check repeated output after reseeding
+        rng.seed(0xabcd1234);
+        REQUIRE(rng() == 0x57c08495);
+        REQUIRE(rng() == 0x33c956ac);
+        REQUIRE(rng() == 0x2206fd76);
+        REQUIRE(rng() == 0x3501a35b);
+        REQUIRE(rng() == 0xfdffb30f);
+    }
+}
+
+TEST_CASE("Comparison ops", "[rng]") {
+    using Catch::SimplePcg32;
+    REQUIRE(SimplePcg32{} == SimplePcg32{});
+    REQUIRE(SimplePcg32{ 0 } != SimplePcg32{});
+    REQUIRE_FALSE(SimplePcg32{ 1 } == SimplePcg32{ 2 });
+    REQUIRE_FALSE(SimplePcg32{ 1 } != SimplePcg32{ 1 });
+}
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/String.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/String.tests.cpp
index ae21bb3ce8274321a1112e0f54d505be483b3e53..456dd4a7d17ec12d52591b3e979225e8d0aea9d1 100644
--- a/packages/Catch2/projects/SelfTest/IntrospectiveTests/String.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/String.tests.cpp
@@ -65,7 +65,6 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
 
         original.c_str(); // Forces it to take ownership
 
-        REQUIRE( isSubstring( original ) == false );
         REQUIRE( isOwned( original ) );
     }
 
@@ -88,10 +87,14 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
             REQUIRE( rawChars == s.currentData() ); // same pointer value
             REQUIRE( ss.c_str() != rawChars );
 
-            REQUIRE( isSubstring( ss ) == false );
             REQUIRE( isOwned( ss ) );
 
-            REQUIRE( ss.currentData() != s.currentData() ); // different pointer value
+            SECTION( "Self-assignment after substring" ) {
+                ss = *&ss; // the *& are there to suppress warnings (see: "Improvements to Clang's diagnostics" in https://rev.ng/gitlab/revng-bar-2019/clang/raw/master/docs/ReleaseNotes.rst)
+                REQUIRE( isOwned(ss) == false );
+                REQUIRE( ss == "hello" );
+                REQUIRE( rawChars == ss.currentData() ); // same pointer value
+            }
         }
 
         SECTION( "non-zero-based substring") {
@@ -108,6 +111,10 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
         SECTION( "Pointer values of substring refs should not match" ) {
             REQUIRE( s.c_str() != ss.c_str() );
         }
+
+        SECTION("Past the end substring") {
+            REQUIRE(s.substr(s.size() + 1, 123).empty());
+        }
     }
 
     SECTION( "Comparisons" ) {
@@ -139,11 +146,6 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
     SECTION( "to std::string" ) {
         StringRef sr = "a stringref";
 
-        SECTION( "implicitly constructed" ) {
-            std::string stdStr = sr;
-            REQUIRE( stdStr == "a stringref" );
-            REQUIRE( stdStr.size() == sr.size() );
-        }
         SECTION( "explicitly constructed" ) {
             std::string stdStr( sr );
             REQUIRE( stdStr == "a stringref" );
@@ -151,54 +153,9 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
         }
         SECTION( "assigned" ) {
             std::string stdStr;
-            stdStr = sr;
+            stdStr = static_cast<std::string>(sr);
             REQUIRE( stdStr == "a stringref" );
             REQUIRE( stdStr.size() == sr.size() );
         }
     }
-
-    SECTION( "Counting utf-8 codepoints" ) {
-        StringRef ascii = "just a plain old boring ascii string...";
-        REQUIRE(ascii.numberOfCharacters() == ascii.size());
-
-        StringRef simpleu8 = u8"Trocha čeőtiny nikoho nezabila";
-        REQUIRE(simpleu8.numberOfCharacters() == 30);
-
-        StringRef emojis = u8"Here be πŸ‘Ύ";
-        REQUIRE(emojis.numberOfCharacters() == 9);
-    }
-
-}
-
-TEST_CASE( "replaceInPlace", "[Strings][StringManip]" ) {
-    std::string letters = "abcdefcg";
-    SECTION( "replace single char" ) {
-        CHECK( Catch::replaceInPlace( letters, "b", "z" ) );
-        CHECK( letters == "azcdefcg" );
-    }
-    SECTION( "replace two chars" ) {
-        CHECK( Catch::replaceInPlace( letters, "c", "z" ) );
-        CHECK( letters == "abzdefzg" );
-    }
-    SECTION( "replace first char" ) {
-        CHECK( Catch::replaceInPlace( letters, "a", "z" ) );
-        CHECK( letters == "zbcdefcg" );
-    }
-    SECTION( "replace last char" ) {
-        CHECK( Catch::replaceInPlace( letters, "g", "z" ) );
-        CHECK( letters == "abcdefcz" );
-    }
-    SECTION( "replace all chars" ) {
-        CHECK( Catch::replaceInPlace( letters, letters, "replaced" ) );
-        CHECK( letters == "replaced" );
-    }
-    SECTION( "replace no chars" ) {
-        CHECK_FALSE( Catch::replaceInPlace( letters, "x", "z" ) );
-        CHECK( letters == letters );
-    }
-    SECTION( "escape '" ) {
-        std::string s = "didn't";
-        CHECK( Catch::replaceInPlace( s, "'", "|'" ) );
-        CHECK( s == "didn|'t" );
-    }
 }
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/StringManip.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/StringManip.tests.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b817f372960946df8284d05bb74753d2c94c6dd5
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/StringManip.tests.cpp
@@ -0,0 +1,67 @@
+#include "internal/catch_string_manip.h"
+
+#include "catch.hpp"
+
+static const char * const no_whitespace = "There is no extra whitespace here";
+static const char * const leading_whitespace = " \r \t\n There is no extra whitespace here";
+static const char * const trailing_whitespace = "There is no extra whitespace here \t \n \r ";
+static const char * const whitespace_at_both_ends = " \r\n \t There is no extra whitespace here  \t\t\t \n";
+
+TEST_CASE("Trim strings", "[string-manip]") {
+    using Catch::trim; using Catch::StringRef;
+    static_assert(std::is_same<std::string, decltype(trim(std::string{}))>::value, "Trimming std::string should return std::string");
+    static_assert(std::is_same<StringRef, decltype(trim(StringRef{}))>::value, "Trimming StringRef should return StringRef");
+
+    REQUIRE(trim(std::string(no_whitespace)) == no_whitespace);
+    REQUIRE(trim(std::string(leading_whitespace)) == no_whitespace);
+    REQUIRE(trim(std::string(trailing_whitespace)) == no_whitespace);
+    REQUIRE(trim(std::string(whitespace_at_both_ends)) == no_whitespace);
+
+    REQUIRE(trim(StringRef(no_whitespace)) == StringRef(no_whitespace));
+    REQUIRE(trim(StringRef(leading_whitespace)) == StringRef(no_whitespace));
+    REQUIRE(trim(StringRef(trailing_whitespace)) == StringRef(no_whitespace));
+    REQUIRE(trim(StringRef(whitespace_at_both_ends)) == StringRef(no_whitespace));
+}
+
+TEST_CASE("replaceInPlace", "[string-manip]") {
+    std::string letters = "abcdefcg";
+    SECTION("replace single char") {
+        CHECK(Catch::replaceInPlace(letters, "b", "z"));
+        CHECK(letters == "azcdefcg");
+    }
+    SECTION("replace two chars") {
+        CHECK(Catch::replaceInPlace(letters, "c", "z"));
+        CHECK(letters == "abzdefzg");
+    }
+    SECTION("replace first char") {
+        CHECK(Catch::replaceInPlace(letters, "a", "z"));
+        CHECK(letters == "zbcdefcg");
+    }
+    SECTION("replace last char") {
+        CHECK(Catch::replaceInPlace(letters, "g", "z"));
+        CHECK(letters == "abcdefcz");
+    }
+    SECTION("replace all chars") {
+        CHECK(Catch::replaceInPlace(letters, letters, "replaced"));
+        CHECK(letters == "replaced");
+    }
+    SECTION("replace no chars") {
+        CHECK_FALSE(Catch::replaceInPlace(letters, "x", "z"));
+        CHECK(letters == letters);
+    }
+    SECTION("escape '") {
+        std::string s = "didn't";
+        CHECK(Catch::replaceInPlace(s, "'", "|'"));
+        CHECK(s == "didn|'t");
+    }
+}
+
+TEST_CASE("splitString", "[string-manip]") {
+    using namespace Catch::Matchers;
+    using Catch::splitStringRef;
+    using Catch::StringRef;
+
+    CHECK_THAT(splitStringRef("", ','), Equals(std::vector<StringRef>()));
+    CHECK_THAT(splitStringRef("abc", ','), Equals(std::vector<StringRef>{"abc"}));
+    CHECK_THAT(splitStringRef("abc,def", ','), Equals(std::vector<StringRef>{"abc", "def"}));
+}
diff --git a/packages/Catch2/projects/SelfTest/IntrospectiveTests/ToString.tests.cpp b/packages/Catch2/projects/SelfTest/IntrospectiveTests/ToString.tests.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..caa924f5281f86d941a38c2d2be2d5806f7d93be
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/IntrospectiveTests/ToString.tests.cpp
@@ -0,0 +1,42 @@
+#include "catch.hpp"
+
+#include "internal/catch_enum_values_registry.h"
+
+enum class EnumClass3 { Value1, Value2, Value3, Value4 };
+
+
+TEST_CASE( "parseEnums", "[Strings][enums]" ) {
+    using namespace Catch::Matchers;
+    using Catch::Detail::parseEnums;
+
+    SECTION( "No enums" )
+        CHECK_THAT( parseEnums( "" ), Equals( std::vector<Catch::StringRef>{} ) );
+
+    SECTION( "One enum value" ) {
+        CHECK_THAT( parseEnums( "ClassName::EnumName::Value1" ),
+                Equals(std::vector<Catch::StringRef>{"Value1"} ) );
+        CHECK_THAT( parseEnums( "Value1" ),
+                Equals( std::vector<Catch::StringRef>{"Value1"} ) );
+        CHECK_THAT( parseEnums( "EnumName::Value1" ),
+                Equals(std::vector<Catch::StringRef>{"Value1"} ) );
+    }
+
+    SECTION( "Multiple enum values" ) {
+        CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2" ),
+                    Equals( std::vector<Catch::StringRef>{"Value1", "Value2"} ) );
+        CHECK_THAT( parseEnums( "ClassName::EnumName::Value1, ClassName::EnumName::Value2, ClassName::EnumName::Value3" ),
+                    Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) );
+        CHECK_THAT( parseEnums( "ClassName::EnumName::Value1,ClassName::EnumName::Value2 , ClassName::EnumName::Value3" ),
+                    Equals( std::vector<Catch::StringRef>{"Value1", "Value2", "Value3"} ) );
+    }
+}
+
+TEST_CASE( "Directly creating an EnumInfo" ) {
+
+    using namespace Catch::Detail;
+    std::unique_ptr<EnumInfo> enumInfo = makeEnumInfo( "EnumName", "EnumName::Value1, EnumName::Value2", {0, 1} );
+
+    CHECK( enumInfo->lookup(0) == "Value1" );
+    CHECK( enumInfo->lookup(1) == "Value2" );
+    CHECK( enumInfo->lookup(3) == "{** unexpected enum value **}" );
+}
diff --git a/packages/Catch2/projects/SelfTest/Misc/invalid-test-names.input b/packages/Catch2/projects/SelfTest/Misc/invalid-test-names.input
new file mode 100644
index 0000000000000000000000000000000000000000..e2bc88ece12ff0f60015fcf19a8ec697b71f3236
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/Misc/invalid-test-names.input
@@ -0,0 +1 @@
+Test with special, characters in \" name
diff --git a/packages/Catch2/projects/SelfTest/Misc/plain-old-tests.input b/packages/Catch2/projects/SelfTest/Misc/plain-old-tests.input
new file mode 100644
index 0000000000000000000000000000000000000000..ae6d9f1b7f7479b60a5b41471dc68b80ea03b596
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/Misc/plain-old-tests.input
@@ -0,0 +1,2 @@
+random SECTION tests
+nested SECTION tests
diff --git a/packages/Catch2/projects/SelfTest/Misc/special-characters-in-file.input b/packages/Catch2/projects/SelfTest/Misc/special-characters-in-file.input
new file mode 100644
index 0000000000000000000000000000000000000000..b68a6bfda0619ed2928c78b5febdb151e0e5e318
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/Misc/special-characters-in-file.input
@@ -0,0 +1 @@
+Test with special\, characters \"in name
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Approx.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Approx.tests.cpp
index b95394a06b065c640a6e624373a9bea59d4f10df..4029223a2bdb44307fab44ee6478b7be62281af7 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Approx.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Approx.tests.cpp
@@ -61,8 +61,6 @@ TEST_CASE( "Some simple comparisons between doubles", "[Approx]" ) {
     REQUIRE( Approx( d ) == 1.23 );
     REQUIRE( Approx( d ) != 1.22 );
     REQUIRE( Approx( d ) != 1.24 );
-
-    REQUIRE(INFINITY == Approx(INFINITY));
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -183,8 +181,11 @@ TEST_CASE("Epsilon only applies to Approx's value", "[Approx]") {
     REQUIRE(101.01 != Approx(100).epsilon(0.01));
 }
 
-TEST_CASE("Assorted miscellaneous tests", "[Approx]") {
+TEST_CASE("Assorted miscellaneous tests", "[Approx][approvals]") {
     REQUIRE(INFINITY == Approx(INFINITY));
+    REQUIRE(-INFINITY != Approx(INFINITY));
+    REQUIRE(1 != Approx(INFINITY));
+    REQUIRE(INFINITY != Approx(1));
     REQUIRE(NAN != Approx(NAN));
     REQUIRE_FALSE(NAN == Approx(NAN));
 }
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Benchmark.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Benchmark.tests.cpp
index ddf6950457d1ca86d4fb8de7692f099a0f5acf9e..24fda0133b45281abb8d2dad34465e6ceb337d41 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Benchmark.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Benchmark.tests.cpp
@@ -2,42 +2,129 @@
 
 #include <map>
 
-TEST_CASE( "benchmarked", "[!benchmark]" ) {
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+namespace {
+    std::uint64_t Fibonacci(std::uint64_t number) {
+        return number < 2 ? 1 : Fibonacci(number - 1) + Fibonacci(number - 2);
+    }
+}
+
+TEST_CASE("Benchmark Fibonacci", "[!benchmark]") {
+    CHECK(Fibonacci(0) == 1);
+    // some more asserts..
+    CHECK(Fibonacci(5) == 8);
+    // some more asserts..
+
+    BENCHMARK("Fibonacci 20") {
+        return Fibonacci(20);
+    };
+
+    BENCHMARK("Fibonacci 25") {
+        return Fibonacci(25);
+    };
 
+    BENCHMARK("Fibonacci 30") {
+        return Fibonacci(30);
+    };
+
+    BENCHMARK("Fibonacci 35") {
+        return Fibonacci(35);
+    };
+}
+
+TEST_CASE("Benchmark containers", "[!benchmark]") {
     static const int size = 100;
 
     std::vector<int> v;
     std::map<int, int> m;
 
-    BENCHMARK( "Load up a vector" ) {
-        v = std::vector<int>();
-        for(int i =0; i < size; ++i )
-            v.push_back( i );
-    }
-    REQUIRE( v.size() == size );
+    SECTION("without generator") {
+        BENCHMARK("Load up a vector") {
+            v = std::vector<int>();
+            for (int i = 0; i < size; ++i)
+                v.push_back(i);
+        };
+        REQUIRE(v.size() == size);
 
-    BENCHMARK( "Load up a map" ) {
-        m = std::map<int, int>();
-        for(int i =0; i < size; ++i )
-            m.insert( { i, i+1 } );
-    }
-    REQUIRE( m.size() == size );
+        // test optimizer control
+        BENCHMARK("Add up a vector's content") {
+            uint64_t add = 0;
+            for (int i = 0; i < size; ++i)
+                add += v[i];
+            return add;
+        };
+
+        BENCHMARK("Load up a map") {
+            m = std::map<int, int>();
+            for (int i = 0; i < size; ++i)
+                m.insert({ i, i + 1 });
+        };
+        REQUIRE(m.size() == size);
+
+        BENCHMARK("Reserved vector") {
+            v = std::vector<int>();
+            v.reserve(size);
+            for (int i = 0; i < size; ++i)
+                v.push_back(i);
+        };
+        REQUIRE(v.size() == size);
+
+        BENCHMARK("Resized vector") {
+            v = std::vector<int>();
+            v.resize(size);
+            for (int i = 0; i < size; ++i)
+                v[i] = i;
+        };
+        REQUIRE(v.size() == size);
+
+        int array[size];
+        BENCHMARK("A fixed size array that should require no allocations") {
+            for (int i = 0; i < size; ++i)
+                array[i] = i;
+        };
+        int sum = 0;
+        for (int i = 0; i < size; ++i)
+            sum += array[i];
+        REQUIRE(sum > size);
+
+        SECTION("XYZ") {
+
+            BENCHMARK_ADVANCED("Load up vector with chronometer")(Catch::Benchmark::Chronometer meter) {
+                std::vector<int> k;
+                meter.measure([&](int idx) {
+                    k = std::vector<int>();
+                    for (int i = 0; i < size; ++i)
+                        k.push_back(idx);
+                });
+                REQUIRE(k.size() == size);
+            };
+
+            int runs = 0;
+            BENCHMARK("Fill vector indexed", benchmarkIndex) {
+                v = std::vector<int>();
+                v.resize(size);
+                for (int i = 0; i < size; ++i)
+                    v[i] = benchmarkIndex;
+                runs = benchmarkIndex;
+            };
 
-    BENCHMARK( "Reserved vector" ) {
-        v = std::vector<int>();
-        v.reserve(size);
-        for(int i =0; i < size; ++i )
-            v.push_back( i );
+            for (size_t i = 0; i < v.size(); ++i) {
+                REQUIRE(v[i] == runs);
+            }
+        }
     }
-    REQUIRE( v.size() == size );
 
-    int array[size];
-    BENCHMARK( "A fixed size array that should require no allocations" ) {
-        for(int i =0; i < size; ++i )
-            array[i] = i;
+    SECTION("with generator") {
+        auto generated = GENERATE(range(0, 10));
+        BENCHMARK("Fill vector generated") {
+            v = std::vector<int>();
+            v.resize(size);
+            for (int i = 0; i < size; ++i)
+                v[i] = generated;
+        };
+        for (size_t i = 0; i < v.size(); ++i) {
+            REQUIRE(v[i] == generated);
+        }
     }
-    int sum = 0;
-    for(int i =0; i < size; ++i )
-        sum += array[i];
-    REQUIRE( sum > size );
 }
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Class.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Class.tests.cpp
index 3bde1d82ab66e18a5825270e24e105df558210d3..f658fc19911c092e04e71f6fce2d62174eee77aa 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Class.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Class.tests.cpp
@@ -7,6 +7,7 @@
  */
 
 #include "catch.hpp"
+#include <array>
 
 namespace{ namespace ClassTests {
 
@@ -58,6 +59,15 @@ struct Template_Foo {
     size_t size() { return 0; }
 };
 
+template< typename T, size_t V>
+struct Template_Foo_2 {
+    size_t size() { return V; }
+};
+
+template <int V>
+struct Nttp_Fixture{
+    int value = V;
+};
 #endif
 
 
@@ -74,11 +84,26 @@ TEMPLATE_TEST_CASE_METHOD(Template_Fixture, "A TEMPLATE_TEST_CASE_METHOD based t
     REQUIRE( Template_Fixture<TestType>::m_a == 1 );
 }
 
+TEMPLATE_TEST_CASE_METHOD_SIG(Nttp_Fixture, "A TEMPLATE_TEST_CASE_METHOD_SIG based test run that succeeds", "[class][template][nttp]",((int V), V), 1, 3, 6) {
+    REQUIRE(Nttp_Fixture<V>::value > 0);
+}
+
 TEMPLATE_PRODUCT_TEST_CASE_METHOD(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that succeeds","[class][template][product]",(std::vector,Template_Foo),(int,float))
 {
     REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 0 );
 }
 
+TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that succeeds", "[class][template][product][nttp]", ((typename T, size_t S), T, S),(std::array, Template_Foo_2), ((int,2), (float,6)))
+{
+    REQUIRE(Template_Fixture_2<TestType>{}.m_a.size() >= 2);
+}
+
+using MyTypes = std::tuple<int, char, double>;
+TEMPLATE_LIST_TEST_CASE_METHOD(Template_Fixture, "Template test case method with test types specified inside std::tuple", "[class][template][list]", MyTypes)
+{
+    REQUIRE( Template_Fixture<TestType>::m_a == 1 );
+}
+
 // We should be able to write our tests within a different namespace
 namespace Inner
 {
@@ -92,10 +117,19 @@ namespace Inner
         REQUIRE( Template_Fixture<TestType>::m_a == 2 );
     }
 
+    TEMPLATE_TEST_CASE_METHOD_SIG(Nttp_Fixture, "A TEMPLATE_TEST_CASE_METHOD_SIG based test run that fails", "[.][class][template][nttp][failing]", ((int V), V), 1, 3, 6) {
+        REQUIRE(Nttp_Fixture<V>::value == 0);
+    }
+
     TEMPLATE_PRODUCT_TEST_CASE_METHOD(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD based test run that fails","[.][class][template][product][failing]",(std::vector,Template_Foo),(int,float))
     {
         REQUIRE( Template_Fixture_2<TestType>::m_a.size() == 1 );
     }
+
+    TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG(Template_Fixture_2, "A TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG based test run that fails", "[.][class][template][product][nttp][failing]", ((typename T, size_t S), T, S), (std::array, Template_Foo_2), ((int, 2), (float, 6)))
+    {
+        REQUIRE(Template_Fixture_2<TestType>{}.m_a.size() < 2);
+    }
 }
 
 
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp
index 7f2ad8bc9cdc7d87d0ae8e47ccb32dbb3979747a..11d136a469bd84cccc1e2cecc0028568bccba706 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp
@@ -194,6 +194,31 @@ namespace { namespace CompilationTests {
         REQUIRE(std::is_same<TypeList<int>, TypeList<int>>::value);
     }
 
-}} // namespace CompilationTests
+    // #925
+    using signal_t = void (*) (void*);
+
+    struct TestClass {
+        signal_t testMethod_uponComplete_arg = nullptr;
+    };
 
+    namespace utility {
+        inline static void synchronizing_callback( void * ) { }
+    }
+
+    TEST_CASE("#925: comparing function pointer to function address failed to compile", "[!nonportable]" ) {
+        TestClass test;
+        REQUIRE(utility::synchronizing_callback != test.testMethod_uponComplete_arg);
+    }
+
+    TEST_CASE( "#1027: Bitfields can be captured" ) {
+        struct Y {
+            uint32_t v : 1;
+        };
+        Y y{ 0 };
+        REQUIRE( y.v == 0 );
+        REQUIRE( 0 == y.v );
+    }
+
+
+}} // namespace CompilationTests
 
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/EnumToString.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/EnumToString.tests.cpp
index 0b188a8262d0410d8fa97e34730bc23ec1451fce..7f27916efe1bdb22d9393d36b35a9f783bf905d1 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/EnumToString.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/EnumToString.tests.cpp
@@ -61,6 +61,39 @@ TEST_CASE( "toString(enum class w/operator<<)", "[toString][enum][enumClass]" )
     EnumClass2 e1 = EnumClass2::EnumClass2Value1;
     CHECK( ::Catch::Detail::stringify(e1) == "E2/V1" );
 
-    EnumClass2 e3 = static_cast<EnumClass2>(10);
+    auto e3 = static_cast<EnumClass2>(10);
     CHECK( ::Catch::Detail::stringify(e3) == "Unknown enum value 10" );
 }
+
+enum class EnumClass3 { Value1, Value2, Value3, Value4 };
+
+CATCH_REGISTER_ENUM( EnumClass3, EnumClass3::Value1, EnumClass3::Value2, EnumClass3::Value3 )
+
+
+TEST_CASE( "Enums can quickly have stringification enabled using REGISTER_ENUM" ) {
+    using Catch::Detail::stringify;
+    REQUIRE( stringify( EnumClass3::Value1 ) == "Value1" );
+    REQUIRE( stringify( EnumClass3::Value2 ) == "Value2" );
+    REQUIRE( stringify( EnumClass3::Value3 ) == "Value3" );
+    REQUIRE( stringify( EnumClass3::Value4 ) == "{** unexpected enum value **}" );
+
+    EnumClass3 ec3 = EnumClass3 ::Value2;
+    REQUIRE( stringify( ec3 ) == "Value2" );
+}
+
+namespace Bikeshed {
+    enum class Colours { Red, Green, Blue };
+}
+
+// Important!: This macro must appear at top level scope - not inside a namespace
+// You can fully qualify the names, or use a using if you prefer
+CATCH_REGISTER_ENUM( Bikeshed::Colours,
+                     Bikeshed::Colours::Red,
+                     Bikeshed::Colours::Green,
+                     Bikeshed::Colours::Blue )
+
+TEST_CASE( "Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" ) {
+    using Catch::Detail::stringify;
+    REQUIRE( stringify( Bikeshed::Colours::Red ) == "Red" );
+    REQUIRE( stringify( Bikeshed::Colours::Blue ) == "Blue" );
+}
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Generators.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Generators.tests.cpp
index f5e3f6a5323b799bc3ad5be1872fe99b31eef851..0e39bd5cbfce337ead5e17e7604e1ceb7297a069 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Generators.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Generators.tests.cpp
@@ -167,6 +167,10 @@ TEST_CASE("Generators -- adapters", "[generators][generic]") {
             REQUIRE(chunk2.front() == chunk2.back());
             REQUIRE(chunk2.front() < 3);
         }
+        SECTION("Chunk size of zero") {
+            auto chunk2 = GENERATE(take(3, chunk(0, value(1))));
+            REQUIRE(chunk2.size() == 0);
+        }
         SECTION("Throws on too small generators") {
             using namespace Catch::Generators;
             REQUIRE_THROWS_AS(chunk(2, value(1)), Catch::GeneratorException);
@@ -176,16 +180,18 @@ TEST_CASE("Generators -- adapters", "[generators][generic]") {
 
 // Note that because of the non-reproducibility of distributions,
 // anything involving the random generators cannot be part of approvals
-TEST_CASE("Random generator", "[generators][.][approvals]") {
+TEST_CASE("Random generator", "[generators][approvals]") {
     SECTION("Infer int from integral arguments") {
         auto val = GENERATE(take(4, random(0, 1)));
         STATIC_REQUIRE(std::is_same<decltype(val), int>::value);
-        static_cast<void>(val); // Silence VS 2015 unused variable warning
+        REQUIRE(0 <= val);
+        REQUIRE(val <= 1);
     }
     SECTION("Infer double from double arguments") {
         auto val = GENERATE(take(4, random(0., 1.)));
         STATIC_REQUIRE(std::is_same<decltype(val), double>::value);
-        static_cast<void>(val); // Silence VS 2015 unused variable warning
+        REQUIRE(0. <= val);
+        REQUIRE(val < 1);
     }
 }
 
@@ -206,3 +212,45 @@ TEST_CASE("Nested generators and captured variables", "[generators]") {
     auto values = GENERATE_COPY(range(from, to));
     REQUIRE(values > -6);
 }
+
+namespace {
+    size_t call_count = 0;
+    size_t test_count = 0;
+    std::vector<int> make_data() {
+        return { 1, 3, 5, 7, 9, 11 };
+    }
+    std::vector<int> make_data_counted() {
+        ++call_count;
+        return make_data();
+    }
+}
+
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
+#endif
+
+TEST_CASE("Copy and then generate a range", "[generators]") {
+    SECTION("from var and iterators") {
+        static auto data = make_data();
+
+        // It is important to notice that a generator is only initialized
+        // **once** per run. What this means is that modifying data will not
+        // modify the underlying generator.
+        auto elem = GENERATE_REF(from_range(data.begin(), data.end()));
+        REQUIRE(elem % 2 == 1);
+    }
+    SECTION("From a temporary container") {
+        auto elem = GENERATE(from_range(make_data_counted()));
+        ++test_count;
+        REQUIRE(elem % 2 == 1);
+    }
+    SECTION("Final validation") {
+        REQUIRE(call_count == 1);
+        REQUIRE(make_data().size() == test_count);
+    }
+}
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp
index f07481d46d3e7b55cf892a47dac0a8aee0f1ebd2..80e0420fe344741d82c1e97cce51a2a44ef49b7c 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp
@@ -52,10 +52,16 @@ namespace { namespace MatchersTests {
         int i;
     };
 
+    struct DerivedException : std::exception {
+        char const* what() const noexcept override {
+            return "DerivedException::what";
+        }
+    };
+
     void doesNotThrow() {}
 
     [[noreturn]]
-    void throws(int i) {
+    void throwsSpecialException(int i) {
         throw SpecialException{i};
     }
 
@@ -64,6 +70,11 @@ namespace { namespace MatchersTests {
         throw i;
     }
 
+    [[noreturn]]
+    void throwsDerivedException() {
+        throw DerivedException{};
+    }
+
     class ExceptionMatcher : public Catch::MatcherBase<SpecialException> {
         int m_expected;
     public:
@@ -213,6 +224,16 @@ namespace { namespace MatchersTests {
             v2.push_back(1);
             v2.push_back(2);
 
+            std::vector<double> v3;
+            v3.push_back(1);
+            v3.push_back(2);
+            v3.push_back(3);
+
+            std::vector<double> v4;
+            v4.push_back(1 + 1e-8);
+            v4.push_back(2 + 1e-8);
+            v4.push_back(3 + 1e-8);
+
             std::vector<int> empty;
 
             SECTION("Contains (element)") {
@@ -265,6 +286,16 @@ namespace { namespace MatchersTests {
             v2.push_back(1);
             v2.push_back(2);
 
+            std::vector<double> v3;
+            v3.push_back(1);
+            v3.push_back(2);
+            v3.push_back(3);
+
+            std::vector<double> v4;
+            v4.push_back(1.1);
+            v4.push_back(2.1);
+            v4.push_back(3.1);
+
             std::vector<int> empty;
 
             SECTION("Contains (element)") {
@@ -299,8 +330,8 @@ namespace { namespace MatchersTests {
         }
 
         TEST_CASE("Exception matchers that succeed", "[matchers][exceptions][!throws]") {
-            CHECK_THROWS_MATCHES(throws(1), SpecialException, ExceptionMatcher{1});
-            REQUIRE_THROWS_MATCHES(throws(2), SpecialException, ExceptionMatcher{2});
+            CHECK_THROWS_MATCHES(throwsSpecialException(1), SpecialException, ExceptionMatcher{1});
+            REQUIRE_THROWS_MATCHES(throwsSpecialException(2), SpecialException, ExceptionMatcher{2});
         }
 
         TEST_CASE("Exception matchers that fail", "[matchers][exceptions][!throws][.failing]") {
@@ -313,12 +344,26 @@ namespace { namespace MatchersTests {
                 REQUIRE_THROWS_MATCHES(throwsAsInt(1), SpecialException, ExceptionMatcher{1});
             }
             SECTION("Contents are wrong") {
-                CHECK_THROWS_MATCHES(throws(3), SpecialException, ExceptionMatcher{1});
-                REQUIRE_THROWS_MATCHES(throws(4), SpecialException, ExceptionMatcher{1});
+                CHECK_THROWS_MATCHES(throwsSpecialException(3), SpecialException, ExceptionMatcher{1});
+                REQUIRE_THROWS_MATCHES(throwsSpecialException(4), SpecialException, ExceptionMatcher{1});
             }
         }
 
         TEST_CASE("Floating point matchers: float", "[matchers][floating-point]") {
+            SECTION("Relative") {
+                REQUIRE_THAT(10.f,  WithinRel(11.1f, 0.1f));
+                REQUIRE_THAT(10.f, !WithinRel(11.2f, 0.1f));
+                REQUIRE_THAT( 1.f, !WithinRel(0.f, 0.99f));
+                REQUIRE_THAT(-0.f,  WithinRel(0.f));
+                SECTION("Some subnormal values") {
+                    auto v1 = std::numeric_limits<float>::min();
+                    auto v2 = v1;
+                    for (int i = 0; i < 5; ++i) {
+                        v2 = std::nextafter(v1, 0.f);
+                    }
+                    REQUIRE_THAT(v1, WithinRel(v2));
+                }
+            }
             SECTION("Margin") {
                 REQUIRE_THAT(1.f, WithinAbs(1.f, 0));
                 REQUIRE_THAT(0.f, WithinAbs(1.f, 1));
@@ -327,7 +372,6 @@ namespace { namespace MatchersTests {
                 REQUIRE_THAT(0.f, !WithinAbs(1.f, 0.99f));
 
                 REQUIRE_THAT(0.f, WithinAbs(-0.f, 0));
-                REQUIRE_THAT(NAN, !WithinAbs(NAN, 0));
 
                 REQUIRE_THAT(11.f, !WithinAbs(10.f, 0.5f));
                 REQUIRE_THAT(10.f, !WithinAbs(11.f, 0.5f));
@@ -338,30 +382,46 @@ namespace { namespace MatchersTests {
                 REQUIRE_THAT(1.f, WithinULP(1.f, 0));
 
                 REQUIRE_THAT(nextafter(1.f, 2.f), WithinULP(1.f, 1));
-                REQUIRE_THAT(nextafter(1.f, 0.f), WithinULP(1.f, 1));
-                REQUIRE_THAT(nextafter(1.f, 2.f), !WithinULP(1.f, 0));
+                REQUIRE_THAT(0.f, WithinULP(nextafter(0.f, 1.f), 1));
+                REQUIRE_THAT(1.f, WithinULP(nextafter(1.f, 0.f), 1));
+                REQUIRE_THAT(1.f, !WithinULP(nextafter(1.f, 2.f), 0));
 
                 REQUIRE_THAT(1.f, WithinULP(1.f, 0));
                 REQUIRE_THAT(-0.f, WithinULP(0.f, 0));
-
-                REQUIRE_THAT(NAN, !WithinULP(NAN, 123));
             }
             SECTION("Composed") {
                 REQUIRE_THAT(1.f, WithinAbs(1.f, 0.5) || WithinULP(1.f, 1));
                 REQUIRE_THAT(1.f, WithinAbs(2.f, 0.5) || WithinULP(1.f, 0));
-
-                REQUIRE_THAT(NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)));
+                REQUIRE_THAT(0.0001f, WithinAbs(0.f, 0.001f) || WithinRel(0.f, 0.1f));
             }
             SECTION("Constructor validation") {
                 REQUIRE_NOTHROW(WithinAbs(1.f, 0.f));
                 REQUIRE_THROWS_AS(WithinAbs(1.f, -1.f), std::domain_error);
 
                 REQUIRE_NOTHROW(WithinULP(1.f, 0));
-                REQUIRE_THROWS_AS(WithinULP(1.f, -1), std::domain_error);
+                REQUIRE_THROWS_AS(WithinULP(1.f, static_cast<uint64_t>(-1)), std::domain_error);
+
+                REQUIRE_NOTHROW(WithinRel(1.f, 0.f));
+                REQUIRE_THROWS_AS(WithinRel(1.f, -0.2f), std::domain_error);
+                REQUIRE_THROWS_AS(WithinRel(1.f, 1.f), std::domain_error);
             }
         }
 
         TEST_CASE("Floating point matchers: double", "[matchers][floating-point]") {
+            SECTION("Relative") {
+                REQUIRE_THAT(10., WithinRel(11.1, 0.1));
+                REQUIRE_THAT(10., !WithinRel(11.2, 0.1));
+                REQUIRE_THAT(1., !WithinRel(0., 0.99));
+                REQUIRE_THAT(-0., WithinRel(0.));
+                SECTION("Some subnormal values") {
+                    auto v1 = std::numeric_limits<double>::min();
+                    auto v2 = v1;
+                    for (int i = 0; i < 5; ++i) {
+                        v2 = std::nextafter(v1, 0);
+                    }
+                    REQUIRE_THAT(v1, WithinRel(v2));
+                }
+            }
             SECTION("Margin") {
                 REQUIRE_THAT(1., WithinAbs(1., 0));
                 REQUIRE_THAT(0., WithinAbs(1., 1));
@@ -369,8 +429,6 @@ namespace { namespace MatchersTests {
                 REQUIRE_THAT(0., !WithinAbs(1., 0.99));
                 REQUIRE_THAT(0., !WithinAbs(1., 0.99));
 
-                REQUIRE_THAT(NAN, !WithinAbs(NAN, 0));
-
                 REQUIRE_THAT(11., !WithinAbs(10., 0.5));
                 REQUIRE_THAT(10., !WithinAbs(11., 0.5));
                 REQUIRE_THAT(-10., WithinAbs(-10., 0.5));
@@ -380,29 +438,43 @@ namespace { namespace MatchersTests {
                 REQUIRE_THAT(1., WithinULP(1., 0));
 
                 REQUIRE_THAT(nextafter(1., 2.), WithinULP(1., 1));
-                REQUIRE_THAT(nextafter(1., 0.), WithinULP(1., 1));
-                REQUIRE_THAT(nextafter(1., 2.), !WithinULP(1., 0));
+                REQUIRE_THAT(0.,  WithinULP(nextafter(0., 1.), 1));
+                REQUIRE_THAT(1.,  WithinULP(nextafter(1., 0.), 1));
+                REQUIRE_THAT(1., !WithinULP(nextafter(1., 2.), 0));
 
                 REQUIRE_THAT(1., WithinULP(1., 0));
                 REQUIRE_THAT(-0., WithinULP(0., 0));
-
-                REQUIRE_THAT(NAN, !WithinULP(NAN, 123));
             }
             SECTION("Composed") {
                 REQUIRE_THAT(1., WithinAbs(1., 0.5) || WithinULP(2., 1));
                 REQUIRE_THAT(1., WithinAbs(2., 0.5) || WithinULP(1., 0));
-
-                REQUIRE_THAT(NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)));
+                REQUIRE_THAT(0.0001, WithinAbs(0., 0.001) || WithinRel(0., 0.1));
             }
             SECTION("Constructor validation") {
                 REQUIRE_NOTHROW(WithinAbs(1., 0.));
                 REQUIRE_THROWS_AS(WithinAbs(1., -1.), std::domain_error);
 
                 REQUIRE_NOTHROW(WithinULP(1., 0));
-                REQUIRE_THROWS_AS(WithinULP(1., -1), std::domain_error);
+
+                REQUIRE_NOTHROW(WithinRel(1., 0.));
+                REQUIRE_THROWS_AS(WithinRel(1., -0.2), std::domain_error);
+                REQUIRE_THROWS_AS(WithinRel(1., 1.), std::domain_error);
             }
         }
 
+        TEST_CASE("Floating point matchers that are problematic in approvals", "[approvals][matchers][floating-point]") {
+            REQUIRE_THAT(NAN, !WithinAbs(NAN, 0));
+            REQUIRE_THAT(NAN, !(WithinAbs(NAN, 100) || WithinULP(NAN, 123)));
+            REQUIRE_THAT(NAN, !WithinULP(NAN, 123));
+            REQUIRE_THAT(INFINITY, WithinRel(INFINITY));
+            REQUIRE_THAT(-INFINITY, !WithinRel(INFINITY));
+            REQUIRE_THAT(1., !WithinRel(INFINITY));
+            REQUIRE_THAT(INFINITY, !WithinRel(1.));
+            REQUIRE_THAT(NAN, !WithinRel(NAN));
+            REQUIRE_THAT(1., !WithinRel(NAN));
+            REQUIRE_THAT(NAN, !WithinRel(1.));
+        }
+
         TEST_CASE("Arbitrary predicate matcher", "[matchers][generic]") {
             SECTION("Function pointer") {
                 REQUIRE_THAT(1,  Predicate<int>(alwaysTrue, "always true"));
@@ -436,6 +508,51 @@ namespace { namespace MatchersTests {
             REQUIRE_THAT("foo", Predicate<const char*>([] (const char* const&) { return true; }));
         }
 
+        TEST_CASE("Vector Approx matcher", "[matchers][approx][vector]") {
+            using Catch::Matchers::Approx;
+            SECTION("Empty vector is roughly equal to an empty vector") {
+                std::vector<double> empty;
+                REQUIRE_THAT(empty, Approx(empty));
+            }
+            SECTION("Vectors with elements") {
+                std::vector<double> v1({1., 2., 3.});
+                SECTION("A vector is approx equal to itself") {
+                    REQUIRE_THAT(v1, Approx(v1));
+                }
+                std::vector<double> v2({1.5, 2.5, 3.5});
+                SECTION("Different length") {
+                    auto temp(v1);
+                    temp.push_back(4);
+                    REQUIRE_THAT(v1, !Approx(temp));
+                }
+                SECTION("Same length, different elements") {
+                    REQUIRE_THAT(v1, !Approx(v2));
+                    REQUIRE_THAT(v1, Approx(v2).margin(0.5));
+                    REQUIRE_THAT(v1, Approx(v2).epsilon(0.5));
+                    REQUIRE_THAT(v1, Approx(v2).epsilon(0.1).scale(500));
+                }
+            }
+        }
+
+        TEST_CASE("Vector Approx matcher -- failing", "[matchers][approx][vector][.failing]") {
+            using Catch::Matchers::Approx;
+            SECTION("Empty and non empty vectors are not approx equal") {
+                std::vector<double> empty, t1({1, 2});
+                CHECK_THAT(empty, Approx(t1));
+            }
+            SECTION("Just different vectors") {
+                std::vector<double> v1({2., 4., 6.}), v2({1., 3., 5.});
+                CHECK_THAT(v1, Approx(v2));
+            }
+        }
+
+        TEST_CASE("Exceptions matchers", "[matchers][exceptions][!throws]") {
+            REQUIRE_THROWS_MATCHES(throwsDerivedException(),  DerivedException,  Message("DerivedException::what"));
+            REQUIRE_THROWS_MATCHES(throwsDerivedException(),  DerivedException, !Message("derivedexception::what"));
+            REQUIRE_THROWS_MATCHES(throwsSpecialException(2), SpecialException, !Message("DerivedException::what"));
+            REQUIRE_THROWS_MATCHES(throwsSpecialException(2), SpecialException,  Message("SpecialException::what"));
+        }
+
 } } // namespace MatchersTests
 
 #endif // CATCH_CONFIG_DISABLE_MATCHERS
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Message.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Message.tests.cpp
index 50992cebb9f98f4e63467b487acd19d477a10ddd..933470845bab02fc6eb48c87feaea46c02055360 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Message.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Message.tests.cpp
@@ -227,9 +227,9 @@ TEST_CASE( "CAPTURE can deal with complex expressions", "[messages][capture]" )
 
 template <typename T1, typename T2>
 struct helper_1436 {
-    helper_1436(T1 t1, T2 t2):
-        t1{ t1 },
-        t2{ t2 }
+    helper_1436(T1 t1_, T2 t2_):
+        t1{ t1_ },
+        t2{ t2_ }
     {}
     T1 t1;
     T2 t2;
@@ -251,6 +251,13 @@ TEST_CASE("CAPTURE can deal with complex expressions involving commas", "[messag
     SUCCEED();
 }
 
+TEST_CASE("CAPTURE parses string and character constants", "[messages][capture]") {
+    CAPTURE(("comma, in string", "escaped, \", "), "single quote in string,',", "some escapes, \\,\\\\");
+    CAPTURE("some, ), unmatched, } prenheses {[<");
+    CAPTURE('"', '\'', ',', '}', ')', '(', '{');
+    SUCCEED();
+}
+
 #ifdef __clang__
 #pragma clang diagnostic pop
 #endif
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Misc.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Misc.tests.cpp
index 4de6f1aa0df3d84ec5df25e2c131778fea192a4b..188bc2d7c7c7ab3d12e9c6df53530be0b97b8a99 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Misc.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Misc.tests.cpp
@@ -18,6 +18,7 @@
 #include <cerrno>
 #include <limits>
 #include <sstream>
+#include <array>
 
 namespace { namespace MiscTests {
 
@@ -66,6 +67,10 @@ struct Foo {
     size_t size() { return 0; }
 };
 
+template<typename T, size_t S>
+struct Bar {
+    size_t size() { return S; }
+};
 #endif
 
 TEST_CASE( "random SECTION tests", "[.][sections][failing]" ) {
@@ -306,15 +311,91 @@ TEMPLATE_TEST_CASE( "TemplateTest: vectors can be sized and resized", "[vector][
     }
 }
 
+TEMPLATE_TEST_CASE_SIG("TemplateTestSig: vectors can be sized and resized", "[vector][template][nttp]", ((typename TestType, int V), TestType, V), (int,5), (float,4), (std::string,15), ((std::tuple<int, float>), 6)) {
+
+    std::vector<TestType> v(V);
+
+    REQUIRE(v.size() == V);
+    REQUIRE(v.capacity() >= V);
+
+    SECTION("resizing bigger changes size and capacity") {
+        v.resize(2 * V);
+
+        REQUIRE(v.size() == 2 * V);
+        REQUIRE(v.capacity() >= 2 * V);
+    }
+    SECTION("resizing smaller changes size but not capacity") {
+        v.resize(0);
+
+        REQUIRE(v.size() == 0);
+        REQUIRE(v.capacity() >= V);
+
+        SECTION("We can use the 'swap trick' to reset the capacity") {
+            std::vector<TestType> empty;
+            empty.swap(v);
+
+            REQUIRE(v.capacity() == 0);
+        }
+    }
+    SECTION("reserving bigger changes capacity but not size") {
+        v.reserve(2 * V);
+
+        REQUIRE(v.size() == V);
+        REQUIRE(v.capacity() >= 2 * V);
+    }
+    SECTION("reserving smaller does not change size or capacity") {
+        v.reserve(0);
+
+        REQUIRE(v.size() == V);
+        REQUIRE(v.capacity() >= V);
+    }
+}
+
 TEMPLATE_PRODUCT_TEST_CASE("A Template product test case", "[template][product]", (std::vector, Foo), (int, float)) {
     TestType x;
     REQUIRE(x.size() == 0);
 }
 
+TEMPLATE_PRODUCT_TEST_CASE_SIG("A Template product test case with array signature", "[template][product][nttp]", ((typename T, size_t S), T, S), (std::array, Bar), ((int, 9), (float, 42))) {
+    TestType x;
+    REQUIRE(x.size() > 0);
+}
+
 TEMPLATE_PRODUCT_TEST_CASE("Product with differing arities", "[template][product]", std::tuple, (int, (int, double), (int, double, float))) {
     REQUIRE(std::tuple_size<TestType>::value >= 1);
 }
 
+using MyTypes = std::tuple<int, char, float>;
+TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside std::tuple", "[template][list]", MyTypes)
+{
+    REQUIRE(sizeof(TestType) > 0);
+}
+
+struct NonDefaultConstructibleType {
+    NonDefaultConstructibleType() = delete;
+};
+
+using MyNonDefaultConstructibleTypes = std::tuple<NonDefaultConstructibleType, float>;
+TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside non-default-constructible std::tuple", "[template][list]", MyNonDefaultConstructibleTypes)
+{
+    REQUIRE(sizeof(TestType) > 0);
+}
+
+struct NonCopyableAndNonMovableType {
+    NonCopyableAndNonMovableType() = default;
+
+    NonCopyableAndNonMovableType(NonCopyableAndNonMovableType const &) = delete;
+    NonCopyableAndNonMovableType(NonCopyableAndNonMovableType &&) = delete;
+    auto operator=(NonCopyableAndNonMovableType const &) -> NonCopyableAndNonMovableType & = delete;
+    auto operator=(NonCopyableAndNonMovableType &&) -> NonCopyableAndNonMovableType & = delete;
+};
+
+using NonCopyableAndNonMovableTypes = std::tuple<NonCopyableAndNonMovableType, float>;
+TEMPLATE_LIST_TEST_CASE("Template test case with test types specified inside non-copyable and non-movable std::tuple", "[template][list]", NonCopyableAndNonMovableTypes)
+{
+    REQUIRE(sizeof(TestType) > 0);
+}
+
 // https://github.com/philsquared/Catch/issues/166
 TEST_CASE("A couple of nested sections followed by a failure", "[failing][.]") {
     SECTION("Outer")
@@ -374,12 +455,6 @@ TEST_CASE( "long long" ) {
     REQUIRE( l == std::numeric_limits<long long>::max() );
 }
 
-//TEST_CASE( "Divide by Zero signal handler", "[.][sig]" ) {
-//    int i = 0;
-//    int x = 10/i; // This should cause the signal to fire
-//    CHECK( x == 0 );
-//}
-
 TEST_CASE( "This test 'should' fail but doesn't", "[.][failing][!shouldfail]" ) {
     SUCCEED( "oops!" );
 }
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/ToStringByte.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/ToStringByte.tests.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0aad679f3df1579ca20c300f61bbdc7da0280c86
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/UsageTests/ToStringByte.tests.cpp
@@ -0,0 +1,15 @@
+#include "catch.hpp"
+
+#if defined(CATCH_CONFIG_CPP17_BYTE)
+
+TEST_CASE( "std::byte -> toString", "[toString][byte][approvals]" ) {
+    using type = std::byte;
+    REQUIRE( "0" == ::Catch::Detail::stringify( type{ 0 } ) );
+}
+
+TEST_CASE( "std::vector<std::byte> -> toString", "[toString][byte][approvals]" ) {
+    using type = std::vector<std::byte>;
+    REQUIRE( "{ 0, 1, 2 }" == ::Catch::Detail::stringify( type{ std::byte{0}, std::byte{1}, std::byte{2} } ) );
+}
+
+#endif // CATCH_INTERNAL_CONFIG_CPP17_BYTE
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/ToStringGeneral.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/ToStringGeneral.tests.cpp
index 09ac304517c58a8f4f49f51bd830b9b90164f00a..69d6320d9976d5adaedf9b574b4b624d83cfb173 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/ToStringGeneral.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/ToStringGeneral.tests.cpp
@@ -128,6 +128,40 @@ TEST_CASE("String views are stringified like other strings", "[toString][approva
 
 #endif
 
+TEST_CASE("Precision of floating point stringification can be set", "[toString][floatingPoint]") {
+    SECTION("Floats") {
+        using sm = Catch::StringMaker<float>;
+        const auto oldPrecision = sm::precision;
+
+        const float testFloat = 1.12345678901234567899f;
+        auto str1 = sm::convert(testFloat);
+        sm::precision = 5;
+        // "1." prefix = 2 chars, f suffix is another char
+        CHECK(str1.size() == 3 + 5);
+
+        sm::precision = 10;
+        auto str2 = sm::convert(testFloat);
+        REQUIRE(str2.size() == 3 + 10);
+        sm::precision = oldPrecision;
+    }
+    SECTION("Double") {
+        using sm = Catch::StringMaker<double>;
+        const auto oldPrecision = sm::precision;
+
+        const double testDouble = 1.123456789012345678901234567899;
+        sm::precision = 5;
+        auto str1 = sm::convert(testDouble);
+        // "1." prefix = 2 chars
+        CHECK(str1.size() == 2 + 5);
+
+        sm::precision = 15;
+        auto str2 = sm::convert(testDouble);
+        REQUIRE(str2.size() == 2 + 15);
+
+        sm::precision = oldPrecision;
+    }
+}
+
 namespace {
 
 struct WhatException : std::exception {
diff --git a/packages/Catch2/projects/SelfTest/UsageTests/Tricky.tests.cpp b/packages/Catch2/projects/SelfTest/UsageTests/Tricky.tests.cpp
index ea507a88847e53150082b84f48826e0bf942bbb9..d8e5465bb0b032e9dfdac435440f46d7ca5f7074 100644
--- a/packages/Catch2/projects/SelfTest/UsageTests/Tricky.tests.cpp
+++ b/packages/Catch2/projects/SelfTest/UsageTests/Tricky.tests.cpp
@@ -402,32 +402,6 @@ TEST_CASE( "non-copyable objects", "[.][failing]" ) {
     CHECK( ti == typeid(int) );
 }
 
-// #925
-using signal_t = void (*) (void*);
-
-struct TestClass {
-    signal_t testMethod_uponComplete_arg = nullptr;
-};
-
-namespace utility {
-    inline static void synchronizing_callback( void * ) { }
-}
-
-TEST_CASE("#925: comparing function pointer to function address failed to compile", "[!nonportable]" ) {
-
-    TestClass test;
-    REQUIRE(utility::synchronizing_callback != test.testMethod_uponComplete_arg);
-}
-
-TEST_CASE( "Bitfields can be captured (#1027)" ) {
-    struct Y {
-        uint32_t v : 1;
-    };
-    Y y{ 0 };
-    REQUIRE( y.v == 0 );
-    REQUIRE( 0 == y.v );
-}
-
 TEST_CASE("#1514: stderr/stdout is not captured in tests aborted by an exception", "[output-capture][regression][.]") {
     std::cout << "This would not be caught previously\n" << std::flush;
     std::clog << "Nor would this\n" << std::flush;
diff --git a/packages/Catch2/projects/SelfTest/WarnAboutNoTests.cmake b/packages/Catch2/projects/SelfTest/WarnAboutNoTests.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..4637e3f3c7f788368633a8a667fbd4f5a88161ff
--- /dev/null
+++ b/packages/Catch2/projects/SelfTest/WarnAboutNoTests.cmake
@@ -0,0 +1,19 @@
+# Workaround for a peculiarity where CTest disregards the return code from a
+# test command if a PASS_REGULAR_EXPRESSION is also set
+execute_process(
+    COMMAND ${CMAKE_ARGV3} -w NoTests "___nonexistent_test___"
+    RESULT_VARIABLE ret
+    OUTPUT_VARIABLE out
+)
+
+message("${out}")
+
+if(NOT ${ret} MATCHES "^[0-9]+$")
+    message(FATAL_ERROR "${ret}")
+endif()
+
+if(${ret} EQUAL 0)
+    message(FATAL_ERROR "Expected nonzero return code")
+elseif(${out} MATCHES "Helper failed with")
+    message(FATAL_ERROR "Helper failed")
+endif()
diff --git a/packages/Catch2/projects/Where did the projects go.txt b/packages/Catch2/projects/Where did the projects go.txt
deleted file mode 100644
index c7b011d55eb60ff6fb06b92c06e32194fea10dc5..0000000000000000000000000000000000000000
--- a/packages/Catch2/projects/Where did the projects go.txt	
+++ /dev/null
@@ -1,13 +0,0 @@
-The canonical project format is now CMake.
-To generate an XCode or Visual Studio project you'll need CMake, which you can download from https://cmake.org if necessary.
-
-To generate the project files open a terminal/ console within the projects directory (where this file is located), create a directory called "Generated" (using mkdir or md), cd into it, then type:
-
-CMake -G <project format> ../..
-
-Where <project format> is XCode for XCode projects, or "Visual Studio 14" for Visual Studio 2015 (replace 14 with the major version number for any other supported Visual Studio version - or execute CMake -help for the full list)
-
-Remember to re-run CMake any time you pull from GitHub.
-Note that the projects/Generated folder is excluded in .gitignore. So it is recommended to use this.
-
-CMake can also generate make files or projects for other build systems. Run CMake -help for the full set of options.
diff --git a/packages/Catch2/scripts/extractFeaturesFromReleaseNotes.py b/packages/Catch2/scripts/extractFeaturesFromReleaseNotes.py
new file mode 100644
index 0000000000000000000000000000000000000000..090f4772ad1acded8b6472b9a50df1efea007692
--- /dev/null
+++ b/packages/Catch2/scripts/extractFeaturesFromReleaseNotes.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+
+#
+# extractFeaturesFromReleaseNotes.py
+#
+# Read the release notes - docs/release-notes.md - and generate text
+# for pasting in to individual documentation pages, to indicate which
+# versions recent features were released in.
+#
+# Using the output of the file is easier than manually constructing
+# the text to paste in to documentation pages.
+#
+# One way to use this:
+# - run this script, saving the output to some temporary file
+# - diff this output with the actual release notes page
+# - the differences are Markdown text that can be pasted in to the
+#   appropriate documentation pages in the docs/ directory.
+# - each release also has a github link to show which documentation files
+#   were changed in it.
+#   This can be helpful to see which documentation pages
+#   to add the 'Introduced in Catch ...' snippets to the relevant pages.
+#
+
+from __future__ import print_function
+
+import re
+
+
+def create_introduced_in_text(version, bug_number = None):
+    """Generate text to paste in to documentation file"""
+    if bug_number:
+        return '> [Introduced](https://github.com/catchorg/Catch2/issues/%s) in Catch %s.' % (bug_number, version)
+    else:
+        # Use this text for changes that don't have issue numbers
+        return '> Introduced in Catch %s.' % version
+
+
+def link_to_changes_in_release(release, releases):
+    """
+    Markdown text for a hyperlink showing all edits in a release, or empty string
+
+    :param release: A release version, as a string 
+    :param releases: A container of releases, in descending order - newest to oldest
+    :return: Markdown text for a hyperlink showing the differences between the give release and the prior one,
+             or empty string, if the previous release is not known
+    """
+
+    if release == releases[-1]:
+        # This is the earliest release we know about
+        return ''
+    index = releases.index(release)
+    previous_release = releases[index + 1]
+    return '\n[Changes in %s](https://github.com/catchorg/Catch2/compare/v%s...v%s)' % (release, previous_release, release)
+
+
+def write_recent_release_notes_with_introduced_text():
+    current_version = None
+    release_toc_regex = r'\[(\d.\d.\d)\]\(#\d+\)<br>'
+    issue_number_regex = r'#[0-9]+'
+    releases = []
+    with open('../docs/release-notes.md') as release_notes:
+        for line in release_notes:
+            line = line[:-1]
+            print(line)
+
+            # Extract version number from table of contents
+            match = re.search(release_toc_regex, line)
+            if match:
+                release_name = match.group(1)
+                releases.append(release_name)
+
+            if line.startswith('## '):
+                # It's a section with version number
+                current_version = line.replace('## ', '')
+
+                # We decided not to add released-date info for older versions
+                if current_version == 'Older versions':
+                    break
+
+                print(create_introduced_in_text(current_version))
+                print(link_to_changes_in_release(current_version, releases))
+
+            # Not yet found a version number, so to avoid picking up hyperlinks to
+            # version numbers in the index, keep going
+            if not current_version:
+                continue
+
+            for bug_link in re.findall(issue_number_regex, line):
+                bug_number = bug_link.replace('#', '')
+                print(create_introduced_in_text(current_version, bug_number))
+
+
+if __name__ == '__main__':
+    write_recent_release_notes_with_introduced_text()
diff --git a/packages/Catch2/scripts/generateSingleHeader.py b/packages/Catch2/scripts/generateSingleHeader.py
index 31033d6831a47ed16056286839e15100999d2c4b..f896877438530b3efe00a4fa1a8d84c653fd3ddf 100755
--- a/packages/Catch2/scripts/generateSingleHeader.py
+++ b/packages/Catch2/scripts/generateSingleHeader.py
@@ -53,7 +53,7 @@ def generate(v):
             out.write( line )
 
     def insertCpps():
-        dirs = [os.path.join( rootPath, s) for s in ['', 'internal', 'reporters']]
+        dirs = [os.path.join( rootPath, s) for s in ['', 'internal', 'reporters', 'internal/benchmark', 'internal/benchmark/detail']]
         cppFiles = []
         for dir in dirs:
             cppFiles += glob(os.path.join(dir, '*.cpp'))
diff --git a/packages/Catch2/scripts/releaseCommon.py b/packages/Catch2/scripts/releaseCommon.py
index 9cdc4f6c12eb4a29ffb6a84be5dcb82493029fdb..102fe46a09fa12c55a76743c9a5a89e2d0046df3 100644
--- a/packages/Catch2/scripts/releaseCommon.py
+++ b/packages/Catch2/scripts/releaseCommon.py
@@ -4,6 +4,8 @@ import os
 import sys
 import re
 import string
+import glob
+import fnmatch
 
 from scriptCommon import catchPath
 
@@ -98,29 +100,47 @@ def updateReadmeFile(version):
 
 
 def updateCmakeFile(version):
-    with open(cmakePath, 'r') as file:
+    with open(cmakePath, 'rb') as file:
         lines = file.readlines()
-    with open(cmakePath, 'w') as file:
+    replacementRegex = re.compile(b'project\\(Catch2 LANGUAGES CXX VERSION \\d+\\.\\d+\\.\\d+\\)')
+    replacement = 'project(Catch2 LANGUAGES CXX VERSION {0})'.format(version.getVersionString()).encode('ascii')
+    with open(cmakePath, 'wb') as file:
         for line in lines:
-            if 'project(Catch2 LANGUAGES CXX VERSION ' in line:
-                file.write('project(Catch2 LANGUAGES CXX VERSION {0})\n'.format(version.getVersionString()))
-            else:
-                file.write(line)
+            file.write(replacementRegex.sub(replacement, line))
 
 
 def updateVersionDefine(version):
-    with open(definePath, 'r') as file:
+    # First member of the tuple is the compiled regex object, the second is replacement if it matches
+    replacementRegexes = [(re.compile(b'#define CATCH_VERSION_MAJOR \\d+'),'#define CATCH_VERSION_MAJOR {}'.format(version.majorVersion).encode('ascii')),
+                          (re.compile(b'#define CATCH_VERSION_MINOR \\d+'),'#define CATCH_VERSION_MINOR {}'.format(version.minorVersion).encode('ascii')),
+                          (re.compile(b'#define CATCH_VERSION_PATCH \\d+'),'#define CATCH_VERSION_PATCH {}'.format(version.patchNumber).encode('ascii')),
+                         ]
+    with open(definePath, 'rb') as file:
         lines = file.readlines()
-    with open(definePath, 'w') as file:
+    with open(definePath, 'wb') as file:
         for line in lines:
-            if '#define CATCH_VERSION_MAJOR' in line:
-                file.write('#define CATCH_VERSION_MAJOR {}\n'.format(version.majorVersion))
-            elif '#define CATCH_VERSION_MINOR' in line:
-                file.write('#define CATCH_VERSION_MINOR {}\n'.format(version.minorVersion))
-            elif '#define CATCH_VERSION_PATCH' in line:
-                file.write('#define CATCH_VERSION_PATCH {}\n'.format(version.patchNumber))
-            else:
-                file.write(line)
+            for replacement in replacementRegexes:
+                line = replacement[0].sub(replacement[1], line)
+            file.write(line)
+
+
+def updateVersionPlaceholder(filename, version):
+    with open(filename, 'rb') as file:
+        lines = file.readlines()
+    placeholderRegex = re.compile(b' in Catch X.Y.Z')
+    replacement = ' in Catch {}.{}.{}'.format(version.majorVersion, version.minorVersion, version.patchNumber).encode('ascii')
+    with open(filename, 'wb') as file:
+        for line in lines:
+            file.write(placeholderRegex.sub(replacement, line))
+
+
+def updateDocumentationVersionPlaceholders(version):
+    print('Updating version placeholder in documentation')
+    docsPath = os.path.join(catchPath, 'docs/')
+    for basePath, _, files in os.walk(docsPath):
+        for file in files:
+            if fnmatch.fnmatch(file, "*.md") and "contributing.md" != file:
+                updateVersionPlaceholder(os.path.join(basePath, file), version)
 
 
 def performUpdates(version):
@@ -143,3 +163,4 @@ def performUpdates(version):
 
     updateReadmeFile(version)
     updateCmakeFile(version)
+    updateDocumentationVersionPlaceholders(version)
diff --git a/packages/Catch2/single_include/catch2/catch.hpp b/packages/Catch2/single_include/catch2/catch.hpp
index 98672c07d88a8b2c52d3164494caec4b642b9577..391db530f212c8dc411722b2e0075cb011a0c38d 100644
--- a/packages/Catch2/single_include/catch2/catch.hpp
+++ b/packages/Catch2/single_include/catch2/catch.hpp
@@ -1,6 +1,6 @@
 /*
- *  Catch v2.7.1
- *  Generated: 2019-04-05 18:22:37.720122
+ *  Catch v2.10.0
+ *  Generated: 2019-10-13 22:24:46.755734
  *  ----------------------------------------------------------
  *  This file has been merged from multiple headers. Please don't edit it directly
  *  Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved.
@@ -14,8 +14,8 @@
 
 
 #define CATCH_VERSION_MAJOR 2
-#define CATCH_VERSION_MINOR 7
-#define CATCH_VERSION_PATCH 1
+#define CATCH_VERSION_MINOR 10
+#define CATCH_VERSION_PATCH 0
 
 #ifdef __clang__
 #    pragma clang system_header
@@ -157,6 +157,12 @@ namespace Catch {
 #       define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS \
             _Pragma( "clang diagnostic pop" )
 
+#       define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+            _Pragma( "clang diagnostic push" ) \
+            _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" )
+#       define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
+            _Pragma( "clang diagnostic pop" )
+
 #endif // __clang__
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -180,6 +186,7 @@ namespace Catch {
 // Android somehow still does not support std::to_string
 #if defined(__ANDROID__)
 #    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
+#    define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE
 #endif
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -204,9 +211,9 @@ namespace Catch {
 // some versions of cygwin (most) do not support std::to_string. Use the libstd check.
 // https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813
 # if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
-	       && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
+           && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
 
-#	define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
+#    define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING
 
 # endif
 #endif // __CYGWIN__
@@ -233,7 +240,11 @@ namespace Catch {
 #  if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL)
 #    define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
 #  endif
+#endif // _MSC_VER
 
+#if defined(_REENTRANT) || defined(_MSC_VER)
+// Enable async processing, as -pthread is specified or no additional linking is required
+# define CATCH_INTERNAL_CONFIG_USE_ASYNC
 #endif // _MSC_VER
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -266,40 +277,53 @@ namespace Catch {
 #endif
 
 ////////////////////////////////////////////////////////////////////////////////
-// Check if string_view is available and usable
-// The check is split apart to work around v140 (VS2015) preprocessor issue...
-#if defined(__has_include)
-#if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)
-#    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW
-#endif
+
+// RTX is a special version of Windows that is real time.
+// This means that it is detected as Windows, but does not provide
+// the same set of capabilities as real Windows does.
+#if defined(UNDER_RTSS) || defined(RTX64_BUILD)
+    #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH
+    #define CATCH_INTERNAL_CONFIG_NO_ASYNC
+    #define CATCH_CONFIG_COLOUR_NONE
 #endif
 
-////////////////////////////////////////////////////////////////////////////////
-// Check if optional is available and usable
-#if defined(__has_include)
-#  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
-#    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL
-#  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
-#endif // __has_include
+#if defined(__UCLIBC__)
+#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER
+#endif
 
-////////////////////////////////////////////////////////////////////////////////
-// Check if variant is available and usable
+// Various stdlib support checks that require __has_include
 #if defined(__has_include)
-#  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
-#    if defined(__clang__) && (__clang_major__ < 8)
-       // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852
-       // fix should be in clang 8, workaround in libstdc++ 8.2
-#      include <ciso646>
-#      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
-#        define CATCH_CONFIG_NO_CPP17_VARIANT
-#      else
-#        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
-#      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
-#    else
-#      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
-#    endif // defined(__clang__) && (__clang_major__ < 8)
-#  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
-#endif // __has_include
+  // Check if string_view is available and usable
+  #if __has_include(<string_view>) && defined(CATCH_CPP17_OR_GREATER)
+  #    define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW
+  #endif
+
+  // Check if optional is available and usable
+  #  if __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
+  #    define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL
+  #  endif // __has_include(<optional>) && defined(CATCH_CPP17_OR_GREATER)
+
+  // Check if byte is available and usable
+  #  if __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
+  #    define CATCH_INTERNAL_CONFIG_CPP17_BYTE
+  #  endif // __has_include(<cstddef>) && defined(CATCH_CPP17_OR_GREATER)
+
+  // Check if variant is available and usable
+  #  if __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
+  #    if defined(__clang__) && (__clang_major__ < 8)
+         // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852
+         // fix should be in clang 8, workaround in libstdc++ 8.2
+  #      include <ciso646>
+  #      if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
+  #        define CATCH_CONFIG_NO_CPP17_VARIANT
+  #      else
+  #        define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
+  #      endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9)
+  #    else
+  #      define CATCH_INTERNAL_CONFIG_CPP17_VARIANT
+  #    endif // defined(__clang__) && (__clang_major__ < 8)
+  #  endif // __has_include(<variant>) && defined(CATCH_CPP17_OR_GREATER)
+#endif // defined(__has_include)
 
 #if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER)
 #   define CATCH_CONFIG_COUNTER
@@ -336,6 +360,10 @@ namespace Catch {
 #  define CATCH_CONFIG_CPP17_VARIANT
 #endif
 
+#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE)
+#  define CATCH_CONFIG_CPP17_BYTE
+#endif
+
 #if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
 #  define CATCH_INTERNAL_CONFIG_NEW_CAPTURE
 #endif
@@ -352,6 +380,18 @@ namespace Catch {
 #  define CATCH_CONFIG_POLYFILL_ISNAN
 #endif
 
+#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC)  && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC)
+#  define CATCH_CONFIG_USE_ASYNC
+#endif
+
+#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE)
+#  define CATCH_CONFIG_ANDROID_LOGWRITE
+#endif
+
+#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+#  define CATCH_CONFIG_GLOBAL_NEXTAFTER
+#endif
+
 #if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS)
 #   define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS
 #   define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS
@@ -364,6 +404,10 @@ namespace Catch {
 #   define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS
 #   define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
 #endif
+#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS)
+#   define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS
+#   define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS
+#endif
 
 #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
 #define CATCH_TRY if ((true))
@@ -427,7 +471,7 @@ namespace Catch {
         SourceLineInfo( SourceLineInfo&& )              noexcept = default;
         SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default;
 
-        bool empty() const noexcept;
+        bool empty() const noexcept { return file[0] == '\0'; }
         bool operator == ( SourceLineInfo const& other ) const noexcept;
         bool operator < ( SourceLineInfo const& other ) const noexcept;
 
@@ -497,6 +541,7 @@ namespace Catch {
         virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const = 0;
     };
 
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config );
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );
     std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config );
     std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config );
@@ -509,6 +554,7 @@ namespace Catch {
 #include <cstddef>
 #include <string>
 #include <iosfwd>
+#include <cassert>
 
 namespace Catch {
 
@@ -522,6 +568,7 @@ namespace Catch {
     class StringRef {
     public:
         using size_type = std::size_t;
+        using const_iterator = const char*;
 
     private:
         friend struct StringRefTestAccess;
@@ -577,7 +624,9 @@ namespace Catch {
             return *this;
         }
 
-        operator std::string() const;
+        explicit operator std::string() const {
+            return std::string(m_start, m_size);
+        }
 
         void swap( StringRef& other ) noexcept;
 
@@ -585,7 +634,10 @@ namespace Catch {
         auto operator == ( StringRef const& other ) const noexcept -> bool;
         auto operator != ( StringRef const& other ) const noexcept -> bool;
 
-        auto operator[] ( size_type index ) const noexcept -> char;
+        auto operator[] ( size_type index ) const noexcept -> char {
+            assert(index < m_size);
+            return m_start[index];
+        }
 
     public: // named queries
         auto empty() const noexcept -> bool {
@@ -595,7 +647,6 @@ namespace Catch {
             return m_size;
         }
 
-        auto numberOfCharacters() const noexcept -> size_type;
         auto c_str() const -> char const*;
 
     public: // substrings and searches
@@ -605,15 +656,15 @@ namespace Catch {
         // Note that the pointer can change when if the StringRef is a substring
         auto currentData() const noexcept -> char const*;
 
+    public: // iterators
+        const_iterator begin() const { return m_start; }
+        const_iterator end() const { return m_start + m_size; }
+
     private: // ownership queries - may not be consistent between calls
         auto isOwned() const noexcept -> bool;
         auto isSubstring() const noexcept -> bool;
     };
 
-    auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string;
-    auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string;
-    auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string;
-
     auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&;
     auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&;
 
@@ -628,38 +679,6 @@ inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noex
 }
 
 // end catch_stringref.h
-// start catch_type_traits.hpp
-
-
-#include <type_traits>
-
-namespace Catch{
-
-#ifdef CATCH_CPP17_OR_GREATER
-	template <typename...>
-	inline constexpr auto is_unique = std::true_type{};
-
-	template <typename T, typename... Rest>
-	inline constexpr auto is_unique<T, Rest...> = std::bool_constant<
-		(!std::is_same_v<T, Rest> && ...) && is_unique<Rest...>
-	>{};
-#else
-
-template <typename...>
-struct is_unique : std::true_type{};
-
-template <typename T0, typename T1, typename... Rest>
-struct is_unique<T0, T1, Rest...> : std::integral_constant
-<bool,
-     !std::is_same<T0, T1>::value
-     && is_unique<T0, Rest...>::value
-     && is_unique<T1, Rest...>::value
->{};
-
-#endif
-}
-
-// end catch_type_traits.hpp
 // start catch_preprocessor.hpp
 
 
@@ -722,23 +741,156 @@ struct is_unique<T0, T1, Rest...> : std::integral_constant
 #define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1)
 #endif
 
+#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__
+#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name)
+
 #define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__)
 
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name, __VA_ARGS__)
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name,...) Name " - " #__VA_ARGS__
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name,...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))
+#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>())
+#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))
 #else
-// MSVC is adding extra space and needs more calls to properly remove ()
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name,...) Name " -" #__VA_ARGS__
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME1(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, __VA_ARGS__)
-#define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME1(Name, INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))
+#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper<INTERNAL_CATCH_REMOVE_PARENS_GEN(__VA_ARGS__)>()))
+#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)))
 #endif
 
-#define INTERNAL_CATCH_MAKE_TYPE_LIST(types) Catch::TypeList<INTERNAL_CATCH_REMOVE_PARENS(types)>
+#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\
+    CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__)
+
+#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0)
+#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1)
+#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2)
+#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3)
+#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4)
+#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5)
+#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6)
+#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7)
+#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8)
+#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9)
+#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10)
+
+#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N
+
+#define INTERNAL_CATCH_TYPE_GEN\
+    template<typename...> struct TypeList {};\
+    template<typename...Ts>\
+    constexpr auto get_wrapper() noexcept -> TypeList<Ts...> { return {}; }\
+    \
+    template<template<typename...> class L1, typename...E1, template<typename...> class L2, typename...E2> \
+    constexpr auto append(L1<E1...>, L2<E2...>) noexcept -> L1<E1...,E2...> { return {}; }\
+    template< template<typename...> class L1, typename...E1, template<typename...> class L2, typename...E2, typename...Rest>\
+    constexpr auto append(L1<E1...>, L2<E2...>, Rest...) noexcept -> decltype(append(L1<E1...,E2...>{}, Rest{}...)) { return {}; }\
+    template< template<typename...> class L1, typename...E1, typename...Rest>\
+    constexpr auto append(L1<E1...>, TypeList<mpl_::na>, Rest...) noexcept -> L1<E1...> { return {}; }\
+    \
+    template< template<typename...> class Container, template<typename...> class List, typename...elems>\
+    constexpr auto rewrap(List<elems...>) noexcept -> TypeList<Container<elems...>> { return {}; }\
+    template< template<typename...> class Container, template<typename...> class List, class...Elems, typename...Elements>\
+    constexpr auto rewrap(List<Elems...>,Elements...) noexcept -> decltype(append(TypeList<Container<Elems...>>{}, rewrap<Container>(Elements{}...))) { return {}; }\
+    \
+    template<template <typename...> class Final, template< typename...> class...Containers, typename...Types>\
+    constexpr auto create(TypeList<Types...>) noexcept -> decltype(append(Final<>{}, rewrap<Containers>(Types{}...)...)) { return {}; }\
+    template<template <typename...> class Final, template <typename...> class List, typename...Ts>\
+    constexpr auto convert(const List<Ts...>& ) noexcept -> decltype(append(Final<>{},TypeList<Ts>{}...)) { return {}; }
+
+#define INTERNAL_CATCH_NTTP_1(signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> struct Nttp{};\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    constexpr auto get_wrapper() noexcept -> Nttp<__VA_ARGS__> { return {}; } \
+    \
+    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    constexpr auto rewrap(List<__VA_ARGS__>) noexcept -> TypeList<Container<__VA_ARGS__>> { return {}; }\
+    template< template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class Container, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class List, INTERNAL_CATCH_REMOVE_PARENS(signature), typename...Elements>\
+    constexpr auto rewrap(List<__VA_ARGS__>,Elements...elems) noexcept -> decltype(append(TypeList<Container<__VA_ARGS__>>{}, rewrap<Container>(elems...))) { return {}; }\
+    template<template <typename...> class Final, template<INTERNAL_CATCH_REMOVE_PARENS(signature)> class...Containers, typename...Types>\
+    constexpr auto create(TypeList<Types...>) noexcept -> decltype(append(Final<>{}, rewrap<Containers>(Types{}...)...)) { return {}; }
+
+#define INTERNAL_CATCH_DECLARE_SIG_TEST0(TestName)
+#define INTERNAL_CATCH_DECLARE_SIG_TEST1(TestName, signature)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    static void TestName()
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_X(TestName, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    static void TestName()
+
+#define INTERNAL_CATCH_DEFINE_SIG_TEST0(TestName)
+#define INTERNAL_CATCH_DEFINE_SIG_TEST1(TestName, signature)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    static void TestName()
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_X(TestName, signature,...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    static void TestName()
+
+#define INTERNAL_CATCH_NTTP_REGISTER0(TestFunc, signature)\
+    template<typename Type>\
+    void reg_test(TypeList<Type>, Catch::NameAndTags nameAndTags)\
+    {\
+        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<Type>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\
+    }
+
+#define INTERNAL_CATCH_NTTP_REGISTER(TestFunc, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    void reg_test(Nttp<__VA_ARGS__>, Catch::NameAndTags nameAndTags)\
+    {\
+        Catch::AutoReg( Catch::makeTestInvoker(&TestFunc<__VA_ARGS__>), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), nameAndTags);\
+    }
+
+#define INTERNAL_CATCH_NTTP_REGISTER_METHOD0(TestName, signature, ...)\
+    template<typename Type>\
+    void reg_test(TypeList<Type>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\
+    {\
+        Catch::AutoReg( Catch::makeTestInvoker(&TestName<Type>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\
+    }
+
+#define INTERNAL_CATCH_NTTP_REGISTER_METHOD(TestName, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)>\
+    void reg_test(Nttp<__VA_ARGS__>, Catch::StringRef className, Catch::NameAndTags nameAndTags)\
+    {\
+        Catch::AutoReg( Catch::makeTestInvoker(&TestName<__VA_ARGS__>::test), CATCH_INTERNAL_LINEINFO, className, nameAndTags);\
+    }
+
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0(TestName, ClassName)
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1(TestName, ClassName, signature)\
+    template<typename TestType> \
+    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<TestType> { \
+        void test();\
+    }
+
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X(TestName, ClassName, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \
+    struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName)<__VA_ARGS__> { \
+        void test();\
+    }
+
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0(TestName)
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1(TestName, signature)\
+    template<typename TestType> \
+    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<TestType>::test()
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X(TestName, signature, ...)\
+    template<INTERNAL_CATCH_REMOVE_PARENS(signature)> \
+    void INTERNAL_CATCH_MAKE_NAMESPACE(TestName)::TestName<__VA_ARGS__>::test()
 
-#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(types)\
-    CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,INTERNAL_CATCH_REMOVE_PARENS(types))
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+#define INTERNAL_CATCH_NTTP_0
+#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__),INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_0)
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__)
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__)
+#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__)
+#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__)
+#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__)
+#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__)
+#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__)
+#else
+#define INTERNAL_CATCH_NTTP_0(signature)
+#define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_1,INTERNAL_CATCH_NTTP_1, INTERNAL_CATCH_NTTP_0)( __VA_ARGS__))
+#define INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD1, INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD0)(TestName, __VA_ARGS__))
+#define INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X,INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD_X, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD1, INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD0)(TestName, ClassName, __VA_ARGS__))
+#define INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD, INTERNAL_CATCH_NTTP_REGISTER_METHOD0, INTERNAL_CATCH_NTTP_REGISTER_METHOD0)(TestName, __VA_ARGS__))
+#define INTERNAL_CATCH_NTTP_REG_GEN(TestFunc, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER, INTERNAL_CATCH_NTTP_REGISTER0, INTERNAL_CATCH_NTTP_REGISTER0)(TestFunc, __VA_ARGS__))
+#define INTERNAL_CATCH_DEFINE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DEFINE_SIG_TEST1, INTERNAL_CATCH_DEFINE_SIG_TEST0)(TestName, __VA_ARGS__))
+#define INTERNAL_CATCH_DECLARE_SIG_TEST(TestName, ...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL( "dummy", __VA_ARGS__, INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DEFINE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X,INTERNAL_CATCH_DECLARE_SIG_TEST_X, INTERNAL_CATCH_DECLARE_SIG_TEST1, INTERNAL_CATCH_DECLARE_SIG_TEST0)(TestName, __VA_ARGS__))
+#define INTERNAL_CATCH_REMOVE_PARENS_GEN(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_REMOVE_PARENS_11_ARG,INTERNAL_CATCH_REMOVE_PARENS_10_ARG,INTERNAL_CATCH_REMOVE_PARENS_9_ARG,INTERNAL_CATCH_REMOVE_PARENS_8_ARG,INTERNAL_CATCH_REMOVE_PARENS_7_ARG,INTERNAL_CATCH_REMOVE_PARENS_6_ARG,INTERNAL_CATCH_REMOVE_PARENS_5_ARG,INTERNAL_CATCH_REMOVE_PARENS_4_ARG,INTERNAL_CATCH_REMOVE_PARENS_3_ARG,INTERNAL_CATCH_REMOVE_PARENS_2_ARG,INTERNAL_CATCH_REMOVE_PARENS_1_ARG)(__VA_ARGS__))
+#endif
 
 // end catch_preprocessor.hpp
 // start catch_meta.hpp
@@ -747,68 +899,29 @@ struct is_unique<T0, T1, Rest...> : std::integral_constant
 #include <type_traits>
 
 namespace Catch {
-template< typename... >
-struct TypeList {};
-
-template< typename... >
-struct append;
-
-template< template<typename...> class L1
-    , typename...E1
-    , template<typename...> class L2
-    , typename...E2
->
-struct append< L1<E1...>, L2<E2...> > {
-    using type = L1<E1..., E2...>;
-};
-
-template< template<typename...> class L1
-    , typename...E1
-    , template<typename...> class L2
-    , typename...E2
-    , typename...Rest
->
-struct append< L1<E1...>, L2<E2...>, Rest...> {
-    using type = typename append< L1<E1..., E2...>, Rest... >::type;
-};
-
-template< template<typename...> class
-    , typename...
->
-struct rewrap;
-
-template< template<typename...> class Container
-    , template<typename...> class List
-    , typename...elems
->
-struct rewrap<Container, List<elems...>> {
-    using type = TypeList< Container< elems... > >;
-};
+template<typename T>
+struct always_false : std::false_type {};
 
-template< template<typename...> class Container
-    , template<typename...> class List
-    , class...Elems
-    , typename...Elements>
-    struct rewrap<Container, List<Elems...>, Elements...> {
-    using type = typename append<TypeList<Container<Elems...>>, typename rewrap<Container, Elements...>::type>::type;
+template <typename> struct true_given : std::true_type {};
+struct is_callable_tester {
+    template <typename Fun, typename... Args>
+    true_given<decltype(std::declval<Fun>()(std::declval<Args>()...))> static test(int);
+    template <typename...>
+    std::false_type static test(...);
 };
 
-template< template<typename...> class...Containers >
-struct combine {
-    template< typename...Types >
-    struct with_types {
-        template< template <typename...> class Final >
-        struct into {
-            using type = typename append<Final<>, typename rewrap<Containers, Types...>::type...>::type;
-        };
-    };
-};
+template <typename T>
+struct is_callable;
 
-template<typename T>
-struct always_false : std::false_type {};
+template <typename Fun, typename... Args>
+struct is_callable<Fun(Args...)> : decltype(is_callable_tester::test<Fun, Args...>(0)) {};
 
 } // namespace Catch
 
+namespace mpl_{
+    struct na;
+}
+
 // end catch_meta.hpp
 namespace Catch {
 
@@ -854,18 +967,47 @@ struct AutoReg : NonCopyable {
             };                            \
         }                                 \
         void TestName::test()
-    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION( TestName, ... )  \
-        template<typename TestType>                                             \
-        static void TestName()
-    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... )    \
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( TestName, TestFunc, Name, Tags, Signature, ... )  \
+        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature))
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... )    \
         namespace{                                                                                  \
-            template<typename TestType>                                                             \
-            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) {     \
-                void test();                                                                        \
-            };                                                                                      \
+            namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                      \
+            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\
         }                                                                                           \
-        template<typename TestType>                                                                 \
-        void TestName::test()
+        }                                                                                           \
+        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))
+
+    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \
+            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
+    #else
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(Name, Tags, ...) \
+            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) )
+    #endif
+
+    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \
+            INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ )
+    #else
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(Name, Tags, Signature, ...) \
+            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) )
+    #endif
+
+    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \
+            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )
+    #else
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( ClassName, Name, Tags,... ) \
+            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )
+    #endif
+
+    #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \
+            INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )
+    #else
+        #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION( ClassName, Name, Tags, Signature, ... ) \
+            INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )
+    #endif
 #endif
 
     ///////////////////////////////////////////////////////////////////////////////
@@ -905,54 +1047,61 @@ struct AutoReg : NonCopyable {
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
 
     ///////////////////////////////////////////////////////////////////////////////
-    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, ... )\
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, Signature, ... )\
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
-        template<typename TestType> \
-        static void TestFunc();\
+        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+        INTERNAL_CATCH_DECLARE_SIG_TEST(TestFunc, INTERNAL_CATCH_REMOVE_PARENS(Signature));\
         namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\
+            INTERNAL_CATCH_TYPE_GEN\
+            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\
+            INTERNAL_CATCH_NTTP_REG_GEN(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))\
             template<typename...Types> \
             struct TestName{\
-                template<typename...Ts> \
-                TestName(Ts...names){\
-                    CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
+                TestName(){\
+                    int index = 0;                                    \
+                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\
                     using expander = int[];\
-                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
+                    (void)expander{(reg_test(Types{}, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++, 0)... };/* NOLINT */ \
                 }\
             };\
-            INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, __VA_ARGS__) \
+            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
+            TestName<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\
+            return 0;\
+        }();\
+        }\
         }\
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
-        template<typename TestType> \
-        static void TestFunc()
-
-#if defined(CATCH_CPP17_OR_GREATER)
-#define CATCH_INTERNAL_CHECK_UNIQUE_TYPES(...) static_assert(Catch::is_unique<__VA_ARGS__>,"Duplicate type detected in declaration of template test case");
-#else
-#define CATCH_INTERNAL_CHECK_UNIQUE_TYPES(...) static_assert(Catch::is_unique<__VA_ARGS__>::value,"Duplicate type detected in declaration of template test case");
-#endif
+        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
+        INTERNAL_CATCH_DEFINE_SIG_TEST(TestFunc,INTERNAL_CATCH_REMOVE_PARENS(Signature))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \
-        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ )
+        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ )
 #else
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \
-        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ ) )
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename TestType, __VA_ARGS__ ) )
 #endif
 
-    #define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, ...)\
-        static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
-            TestName<CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)>(CATCH_REC_LIST_UD(INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME,Name, __VA_ARGS__));\
-            return 0;\
-        }();
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \
+        INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ )
+#else
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG(Name, Tags, Signature, ...) \
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) )
+#endif
 
-    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList) \
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, Signature, TmplTypes, TypesList) \
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS                      \
+        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS                \
         template<typename TestType> static void TestFuncName();       \
-        namespace {                                                   \
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName) {                                     \
+            INTERNAL_CATCH_TYPE_GEN                                                  \
+            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))         \
             template<typename... Types>                               \
             struct TestName {                                         \
-                TestName() {                                          \
-                    CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)       \
+                void reg_tests() {                                          \
                     int index = 0;                                    \
                     using expander = int[];                           \
                     constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
@@ -962,65 +1111,120 @@ struct AutoReg : NonCopyable {
                 }                                                     \
             };                                                        \
             static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
-                using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)> \
-                            ::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestName>::type; \
-                TestInit();                                           \
+                using TestInit = decltype(create<TestName, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>(TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>{})); \
+                TestInit t;                                           \
+                t.reg_tests();                                        \
                 return 0;                                             \
             }();                                                      \
         }                                                             \
+        }                                                             \
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS                    \
+        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS              \
         template<typename TestType>                                   \
         static void TestFuncName()
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\
-        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ),Name,Tags,__VA_ARGS__)
+        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename T,__VA_ARGS__)
 #else
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\
-        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ ) )
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, typename T, __VA_ARGS__ ) )
+#endif
+
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\
+        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__)
+#else
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG(Name, Tags, Signature, ...)\
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, Signature, __VA_ARGS__ ) )
 #endif
 
-    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, ... ) \
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2(TestName, TestFunc, Name, Tags, TmplList)\
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
-        namespace{ \
-            template<typename TestType> \
-            struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
-                void test();\
-            };\
+        template<typename TestType> static void TestFunc();       \
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){\
+        INTERNAL_CATCH_TYPE_GEN\
+        template<typename... Types>                               \
+        struct TestName {                                         \
+            void reg_tests() {                                          \
+                int index = 0;                                    \
+                using expander = int[];                           \
+                (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc<Types> ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++, 0)... };/* NOLINT */\
+            }                                                     \
+        };\
+        static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \
+                using TestInit = decltype(convert<TestName>(std::declval<TmplList>())); \
+                TestInit t;                                           \
+                t.reg_tests();                                        \
+                return 0;                                             \
+            }();                                                        \
+        }}\
+        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS                    \
+        template<typename TestType>                                   \
+        static void TestFunc()
+
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(Name, Tags, TmplList) \
+        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, TmplList )
+
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, Signature, ... ) \
+        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \
+            INTERNAL_CATCH_TYPE_GEN\
+            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\
+            INTERNAL_CATCH_DECLARE_SIG_TEST_METHOD(TestName, ClassName, INTERNAL_CATCH_REMOVE_PARENS(Signature));\
+            INTERNAL_CATCH_NTTP_REG_METHOD_GEN(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))\
             template<typename...Types> \
             struct TestNameClass{\
-                template<typename...Ts> \
-                TestNameClass(Ts...names){\
-                    CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \
+                TestNameClass(){\
+                    int index = 0;                                    \
+                    constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, __VA_ARGS__)};\
                     using expander = int[];\
-                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \
+                    (void)expander{(reg_test(Types{}, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index]), Tags } ), index++, 0)... };/* NOLINT */ \
                 }\
             };\
-            INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestNameClass, Name, __VA_ARGS__)\
+            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
+                TestNameClass<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(__VA_ARGS__)>();\
+                return 0;\
+        }();\
+        }\
         }\
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS\
-        template<typename TestType> \
-        void TestName<TestType>::test()
+        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS\
+        INTERNAL_CATCH_DEFINE_SIG_TEST_METHOD(TestName, INTERNAL_CATCH_REMOVE_PARENS(Signature))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \
-        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ )
+        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ )
 #else
     #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \
-        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ ) )
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, typename T, __VA_ARGS__ ) )
+#endif
+
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \
+        INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ )
+#else
+    #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... ) \
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, Signature, __VA_ARGS__ ) )
 #endif
 
-    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)\
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, Signature, TmplTypes, TypesList)\
         CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \
         template<typename TestType> \
             struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
                 void test();\
             };\
         namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestNameClass) {\
+            INTERNAL_CATCH_TYPE_GEN                  \
+            INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\
             template<typename...Types>\
             struct TestNameClass{\
-                TestNameClass(){\
-                    CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)\
+                void reg_tests(){\
                     int index = 0;\
                     using expander = int[];\
                     constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\
@@ -1030,24 +1234,65 @@ struct AutoReg : NonCopyable {
                 }\
             };\
             static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
-                using TestInit = Catch::combine<INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>\
-                            ::with_types<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(TypesList)>::into<TestNameClass>::type;\
-                TestInit();\
+                using TestInit = decltype(create<TestNameClass, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes)>(TypeList<INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(INTERNAL_CATCH_REMOVE_PARENS(TypesList))>{}));\
+                TestInit t;\
+                t.reg_tests();\
                 return 0;\
             }(); \
         }\
+        }\
         CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
+        CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \
         template<typename TestType> \
         void TestName<TestType>::test()
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\
-        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ )
+        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, typename T, __VA_ARGS__ )
 #else
     #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\
-        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ ) )
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, typename T,__VA_ARGS__ ) )
+#endif
+
+#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\
+        INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature, __VA_ARGS__ )
+#else
+    #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( ClassName, Name, Tags, Signature, ... )\
+        INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, Signature,__VA_ARGS__ ) )
 #endif
 
+    #define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, TmplList) \
+        CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
+        template<typename TestType> \
+        struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
+            void test();\
+        };\
+        namespace {\
+        namespace INTERNAL_CATCH_MAKE_NAMESPACE(TestName){ \
+            INTERNAL_CATCH_TYPE_GEN\
+            template<typename...Types>\
+            struct TestNameClass{\
+                void reg_tests(){\
+                    int index = 0;\
+                    using expander = int[];\
+                    (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName<Types>::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(INTERNAL_CATCH_STRINGIZE(TmplList)) + " - " + std::to_string(index), Tags } ), index++, 0)... };/* NOLINT */ \
+                }\
+            };\
+            static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\
+                using TestInit = decltype(convert<TestNameClass>(std::declval<TmplList>()));\
+                TestInit t;\
+                t.reg_tests();\
+                return 0;\
+            }(); \
+        }}\
+        CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \
+        template<typename TestType> \
+        void TestName<TestType>::test()
+
+#define INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD(ClassName, Name, Tags, TmplList) \
+        INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, TmplList )
+
 // end catch_test_registry.h
 // start catch_capture.hpp
 
@@ -1166,6 +1411,42 @@ namespace Catch {
 }
 
 // end catch_stream.h
+// start catch_interfaces_enum_values_registry.h
+
+#include <vector>
+
+namespace Catch {
+
+    namespace Detail {
+        struct EnumInfo {
+            StringRef m_name;
+            std::vector<std::pair<int, StringRef>> m_values;
+
+            ~EnumInfo();
+
+            StringRef lookup( int value ) const;
+        };
+    } // namespace Detail
+
+    struct IMutableEnumValuesRegistry {
+        virtual ~IMutableEnumValuesRegistry();
+
+        virtual Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values ) = 0;
+
+        template<typename E>
+        Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::initializer_list<E> values ) {
+            static_assert(sizeof(int) >= sizeof(E), "Cannot serialize enum to int");
+            std::vector<int> intValues;
+            intValues.reserve( values.size() );
+            for( auto enumValue : values )
+                intValues.push_back( static_cast<int>( enumValue ) );
+            return registerEnum( enumName, allEnums, intValues );
+        }
+    };
+
+} // Catch
+
+// end catch_interfaces_enum_values_registry.h
 
 #ifdef CATCH_CONFIG_CPP17_STRING_VIEW
 #include <string_view>
@@ -1236,9 +1517,9 @@ namespace Catch {
 
         template<typename T>
         class IsStreamInsertable {
-            template<typename SS, typename TT>
+            template<typename Stream, typename U>
             static auto test(int)
-                -> decltype(std::declval<SS&>() << std::declval<TT>(), std::true_type());
+                -> decltype(std::declval<Stream&>() << std::declval<U>(), std::true_type());
 
             template<typename, typename>
             static auto test(...)->std::false_type;
@@ -1400,6 +1681,12 @@ namespace Catch {
         }
     };
 
+#if defined(CATCH_CONFIG_CPP17_BYTE)
+    template<>
+    struct StringMaker<std::byte> {
+        static std::string convert(std::byte value);
+    };
+#endif // defined(CATCH_CONFIG_CPP17_BYTE)
     template<>
     struct StringMaker<int> {
         static std::string convert(int value);
@@ -1451,10 +1738,13 @@ namespace Catch {
     template<>
     struct StringMaker<float> {
         static std::string convert(float value);
+        static int precision;
     };
+
     template<>
     struct StringMaker<double> {
         static std::string convert(double value);
+        static int precision;
     };
 
     template <typename T>
@@ -1827,6 +2117,18 @@ struct ratio_string<std::milli> {
 }
 #endif // CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER
 
+#define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \
+namespace Catch { \
+    template<> struct StringMaker<enumName> { \
+        static std::string convert( enumName value ) { \
+            static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \
+            return static_cast<std::string>(enumInfo.lookup( static_cast<int>( value ) )); \
+        } \
+    }; \
+}
+
+#define CATCH_REGISTER_ENUM( enumName, ... ) INTERNAL_CATCH_REGISTER_ENUM( enumName, __VA_ARGS__ )
+
 #ifdef _MSC_VER
 #pragma warning(pop)
 #endif
@@ -2066,6 +2368,7 @@ namespace Catch {
 // start catch_interfaces_capture.h
 
 #include <string>
+#include <chrono>
 
 namespace Catch {
 
@@ -2076,14 +2379,18 @@ namespace Catch {
     struct MessageInfo;
     struct MessageBuilder;
     struct Counts;
-    struct BenchmarkInfo;
-    struct BenchmarkStats;
     struct AssertionReaction;
     struct SourceLineInfo;
 
     struct ITransientExpression;
     struct IGeneratorTracker;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    struct BenchmarkInfo;
+    template <typename Duration = std::chrono::duration<double, std::nano>>
+    struct BenchmarkStats;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     struct IResultCapture {
 
         virtual ~IResultCapture();
@@ -2095,8 +2402,12 @@ namespace Catch {
 
         virtual auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        virtual void benchmarkPreparing( std::string const& name ) = 0;
         virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0;
-        virtual void benchmarkEnded( BenchmarkStats const& stats ) = 0;
+        virtual void benchmarkEnded( BenchmarkStats<> const& stats ) = 0;
+        virtual void benchmarkFailed( std::string const& error ) = 0;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         virtual void pushScopedMessage( MessageInfo const& message ) = 0;
         virtual void popScopedMessage( MessageInfo const& message ) = 0;
@@ -2562,52 +2873,6 @@ namespace Catch {
     CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS
 
 // end catch_section.h
-// start catch_benchmark.h
-
-#include <cstdint>
-#include <string>
-
-namespace Catch {
-
-    class BenchmarkLooper {
-
-        std::string m_name;
-        std::size_t m_count = 0;
-        std::size_t m_iterationsToRun = 1;
-        uint64_t m_resolution;
-        Timer m_timer;
-
-        static auto getResolution() -> uint64_t;
-    public:
-        // Keep most of this inline as it's on the code path that is being timed
-        BenchmarkLooper( StringRef name )
-        :   m_name( name ),
-            m_resolution( getResolution() )
-        {
-            reportStart();
-            m_timer.start();
-        }
-
-        explicit operator bool() {
-            if( m_count < m_iterationsToRun )
-                return true;
-            return needsMoreIterations();
-        }
-
-        void increment() {
-            ++m_count;
-        }
-
-        void reportStart();
-        auto needsMoreIterations() -> bool;
-    };
-
-} // end namespace Catch
-
-#define BENCHMARK( name ) \
-    for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() )
-
-// end catch_benchmark.h
 // start catch_interfaces_exception.h
 
 // start catch_interfaces_registry_hub.h
@@ -2624,6 +2889,8 @@ namespace Catch {
     struct IReporterRegistry;
     struct IReporterFactory;
     struct ITagAliasRegistry;
+    struct IMutableEnumValuesRegistry;
+
     class StartupExceptionRegistry;
 
     using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;
@@ -2634,7 +2901,6 @@ namespace Catch {
         virtual IReporterRegistry const& getReporterRegistry() const = 0;
         virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0;
         virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0;
-
         virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0;
 
         virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0;
@@ -2648,6 +2914,7 @@ namespace Catch {
         virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;
         virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0;
         virtual void registerStartupException() noexcept = 0;
+        virtual IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() = 0;
     };
 
     IRegistryHub const& getRegistryHub();
@@ -2854,6 +3121,7 @@ struct StringMaker<Catch::Detail::Approx> {
 
 #include <string>
 #include <iosfwd>
+#include <vector>
 
 namespace Catch {
 
@@ -2864,7 +3132,13 @@ namespace Catch {
     bool contains( std::string const& s, std::string const& infix );
     void toLowerInPlace( std::string& s );
     std::string toLower( std::string const& s );
+    //! Returns a new string without whitespace at the start/end
     std::string trim( std::string const& str );
+    //! Returns a substring of the original ref without whitespace. Beware lifetimes!
+    StringRef trim(StringRef ref);
+
+    // !!! Be aware, returns refs into original string - make sure original string outlives them
+    std::vector<StringRef> splitStringRef( StringRef str, char delimiter );
     bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis );
 
     struct pluralise {
@@ -2917,6 +3191,15 @@ namespace Matchers {
             virtual bool match( ObjectT const& arg ) const = 0;
         };
 
+#if defined(__OBJC__)
+        // Hack to fix Catch GH issue #1661. Could use id for generic Object support.
+        // use of const for Object pointers is very uncommon and under ARC it causes some kind of signature mismatch that breaks compilation
+        template<>
+        struct MatcherMethod<NSString*> {
+            virtual bool match( NSString* arg ) const = 0;
+        };
+#endif
+
 #ifdef __clang__
 #    pragma clang diagnostic pop
 #endif
@@ -3033,10 +3316,34 @@ using Matchers::Impl::MatcherBase;
 } // namespace Catch
 
 // end catch_matchers.h
-// start catch_matchers_floating.h
+// start catch_matchers_exception.hpp
 
-#include <type_traits>
-#include <cmath>
+namespace Catch {
+namespace Matchers {
+namespace Exception {
+
+class ExceptionMessageMatcher : public MatcherBase<std::exception> {
+    std::string m_message;
+public:
+
+    ExceptionMessageMatcher(std::string const& message):
+        m_message(message)
+    {}
+
+    bool match(std::exception const& ex) const override;
+
+    std::string describe() const override;
+};
+
+} // namespace Exception
+
+Exception::ExceptionMessageMatcher Message(std::string const& message);
+
+} // namespace Matchers
+} // namespace Catch
+
+// end catch_matchers_exception.hpp
+// start catch_matchers_floating.h
 
 namespace Catch {
 namespace Matchers {
@@ -3055,22 +3362,43 @@ namespace Matchers {
         };
 
         struct WithinUlpsMatcher : MatcherBase<double> {
-            WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType);
+            WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType);
             bool match(double const& matchee) const override;
             std::string describe() const override;
         private:
             double m_target;
-            int m_ulps;
+            uint64_t m_ulps;
             FloatingPointKind m_type;
         };
 
+        // Given IEEE-754 format for floats and doubles, we can assume
+        // that float -> double promotion is lossless. Given this, we can
+        // assume that if we do the standard relative comparison of
+        // |lhs - rhs| <= epsilon * max(fabs(lhs), fabs(rhs)), then we get
+        // the same result if we do this for floats, as if we do this for
+        // doubles that were promoted from floats.
+        struct WithinRelMatcher : MatcherBase<double> {
+            WithinRelMatcher(double target, double epsilon);
+            bool match(double const& matchee) const override;
+            std::string describe() const override;
+        private:
+            double m_target;
+            double m_epsilon;
+        };
+
     } // namespace Floating
 
     // The following functions create the actual matcher objects.
     // This allows the types to be inferred
-    Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff);
-    Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff);
+    Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff);
+    Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff);
     Floating::WithinAbsMatcher WithinAbs(double target, double margin);
+    Floating::WithinRelMatcher WithinRel(double target, double eps);
+    // defaults epsilon to 100*numeric_limits<double>::epsilon()
+    Floating::WithinRelMatcher WithinRel(double target);
+    Floating::WithinRelMatcher WithinRel(float target, float eps);
+    // defaults epsilon to 100*numeric_limits<float>::epsilon()
+    Floating::WithinRelMatcher WithinRel(float target);
 
 } // namespace Matchers
 } // namespace Catch
@@ -3113,7 +3441,7 @@ public:
 
     // The following functions create the actual matcher objects.
     // The user has to explicitly specify type to the function, because
-    // infering std::function<bool(T const&)> is hard (but possible) and
+    // inferring std::function<bool(T const&)> is hard (but possible) and
     // requires a lot of TMP.
     template<typename T>
     Generic::PredicateMatcher<T> Predicate(std::function<bool(T const&)> const& predicate, std::string const& description = "") {
@@ -3201,28 +3529,6 @@ namespace Catch {
 namespace Matchers {
 
     namespace Vector {
-        namespace Detail {
-            template <typename InputIterator, typename T>
-            size_t count(InputIterator first, InputIterator last, T const& item) {
-                size_t cnt = 0;
-                for (; first != last; ++first) {
-                    if (*first == item) {
-                        ++cnt;
-                    }
-                }
-                return cnt;
-            }
-            template <typename InputIterator, typename T>
-            bool contains(InputIterator first, InputIterator last, T const& item) {
-                for (; first != last; ++first) {
-                    if (*first == item) {
-                        return true;
-                    }
-                }
-                return false;
-            }
-        }
-
         template<typename T>
         struct ContainsElementMatcher : MatcherBase<std::vector<T>> {
 
@@ -3298,37 +3604,52 @@ namespace Matchers {
         };
 
         template<typename T>
-        struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>> {
-            UnorderedEqualsMatcher(std::vector<T> const& target) : m_target(target) {}
-            bool match(std::vector<T> const& vec) const override {
-                // Note: This is a reimplementation of std::is_permutation,
-                //       because I don't want to include <algorithm> inside the common path
-                if (m_target.size() != vec.size()) {
-                    return false;
-                }
-                auto lfirst = m_target.begin(), llast = m_target.end();
-                auto rfirst = vec.begin(), rlast = vec.end();
-                // Cut common prefix to optimize checking of permuted parts
-                while (lfirst != llast && *lfirst == *rfirst) {
-                    ++lfirst; ++rfirst;
-                }
-                if (lfirst == llast) {
-                    return true;
-                }
+        struct ApproxMatcher : MatcherBase<std::vector<T>> {
 
-                for (auto mid = lfirst; mid != llast; ++mid) {
-                    // Skip already counted items
-                    if (Detail::contains(lfirst, mid, *mid)) {
-                        continue;
-                    }
-                    size_t num_vec = Detail::count(rfirst, rlast, *mid);
-                    if (num_vec == 0 || Detail::count(lfirst, llast, *mid) != num_vec) {
-                        return false;
-                    }
-                }
+            ApproxMatcher(std::vector<T> const& comparator) : m_comparator( comparator ) {}
 
+            bool match(std::vector<T> const &v) const override {
+                if (m_comparator.size() != v.size())
+                    return false;
+                for (std::size_t i = 0; i < v.size(); ++i)
+                    if (m_comparator[i] != approx(v[i]))
+                        return false;
                 return true;
             }
+            std::string describe() const override {
+                return "is approx: " + ::Catch::Detail::stringify( m_comparator );
+            }
+            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
+            ApproxMatcher& epsilon( T const& newEpsilon ) {
+                approx.epsilon(newEpsilon);
+                return *this;
+            }
+            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
+            ApproxMatcher& margin( T const& newMargin ) {
+                approx.margin(newMargin);
+                return *this;
+            }
+            template <typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
+            ApproxMatcher& scale( T const& newScale ) {
+                approx.scale(newScale);
+                return *this;
+            }
+
+            std::vector<T> const& m_comparator;
+            mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom();
+        };
+
+        template<typename T>
+        struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>> {
+            UnorderedEqualsMatcher(std::vector<T> const& target) : m_target(target) {}
+            bool match(std::vector<T> const& vec) const override {
+                // Note: This is a reimplementation of std::is_permutation,
+                //       because I don't want to include <algorithm> inside the common path
+                if (m_target.size() != vec.size()) {
+                    return false;
+                }
+                return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());
+            }
 
             std::string describe() const override {
                 return "UnorderedEquals: " + ::Catch::Detail::stringify(m_target);
@@ -3357,6 +3678,11 @@ namespace Matchers {
         return Vector::EqualsMatcher<T>( comparator );
     }
 
+    template<typename T>
+    Vector::ApproxMatcher<T> Approx( std::vector<T> const& comparator ) {
+        return Vector::ApproxMatcher<T>( comparator );
+    }
+
     template<typename T>
     Vector::UnorderedEqualsMatcher<T> UnorderedEquals(std::vector<T> const& target) {
         return Vector::UnorderedEqualsMatcher<T>(target);
@@ -3470,7 +3796,7 @@ namespace Catch {
 // end catch_interfaces_generatortracker.h
 // start catch_enforce.h
 
-#include <stdexcept>
+#include <exception>
 
 namespace Catch {
 #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
@@ -3483,18 +3809,30 @@ namespace Catch {
     [[noreturn]]
     void throw_exception(std::exception const& e);
 #endif
+
+    [[noreturn]]
+    void throw_logic_error(std::string const& msg);
+    [[noreturn]]
+    void throw_domain_error(std::string const& msg);
+    [[noreturn]]
+    void throw_runtime_error(std::string const& msg);
+
 } // namespace Catch;
 
-#define CATCH_PREPARE_EXCEPTION( type, msg ) \
-    type( ( Catch::ReusableStringStream() << msg ).str() )
-#define CATCH_INTERNAL_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg))
-#define CATCH_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::domain_error, msg ))
-#define CATCH_RUNTIME_ERROR( msg ) \
-    Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg ))
-#define CATCH_ENFORCE( condition, msg ) \
-    do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false)
+#define CATCH_MAKE_MSG(...) \
+    (Catch::ReusableStringStream() << __VA_ARGS__).str()
+
+#define CATCH_INTERNAL_ERROR(...) \
+    Catch::throw_logic_error(CATCH_MAKE_MSG( CATCH_INTERNAL_LINEINFO << ": Internal Catch2 error: " << __VA_ARGS__))
+
+#define CATCH_ERROR(...) \
+    Catch::throw_domain_error(CATCH_MAKE_MSG( __VA_ARGS__ ))
+
+#define CATCH_RUNTIME_ERROR(...) \
+    Catch::throw_runtime_error(CATCH_MAKE_MSG( __VA_ARGS__ ))
+
+#define CATCH_ENFORCE( condition, ... ) \
+    do{ if( !(condition) ) CATCH_ERROR( __VA_ARGS__ ); } while(false)
 
 // end catch_enforce.h
 #include <memory>
@@ -3556,6 +3894,9 @@ namespace Generators {
 
     template<typename T>
     class FixedValuesGenerator final : public IGenerator<T> {
+        static_assert(!std::is_same<T, bool>::value,
+            "FixedValuesGenerator does not support bools because of std::vector<bool>"
+            "specialization, use SingleValue Generator instead.");
         std::vector<T> m_values;
         size_t m_idx = 0;
     public:
@@ -3775,6 +4116,9 @@ namespace Generators {
 
     template <typename T>
     class RepeatGenerator : public IGenerator<T> {
+        static_assert(!std::is_same<T, bool>::value,
+            "RepeatGenerator currently does not support bools"
+            "because of std::vector<bool> specialization");
         GeneratorWrapper<T> m_generator;
         mutable std::vector<T> m_returned;
         size_t m_target_repeats;
@@ -3889,12 +4233,14 @@ namespace Generators {
             m_chunk_size(size), m_generator(std::move(generator))
         {
             m_chunk.reserve(m_chunk_size);
-            m_chunk.push_back(m_generator.get());
-            for (size_t i = 1; i < m_chunk_size; ++i) {
-                if (!m_generator.next()) {
-                    Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
-                }
+            if (m_chunk_size != 0) {
                 m_chunk.push_back(m_generator.get());
+                for (size_t i = 1; i < m_chunk_size; ++i) {
+                    if (!m_generator.next()) {
+                        Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk"));
+                    }
+                    m_chunk.push_back(m_generator.get());
+                }
             }
         }
         std::vector<T> const& get() const override {
@@ -3974,11 +4320,79 @@ namespace Catch {
     }
 
     void cleanUpContext();
+
+    class SimplePcg32;
+    SimplePcg32& rng();
 }
 
 // end catch_context.h
 // start catch_interfaces_config.h
 
+// start catch_option.hpp
+
+namespace Catch {
+
+    // An optional type
+    template<typename T>
+    class Option {
+    public:
+        Option() : nullableValue( nullptr ) {}
+        Option( T const& _value )
+        : nullableValue( new( storage ) T( _value ) )
+        {}
+        Option( Option const& _other )
+        : nullableValue( _other ? new( storage ) T( *_other ) : nullptr )
+        {}
+
+        ~Option() {
+            reset();
+        }
+
+        Option& operator= ( Option const& _other ) {
+            if( &_other != this ) {
+                reset();
+                if( _other )
+                    nullableValue = new( storage ) T( *_other );
+            }
+            return *this;
+        }
+        Option& operator = ( T const& _value ) {
+            reset();
+            nullableValue = new( storage ) T( _value );
+            return *this;
+        }
+
+        void reset() {
+            if( nullableValue )
+                nullableValue->~T();
+            nullableValue = nullptr;
+        }
+
+        T& operator*() { return *nullableValue; }
+        T const& operator*() const { return *nullableValue; }
+        T* operator->() { return nullableValue; }
+        const T* operator->() const { return nullableValue; }
+
+        T valueOr( T const& defaultValue ) const {
+            return nullableValue ? *nullableValue : defaultValue;
+        }
+
+        bool some() const { return nullableValue != nullptr; }
+        bool none() const { return nullableValue == nullptr; }
+
+        bool operator !() const { return nullableValue == nullptr; }
+        explicit operator bool() const {
+            return some();
+        }
+
+    private:
+        T *nullableValue;
+        alignas(alignof(T)) char storage[sizeof(T)];
+    };
+
+} // end namespace Catch
+
+// end catch_option.hpp
 #include <iosfwd>
 #include <string>
 #include <vector>
@@ -4041,16 +4455,70 @@ namespace Catch {
         virtual std::vector<std::string> const& getTestsOrTags() const = 0;
         virtual RunTests::InWhatOrder runOrder() const = 0;
         virtual unsigned int rngSeed() const = 0;
-        virtual int benchmarkResolutionMultiple() const = 0;
         virtual UseColour::YesOrNo useColour() const = 0;
         virtual std::vector<std::string> const& getSectionsToRun() const = 0;
         virtual Verbosity verbosity() const = 0;
+
+        virtual bool benchmarkNoAnalysis() const = 0;
+        virtual int benchmarkSamples() const = 0;
+        virtual double benchmarkConfidenceInterval() const = 0;
+        virtual unsigned int benchmarkResamples() const = 0;
     };
 
     using IConfigPtr = std::shared_ptr<IConfig const>;
 }
 
 // end catch_interfaces_config.h
+// start catch_random_number_generator.h
+
+#include <cstdint>
+
+namespace Catch {
+
+    // This is a simple implementation of C++11 Uniform Random Number
+    // Generator. It does not provide all operators, because Catch2
+    // does not use it, but it should behave as expected inside stdlib's
+    // distributions.
+    // The implementation is based on the PCG family (http://pcg-random.org)
+    class SimplePcg32 {
+        using state_type = std::uint64_t;
+    public:
+        using result_type = std::uint32_t;
+        static constexpr result_type min() {
+            return 0;
+        }
+        static constexpr result_type max() {
+            return static_cast<result_type>(-1);
+        }
+
+        // Provide some default initial state for the default constructor
+        SimplePcg32():SimplePcg32(0xed743cc4U) {}
+
+        explicit SimplePcg32(result_type seed_);
+
+        void seed(result_type seed_);
+        void discard(uint64_t skip);
+
+        result_type operator()();
+
+    private:
+        friend bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs);
+        friend bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs);
+
+        // In theory we also need operator<< and operator>>
+        // In practice we do not use them, so we will skip them for now
+
+        std::uint64_t m_state;
+        // This part of the state determines which "stream" of the numbers
+        // is chosen -- we take it as a constant for Catch2, so we only
+        // need to deal with seeding the main state.
+        // Picked by reading 8 bytes from `/dev/random` :-)
+        static const std::uint64_t s_inc = (0x13ed0cc53f939476ULL << 1ULL) | 1ULL;
+    };
+
+} // end namespace Catch
+
+// end catch_random_number_generator.h
 #include <random>
 
 namespace Catch {
@@ -4058,14 +4526,13 @@ namespace Generators {
 
 template <typename Float>
 class RandomFloatingGenerator final : public IGenerator<Float> {
-    // FIXME: What is the right seed?
-    std::minstd_rand m_rand;
+    Catch::SimplePcg32& m_rng;
     std::uniform_real_distribution<Float> m_dist;
     Float m_current_number;
 public:
 
     RandomFloatingGenerator(Float a, Float b):
-        m_rand(getCurrentContext().getConfig()->rngSeed()),
+        m_rng(rng()),
         m_dist(a, b) {
         static_cast<void>(next());
     }
@@ -4074,20 +4541,20 @@ public:
         return m_current_number;
     }
     bool next() override {
-        m_current_number = m_dist(m_rand);
+        m_current_number = m_dist(m_rng);
         return true;
     }
 };
 
 template <typename Integer>
 class RandomIntegerGenerator final : public IGenerator<Integer> {
-    std::minstd_rand m_rand;
+    Catch::SimplePcg32& m_rng;
     std::uniform_int_distribution<Integer> m_dist;
     Integer m_current_number;
 public:
 
     RandomIntegerGenerator(Integer a, Integer b):
-        m_rand(getCurrentContext().getConfig()->rngSeed()),
+        m_rng(rng()),
         m_dist(a, b) {
         static_cast<void>(next());
     }
@@ -4096,7 +4563,7 @@ public:
         return m_current_number;
     }
     bool next() override {
-        m_current_number = m_dist(m_rand);
+        m_current_number = m_dist(m_rng);
         return true;
     }
 };
@@ -4166,6 +4633,45 @@ GeneratorWrapper<T> range(T const& start, T const& end) {
     return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end));
 }
 
+template <typename T>
+class IteratorGenerator final : public IGenerator<T> {
+    static_assert(!std::is_same<T, bool>::value,
+        "IteratorGenerator currently does not support bools"
+        "because of std::vector<bool> specialization");
+
+    std::vector<T> m_elems;
+    size_t m_current = 0;
+public:
+    template <typename InputIterator, typename InputSentinel>
+    IteratorGenerator(InputIterator first, InputSentinel last):m_elems(first, last) {
+        if (m_elems.empty()) {
+            Catch::throw_exception(GeneratorException("IteratorGenerator received no valid values"));
+        }
+    }
+
+    T const& get() const override {
+        return m_elems[m_current];
+    }
+
+    bool next() override {
+        ++m_current;
+        return m_current != m_elems.size();
+    }
+};
+
+template <typename InputIterator,
+          typename InputSentinel,
+          typename ResultType = typename std::iterator_traits<InputIterator>::value_type>
+GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) {
+    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(from, to));
+}
+
+template <typename Container,
+          typename ResultType = typename Container::value_type>
+GeneratorWrapper<ResultType> from_range(Container const& cnt) {
+    return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end()));
+}
+
 } // namespace Generators
 } // namespace Catch
 
@@ -4369,7 +4875,7 @@ namespace Catch {
                     arcSafeRelease( m_substr );
                 }
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return false;
                 }
 
@@ -4379,7 +4885,7 @@ namespace Catch {
             struct Equals : StringHolder {
                 Equals( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str isEqualToString:m_substr];
                 }
@@ -4392,7 +4898,7 @@ namespace Catch {
             struct Contains : StringHolder {
                 Contains( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location != NSNotFound;
                 }
@@ -4405,7 +4911,7 @@ namespace Catch {
             struct StartsWith : StringHolder {
                 StartsWith( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location == 0;
                 }
@@ -4417,7 +4923,7 @@ namespace Catch {
             struct EndsWith : StringHolder {
                 EndsWith( NSString* substr ) : StringHolder( substr ){}
 
-                bool match( NSString* const& str ) const override {
+                bool match( NSString* str ) const override {
                     return  (str != nil || m_substr == nil ) &&
                             [str rangeOfString:m_substr].location == [str length] - [m_substr length];
                 }
@@ -4468,7 +4974,8 @@ return @ desc; \
 // end catch_objc.hpp
 #endif
 
-#ifdef CATCH_CONFIG_EXTERNAL_INTERFACES
+// Benchmarking needs the externally-facing parts of reporters to work
+#if defined(CATCH_CONFIG_EXTERNAL_INTERFACES) || defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
 // start catch_external_interfaces.h
 
 // start catch_reporter_bases.hpp
@@ -4510,7 +5017,7 @@ namespace Catch
         virtual bool matches( std::string const& str ) const;
 
     private:
-        std::string adjustCase( std::string const& str ) const;
+        std::string normaliseString( std::string const& str ) const;
         CaseSensitive::Choice m_caseSensitivity;
         WildcardPosition m_wildcard = NoWildcard;
         std::string m_pattern;
@@ -4524,36 +5031,40 @@ namespace Catch
 
 namespace Catch {
 
+    struct IConfig;
+
     class TestSpec {
-        struct Pattern {
+        class Pattern {
+        public:
+            explicit Pattern( std::string const& name );
             virtual ~Pattern();
             virtual bool matches( TestCaseInfo const& testCase ) const = 0;
+            std::string const& name() const;
+        private:
+            std::string const m_name;
         };
         using PatternPtr = std::shared_ptr<Pattern>;
 
         class NamePattern : public Pattern {
         public:
-            NamePattern( std::string const& name );
-            virtual ~NamePattern();
-            virtual bool matches( TestCaseInfo const& testCase ) const override;
+            explicit NamePattern( std::string const& name, std::string const& filterString );
+            bool matches( TestCaseInfo const& testCase ) const override;
         private:
             WildcardPattern m_wildcardPattern;
         };
 
         class TagPattern : public Pattern {
         public:
-            TagPattern( std::string const& tag );
-            virtual ~TagPattern();
-            virtual bool matches( TestCaseInfo const& testCase ) const override;
+            explicit TagPattern( std::string const& tag, std::string const& filterString );
+            bool matches( TestCaseInfo const& testCase ) const override;
         private:
             std::string m_tag;
         };
 
         class ExcludedPattern : public Pattern {
         public:
-            ExcludedPattern( PatternPtr const& underlyingPattern );
-            virtual ~ExcludedPattern();
-            virtual bool matches( TestCaseInfo const& testCase ) const override;
+            explicit ExcludedPattern( PatternPtr const& underlyingPattern );
+            bool matches( TestCaseInfo const& testCase ) const override;
         private:
             PatternPtr m_underlyingPattern;
         };
@@ -4562,11 +5073,19 @@ namespace Catch {
             std::vector<PatternPtr> m_patterns;
 
             bool matches( TestCaseInfo const& testCase ) const;
+            std::string name() const;
         };
 
     public:
+        struct FilterMatch {
+            std::string name;
+            std::vector<TestCase const*> tests;
+        };
+        using Matches = std::vector<FilterMatch>;
+
         bool hasFilters() const;
         bool matches( TestCaseInfo const& testCase ) const;
+        Matches matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const;
 
     private:
         std::vector<Filter> m_filters;
@@ -4605,9 +5124,13 @@ namespace Catch {
     class TestSpecParser {
         enum Mode{ None, Name, QuotedName, Tag, EscapedName };
         Mode m_mode = None;
+        Mode lastMode = None;
         bool m_exclusion = false;
-        std::size_t m_start = std::string::npos, m_pos = 0;
+        std::size_t m_pos = 0;
+        std::size_t m_realPatternPos = 0;
         std::string m_arg;
+        std::string m_substring;
+        std::string m_patternName;
         std::vector<std::size_t> m_escapeChars;
         TestSpec::Filter m_currentFilter;
         TestSpec m_testSpec;
@@ -4621,26 +5144,34 @@ namespace Catch {
 
     private:
         void visitChar( char c );
-        void startNewMode( Mode mode, std::size_t start );
+        void startNewMode( Mode mode );
+        bool processNoneChar( char c );
+        void processNameChar( char c );
+        bool processOtherChar( char c );
+        void endMode();
         void escape();
-        std::string subString() const;
+        bool isControlChar( char c ) const;
+        void saveLastMode();
+        void revertBackToLastMode();
 
         template<typename T>
         void addPattern() {
-            std::string token = subString();
+            std::string token = m_patternName;
             for( std::size_t i = 0; i < m_escapeChars.size(); ++i )
-                token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 );
+                token = token.substr( 0, m_escapeChars[i] - i ) + token.substr( m_escapeChars[i] -i +1 );
             m_escapeChars.clear();
             if( startsWith( token, "exclude:" ) ) {
                 m_exclusion = true;
                 token = token.substr( 8 );
             }
             if( !token.empty() ) {
-                TestSpec::PatternPtr pattern = std::make_shared<T>( token );
+                TestSpec::PatternPtr pattern = std::make_shared<T>( token, m_substring );
                 if( m_exclusion )
                     pattern = std::make_shared<TestSpec::ExcludedPattern>( pattern );
                 m_currentFilter.m_patterns.push_back( pattern );
             }
+            m_substring.clear();
+            m_patternName.clear();
             m_exclusion = false;
             m_mode = None;
         }
@@ -4686,7 +5217,11 @@ namespace Catch {
 
         int abortAfter = -1;
         unsigned int rngSeed = 0;
-        int benchmarkResolutionMultiple = 100;
+
+        bool benchmarkNoAnalysis = false;
+        unsigned int benchmarkSamples = 100;
+        double benchmarkConfidenceInterval = 0.95;
+        unsigned int benchmarkResamples = 100000;
 
         Verbosity verbosity = Verbosity::Normal;
         WarnAbout::What warnings = WarnAbout::Nothing;
@@ -4728,7 +5263,7 @@ namespace Catch {
         std::vector<std::string> const& getTestsOrTags() const override;
         std::vector<std::string> const& getSectionsToRun() const override;
 
-        virtual TestSpec const& testSpec() const override;
+        TestSpec const& testSpec() const override;
         bool hasTestFilters() const override;
 
         bool showHelp() const;
@@ -4743,12 +5278,15 @@ namespace Catch {
         ShowDurations::OrNot showDurations() const override;
         RunTests::InWhatOrder runOrder() const override;
         unsigned int rngSeed() const override;
-        int benchmarkResolutionMultiple() const override;
         UseColour::YesOrNo useColour() const override;
         bool shouldDebugBreak() const override;
         int abortAfter() const override;
         bool showInvisibles() const override;
         Verbosity verbosity() const override;
+        bool benchmarkNoAnalysis() const override;
+        int benchmarkSamples() const override;
+        double benchmarkConfidenceInterval() const override;
+        unsigned int benchmarkResamples() const override;
 
     private:
 
@@ -4809,76 +5347,59 @@ namespace Catch {
 } // end namespace Catch
 
 // end catch_assertionresult.h
-// start catch_option.hpp
-
-namespace Catch {
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+// start catch_estimate.hpp
 
-    // An optional type
-    template<typename T>
-    class Option {
-    public:
-        Option() : nullableValue( nullptr ) {}
-        Option( T const& _value )
-        : nullableValue( new( storage ) T( _value ) )
-        {}
-        Option( Option const& _other )
-        : nullableValue( _other ? new( storage ) T( *_other ) : nullptr )
-        {}
+ // Statistics estimates
 
-        ~Option() {
-            reset();
-        }
 
-        Option& operator= ( Option const& _other ) {
-            if( &_other != this ) {
-                reset();
-                if( _other )
-                    nullableValue = new( storage ) T( *_other );
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct Estimate {
+            Duration point;
+            Duration lower_bound;
+            Duration upper_bound;
+            double confidence_interval;
+
+            template <typename Duration2>
+            operator Estimate<Duration2>() const {
+                return { point, lower_bound, upper_bound, confidence_interval };
             }
-            return *this;
-        }
-        Option& operator = ( T const& _value ) {
-            reset();
-            nullableValue = new( storage ) T( _value );
-            return *this;
-        }
-
-        void reset() {
-            if( nullableValue )
-                nullableValue->~T();
-            nullableValue = nullptr;
-        }
-
-        T& operator*() { return *nullableValue; }
-        T const& operator*() const { return *nullableValue; }
-        T* operator->() { return nullableValue; }
-        const T* operator->() const { return nullableValue; }
-
-        T valueOr( T const& defaultValue ) const {
-            return nullableValue ? *nullableValue : defaultValue;
-        }
+        };
+    } // namespace Benchmark
+} // namespace Catch
 
-        bool some() const { return nullableValue != nullptr; }
-        bool none() const { return nullableValue == nullptr; }
+// end catch_estimate.hpp
+// start catch_outlier_classification.hpp
 
-        bool operator !() const { return nullableValue == nullptr; }
-        explicit operator bool() const {
-            return some();
-        }
+// Outlier information
 
-    private:
-        T *nullableValue;
-        alignas(alignof(T)) char storage[sizeof(T)];
-    };
+namespace Catch {
+    namespace Benchmark {
+        struct OutlierClassification {
+            int samples_seen = 0;
+            int low_severe = 0;     // more than 3 times IQR below Q1
+            int low_mild = 0;       // 1.5 to 3 times IQR below Q1
+            int high_mild = 0;      // 1.5 to 3 times IQR above Q3
+            int high_severe = 0;    // more than 3 times IQR above Q3
+
+            int total() const {
+                return low_severe + low_mild + high_mild + high_severe;
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
 
-} // end namespace Catch
+// end catch_outlier_classification.hpp
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
-// end catch_option.hpp
 #include <string>
 #include <iosfwd>
 #include <map>
 #include <set>
 #include <memory>
+#include <algorithm>
 
 namespace Catch {
 
@@ -5014,14 +5535,43 @@ namespace Catch {
         bool aborting;
     };
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
     struct BenchmarkInfo {
         std::string name;
+        double estimatedDuration;
+        int iterations;
+        int samples;
+        unsigned int resamples;
+        double clockResolution;
+        double clockCost;
     };
+
+    template <class Duration>
     struct BenchmarkStats {
         BenchmarkInfo info;
-        std::size_t iterations;
-        uint64_t elapsedTimeInNanoseconds;
+
+        std::vector<Duration> samples;
+        Benchmark::Estimate<Duration> mean;
+        Benchmark::Estimate<Duration> standardDeviation;
+        Benchmark::OutlierClassification outliers;
+        double outlierVariance;
+
+        template <typename Duration2>
+        operator BenchmarkStats<Duration2>() const {
+            std::vector<Duration2> samples2;
+            samples2.reserve(samples.size());
+            std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });
+            return {
+                info,
+                std::move(samples2),
+                mean,
+                standardDeviation,
+                outliers,
+                outlierVariance,
+            };
+        }
     };
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
     struct IStreamingReporter {
         virtual ~IStreamingReporter() = default;
@@ -5040,17 +5590,18 @@ namespace Catch {
         virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0;
         virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0;
 
-        // *** experimental ***
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        virtual void benchmarkPreparing( std::string const& ) {}
         virtual void benchmarkStarting( BenchmarkInfo const& ) {}
+        virtual void benchmarkEnded( BenchmarkStats<> const& ) {}
+        virtual void benchmarkFailed( std::string const& ) {}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0;
 
         // The return value indicates if the messages buffer should be cleared:
         virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0;
 
-        // *** experimental ***
-        virtual void benchmarkEnded( BenchmarkStats const& ) {}
-
         virtual void sectionEnded( SectionStats const& sectionStats ) = 0;
         virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0;
         virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0;
@@ -5419,11 +5970,11 @@ namespace Catch {
 
         class ReporterFactory : public IReporterFactory {
 
-            virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override {
+            IStreamingReporterPtr create( ReporterConfig const& config ) const override {
                 return std::unique_ptr<T>( new T( config ) );
             }
 
-            virtual std::string getDescription() const override {
+            std::string getDescription() const override {
                 return T::getDescription();
             }
         };
@@ -5440,10 +5991,10 @@ namespace Catch {
 
         class ListenerFactory : public IReporterFactory {
 
-            virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override {
+            IStreamingReporterPtr create( ReporterConfig const& config ) const override {
                 return std::unique_ptr<T>( new T( config ) );
             }
-            virtual std::string getDescription() const override {
+            std::string getDescription() const override {
                 return std::string();
             }
         };
@@ -5535,8 +6086,12 @@ namespace Catch {
         void sectionStarting(SectionInfo const& _sectionInfo) override;
         void sectionEnded(SectionStats const& _sectionStats) override;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
         void benchmarkStarting(BenchmarkInfo const& info) override;
-        void benchmarkEnded(BenchmarkStats const& stats) override;
+        void benchmarkEnded(BenchmarkStats<> const& stats) override;
+        void benchmarkFailed(std::string const& error) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void testCaseEnded(TestCaseStats const& _testCaseStats) override;
         void testGroupEnded(TestGroupStats const& _testGroupStats) override;
@@ -5758,6 +6313,13 @@ namespace Catch {
 
         void testRunEnded(TestRunStats const& testRunStats) override;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
+        void benchmarkStarting(BenchmarkInfo const&) override;
+        void benchmarkEnded(BenchmarkStats<> const&) override;
+        void benchmarkFailed(std::string const&) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     private:
         Timer m_testCaseTimer;
         XmlWriter m_xml;
@@ -5771,39 +6333,985 @@ namespace Catch {
 // end catch_external_interfaces.h
 #endif
 
-#endif // ! CATCH_CONFIG_IMPL_ONLY
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+// start catch_benchmark.hpp
 
-#ifdef CATCH_IMPL
-// start catch_impl.hpp
+ // Benchmark
 
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wweak-vtables"
-#endif
+// start catch_chronometer.hpp
 
-// Keep these here for external reporters
-// start catch_test_case_tracker.h
+// User-facing chronometer
 
-#include <string>
-#include <vector>
-#include <memory>
 
-namespace Catch {
-namespace TestCaseTracking {
+// start catch_clock.hpp
 
-    struct NameAndLocation {
-        std::string name;
-        SourceLineInfo location;
+// Clocks
 
-        NameAndLocation( std::string const& _name, SourceLineInfo const& _location );
-    };
 
-    struct ITracker;
+#include <chrono>
+#include <ratio>
 
-    using ITrackerPtr = std::shared_ptr<ITracker>;
+namespace Catch {
+    namespace Benchmark {
+        template <typename Clock>
+        using ClockDuration = typename Clock::duration;
+        template <typename Clock>
+        using FloatDuration = std::chrono::duration<double, typename Clock::period>;
 
-    struct ITracker {
-        virtual ~ITracker();
+        template <typename Clock>
+        using TimePoint = typename Clock::time_point;
+
+        using default_clock = std::chrono::steady_clock;
+
+        template <typename Clock>
+        struct now {
+            TimePoint<Clock> operator()() const {
+                return Clock::now();
+            }
+        };
+
+        using fp_seconds = std::chrono::duration<double, std::ratio<1>>;
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_clock.hpp
+// start catch_optimizer.hpp
+
+ // Hinting the optimizer
+
+
+#if defined(_MSC_VER)
+#   include <atomic> // atomic_thread_fence
+#endif
+
+namespace Catch {
+    namespace Benchmark {
+#if defined(__GNUC__) || defined(__clang__)
+        template <typename T>
+        inline void keep_memory(T* p) {
+            asm volatile("" : : "g"(p) : "memory");
+        }
+        inline void keep_memory() {
+            asm volatile("" : : : "memory");
+        }
+
+        namespace Detail {
+            inline void optimizer_barrier() { keep_memory(); }
+        } // namespace Detail
+#elif defined(_MSC_VER)
+
+#pragma optimize("", off)
+        template <typename T>
+        inline void keep_memory(T* p) {
+            // thanks @milleniumbug
+            *reinterpret_cast<char volatile*>(p) = *reinterpret_cast<char const volatile*>(p);
+        }
+        // TODO equivalent keep_memory()
+#pragma optimize("", on)
+
+        namespace Detail {
+            inline void optimizer_barrier() {
+                std::atomic_thread_fence(std::memory_order_seq_cst);
+            }
+        } // namespace Detail
+
+#endif
+
+        template <typename T>
+        inline void deoptimize_value(T&& x) {
+            keep_memory(&x);
+        }
+
+        template <typename Fn, typename... Args>
+        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<!std::is_same<void, decltype(fn(args...))>::value>::type {
+            deoptimize_value(std::forward<Fn>(fn) (std::forward<Args...>(args...)));
+        }
+
+        template <typename Fn, typename... Args>
+        inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if<std::is_same<void, decltype(fn(args...))>::value>::type {
+            std::forward<Fn>(fn) (std::forward<Args...>(args...));
+        }
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_optimizer.hpp
+// start catch_complete_invoke.hpp
+
+// Invoke with a special case for void
+
+
+#include <type_traits>
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename T>
+            struct CompleteType { using type = T; };
+            template <>
+            struct CompleteType<void> { struct type {}; };
+
+            template <typename T>
+            using CompleteType_t = typename CompleteType<T>::type;
+
+            template <typename Result>
+            struct CompleteInvoker {
+                template <typename Fun, typename... Args>
+                static Result invoke(Fun&& fun, Args&&... args) {
+                    return std::forward<Fun>(fun)(std::forward<Args>(args)...);
+                }
+            };
+            template <>
+            struct CompleteInvoker<void> {
+                template <typename Fun, typename... Args>
+                static CompleteType_t<void> invoke(Fun&& fun, Args&&... args) {
+                    std::forward<Fun>(fun)(std::forward<Args>(args)...);
+                    return {};
+                }
+            };
+            template <typename Sig>
+            using ResultOf_t = typename std::result_of<Sig>::type;
+
+            // invoke and not return void :(
+            template <typename Fun, typename... Args>
+            CompleteType_t<ResultOf_t<Fun(Args...)>> complete_invoke(Fun&& fun, Args&&... args) {
+                return CompleteInvoker<ResultOf_t<Fun(Args...)>>::invoke(std::forward<Fun>(fun), std::forward<Args>(args)...);
+            }
+
+            const std::string benchmarkErrorMsg = "a benchmark failed to run successfully";
+        } // namespace Detail
+
+        template <typename Fun>
+        Detail::CompleteType_t<Detail::ResultOf_t<Fun()>> user_code(Fun&& fun) {
+            CATCH_TRY{
+                return Detail::complete_invoke(std::forward<Fun>(fun));
+            } CATCH_CATCH_ALL{
+                getResultCapture().benchmarkFailed(translateActiveException());
+                CATCH_RUNTIME_ERROR(Detail::benchmarkErrorMsg);
+            }
+        }
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_complete_invoke.hpp
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            struct ChronometerConcept {
+                virtual void start() = 0;
+                virtual void finish() = 0;
+                virtual ~ChronometerConcept() = default;
+            };
+            template <typename Clock>
+            struct ChronometerModel final : public ChronometerConcept {
+                void start() override { started = Clock::now(); }
+                void finish() override { finished = Clock::now(); }
+
+                ClockDuration<Clock> elapsed() const { return finished - started; }
+
+                TimePoint<Clock> started;
+                TimePoint<Clock> finished;
+            };
+        } // namespace Detail
+
+        struct Chronometer {
+        public:
+            template <typename Fun>
+            void measure(Fun&& fun) { measure(std::forward<Fun>(fun), is_callable<Fun(int)>()); }
+
+            int runs() const { return k; }
+
+            Chronometer(Detail::ChronometerConcept& meter, int k)
+                : impl(&meter)
+                , k(k) {}
+
+        private:
+            template <typename Fun>
+            void measure(Fun&& fun, std::false_type) {
+                measure([&fun](int) { return fun(); }, std::true_type());
+            }
+
+            template <typename Fun>
+            void measure(Fun&& fun, std::true_type) {
+                Detail::optimizer_barrier();
+                impl->start();
+                for (int i = 0; i < k; ++i) invoke_deoptimized(fun, i);
+                impl->finish();
+                Detail::optimizer_barrier();
+            }
+
+            Detail::ChronometerConcept* impl;
+            int k;
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_chronometer.hpp
+// start catch_environment.hpp
+
+// Environment information
+
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct EnvironmentEstimate {
+            Duration mean;
+            OutlierClassification outliers;
+
+            template <typename Duration2>
+            operator EnvironmentEstimate<Duration2>() const {
+                return { mean, outliers };
+            }
+        };
+        template <typename Clock>
+        struct Environment {
+            using clock_type = Clock;
+            EnvironmentEstimate<FloatDuration<Clock>> clock_resolution;
+            EnvironmentEstimate<FloatDuration<Clock>> clock_cost;
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_environment.hpp
+// start catch_execution_plan.hpp
+
+ // Execution plan
+
+
+// start catch_benchmark_function.hpp
+
+ // Dumb std::function implementation for consistent call overhead
+
+
+#include <cassert>
+#include <type_traits>
+#include <utility>
+#include <memory>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename T>
+            using Decay = typename std::decay<T>::type;
+            template <typename T, typename U>
+            struct is_related
+                : std::is_same<Decay<T>, Decay<U>> {};
+
+            /// We need to reinvent std::function because every piece of code that might add overhead
+            /// in a measurement context needs to have consistent performance characteristics so that we
+            /// can account for it in the measurement.
+            /// Implementations of std::function with optimizations that aren't always applicable, like
+            /// small buffer optimizations, are not uncommon.
+            /// This is effectively an implementation of std::function without any such optimizations;
+            /// it may be slow, but it is consistently slow.
+            struct BenchmarkFunction {
+            private:
+                struct callable {
+                    virtual void call(Chronometer meter) const = 0;
+                    virtual callable* clone() const = 0;
+                    virtual ~callable() = default;
+                };
+                template <typename Fun>
+                struct model : public callable {
+                    model(Fun&& fun) : fun(std::move(fun)) {}
+                    model(Fun const& fun) : fun(fun) {}
+
+                    model<Fun>* clone() const override { return new model<Fun>(*this); }
+
+                    void call(Chronometer meter) const override {
+                        call(meter, is_callable<Fun(Chronometer)>());
+                    }
+                    void call(Chronometer meter, std::true_type) const {
+                        fun(meter);
+                    }
+                    void call(Chronometer meter, std::false_type) const {
+                        meter.measure(fun);
+                    }
+
+                    Fun fun;
+                };
+
+                struct do_nothing { void operator()() const {} };
+
+                template <typename T>
+                BenchmarkFunction(model<T>* c) : f(c) {}
+
+            public:
+                BenchmarkFunction()
+                    : f(new model<do_nothing>{ {} }) {}
+
+                template <typename Fun,
+                    typename std::enable_if<!is_related<Fun, BenchmarkFunction>::value, int>::type = 0>
+                    BenchmarkFunction(Fun&& fun)
+                    : f(new model<typename std::decay<Fun>::type>(std::forward<Fun>(fun))) {}
+
+                BenchmarkFunction(BenchmarkFunction&& that)
+                    : f(std::move(that.f)) {}
+
+                BenchmarkFunction(BenchmarkFunction const& that)
+                    : f(that.f->clone()) {}
+
+                BenchmarkFunction& operator=(BenchmarkFunction&& that) {
+                    f = std::move(that.f);
+                    return *this;
+                }
+
+                BenchmarkFunction& operator=(BenchmarkFunction const& that) {
+                    f.reset(that.f->clone());
+                    return *this;
+                }
+
+                void operator()(Chronometer meter) const { f->call(meter); }
+
+            private:
+                std::unique_ptr<callable> f;
+            };
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_benchmark_function.hpp
+// start catch_repeat.hpp
+
+// repeat algorithm
+
+
+#include <type_traits>
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Fun>
+            struct repeater {
+                void operator()(int k) const {
+                    for (int i = 0; i < k; ++i) {
+                        fun();
+                    }
+                }
+                Fun fun;
+            };
+            template <typename Fun>
+            repeater<typename std::decay<Fun>::type> repeat(Fun&& fun) {
+                return { std::forward<Fun>(fun) };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_repeat.hpp
+// start catch_run_for_at_least.hpp
+
+// Run a function for a minimum amount of time
+
+
+// start catch_measure.hpp
+
+// Measure
+
+
+// start catch_timing.hpp
+
+// Timing
+
+
+#include <tuple>
+#include <type_traits>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration, typename Result>
+        struct Timing {
+            Duration elapsed;
+            Result result;
+            int iterations;
+        };
+        template <typename Clock, typename Sig>
+        using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<Detail::ResultOf_t<Sig>>>;
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_timing.hpp
+#include <utility>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock, typename Fun, typename... Args>
+            TimingOf<Clock, Fun(Args...)> measure(Fun&& fun, Args&&... args) {
+                auto start = Clock::now();
+                auto&& r = Detail::complete_invoke(fun, std::forward<Args>(args)...);
+                auto end = Clock::now();
+                auto delta = end - start;
+                return { delta, std::forward<decltype(r)>(r), 1 };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_measure.hpp
+#include <utility>
+#include <type_traits>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun(int)> measure_one(Fun&& fun, int iters, std::false_type) {
+                return Detail::measure<Clock>(fun, iters);
+            }
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun(Chronometer)> measure_one(Fun&& fun, int iters, std::true_type) {
+                Detail::ChronometerModel<Clock> meter;
+                auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters));
+
+                return { meter.elapsed(), std::move(result), iters };
+            }
+
+            template <typename Clock, typename Fun>
+            using run_for_at_least_argument_t = typename std::conditional<is_callable<Fun(Chronometer)>::value, Chronometer, int>::type;
+
+            struct optimized_away_error : std::exception {
+                const char* what() const noexcept override {
+                    return "could not measure benchmark, maybe it was optimized away";
+                }
+            };
+
+            template <typename Clock, typename Fun>
+            TimingOf<Clock, Fun(run_for_at_least_argument_t<Clock, Fun>)> run_for_at_least(ClockDuration<Clock> how_long, int seed, Fun&& fun) {
+                auto iters = seed;
+                while (iters < (1 << 30)) {
+                    auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
+
+                    if (Timing.elapsed >= how_long) {
+                        return { Timing.elapsed, std::move(Timing.result), iters };
+                    }
+                    iters *= 2;
+                }
+                throw optimized_away_error{};
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_run_for_at_least.hpp
+#include <algorithm>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct ExecutionPlan {
+            int iterations_per_sample;
+            Duration estimated_duration;
+            Detail::BenchmarkFunction benchmark;
+            Duration warmup_time;
+            int warmup_iterations;
+
+            template <typename Duration2>
+            operator ExecutionPlan<Duration2>() const {
+                return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations };
+            }
+
+            template <typename Clock>
+            std::vector<FloatDuration<Clock>> run(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {
+                // warmup a bit
+                Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_iterations, Detail::repeat(now<Clock>{}));
+
+                std::vector<FloatDuration<Clock>> times;
+                times.reserve(cfg.benchmarkSamples());
+                std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] {
+                    Detail::ChronometerModel<Clock> model;
+                    this->benchmark(Chronometer(model, iterations_per_sample));
+                    auto sample_time = model.elapsed() - env.clock_cost.mean;
+                    if (sample_time < FloatDuration<Clock>::zero()) sample_time = FloatDuration<Clock>::zero();
+                    return sample_time / iterations_per_sample;
+                });
+                return times;
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_execution_plan.hpp
+// start catch_estimate_clock.hpp
+
+ // Environment measurement
+
+
+// start catch_stats.hpp
+
+// Statistical analysis tools
+
+
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <numeric>
+#include <tuple>
+#include <cmath>
+#include <utility>
+#include <cstddef>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            using sample = std::vector<double>;
+
+            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last);
+
+            template <typename Iterator>
+            OutlierClassification classify_outliers(Iterator first, Iterator last) {
+                std::vector<double> copy(first, last);
+
+                auto q1 = weighted_average_quantile(1, 4, copy.begin(), copy.end());
+                auto q3 = weighted_average_quantile(3, 4, copy.begin(), copy.end());
+                auto iqr = q3 - q1;
+                auto los = q1 - (iqr * 3.);
+                auto lom = q1 - (iqr * 1.5);
+                auto him = q3 + (iqr * 1.5);
+                auto his = q3 + (iqr * 3.);
+
+                OutlierClassification o;
+                for (; first != last; ++first) {
+                    auto&& t = *first;
+                    if (t < los) ++o.low_severe;
+                    else if (t < lom) ++o.low_mild;
+                    else if (t > his) ++o.high_severe;
+                    else if (t > him) ++o.high_mild;
+                    ++o.samples_seen;
+                }
+                return o;
+            }
+
+            template <typename Iterator>
+            double mean(Iterator first, Iterator last) {
+                auto count = last - first;
+                double sum = std::accumulate(first, last, 0.);
+                return sum / count;
+            }
+
+            template <typename URng, typename Iterator, typename Estimator>
+            sample resample(URng& rng, int resamples, Iterator first, Iterator last, Estimator& estimator) {
+                auto n = last - first;
+                std::uniform_int_distribution<decltype(n)> dist(0, n - 1);
+
+                sample out;
+                out.reserve(resamples);
+                std::generate_n(std::back_inserter(out), resamples, [n, first, &estimator, &dist, &rng] {
+                    std::vector<double> resampled;
+                    resampled.reserve(n);
+                    std::generate_n(std::back_inserter(resampled), n, [first, &dist, &rng] { return first[dist(rng)]; });
+                    return estimator(resampled.begin(), resampled.end());
+                });
+                std::sort(out.begin(), out.end());
+                return out;
+            }
+
+            template <typename Estimator, typename Iterator>
+            sample jackknife(Estimator&& estimator, Iterator first, Iterator last) {
+                auto n = last - first;
+                auto second = std::next(first);
+                sample results;
+                results.reserve(n);
+
+                for (auto it = first; it != last; ++it) {
+                    std::iter_swap(it, first);
+                    results.push_back(estimator(second, last));
+                }
+
+                return results;
+            }
+
+            inline double normal_cdf(double x) {
+                return std::erfc(-x / std::sqrt(2.0)) / 2.0;
+            }
+
+            double erfc_inv(double x);
+
+            double normal_quantile(double p);
+
+            template <typename Iterator, typename Estimator>
+            Estimate<double> bootstrap(double confidence_level, Iterator first, Iterator last, sample const& resample, Estimator&& estimator) {
+                auto n_samples = last - first;
+
+                double point = estimator(first, last);
+                // Degenerate case with a single sample
+                if (n_samples == 1) return { point, point, point, confidence_level };
+
+                sample jack = jackknife(estimator, first, last);
+                double jack_mean = mean(jack.begin(), jack.end());
+                double sum_squares, sum_cubes;
+                std::tie(sum_squares, sum_cubes) = std::accumulate(jack.begin(), jack.end(), std::make_pair(0., 0.), [jack_mean](std::pair<double, double> sqcb, double x) -> std::pair<double, double> {
+                    auto d = jack_mean - x;
+                    auto d2 = d * d;
+                    auto d3 = d2 * d;
+                    return { sqcb.first + d2, sqcb.second + d3 };
+                });
+
+                double accel = sum_cubes / (6 * std::pow(sum_squares, 1.5));
+                int n = static_cast<int>(resample.size());
+                double prob_n = std::count_if(resample.begin(), resample.end(), [point](double x) { return x < point; }) / (double)n;
+                // degenerate case with uniform samples
+                if (prob_n == 0) return { point, point, point, confidence_level };
+
+                double bias = normal_quantile(prob_n);
+                double z1 = normal_quantile((1. - confidence_level) / 2.);
+
+                auto cumn = [n](double x) -> int {
+                    return std::lround(normal_cdf(x) * n); };
+                auto a = [bias, accel](double b) { return bias + b / (1. - accel * b); };
+                double b1 = bias + z1;
+                double b2 = bias - z1;
+                double a1 = a(b1);
+                double a2 = a(b2);
+                auto lo = std::max(cumn(a1), 0);
+                auto hi = std::min(cumn(a2), n - 1);
+
+                return { point, resample[lo], resample[hi], confidence_level };
+            }
+
+            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n);
+
+            struct bootstrap_analysis {
+                Estimate<double> mean;
+                Estimate<double> standard_deviation;
+                double outlier_variance;
+            };
+
+            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last);
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_stats.hpp
+#include <algorithm>
+#include <iterator>
+#include <tuple>
+#include <vector>
+#include <cmath>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Clock>
+            std::vector<double> resolution(int k) {
+                std::vector<TimePoint<Clock>> times;
+                times.reserve(k + 1);
+                std::generate_n(std::back_inserter(times), k + 1, now<Clock>{});
+
+                std::vector<double> deltas;
+                deltas.reserve(k);
+                std::transform(std::next(times.begin()), times.end(), times.begin(),
+                    std::back_inserter(deltas),
+                    [](TimePoint<Clock> a, TimePoint<Clock> b) { return static_cast<double>((a - b).count()); });
+
+                return deltas;
+            }
+
+            const auto warmup_iterations = 10000;
+            const auto warmup_time = std::chrono::milliseconds(100);
+            const auto minimum_ticks = 1000;
+            const auto warmup_seed = 10000;
+            const auto clock_resolution_estimation_time = std::chrono::milliseconds(500);
+            const auto clock_cost_estimation_time_limit = std::chrono::seconds(1);
+            const auto clock_cost_estimation_tick_limit = 100000;
+            const auto clock_cost_estimation_time = std::chrono::milliseconds(10);
+            const auto clock_cost_estimation_iterations = 10000;
+
+            template <typename Clock>
+            int warmup() {
+                return run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(warmup_time), warmup_seed, &resolution<Clock>)
+                    .iterations;
+            }
+            template <typename Clock>
+            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) {
+                auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>)
+                    .result;
+                return {
+                    FloatDuration<Clock>(mean(r.begin(), r.end())),
+                    classify_outliers(r.begin(), r.end()),
+                };
+            }
+            template <typename Clock>
+            EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) {
+                auto time_limit = std::min(resolution * clock_cost_estimation_tick_limit, FloatDuration<Clock>(clock_cost_estimation_time_limit));
+                auto time_clock = [](int k) {
+                    return Detail::measure<Clock>([k] {
+                        for (int i = 0; i < k; ++i) {
+                            volatile auto ignored = Clock::now();
+                            (void)ignored;
+                        }
+                    }).elapsed;
+                };
+                time_clock(1);
+                int iters = clock_cost_estimation_iterations;
+                auto&& r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_cost_estimation_time), iters, time_clock);
+                std::vector<double> times;
+                int nsamples = static_cast<int>(std::ceil(time_limit / r.elapsed));
+                times.reserve(nsamples);
+                std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] {
+                    return static_cast<double>((time_clock(r.iterations) / r.iterations).count());
+                });
+                return {
+                    FloatDuration<Clock>(mean(times.begin(), times.end())),
+                    classify_outliers(times.begin(), times.end()),
+                };
+            }
+
+            template <typename Clock>
+            Environment<FloatDuration<Clock>> measure_environment() {
+                static Environment<FloatDuration<Clock>>* env = nullptr;
+                if (env) {
+                    return *env;
+                }
+
+                auto iters = Detail::warmup<Clock>();
+                auto resolution = Detail::estimate_clock_resolution<Clock>(iters);
+                auto cost = Detail::estimate_clock_cost<Clock>(resolution.mean);
+
+                env = new Environment<FloatDuration<Clock>>{ resolution, cost };
+                return *env;
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_estimate_clock.hpp
+// start catch_analyse.hpp
+
+ // Run and analyse one benchmark
+
+
+// start catch_sample_analysis.hpp
+
+// Benchmark results
+
+
+#include <algorithm>
+#include <vector>
+#include <string>
+#include <iterator>
+
+namespace Catch {
+    namespace Benchmark {
+        template <typename Duration>
+        struct SampleAnalysis {
+            std::vector<Duration> samples;
+            Estimate<Duration> mean;
+            Estimate<Duration> standard_deviation;
+            OutlierClassification outliers;
+            double outlier_variance;
+
+            template <typename Duration2>
+            operator SampleAnalysis<Duration2>() const {
+                std::vector<Duration2> samples2;
+                samples2.reserve(samples.size());
+                std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });
+                return {
+                    std::move(samples2),
+                    mean,
+                    standard_deviation,
+                    outliers,
+                    outlier_variance,
+                };
+            }
+        };
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_sample_analysis.hpp
+#include <algorithm>
+#include <iterator>
+#include <vector>
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+            template <typename Duration, typename Iterator>
+            SampleAnalysis<Duration> analyse(const IConfig &cfg, Environment<Duration>, Iterator first, Iterator last) {
+                if (!cfg.benchmarkNoAnalysis()) {
+                    std::vector<double> samples;
+                    samples.reserve(last - first);
+                    std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); });
+
+                    auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end());
+                    auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end());
+
+                    auto wrap_estimate = [](Estimate<double> e) {
+                        return Estimate<Duration> {
+                            Duration(e.point),
+                                Duration(e.lower_bound),
+                                Duration(e.upper_bound),
+                                e.confidence_interval,
+                        };
+                    };
+                    std::vector<Duration> samples2;
+                    samples2.reserve(samples.size());
+                    std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); });
+                    return {
+                        std::move(samples2),
+                        wrap_estimate(analysis.mean),
+                        wrap_estimate(analysis.standard_deviation),
+                        outliers,
+                        analysis.outlier_variance,
+                    };
+                } else {
+                    std::vector<Duration> samples;
+                    samples.reserve(last - first);
+
+                    Duration mean = Duration(0);
+                    int i = 0;
+                    for (auto it = first; it < last; ++it, ++i) {
+                        samples.push_back(Duration(*it));
+                        mean += Duration(*it);
+                    }
+                    mean /= i;
+
+                    return {
+                        std::move(samples),
+                        Estimate<Duration>{mean, mean, mean, 0.0},
+                        Estimate<Duration>{Duration(0), Duration(0), Duration(0), 0.0},
+                        OutlierClassification{},
+                        0.0
+                    };
+                }
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+// end catch_analyse.hpp
+#include <algorithm>
+#include <functional>
+#include <string>
+#include <vector>
+#include <cmath>
+
+namespace Catch {
+    namespace Benchmark {
+        struct Benchmark {
+            Benchmark(std::string &&name)
+                : name(std::move(name)) {}
+
+            template <class FUN>
+            Benchmark(std::string &&name, FUN &&func)
+                : fun(std::move(func)), name(std::move(name)) {}
+
+            template <typename Clock>
+            ExecutionPlan<FloatDuration<Clock>> prepare(const IConfig &cfg, Environment<FloatDuration<Clock>> env) const {
+                auto min_time = env.clock_resolution.mean * Detail::minimum_ticks;
+                auto run_time = std::max(min_time, std::chrono::duration_cast<decltype(min_time)>(Detail::warmup_time));
+                auto&& test = Detail::run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(run_time), 1, fun);
+                int new_iters = static_cast<int>(std::ceil(min_time * test.iterations / test.elapsed));
+                return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast<FloatDuration<Clock>>(Detail::warmup_time), Detail::warmup_iterations };
+            }
+
+            template <typename Clock = default_clock>
+            void run() {
+                IConfigPtr cfg = getCurrentContext().getConfig();
+
+                auto env = Detail::measure_environment<Clock>();
+
+                getResultCapture().benchmarkPreparing(name);
+                CATCH_TRY{
+                    auto plan = user_code([&] {
+                        return prepare<Clock>(*cfg, env);
+                    });
+
+                    BenchmarkInfo info {
+                        name,
+                        plan.estimated_duration.count(),
+                        plan.iterations_per_sample,
+                        cfg->benchmarkSamples(),
+                        cfg->benchmarkResamples(),
+                        env.clock_resolution.mean.count(),
+                        env.clock_cost.mean.count()
+                    };
+
+                    getResultCapture().benchmarkStarting(info);
+
+                    auto samples = user_code([&] {
+                        return plan.template run<Clock>(*cfg, env);
+                    });
+
+                    auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());
+                    BenchmarkStats<std::chrono::duration<double, std::nano>> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
+                    getResultCapture().benchmarkEnded(stats);
+
+                } CATCH_CATCH_ALL{
+                    if (translateActiveException() != Detail::benchmarkErrorMsg) // benchmark errors have been reported, otherwise rethrow.
+                        std::rethrow_exception(std::current_exception());
+                }
+            }
+
+            // sets lambda to be used in fun *and* executes benchmark!
+            template <typename Fun,
+                typename std::enable_if<!Detail::is_related<Fun, Benchmark>::value, int>::type = 0>
+                Benchmark & operator=(Fun func) {
+                fun = Detail::BenchmarkFunction(func);
+                run();
+                return *this;
+            }
+
+            explicit operator bool() {
+                return true;
+            }
+
+        private:
+            Detail::BenchmarkFunction fun;
+            std::string name;
+        };
+    }
+} // namespace Catch
+
+#define INTERNAL_CATCH_GET_1_ARG(arg1, arg2, ...) arg1
+#define INTERNAL_CATCH_GET_2_ARG(arg1, arg2, ...) arg2
+
+#define INTERNAL_CATCH_BENCHMARK(BenchmarkName, name, benchmarkIndex)\
+    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
+        BenchmarkName = [&](int benchmarkIndex)
+
+#define INTERNAL_CATCH_BENCHMARK_ADVANCED(BenchmarkName, name)\
+    if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
+        BenchmarkName = [&]
+
+// end catch_benchmark.hpp
+#endif
+
+#endif // ! CATCH_CONFIG_IMPL_ONLY
+
+#ifdef CATCH_IMPL
+// start catch_impl.hpp
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
+
+// Keep these here for external reporters
+// start catch_test_case_tracker.h
+
+#include <string>
+#include <vector>
+#include <memory>
+
+namespace Catch {
+namespace TestCaseTracking {
+
+    struct NameAndLocation {
+        std::string name;
+        SourceLineInfo location;
+
+        NameAndLocation( std::string const& _name, SourceLineInfo const& _location );
+    };
+
+    struct ITracker;
+
+    using ITrackerPtr = std::shared_ptr<ITracker>;
+
+    struct ITracker {
+        virtual ~ITracker();
 
         // static queries
         virtual NameAndLocation const& nameAndLocation() const = 0;
@@ -5844,8 +7352,6 @@ namespace TestCaseTracking {
 
     public:
 
-        static TrackerContext& instance();
-
         ITracker& startRun();
         void endRun();
 
@@ -5900,50 +7406,261 @@ namespace TestCaseTracking {
         void fail() override;
         void markAsNeedingAnotherRun() override;
 
-    private:
-        void moveToParent();
-        void moveToThis();
-    };
+    private:
+        void moveToParent();
+        void moveToThis();
+    };
+
+    class SectionTracker : public TrackerBase {
+        std::vector<std::string> m_filters;
+        std::string m_trimmed_name;
+    public:
+        SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );
+
+        bool isSectionTracker() const override;
+
+        bool isComplete() const override;
+
+        static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation );
+
+        void tryOpen();
+
+        void addInitialFilters( std::vector<std::string> const& filters );
+        void addNextFilters( std::vector<std::string> const& filters );
+    };
+
+} // namespace TestCaseTracking
+
+using TestCaseTracking::ITracker;
+using TestCaseTracking::TrackerContext;
+using TestCaseTracking::SectionTracker;
+
+} // namespace Catch
+
+// end catch_test_case_tracker.h
+
+// start catch_leak_detector.h
+
+namespace Catch {
+
+    struct LeakDetector {
+        LeakDetector();
+        ~LeakDetector();
+    };
+
+}
+// end catch_leak_detector.h
+// Cpp files will be included in the single-header file here
+// start catch_stats.cpp
+
+// Statistical analysis tools
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+
+#include <cassert>
+#include <random>
+
+#if defined(CATCH_CONFIG_USE_ASYNC)
+#include <future>
+#endif
+
+namespace {
+    double erf_inv(double x) {
+        // Code accompanying the article "Approximating the erfinv function" in GPU Computing Gems, Volume 2
+        double w, p;
+
+        w = -log((1.0 - x) * (1.0 + x));
+
+        if (w < 6.250000) {
+            w = w - 3.125000;
+            p = -3.6444120640178196996e-21;
+            p = -1.685059138182016589e-19 + p * w;
+            p = 1.2858480715256400167e-18 + p * w;
+            p = 1.115787767802518096e-17 + p * w;
+            p = -1.333171662854620906e-16 + p * w;
+            p = 2.0972767875968561637e-17 + p * w;
+            p = 6.6376381343583238325e-15 + p * w;
+            p = -4.0545662729752068639e-14 + p * w;
+            p = -8.1519341976054721522e-14 + p * w;
+            p = 2.6335093153082322977e-12 + p * w;
+            p = -1.2975133253453532498e-11 + p * w;
+            p = -5.4154120542946279317e-11 + p * w;
+            p = 1.051212273321532285e-09 + p * w;
+            p = -4.1126339803469836976e-09 + p * w;
+            p = -2.9070369957882005086e-08 + p * w;
+            p = 4.2347877827932403518e-07 + p * w;
+            p = -1.3654692000834678645e-06 + p * w;
+            p = -1.3882523362786468719e-05 + p * w;
+            p = 0.0001867342080340571352 + p * w;
+            p = -0.00074070253416626697512 + p * w;
+            p = -0.0060336708714301490533 + p * w;
+            p = 0.24015818242558961693 + p * w;
+            p = 1.6536545626831027356 + p * w;
+        } else if (w < 16.000000) {
+            w = sqrt(w) - 3.250000;
+            p = 2.2137376921775787049e-09;
+            p = 9.0756561938885390979e-08 + p * w;
+            p = -2.7517406297064545428e-07 + p * w;
+            p = 1.8239629214389227755e-08 + p * w;
+            p = 1.5027403968909827627e-06 + p * w;
+            p = -4.013867526981545969e-06 + p * w;
+            p = 2.9234449089955446044e-06 + p * w;
+            p = 1.2475304481671778723e-05 + p * w;
+            p = -4.7318229009055733981e-05 + p * w;
+            p = 6.8284851459573175448e-05 + p * w;
+            p = 2.4031110387097893999e-05 + p * w;
+            p = -0.0003550375203628474796 + p * w;
+            p = 0.00095328937973738049703 + p * w;
+            p = -0.0016882755560235047313 + p * w;
+            p = 0.0024914420961078508066 + p * w;
+            p = -0.0037512085075692412107 + p * w;
+            p = 0.005370914553590063617 + p * w;
+            p = 1.0052589676941592334 + p * w;
+            p = 3.0838856104922207635 + p * w;
+        } else {
+            w = sqrt(w) - 5.000000;
+            p = -2.7109920616438573243e-11;
+            p = -2.5556418169965252055e-10 + p * w;
+            p = 1.5076572693500548083e-09 + p * w;
+            p = -3.7894654401267369937e-09 + p * w;
+            p = 7.6157012080783393804e-09 + p * w;
+            p = -1.4960026627149240478e-08 + p * w;
+            p = 2.9147953450901080826e-08 + p * w;
+            p = -6.7711997758452339498e-08 + p * w;
+            p = 2.2900482228026654717e-07 + p * w;
+            p = -9.9298272942317002539e-07 + p * w;
+            p = 4.5260625972231537039e-06 + p * w;
+            p = -1.9681778105531670567e-05 + p * w;
+            p = 7.5995277030017761139e-05 + p * w;
+            p = -0.00021503011930044477347 + p * w;
+            p = -0.00013871931833623122026 + p * w;
+            p = 1.0103004648645343977 + p * w;
+            p = 4.8499064014085844221 + p * w;
+        }
+        return p * x;
+    }
+
+    double standard_deviation(std::vector<double>::iterator first, std::vector<double>::iterator last) {
+        auto m = Catch::Benchmark::Detail::mean(first, last);
+        double variance = std::accumulate(first, last, 0., [m](double a, double b) {
+            double diff = b - m;
+            return a + diff * diff;
+            }) / (last - first);
+            return std::sqrt(variance);
+    }
+
+}
+
+namespace Catch {
+    namespace Benchmark {
+        namespace Detail {
+
+            double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) {
+                auto count = last - first;
+                double idx = (count - 1) * k / static_cast<double>(q);
+                int j = static_cast<int>(idx);
+                double g = idx - j;
+                std::nth_element(first, first + j, last);
+                auto xj = first[j];
+                if (g == 0) return xj;
+
+                auto xj1 = *std::min_element(first + (j + 1), last);
+                return xj + g * (xj1 - xj);
+            }
 
-    class SectionTracker : public TrackerBase {
-        std::vector<std::string> m_filters;
-    public:
-        SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent );
+            double erfc_inv(double x) {
+                return erf_inv(1.0 - x);
+            }
 
-        bool isSectionTracker() const override;
+            double normal_quantile(double p) {
+                static const double ROOT_TWO = std::sqrt(2.0);
 
-        bool isComplete() const override;
+                double result = 0.0;
+                assert(p >= 0 && p <= 1);
+                if (p < 0 || p > 1) {
+                    return result;
+                }
 
-        static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation );
+                result = -erfc_inv(2.0 * p);
+                // result *= normal distribution standard deviation (1.0) * sqrt(2)
+                result *= /*sd * */ ROOT_TWO;
+                // result += normal disttribution mean (0)
+                return result;
+            }
 
-        void tryOpen();
+            double outlier_variance(Estimate<double> mean, Estimate<double> stddev, int n) {
+                double sb = stddev.point;
+                double mn = mean.point / n;
+                double mg_min = mn / 2.;
+                double sg = std::min(mg_min / 4., sb / std::sqrt(n));
+                double sg2 = sg * sg;
+                double sb2 = sb * sb;
+
+                auto c_max = [n, mn, sb2, sg2](double x) -> double {
+                    double k = mn - x;
+                    double d = k * k;
+                    double nd = n * d;
+                    double k0 = -n * nd;
+                    double k1 = sb2 - n * sg2 + nd;
+                    double det = k1 * k1 - 4 * sg2 * k0;
+                    return (int)(-2. * k0 / (k1 + std::sqrt(det)));
+                };
+
+                auto var_out = [n, sb2, sg2](double c) {
+                    double nc = n - c;
+                    return (nc / n) * (sb2 - nc * sg2);
+                };
+
+                return std::min(var_out(1), var_out(std::min(c_max(0.), c_max(mg_min)))) / sb2;
+            }
 
-        void addInitialFilters( std::vector<std::string> const& filters );
-        void addNextFilters( std::vector<std::string> const& filters );
-    };
+            bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector<double>::iterator first, std::vector<double>::iterator last) {
+                CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
+                static std::random_device entropy;
+                CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS
 
-} // namespace TestCaseTracking
+                auto n = static_cast<int>(last - first); // seriously, one can't use integral types without hell in C++
 
-using TestCaseTracking::ITracker;
-using TestCaseTracking::TrackerContext;
-using TestCaseTracking::SectionTracker;
+                auto mean = &Detail::mean<std::vector<double>::iterator>;
+                auto stddev = &standard_deviation;
 
-} // namespace Catch
+#if defined(CATCH_CONFIG_USE_ASYNC)
+                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {
+                    auto seed = entropy();
+                    return std::async(std::launch::async, [=] {
+                        std::mt19937 rng(seed);
+                        auto resampled = resample(rng, n_resamples, first, last, f);
+                        return bootstrap(confidence_level, first, last, resampled, f);
+                    });
+                };
 
-// end catch_test_case_tracker.h
+                auto mean_future = Estimate(mean);
+                auto stddev_future = Estimate(stddev);
 
-// start catch_leak_detector.h
+                auto mean_estimate = mean_future.get();
+                auto stddev_estimate = stddev_future.get();
+#else
+                auto Estimate = [=](double(*f)(std::vector<double>::iterator, std::vector<double>::iterator)) {
+                    auto seed = entropy();
+                    std::mt19937 rng(seed);
+                    auto resampled = resample(rng, n_resamples, first, last, f);
+                    return bootstrap(confidence_level, first, last, resampled, f);
+                };
 
-namespace Catch {
+                auto mean_estimate = Estimate(mean);
+                auto stddev_estimate = Estimate(stddev);
+#endif // CATCH_USE_ASYNC
 
-    struct LeakDetector {
-        LeakDetector();
-        ~LeakDetector();
-    };
+                double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n);
 
-}
-// end catch_leak_detector.h
-// Cpp files will be included in the single-header file here
+                return { mean_estimate, stddev_estimate, outlier_variance };
+            }
+        } // namespace Detail
+    } // namespace Benchmark
+} // namespace Catch
+
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+// end catch_stats.cpp
 // start catch_approx.cpp
 
 #include <cmath>
@@ -5988,21 +7705,22 @@ namespace Detail {
     bool Approx::equalityComparisonImpl(const double other) const {
         // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value
         // Thanks to Richard Harris for his help refining the scaled margin value
-        return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value)));
+        return marginComparison(m_value, other, m_margin)
+            || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(std::isinf(m_value)? 0 : m_value)));
     }
 
-    void Approx::setMargin(double margin) {
-        CATCH_ENFORCE(margin >= 0,
-            "Invalid Approx::margin: " << margin << '.'
+    void Approx::setMargin(double newMargin) {
+        CATCH_ENFORCE(newMargin >= 0,
+            "Invalid Approx::margin: " << newMargin << '.'
             << " Approx::Margin has to be non-negative.");
-        m_margin = margin;
+        m_margin = newMargin;
     }
 
-    void Approx::setEpsilon(double epsilon) {
-        CATCH_ENFORCE(epsilon >= 0 && epsilon <= 1.0,
-            "Invalid Approx::epsilon: " << epsilon << '.'
+    void Approx::setEpsilon(double newEpsilon) {
+        CATCH_ENFORCE(newEpsilon >= 0 && newEpsilon <= 1.0,
+            "Invalid Approx::epsilon: " << newEpsilon << '.'
             << " Approx::epsilon has to be in [0, 1]");
-        m_epsilon = epsilon;
+        m_epsilon = newEpsilon;
     }
 
 } // end namespace Detail
@@ -6204,8 +7922,12 @@ namespace Catch {
 
         auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override;
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing( std::string const& name ) override;
         void benchmarkStarting( BenchmarkInfo const& info ) override;
-        void benchmarkEnded( BenchmarkStats const& stats ) override;
+        void benchmarkEnded( BenchmarkStats<> const& stats ) override;
+        void benchmarkFailed( std::string const& error ) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void pushScopedMessage( MessageInfo const& message ) override;
         void popScopedMessage( MessageInfo const& message ) override;
@@ -6269,6 +7991,8 @@ namespace Catch {
         bool m_includeSuccessfulResults;
     };
 
+    void seedRng(IConfig const& config);
+    unsigned int rngSeed();
 } // end namespace Catch
 
 // end catch_run_context.h
@@ -6415,7 +8139,7 @@ namespace Catch {
     }
 
     bool AssertionResult::hasExpression() const {
-        return m_info.capturedExpression[0] != 0;
+        return !m_info.capturedExpression.empty();
     }
 
     bool AssertionResult::hasMessage() const {
@@ -6423,16 +8147,22 @@ namespace Catch {
     }
 
     std::string AssertionResult::getExpression() const {
-        if( isFalseTest( m_info.resultDisposition ) )
-            return "!(" + m_info.capturedExpression + ")";
-        else
-            return m_info.capturedExpression;
+        // Possibly overallocating by 3 characters should be basically free
+        std::string expr; expr.reserve(m_info.capturedExpression.size() + 3);
+        if (isFalseTest(m_info.resultDisposition)) {
+            expr += "!(";
+        }
+        expr += m_info.capturedExpression;
+        if (isFalseTest(m_info.resultDisposition)) {
+            expr += ')';
+        }
+        return expr;
     }
 
     std::string AssertionResult::getExpressionInMacro() const {
         std::string expr;
-        if( m_info.macroName[0] == 0 )
-            expr = m_info.capturedExpression;
+        if( m_info.macroName.empty() )
+            expr = static_cast<std::string>(m_info.capturedExpression);
         else {
             expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 );
             expr += m_info.macroName;
@@ -6467,32 +8197,6 @@ namespace Catch {
 
 } // end namespace Catch
 // end catch_assertionresult.cpp
-// start catch_benchmark.cpp
-
-namespace Catch {
-
-    auto BenchmarkLooper::getResolution() -> uint64_t {
-        return getEstimatedClockResolution() * getCurrentContext().getConfig()->benchmarkResolutionMultiple();
-    }
-
-    void BenchmarkLooper::reportStart() {
-        getResultCapture().benchmarkStarting( { m_name } );
-    }
-    auto BenchmarkLooper::needsMoreIterations() -> bool {
-        auto elapsed = m_timer.getElapsedNanoseconds();
-
-        // Exponentially increasing iterations until we're confident in our timer resolution
-        if( elapsed < m_resolution ) {
-            m_iterationsToRun *= 10;
-            return true;
-        }
-
-        getResultCapture().benchmarkEnded( { { m_name }, m_count, elapsed } );
-        return false;
-    }
-
-} // end namespace Catch
-// end catch_benchmark.cpp
 // start catch_capture_matchers.cpp
 
 namespace Catch {
@@ -6638,6 +8342,9 @@ public:
 			m_suffix = false;
 			auto width = m_column.m_width - indent();
 			m_end = m_pos;
+			if (line()[m_pos] == '\n') {
+				++m_end;
+			}
 			while (m_end < line().size() && line()[m_end] != '\n')
 				++m_end;
 
@@ -7984,11 +9691,19 @@ namespace Catch {
             | Opt( setWaitForKeypress, "start|exit|both" )
                 ["--wait-for-keypress"]
                 ( "waits for a keypress before exiting" )
-            | Opt( config.benchmarkResolutionMultiple, "multiplier" )
-                ["--benchmark-resolution-multiple"]
-                ( "multiple of clock resolution to run benchmarks" )
-
-            | Arg( config.testsOrTags, "test name|pattern|tags" )
+            | Opt( config.benchmarkSamples, "samples" )
+                ["--benchmark-samples"]
+                ( "number of samples to collect (default: 100)" )
+            | Opt( config.benchmarkResamples, "resamples" )
+                ["--benchmark-resamples"]
+                ( "number of resamples for the bootstrap (default: 100000)" )
+            | Opt( config.benchmarkConfidenceInterval, "confidence interval" )
+                ["--benchmark-confidence-interval"]
+                ( "confidence interval for the bootstrap (between 0 and 1, default: 0.95)" )
+            | Opt( config.benchmarkNoAnalysis )
+                ["--benchmark-no-analysis"]
+                ( "perform only measurements; do not perform any analysis" )
+			| Arg( config.testsOrTags, "test name|pattern|tags" )
                 ( "which test or tests to use" );
 
         return cli;
@@ -8003,9 +9718,6 @@ namespace Catch {
 
 namespace Catch {
 
-    bool SourceLineInfo::empty() const noexcept {
-        return file[0] == '\0';
-    }
     bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept {
         return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);
     }
@@ -8041,14 +9753,23 @@ namespace Catch {
     :   m_data( data ),
         m_stream( openStream() )
     {
-        TestSpecParser parser(ITagAliasRegistry::get());
-        if (data.testsOrTags.empty()) {
-            parser.parse("~[.]"); // All not hidden tests
+        // We need to trim filter specs to avoid trouble with superfluous
+        // whitespace (esp. important for bdd macros, as those are manually
+        // aligned with whitespace).
+
+        for (auto& elem : m_data.testsOrTags) {
+            elem = trim(elem);
         }
-        else {
+        for (auto& elem : m_data.sectionsToRun) {
+            elem = trim(elem);
+        }
+
+        TestSpecParser parser(ITagAliasRegistry::get());
+        if (!m_data.testsOrTags.empty()) {
             m_hasTestFilters = true;
-            for( auto const& testOrTags : data.testsOrTags )
-                parser.parse( testOrTags );
+            for (auto const& testOrTags : m_data.testsOrTags) {
+                parser.parse(testOrTags);
+            }
         }
         m_testSpec = parser.testSpec();
     }
@@ -8083,13 +9804,17 @@ namespace Catch {
     ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; }
     RunTests::InWhatOrder Config::runOrder() const     { return m_data.runOrder; }
     unsigned int Config::rngSeed() const               { return m_data.rngSeed; }
-    int Config::benchmarkResolutionMultiple() const    { return m_data.benchmarkResolutionMultiple; }
     UseColour::YesOrNo Config::useColour() const       { return m_data.useColour; }
     bool Config::shouldDebugBreak() const              { return m_data.shouldDebugBreak; }
     int Config::abortAfter() const                     { return m_data.abortAfter; }
     bool Config::showInvisibles() const                { return m_data.showInvisibles; }
     Verbosity Config::verbosity() const                { return m_data.verbosity; }
 
+    bool Config::benchmarkNoAnalysis() const           { return m_data.benchmarkNoAnalysis; }
+    int Config::benchmarkSamples() const               { return m_data.benchmarkSamples; }
+    double Config::benchmarkConfidenceInterval() const { return m_data.benchmarkConfidenceInterval; }
+    unsigned int Config::benchmarkResamples() const    { return m_data.benchmarkResamples; }
+
     IStream const* Config::openStream() {
         return Catch::makeStream(m_data.outputFilename);
     }
@@ -8163,7 +9888,7 @@ namespace {
             originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
         }
 
-        virtual void use( Colour::Code _colourCode ) override {
+        void use( Colour::Code _colourCode ) override {
             switch( _colourCode ) {
                 case Colour::None:      return setTextAttribute( originalForegroundAttributes );
                 case Colour::White:     return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE );
@@ -8226,7 +9951,7 @@ namespace {
     // https://github.com/philsquared/Catch/pull/131
     class PosixColourImpl : public IColourImpl {
     public:
-        virtual void use( Colour::Code _colourCode ) override {
+        void use( Colour::Code _colourCode ) override {
             switch( _colourCode ) {
                 case Colour::None:
                 case Colour::White:     return setColour( "[0m" );
@@ -8316,7 +10041,13 @@ namespace Catch {
 
     void Colour::use( Code _colourCode ) {
         static IColourImpl* impl = platformColourInstance();
-        impl->use( _colourCode );
+        // Strictly speaking, this cannot possibly happen.
+        // However, under some conditions it does happen (see #1626),
+        // and this change is small enough that we can let practicality
+        // triumph over purity in this case.
+        if (impl != NULL) {
+            impl->use( _colourCode );
+        }
     }
 
     std::ostream& operator << ( std::ostream& os, Colour const& ) {
@@ -8337,27 +10068,27 @@ namespace Catch {
     class Context : public IMutableContext, NonCopyable {
 
     public: // IContext
-        virtual IResultCapture* getResultCapture() override {
+        IResultCapture* getResultCapture() override {
             return m_resultCapture;
         }
-        virtual IRunner* getRunner() override {
+        IRunner* getRunner() override {
             return m_runner;
         }
 
-        virtual IConfigPtr const& getConfig() const override {
+        IConfigPtr const& getConfig() const override {
             return m_config;
         }
 
-        virtual ~Context() override;
+        ~Context() override;
 
     public: // IMutableContext
-        virtual void setResultCapture( IResultCapture* resultCapture ) override {
+        void setResultCapture( IResultCapture* resultCapture ) override {
             m_resultCapture = resultCapture;
         }
-        virtual void setRunner( IRunner* runner ) override {
+        void setRunner( IRunner* runner ) override {
             m_runner = runner;
         }
-        virtual void setConfig( IConfigPtr const& config ) override {
+        void setConfig( IConfigPtr const& config ) override {
             m_config = config;
         }
 
@@ -8383,6 +10114,12 @@ namespace Catch {
     IContext::~IContext() = default;
     IMutableContext::~IMutableContext() = default;
     Context::~Context() = default;
+
+    SimplePcg32& rng() {
+        static SimplePcg32 s_rng;
+        return s_rng;
+    }
+
 }
 // end catch_context.cpp
 // start catch_debug_console.cpp
@@ -8396,7 +10133,16 @@ namespace Catch {
 }
 
 // end catch_debug_console.h
-#ifdef CATCH_PLATFORM_WINDOWS
+#if defined(CATCH_CONFIG_ANDROID_LOGWRITE)
+#include <android/log.h>
+
+    namespace Catch {
+        void writeToDebugConsole( std::string const& text ) {
+            __android_log_write( ANDROID_LOG_DEBUG, "Catch", text.c_str() );
+        }
+    }
+
+#elif defined(CATCH_PLATFORM_WINDOWS)
 
     namespace Catch {
         void writeToDebugConsole( std::string const& text ) {
@@ -8423,19 +10169,23 @@ namespace Catch {
 #  include <stdbool.h>
 #  include <sys/types.h>
 #  include <unistd.h>
-#  include <sys/sysctl.h>
 #  include <cstddef>
 #  include <ostream>
 
-namespace Catch {
+#ifdef __apple_build_version__
+    // These headers will only compile with AppleClang (XCode)
+    // For other compilers (Clang, GCC, ... ) we need to exclude them
+#  include <sys/sysctl.h>
+#endif
 
+    namespace Catch {
+        #ifdef __apple_build_version__
         // The following function is taken directly from the following technical note:
-        // http://developer.apple.com/library/mac/#qa/qa2004/qa1361.html
+        // https://developer.apple.com/library/archive/qa/qa1361/_index.html
 
         // Returns true if the current process is being debugged (either
         // running under the debugger or has a debugger attached post facto).
         bool isDebuggerActive(){
-
             int                 mib[4];
             struct kinfo_proc   info;
             std::size_t         size;
@@ -8465,6 +10215,12 @@ namespace Catch {
 
             return ( (info.kp_proc.p_flag & P_TRACED) != 0 );
         }
+        #else
+        bool isDebuggerActive() {
+            // We need to find another way to determine this for non-appleclang compilers on macOS
+            return false;
+        }
+        #endif
     } // namespace Catch
 
 #elif defined(CATCH_PLATFORM_LINUX)
@@ -8535,6 +10291,8 @@ namespace Catch {
 // end catch_decomposer.cpp
 // start catch_enforce.cpp
 
+#include <stdexcept>
+
 namespace Catch {
 #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER)
     [[noreturn]]
@@ -8544,8 +10302,116 @@ namespace Catch {
         std::terminate();
     }
 #endif
+
+    [[noreturn]]
+    void throw_logic_error(std::string const& msg) {
+        throw_exception(std::logic_error(msg));
+    }
+
+    [[noreturn]]
+    void throw_domain_error(std::string const& msg) {
+        throw_exception(std::domain_error(msg));
+    }
+
+    [[noreturn]]
+    void throw_runtime_error(std::string const& msg) {
+        throw_exception(std::runtime_error(msg));
+    }
+
 } // namespace Catch;
 // end catch_enforce.cpp
+// start catch_enum_values_registry.cpp
+// start catch_enum_values_registry.h
+
+#include <vector>
+#include <memory>
+
+namespace Catch {
+
+    namespace Detail {
+
+        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values );
+
+        class EnumValuesRegistry : public IMutableEnumValuesRegistry {
+
+            std::vector<std::unique_ptr<EnumInfo>> m_enumInfos;
+
+            EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;
+        };
+
+        std::vector<StringRef> parseEnums( StringRef enums );
+
+    } // Detail
+
+} // Catch
+
+// end catch_enum_values_registry.h
+
+#include <map>
+#include <cassert>
+
+namespace Catch {
+
+    IMutableEnumValuesRegistry::~IMutableEnumValuesRegistry() {}
+
+    namespace Detail {
+
+        namespace {
+            // Extracts the actual name part of an enum instance
+            // In other words, it returns the Blue part of Bikeshed::Colour::Blue
+            StringRef extractInstanceName(StringRef enumInstance) {
+                // Find last occurence of ":"
+                size_t name_start = enumInstance.size();
+                while (name_start > 0 && enumInstance[name_start - 1] != ':') {
+                    --name_start;
+                }
+                return enumInstance.substr(name_start, enumInstance.size() - name_start);
+            }
+        }
+
+        std::vector<StringRef> parseEnums( StringRef enums ) {
+            auto enumValues = splitStringRef( enums, ',' );
+            std::vector<StringRef> parsed;
+            parsed.reserve( enumValues.size() );
+            for( auto const& enumValue : enumValues ) {
+                parsed.push_back(trim(extractInstanceName(enumValue)));
+            }
+            return parsed;
+        }
+
+        EnumInfo::~EnumInfo() {}
+
+        StringRef EnumInfo::lookup( int value ) const {
+            for( auto const& valueToName : m_values ) {
+                if( valueToName.first == value )
+                    return valueToName.second;
+            }
+            return "{** unexpected enum value **}"_sr;
+        }
+
+        std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {
+            std::unique_ptr<EnumInfo> enumInfo( new EnumInfo );
+            enumInfo->m_name = enumName;
+            enumInfo->m_values.reserve( values.size() );
+
+            const auto valueNames = Catch::Detail::parseEnums( allValueNames );
+            assert( valueNames.size() == values.size() );
+            std::size_t i = 0;
+            for( auto value : values )
+                enumInfo->m_values.push_back({ value, valueNames[i++] });
+
+            return enumInfo;
+        }
+
+        EnumInfo const& EnumValuesRegistry::registerEnum( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) {
+            m_enumInfos.push_back(makeEnumInfo(enumName, allValueNames, values));
+            return *m_enumInfos.back();
+        }
+
+    } // Detail
+} // Catch
+
+// end catch_enum_values_registry.cpp
 // start catch_errno_guard.cpp
 
 #include <cerrno>
@@ -8569,7 +10435,7 @@ namespace Catch {
     public:
         ~ExceptionTranslatorRegistry();
         virtual void registerTranslator( const IExceptionTranslator* translator );
-        virtual std::string translateActiveException() const override;
+        std::string translateActiveException() const override;
         std::string tryTranslators() const;
 
     private:
@@ -8740,7 +10606,7 @@ namespace Catch {
 
     // 32kb for the alternate stack seems to be sufficient. However, this value
     // is experimentally determined, so that's not guaranteed.
-    constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
+    static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
 
     static SignalDefs signalDefs[] = {
         { SIGINT,  "SIGINT - Terminal interrupt signal" },
@@ -8817,22 +10683,6 @@ namespace Catch {
 // end catch_fatal_condition.cpp
 // start catch_generators.cpp
 
-// start catch_random_number_generator.h
-
-#include <algorithm>
-#include <random>
-
-namespace Catch {
-
-    struct IConfig;
-
-    std::mt19937& rng();
-    void seedRng( IConfig const& config );
-    unsigned int rngSeed();
-
-}
-
-// end catch_random_number_generator.h
 #include <limits>
 #include <set>
 
@@ -8907,8 +10757,12 @@ namespace Catch {
 
         static std::set<Verbosity> getSupportedVerbosities();
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+        void benchmarkPreparing(std::string const& name) override;
         void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override;
-        void benchmarkEnded( BenchmarkStats const& benchmarkStats ) override;
+        void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) override;
+        void benchmarkFailed(std::string const&) override;
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
         void testRunStarting( TestRunInfo const& testRunInfo ) override;
         void testGroupStarting( GroupInfo const& groupInfo ) override;
@@ -9174,9 +11028,18 @@ namespace Catch {
     }
 
     std::string TagInfo::all() const {
-        std::string out;
-        for( auto const& spelling : spellings )
-            out += "[" + spelling + "]";
+        size_t size = 0;
+        for (auto const& spelling : spellings) {
+            // Add 2 for the brackes
+            size += spelling.size() + 2;
+        }
+
+        std::string out; out.reserve(size);
+        for (auto const& spelling : spellings) {
+            out += '[';
+            out += spelling;
+            out += ']';
+        }
         return out;
     }
 
@@ -9275,6 +11138,29 @@ using Matchers::Impl::MatcherBase;
 
 } // namespace Catch
 // end catch_matchers.cpp
+// start catch_matchers_exception.cpp
+
+namespace Catch {
+namespace Matchers {
+namespace Exception {
+
+bool ExceptionMessageMatcher::match(std::exception const& ex) const {
+    return ex.what() == m_message;
+}
+
+std::string ExceptionMessageMatcher::describe() const {
+    return "exception message matches \"" + m_message + "\"";
+}
+
+}
+Exception::ExceptionMessageMatcher Message(std::string const& message) {
+    return Exception::ExceptionMessageMatcher(message);
+}
+
+// namespace Exception
+} // namespace Matchers
+} // namespace Catch
+// end catch_matchers_exception.cpp
 // start catch_matchers_floating.cpp
 
 // start catch_polyfills.hpp
@@ -9303,74 +11189,115 @@ namespace Catch {
 } // end namespace Catch
 
 // end catch_to_string.hpp
+#include <algorithm>
+#include <cmath>
 #include <cstdlib>
 #include <cstdint>
 #include <cstring>
+#include <sstream>
+#include <type_traits>
+#include <iomanip>
+#include <limits>
 
 namespace Catch {
-namespace Matchers {
-namespace Floating {
-enum class FloatingPointKind : uint8_t {
-    Float,
-    Double
-};
-}
-}
-}
-
 namespace {
 
-template <typename T>
-struct Converter;
-
-template <>
-struct Converter<float> {
-    static_assert(sizeof(float) == sizeof(int32_t), "Important ULP matcher assumption violated");
-    Converter(float f) {
+    int32_t convert(float f) {
+        static_assert(sizeof(float) == sizeof(int32_t), "Important ULP matcher assumption violated");
+        int32_t i;
         std::memcpy(&i, &f, sizeof(f));
+        return i;
     }
-    int32_t i;
-};
 
-template <>
-struct Converter<double> {
-    static_assert(sizeof(double) == sizeof(int64_t), "Important ULP matcher assumption violated");
-    Converter(double d) {
+    int64_t convert(double d) {
+        static_assert(sizeof(double) == sizeof(int64_t), "Important ULP matcher assumption violated");
+        int64_t i;
         std::memcpy(&i, &d, sizeof(d));
+        return i;
     }
-    int64_t i;
-};
 
-template <typename T>
-auto convert(T t) -> Converter<T> {
-    return Converter<T>(t);
-}
+    template <typename FP>
+    bool almostEqualUlps(FP lhs, FP rhs, uint64_t maxUlpDiff) {
+        // Comparison with NaN should always be false.
+        // This way we can rule it out before getting into the ugly details
+        if (Catch::isnan(lhs) || Catch::isnan(rhs)) {
+            return false;
+        }
 
-template <typename FP>
-bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) {
-    // Comparison with NaN should always be false.
-    // This way we can rule it out before getting into the ugly details
-    if (Catch::isnan(lhs) || Catch::isnan(rhs)) {
-        return false;
+        auto lc = convert(lhs);
+        auto rc = convert(rhs);
+
+        if ((lc < 0) != (rc < 0)) {
+            // Potentially we can have +0 and -0
+            return lhs == rhs;
+        }
+
+        auto ulpDiff = std::abs(lc - rc);
+        return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;
+    }
+
+} //end anonymous namespace
+
+#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+
+#if defined(__clang__)
+#pragma clang diagnostic push
+// The long double overload is currently unused
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
+    float nextafter(float x, float y) {
+        return ::nextafterf(x, y);
     }
 
-    auto lc = convert(lhs);
-    auto rc = convert(rhs);
+    double nextafter(double x, double y) {
+        return ::nextafter(x, y);
+    }
 
-    if ((lc.i < 0) != (rc.i < 0)) {
-        // Potentially we can have +0 and -0
-        return lhs == rhs;
+    long double nextafter(long double x, long double y) {
+        return ::nextafterl(x, y);
     }
 
-    auto ulpDiff = std::abs(lc.i - rc.i);
-    return ulpDiff <= maxUlpDiff;
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
+#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^
+
+namespace {
+
+template <typename FP>
+FP step(FP start, FP direction, uint64_t steps) {
+    for (uint64_t i = 0; i < steps; ++i) {
+#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
+        start = Catch::nextafter(start, direction);
+#else
+        start = std::nextafter(start, direction);
+#endif
+    }
+    return start;
 }
 
+namespace {
+
+    // Performs equivalent check of std::fabs(lhs - rhs) <= margin
+    // But without the subtraction to allow for INFINITY in comparison
+    bool marginComparison(double lhs, double rhs, double margin) {
+        return (lhs + margin >= rhs) && (rhs + margin >= lhs);
+    }
+
 }
 
-namespace Catch {
+} // end anonymous namespace
+
 namespace Matchers {
 namespace Floating {
+
+    enum class FloatingPointKind : uint8_t {
+        Float,
+        Double
+    };
+
     WithinAbsMatcher::WithinAbsMatcher(double target, double margin)
         :m_target{ target }, m_margin{ margin } {
         CATCH_ENFORCE(margin >= 0, "Invalid margin: " << margin << '.'
@@ -9387,10 +11314,11 @@ namespace Floating {
         return "is within " + ::Catch::Detail::stringify(m_margin) + " of " + ::Catch::Detail::stringify(m_target);
     }
 
-    WithinUlpsMatcher::WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType)
+    WithinUlpsMatcher::WithinUlpsMatcher(double target, uint64_t ulps, FloatingPointKind baseType)
         :m_target{ target }, m_ulps{ ulps }, m_type{ baseType } {
-        CATCH_ENFORCE(ulps >= 0, "Invalid ULP setting: " << ulps << '.'
-            << " ULPs have to be non-negative.");
+        CATCH_ENFORCE(m_type == FloatingPointKind::Double
+                   || m_ulps < std::numeric_limits<uint32_t>::max(),
+            "Provided ULP is impossibly large for a float comparison.");
     }
 
 #if defined(__clang__)
@@ -9410,21 +11338,62 @@ namespace Floating {
         }
     }
 
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
+    std::string WithinUlpsMatcher::describe() const {
+        std::stringstream ret;
+
+        ret << "is within " << m_ulps << " ULPs of " << ::Catch::Detail::stringify(m_target);
+
+        if (m_type == FloatingPointKind::Float) {
+            ret << 'f';
+        }
+
+        ret << " ([";
+        ret << std::fixed << std::setprecision(std::numeric_limits<double>::max_digits10);
+        if (m_type == FloatingPointKind::Double) {
+            ret << step(m_target, static_cast<double>(-INFINITY), m_ulps)
+                << ", "
+                << step(m_target, static_cast<double>(INFINITY), m_ulps);
+        } else {
+            ret << step<float>(static_cast<float>(m_target), -INFINITY, m_ulps)
+                << ", "
+                << step<float>(static_cast<float>(m_target), INFINITY, m_ulps);
+        }
+        ret << "])";
+
+        return ret.str();
+        //return "is within " + Catch::to_string(m_ulps) + " ULPs of " + ::Catch::Detail::stringify(m_target) + ((m_type == FloatingPointKind::Float)? "f" : "");
+    }
+
+    WithinRelMatcher::WithinRelMatcher(double target, double epsilon):
+        m_target(target),
+        m_epsilon(epsilon){
+        CATCH_ENFORCE(m_epsilon >= 0., "Relative comparison with epsilon <  0 does not make sense.");
+        CATCH_ENFORCE(m_epsilon  < 1., "Relative comparison with epsilon >= 1 does not make sense.");
+    }
+
+    bool WithinRelMatcher::match(double const& matchee) const {
+        const auto relMargin = m_epsilon * std::max(std::fabs(matchee), std::fabs(m_target));
+        return marginComparison(matchee, m_target,
+                                std::isinf(relMargin)? 0 : relMargin);
+    }
 
-    std::string WithinUlpsMatcher::describe() const {
-        return "is within " + Catch::to_string(m_ulps) + " ULPs of " + ::Catch::Detail::stringify(m_target) + ((m_type == FloatingPointKind::Float)? "f" : "");
+    std::string WithinRelMatcher::describe() const {
+        Catch::ReusableStringStream sstr;
+        sstr << "and " << m_target << " are within " << m_epsilon * 100. << "% of each other";
+        return sstr.str();
     }
 
 }// namespace Floating
 
-Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff) {
+Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlpDiff) {
     return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Double);
 }
 
-Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff) {
+Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpDiff) {
     return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Float);
 }
 
@@ -9432,6 +11401,22 @@ Floating::WithinAbsMatcher WithinAbs(double target, double margin) {
     return Floating::WithinAbsMatcher(target, margin);
 }
 
+Floating::WithinRelMatcher WithinRel(double target, double eps) {
+    return Floating::WithinRelMatcher(target, eps);
+}
+
+Floating::WithinRelMatcher WithinRel(double target) {
+    return Floating::WithinRelMatcher(target, std::numeric_limits<double>::epsilon() * 100);
+}
+
+Floating::WithinRelMatcher WithinRel(float target, float eps) {
+    return Floating::WithinRelMatcher(target, eps);
+}
+
+Floating::WithinRelMatcher WithinRel(float target) {
+    return Floating::WithinRelMatcher(target, std::numeric_limits<float>::epsilon() * 100);
+}
+
 } // namespace Matchers
 } // namespace Catch
 
@@ -9620,6 +11605,15 @@ namespace Catch {
             }
             return names.substr(start, end - start + 1);
         };
+        auto skipq = [&] (size_t start, char quote) {
+            for (auto i = start + 1; i < names.size() ; ++i) {
+                if (names[i] == quote)
+                    return i;
+                if (names[i] == '\\')
+                    ++i;
+            }
+            CATCH_INTERNAL_ERROR("CAPTURE parsing encountered unmatched quote");
+        };
 
         size_t start = 0;
         std::stack<char> openings;
@@ -9640,10 +11634,14 @@ namespace Catch {
 //           case '>':
                 openings.pop();
                 break;
+            case '"':
+            case '\'':
+                pos = skipq(pos, c);
+                break;
             case ',':
                 if (start != pos && openings.size() == 0) {
                     m_messages.emplace_back(macroName, lineInfo, resultType);
-                    m_messages.back().message = trimmed(start, pos);
+                    m_messages.back().message = static_cast<std::string>(trimmed(start, pos));
                     m_messages.back().message += " := ";
                     start = pos;
                 }
@@ -9651,7 +11649,7 @@ namespace Catch {
         }
         assert(openings.size() == 0 && "Mismatched openings");
         m_messages.emplace_back(macroName, lineInfo, resultType);
-        m_messages.back().message = trimmed(start, names.size() - 1);
+        m_messages.back().message = static_cast<std::string>(trimmed(start, names.size() - 1));
         m_messages.back().message += " := ";
     }
     Capturer::~Capturer() {
@@ -9842,7 +11840,7 @@ namespace Catch {
             if (strerror_s(buffer, errno)) {
                 CATCH_RUNTIME_ERROR("Could not translate errno to a string");
             }
-            CATCH_RUNTIME_ERROR("Coul dnot open the temp file: '" << m_buffer << "' because: " << buffer);
+            CATCH_RUNTIME_ERROR("Could not open the temp file: '" << m_buffer << "' because: " << buffer);
         }
     }
 #else
@@ -9945,20 +11943,61 @@ namespace Catch {
 
 namespace Catch {
 
-    std::mt19937& rng() {
-        static std::mt19937 s_rng;
-        return s_rng;
+namespace {
+
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4146) // we negate uint32 during the rotate
+#endif
+        // Safe rotr implementation thanks to John Regehr
+        uint32_t rotate_right(uint32_t val, uint32_t count) {
+            const uint32_t mask = 31;
+            count &= mask;
+            return (val >> count) | (val << (-count & mask));
+        }
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
+}
+
+    SimplePcg32::SimplePcg32(result_type seed_) {
+        seed(seed_);
+    }
+
+    void SimplePcg32::seed(result_type seed_) {
+        m_state = 0;
+        (*this)();
+        m_state += seed_;
+        (*this)();
     }
 
-    void seedRng( IConfig const& config ) {
-        if( config.rngSeed() != 0 ) {
-            std::srand( config.rngSeed() );
-            rng().seed( config.rngSeed() );
+    void SimplePcg32::discard(uint64_t skip) {
+        // We could implement this to run in O(log n) steps, but this
+        // should suffice for our use case.
+        for (uint64_t s = 0; s < skip; ++s) {
+            static_cast<void>((*this)());
         }
     }
 
-    unsigned int rngSeed() {
-        return getCurrentContext().getConfig()->rngSeed();
+    SimplePcg32::result_type SimplePcg32::operator()() {
+        // prepare the output value
+        const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);
+        const auto output = rotate_right(xorshifted, m_state >> 59u);
+
+        // advance state
+        m_state = m_state * 6364136223846793005ULL + s_inc;
+
+        return output;
+    }
+
+    bool operator==(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {
+        return lhs.m_state == rhs.m_state;
+    }
+
+    bool operator!=(SimplePcg32 const& lhs, SimplePcg32 const& rhs) {
+        return lhs.m_state != rhs.m_state;
     }
 }
 // end catch_random_number_generator.cpp
@@ -9977,6 +12016,8 @@ namespace Catch {
     struct IConfig;
 
     std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases );
+
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config );
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );
 
     void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions );
@@ -10178,6 +12219,9 @@ namespace Catch {
             void registerStartupException() noexcept override {
                 m_exceptionRegistry.add(std::current_exception());
             }
+            IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() override {
+                return m_enumValuesRegistry;
+            }
 
         private:
             TestRegistry m_testCaseRegistry;
@@ -10185,6 +12229,7 @@ namespace Catch {
             ExceptionTranslatorRegistry m_exceptionTranslatorRegistry;
             TagAliasRegistry m_tagAliasRegistry;
             StartupExceptionRegistry m_exceptionRegistry;
+            Detail::EnumValuesRegistry m_enumValuesRegistry;
         };
     }
 
@@ -10480,12 +12525,21 @@ namespace Catch {
 
         m_unfinishedSections.push_back(endInfo);
     }
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void RunContext::benchmarkPreparing(std::string const& name) {
+		m_reporter->benchmarkPreparing(name);
+	}
     void RunContext::benchmarkStarting( BenchmarkInfo const& info ) {
         m_reporter->benchmarkStarting( info );
     }
-    void RunContext::benchmarkEnded( BenchmarkStats const& stats ) {
+    void RunContext::benchmarkEnded( BenchmarkStats<> const& stats ) {
         m_reporter->benchmarkEnded( stats );
     }
+	void RunContext::benchmarkFailed(std::string const & error) {
+		m_reporter->benchmarkFailed(error);
+	}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
     void RunContext::pushScopedMessage(MessageInfo const & message) {
         m_messages.push_back(message);
@@ -10520,7 +12574,7 @@ namespace Catch {
         // Don't rebuild the result -- the stringification itself can cause more fatal errors
         // Instead, fake a result data.
         AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } );
-        tempResult.message = message;
+        tempResult.message = static_cast<std::string>(message);
         AssertionResult result(m_lastAssertionInfo, tempResult);
 
         assertionEnded(result);
@@ -10683,7 +12737,7 @@ namespace Catch {
         m_lastAssertionInfo = info;
 
         AssertionResultData data( resultType, LazyExpression( false ) );
-        data.message = message;
+        data.message = static_cast<std::string>(message);
         AssertionResult assertionResult{ m_lastAssertionInfo, data };
         assertionEnded( assertionResult );
         if( !assertionResult.isOk() )
@@ -10746,6 +12800,18 @@ namespace Catch {
         else
             CATCH_INTERNAL_ERROR("No result capture instance");
     }
+
+    void seedRng(IConfig const& config) {
+        if (config.rngSeed() != 0) {
+            std::srand(config.rngSeed());
+            rng().seed(config.rngSeed());
+        }
+    }
+
+    unsigned int rngSeed() {
+        return getCurrentContext().getConfig()->rngSeed();
+    }
+
 }
 // end catch_run_context.cpp
 // start catch_section.cpp
@@ -10807,7 +12873,7 @@ namespace Catch {
         void libIdentify();
 
         int applyCommandLine( int argc, char const * const * argv );
-    #if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
+    #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
         int applyCommandLine( int argc, wchar_t const * const * argv );
     #endif
 
@@ -10874,6 +12940,8 @@ namespace Catch {
 // end catch_version.h
 #include <cstdlib>
 #include <iomanip>
+#include <set>
+#include <iterator>
 
 namespace Catch {
 
@@ -10907,42 +12975,53 @@ namespace Catch {
             return ret;
         }
 
-        Catch::Totals runTests(std::shared_ptr<Config> const& config) {
-            auto reporter = makeReporter(config);
-
-            RunContext context(config, std::move(reporter));
-
-            Totals totals;
-
-            context.testGroupStarting(config->name(), 1, 1);
-
-            TestSpec testSpec = config->testSpec();
+        class TestGroup {
+        public:
+            explicit TestGroup(std::shared_ptr<Config> const& config)
+            : m_config{config}
+            , m_context{config, makeReporter(config)}
+            {
+                auto const& allTestCases = getAllTestCasesSorted(*m_config);
+                m_matches = m_config->testSpec().matchesByFilter(allTestCases, *m_config);
 
-            auto const& allTestCases = getAllTestCasesSorted(*config);
-            for (auto const& testCase : allTestCases) {
-                if (!context.aborting() && matchTest(testCase, testSpec, *config))
-                    totals += context.runTest(testCase);
-                else
-                    context.reporter().skipTest(testCase);
+                if (m_matches.empty()) {
+                    for (auto const& test : allTestCases)
+                        if (!test.isHidden())
+                            m_tests.emplace(&test);
+                } else {
+                    for (auto const& match : m_matches)
+                        m_tests.insert(match.tests.begin(), match.tests.end());
+                }
             }
 
-            if (config->warnAboutNoTests() && totals.testCases.total() == 0) {
-                ReusableStringStream testConfig;
-
-                bool first = true;
-                for (const auto& input : config->getTestsOrTags()) {
-                    if (!first) { testConfig << ' '; }
-                    first = false;
-                    testConfig << input;
+            Totals execute() {
+                Totals totals;
+                m_context.testGroupStarting(m_config->name(), 1, 1);
+                for (auto const& testCase : m_tests) {
+                    if (!m_context.aborting())
+                        totals += m_context.runTest(*testCase);
+                    else
+                        m_context.reporter().skipTest(*testCase);
                 }
 
-                context.reporter().noMatchingTestCases(testConfig.str());
-                totals.error = -1;
+                for (auto const& match : m_matches) {
+                    if (match.tests.empty()) {
+                        m_context.reporter().noMatchingTestCases(match.name);
+                        totals.error = -1;
+                    }
+                }
+                m_context.testGroupEnded(m_config->name(), totals, 1, 1);
+                return totals;
             }
 
-            context.testGroupEnded(config->name(), totals, 1, 1);
-            return totals;
-        }
+        private:
+            using Tests = std::set<TestCase const*>;
+
+            std::shared_ptr<Config> m_config;
+            RunContext m_context;
+            Tests m_tests;
+            TestSpec::Matches m_matches;
+        };
 
         void applyFilenamesAsTags(Catch::IConfig const& config) {
             auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));
@@ -10979,6 +13058,9 @@ namespace Catch {
 #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
         const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions();
         if ( !exceptions.empty() ) {
+            config();
+            getCurrentMutableContext().setConfig(m_config);
+
             m_startupExceptions = true;
             Colour colourGuard( Colour::Red );
             Catch::cerr() << "Errors occurred during startup!" << '\n';
@@ -11008,7 +13090,7 @@ namespace Catch {
     }
     void Session::libIdentify() {
         Catch::cout()
-                << std::left << std::setw(16) << "description: " << "A Catch test executable\n"
+                << std::left << std::setw(16) << "description: " << "A Catch2 test executable\n"
                 << std::left << std::setw(16) << "category: " << "testframework\n"
                 << std::left << std::setw(16) << "framework: " << "Catch Test\n"
                 << std::left << std::setw(16) << "version: " << libraryVersion() << std::endl;
@@ -11039,7 +13121,7 @@ namespace Catch {
         return 0;
     }
 
-#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
+#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
     int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {
 
         char **utf8Argv = new char *[ argc ];
@@ -11116,7 +13198,12 @@ namespace Catch {
             if( Option<std::size_t> listed = list( m_config ) )
                 return static_cast<int>( *listed );
 
-            auto totals = runTests( m_config );
+            TestGroup tests { m_config };
+            auto const totals = tests.execute();
+
+            if( m_config->warnAboutNoTests() && totals.error == -1 )
+                return 2;
+
             // Note that on unices only the lower 8 bits are usually used, clamping
             // the return value to 255 prevents false negative when some multiple
             // of 256 tests has failed
@@ -11193,7 +13280,7 @@ namespace Catch {
 
     Catch::IStream::~IStream() = default;
 
-    namespace detail { namespace {
+    namespace Detail { namespace {
         template<typename WriterF, std::size_t bufferSize=256>
         class StreamBufImpl : public std::streambuf {
             char data[bufferSize];
@@ -11292,15 +13379,15 @@ namespace Catch {
 
     auto makeStream( StringRef const &filename ) -> IStream const* {
         if( filename.empty() )
-            return new detail::CoutStream();
+            return new Detail::CoutStream();
         else if( filename[0] == '%' ) {
             if( filename == "%debug" )
-                return new detail::DebugOutStream();
+                return new Detail::DebugOutStream();
             else
                 CATCH_ERROR( "Unrecognised stream: '" << filename << "'" );
         }
         else
-            return new detail::FileStream( filename );
+            return new Detail::FileStream( filename );
     }
 
     // This class encapsulates the idea of a pool of ostringstreams that can be reused.
@@ -11357,6 +13444,7 @@ namespace Catch {
 #include <ostream>
 #include <cstring>
 #include <cctype>
+#include <vector>
 
 namespace Catch {
 
@@ -11397,6 +13485,18 @@ namespace Catch {
         return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string();
     }
 
+    StringRef trim(StringRef ref) {
+        const auto is_ws = [](char c) {
+            return c == ' ' || c == '\t' || c == '\n' || c == '\r';
+        };
+        size_t real_begin = 0;
+        while (real_begin < ref.size() && is_ws(ref[real_begin])) { ++real_begin; }
+        size_t real_end = ref.size();
+        while (real_end > real_begin && is_ws(ref[real_end - 1])) { --real_end; }
+
+        return ref.substr(real_begin, real_end - real_begin);
+    }
+
     bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {
         bool replaced = false;
         std::size_t i = str.find( replaceThis );
@@ -11411,6 +13511,21 @@ namespace Catch {
         return replaced;
     }
 
+    std::vector<StringRef> splitStringRef( StringRef str, char delimiter ) {
+        std::vector<StringRef> subStrings;
+        std::size_t start = 0;
+        for(std::size_t pos = 0; pos < str.size(); ++pos ) {
+            if( str[pos] == delimiter ) {
+                if( pos - start > 1 )
+                    subStrings.push_back( str.substr( start, pos-start ) );
+                start = pos+1;
+            }
+        }
+        if( start < str.size() )
+            subStrings.push_back( str.substr( start, str.size()-start ) );
+        return subStrings;
+    }
+
     pluralise::pluralise( std::size_t count, std::string const& label )
     :   m_count( count ),
         m_label( label )
@@ -11436,21 +13551,11 @@ namespace Catch {
 #include <cstring>
 #include <cstdint>
 
-namespace {
-    const uint32_t byte_2_lead = 0xC0;
-    const uint32_t byte_3_lead = 0xE0;
-    const uint32_t byte_4_lead = 0xF0;
-}
-
 namespace Catch {
     StringRef::StringRef( char const* rawChars ) noexcept
     : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
     {}
 
-    StringRef::operator std::string() const {
-        return std::string( m_start, m_size );
-    }
-
     void StringRef::swap( StringRef& other ) noexcept {
         std::swap( m_start, other.m_start );
         std::swap( m_size, other.m_size );
@@ -11458,9 +13563,11 @@ namespace Catch {
     }
 
     auto StringRef::c_str() const -> char const* {
-        if( isSubstring() )
-           const_cast<StringRef*>( this )->takeOwnership();
-        return m_start;
+        if( !isSubstring() )
+            return m_start;
+
+        const_cast<StringRef *>( this )->takeOwnership();
+        return m_data;
     }
     auto StringRef::currentData() const noexcept -> char const* {
         return m_start;
@@ -11478,7 +13585,6 @@ namespace Catch {
             m_data = new char[m_size+1];
             memcpy( m_data, m_start, m_size );
             m_data[m_size] = '\0';
-            m_start = m_data;
         }
     }
     auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef {
@@ -11496,40 +13602,6 @@ namespace Catch {
         return !operator==( other );
     }
 
-    auto StringRef::operator[](size_type index) const noexcept -> char {
-        return m_start[index];
-    }
-
-    auto StringRef::numberOfCharacters() const noexcept -> size_type {
-        size_type noChars = m_size;
-        // Make adjustments for uft encodings
-        for( size_type i=0; i < m_size; ++i ) {
-            char c = m_start[i];
-            if( ( c & byte_2_lead ) == byte_2_lead ) {
-                noChars--;
-                if (( c & byte_3_lead ) == byte_3_lead )
-                    noChars--;
-                if( ( c & byte_4_lead ) == byte_4_lead )
-                    noChars--;
-            }
-        }
-        return noChars;
-    }
-
-    auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string {
-        std::string str;
-        str.reserve( lhs.size() + rhs.size() );
-        str += lhs;
-        str += rhs;
-        return str;
-    }
-    auto operator + ( StringRef const& lhs, const char* rhs ) -> std::string {
-        return std::string( lhs ) + std::string( rhs );
-    }
-    auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string {
-        return std::string( lhs ) + std::string( rhs );
-    }
-
     auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& {
         return os.write(str.currentData(), str.size());
     }
@@ -11646,7 +13718,7 @@ namespace Catch {
         void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {
             CATCH_ENFORCE( !isReservedTag(tag),
                           "Tag name: [" << tag << "] is not allowed.\n"
-                          << "Tag names starting with non alpha-numeric characters are reserved\n"
+                          << "Tag names starting with non alphanumeric characters are reserved\n"
                           << _lineInfo );
         }
     }
@@ -11662,8 +13734,7 @@ namespace Catch {
         std::vector<std::string> tags;
         std::string desc, tag;
         bool inTag = false;
-        std::string _descOrTags = nameAndTags.tags;
-        for (char c : _descOrTags) {
+        for (char c : nameAndTags.tags) {
             if( !inTag ) {
                 if( c == '[' )
                     inTag = true;
@@ -11696,7 +13767,7 @@ namespace Catch {
             tags.push_back( "." );
         }
 
-        TestCaseInfo info( nameAndTags.name, _className, desc, tags, _lineInfo );
+        TestCaseInfo info( static_cast<std::string>(nameAndTags.name), _className, desc, tags, _lineInfo );
         return TestCase( _testCase, std::move(info) );
     }
 
@@ -11810,8 +13881,13 @@ namespace Catch {
         }
         return sorted;
     }
+
+    bool isThrowSafe( TestCase const& testCase, IConfig const& config ) {
+        return !testCase.throws() || config.allowThrows();
+    }
+
     bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) {
-        return testSpec.matches( testCase ) && ( config.allowThrows() || !testCase.throws() );
+        return testSpec.matches( testCase ) && isThrowSafe( testCase, config );
     }
 
     void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions ) {
@@ -11828,9 +13904,12 @@ namespace Catch {
     std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config ) {
         std::vector<TestCase> filtered;
         filtered.reserve( testCases.size() );
-        for( auto const& testCase : testCases )
-            if( matchTest( testCase, testSpec, config ) )
-                filtered.push_back( testCase );
+        for (auto const& testCase : testCases) {
+            if ((!testSpec.hasFilters() && !testCase.isHidden()) ||
+                (testSpec.hasFilters() && matchTest(testCase, testSpec, config))) {
+                filtered.push_back(testCase);
+            }
+        }
         return filtered;
     }
     std::vector<TestCase> const& getAllTestCasesSorted( IConfig const& config ) {
@@ -11869,7 +13948,7 @@ namespace Catch {
     }
 
     std::string extractClassName( StringRef const& classOrQualifiedMethodName ) {
-        std::string className = classOrQualifiedMethodName;
+        std::string className(classOrQualifiedMethodName);
         if( startsWith( className, '&' ) )
         {
             std::size_t lastColons = className.rfind( "::" );
@@ -11906,11 +13985,6 @@ namespace TestCaseTracking {
 
     ITracker::~ITracker() = default;
 
-    TrackerContext& TrackerContext::instance() {
-        static TrackerContext s_instance;
-        return s_instance;
-    }
-
     ITracker& TrackerContext::startRun() {
         m_rootTracker = std::make_shared<SectionTracker>( NameAndLocation( "{root}", CATCH_INTERNAL_LINEINFO ), *this, nullptr );
         m_currentTracker = nullptr;
@@ -12016,7 +14090,7 @@ namespace TestCaseTracking {
                 m_runState = CompletedSuccessfully;
                 break;
             case ExecutingChildren:
-                if( m_children.empty() || m_children.back()->isComplete() )
+                if( std::all_of(m_children.begin(), m_children.end(), [](ITrackerPtr const& t){ return t->isComplete(); }) )
                     m_runState = CompletedSuccessfully;
                 break;
 
@@ -12051,7 +14125,8 @@ namespace TestCaseTracking {
     }
 
     SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )
-    :   TrackerBase( nameAndLocation, ctx, parent )
+    :   TrackerBase( nameAndLocation, ctx, parent ),
+        m_trimmed_name(trim(nameAndLocation.name))
     {
         if( parent ) {
             while( !parent->isSectionTracker() )
@@ -12065,12 +14140,11 @@ namespace TestCaseTracking {
     bool SectionTracker::isComplete() const {
         bool complete = true;
 
-        if ((m_filters.empty() || m_filters[0] == "") ||
-             std::find(m_filters.begin(), m_filters.end(),
-                       m_nameAndLocation.name) != m_filters.end())
+        if ((m_filters.empty() || m_filters[0] == "")
+            || std::find(m_filters.begin(), m_filters.end(), m_trimmed_name) != m_filters.end()) {
             complete = TrackerBase::isComplete();
+        }
         return complete;
-
     }
 
     bool SectionTracker::isSectionTracker() const { return true; }
@@ -12094,12 +14168,13 @@ namespace TestCaseTracking {
     }
 
     void SectionTracker::tryOpen() {
-        if( !isComplete() && (m_filters.empty() || m_filters[0].empty() ||  m_filters[0] == m_nameAndLocation.name ) )
+        if( !isComplete() )
             open();
     }
 
     void SectionTracker::addInitialFilters( std::vector<std::string> const& filters ) {
         if( !filters.empty() ) {
+            m_filters.reserve( m_filters.size() + filters.size() + 2 );
             m_filters.push_back(""); // Root - should never be consulted
             m_filters.push_back(""); // Test Case - not a section filter
             m_filters.insert( m_filters.end(), filters.begin(), filters.end() );
@@ -12107,7 +14182,7 @@ namespace TestCaseTracking {
     }
     void SectionTracker::addNextFilters( std::vector<std::string> const& filters ) {
         if( filters.size() > 1 )
-            m_filters.insert( m_filters.end(), ++filters.begin(), filters.end() );
+            m_filters.insert( m_filters.end(), filters.begin()+1, filters.end() );
     }
 
 } // namespace TestCaseTracking
@@ -12159,47 +14234,77 @@ namespace Catch {
 
 namespace Catch {
 
+    TestSpec::Pattern::Pattern( std::string const& name )
+    : m_name( name )
+    {}
+
     TestSpec::Pattern::~Pattern() = default;
-    TestSpec::NamePattern::~NamePattern() = default;
-    TestSpec::TagPattern::~TagPattern() = default;
-    TestSpec::ExcludedPattern::~ExcludedPattern() = default;
 
-    TestSpec::NamePattern::NamePattern( std::string const& name )
-    : m_wildcardPattern( toLower( name ), CaseSensitive::No )
+    std::string const& TestSpec::Pattern::name() const {
+        return m_name;
+    }
+
+    TestSpec::NamePattern::NamePattern( std::string const& name, std::string const& filterString )
+    : Pattern( filterString )
+    , m_wildcardPattern( toLower( name ), CaseSensitive::No )
     {}
+
     bool TestSpec::NamePattern::matches( TestCaseInfo const& testCase ) const {
-        return m_wildcardPattern.matches( toLower( testCase.name ) );
+        return m_wildcardPattern.matches( testCase.name );
     }
 
-    TestSpec::TagPattern::TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {}
+    TestSpec::TagPattern::TagPattern( std::string const& tag, std::string const& filterString )
+    : Pattern( filterString )
+    , m_tag( toLower( tag ) )
+    {}
+
     bool TestSpec::TagPattern::matches( TestCaseInfo const& testCase ) const {
         return std::find(begin(testCase.lcaseTags),
                          end(testCase.lcaseTags),
                          m_tag) != end(testCase.lcaseTags);
     }
 
-    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern ) : m_underlyingPattern( underlyingPattern ) {}
-    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const { return !m_underlyingPattern->matches( testCase ); }
+    TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern )
+    : Pattern( underlyingPattern->name() )
+    , m_underlyingPattern( underlyingPattern )
+    {}
+
+    bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const {
+        return !m_underlyingPattern->matches( testCase );
+    }
 
     bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const {
-        // All patterns in a filter must match for the filter to be a match
-        for( auto const& pattern : m_patterns ) {
-            if( !pattern->matches( testCase ) )
-                return false;
-        }
-        return true;
+        return std::all_of( m_patterns.begin(), m_patterns.end(), [&]( PatternPtr const& p ){ return p->matches( testCase ); } );
+    }
+
+    std::string TestSpec::Filter::name() const {
+        std::string name;
+        for( auto const& p : m_patterns )
+            name += p->name();
+        return name;
     }
 
     bool TestSpec::hasFilters() const {
         return !m_filters.empty();
     }
+
     bool TestSpec::matches( TestCaseInfo const& testCase ) const {
-        // A TestSpec matches if any filter matches
-        for( auto const& filter : m_filters )
-            if( filter.matches( testCase ) )
-                return true;
-        return false;
+        return std::any_of( m_filters.begin(), m_filters.end(), [&]( Filter const& f ){ return f.matches( testCase ); } );
+    }
+
+    TestSpec::Matches TestSpec::matchesByFilter( std::vector<TestCase> const& testCases, IConfig const& config ) const
+    {
+        Matches matches( m_filters.size() );
+        std::transform( m_filters.begin(), m_filters.end(), matches.begin(), [&]( Filter const& filter ){
+            std::vector<TestCase const*> currentMatches;
+            for( auto const& test : testCases )
+                if( isThrowSafe( test, config ) && filter.matches( test ) )
+                    currentMatches.emplace_back( &test );
+            return FilterMatch{ filter.name(), currentMatches };
+        } );
+        return matches;
     }
+
 }
 // end catch_test_spec.cpp
 // start catch_test_spec_parser.cpp
@@ -12211,64 +14316,136 @@ namespace Catch {
     TestSpecParser& TestSpecParser::parse( std::string const& arg ) {
         m_mode = None;
         m_exclusion = false;
-        m_start = std::string::npos;
         m_arg = m_tagAliases->expandAliases( arg );
         m_escapeChars.clear();
+        m_substring.reserve(m_arg.size());
+        m_patternName.reserve(m_arg.size());
+        m_realPatternPos = 0;
         for( m_pos = 0; m_pos < m_arg.size(); ++m_pos )
             visitChar( m_arg[m_pos] );
-        if( m_mode == Name )
-            addPattern<TestSpec::NamePattern>();
+        endMode();
         return *this;
     }
     TestSpec TestSpecParser::testSpec() {
         addFilter();
         return m_testSpec;
     }
-
     void TestSpecParser::visitChar( char c ) {
-        if( m_mode == None ) {
-            switch( c ) {
-            case ' ': return;
-            case '~': m_exclusion = true; return;
-            case '[': return startNewMode( Tag, ++m_pos );
-            case '"': return startNewMode( QuotedName, ++m_pos );
-            case '\\': return escape();
-            default: startNewMode( Name, m_pos ); break;
-            }
-        }
-        if( m_mode == Name ) {
-            if( c == ',' ) {
-                addPattern<TestSpec::NamePattern>();
-                addFilter();
-            }
-            else if( c == '[' ) {
-                if( subString() == "exclude:" )
-                    m_exclusion = true;
-                else
-                    addPattern<TestSpec::NamePattern>();
-                startNewMode( Tag, ++m_pos );
-            }
-            else if( c == '\\' )
-                escape();
+        if( (m_mode != EscapedName) && (c == '\\') ) {
+            escape();
+            m_substring += c;
+            m_patternName += c;
+            m_realPatternPos++;
+            return;
+        }else if((m_mode != EscapedName) && (c == ',') )  {
+            endMode();
+            addFilter();
+            return;
+        }
+
+        switch( m_mode ) {
+        case None:
+            if( processNoneChar( c ) )
+                return;
+            break;
+        case Name:
+            processNameChar( c );
+            break;
+        case EscapedName:
+            endMode();
+            m_substring += c;
+            m_patternName += c;
+            m_realPatternPos++;
+            return;
+        default:
+        case Tag:
+        case QuotedName:
+            if( processOtherChar( c ) )
+                return;
+            break;
+        }
+
+        m_substring += c;
+        if( !isControlChar( c ) ) {
+            m_patternName += c;
+            m_realPatternPos++;
+        }
+    }
+    // Two of the processing methods return true to signal the caller to return
+    // without adding the given character to the current pattern strings
+    bool TestSpecParser::processNoneChar( char c ) {
+        switch( c ) {
+        case ' ':
+            return true;
+        case '~':
+            m_exclusion = true;
+            return false;
+        case '[':
+            startNewMode( Tag );
+            return false;
+        case '"':
+            startNewMode( QuotedName );
+            return false;
+        default:
+            startNewMode( Name );
+            return false;
         }
-        else if( m_mode == EscapedName )
-            m_mode = Name;
-        else if( m_mode == QuotedName && c == '"' )
-            addPattern<TestSpec::NamePattern>();
-        else if( m_mode == Tag && c == ']' )
-            addPattern<TestSpec::TagPattern>();
     }
-    void TestSpecParser::startNewMode( Mode mode, std::size_t start ) {
+    void TestSpecParser::processNameChar( char c ) {
+        if( c == '[' ) {
+            if( m_substring == "exclude:" )
+                m_exclusion = true;
+            else
+                endMode();
+            startNewMode( Tag );
+        }
+    }
+    bool TestSpecParser::processOtherChar( char c ) {
+        if( !isControlChar( c ) )
+            return false;
+        m_substring += c;
+        endMode();
+        return true;
+    }
+    void TestSpecParser::startNewMode( Mode mode ) {
         m_mode = mode;
-        m_start = start;
+    }
+    void TestSpecParser::endMode() {
+        switch( m_mode ) {
+        case Name:
+        case QuotedName:
+            return addPattern<TestSpec::NamePattern>();
+        case Tag:
+            return addPattern<TestSpec::TagPattern>();
+        case EscapedName:
+            revertBackToLastMode();
+            return;
+        case None:
+        default:
+            return startNewMode( None );
+        }
     }
     void TestSpecParser::escape() {
-        if( m_mode == None )
-            m_start = m_pos;
+        saveLastMode();
         m_mode = EscapedName;
-        m_escapeChars.push_back( m_pos );
+        m_escapeChars.push_back(m_realPatternPos);
+    }
+    bool TestSpecParser::isControlChar( char c ) const {
+        switch( m_mode ) {
+            default:
+                return false;
+            case None:
+                return c == '~';
+            case Name:
+                return c == '[';
+            case EscapedName:
+                return true;
+            case QuotedName:
+                return c == '"';
+            case Tag:
+                return c == '[' || c == ']';
+        }
     }
-    std::string TestSpecParser::subString() const { return m_arg.substr( m_start, m_pos - m_start ); }
 
     void TestSpecParser::addFilter() {
         if( !m_currentFilter.m_patterns.empty() ) {
@@ -12277,6 +14454,14 @@ namespace Catch {
         }
     }
 
+    void TestSpecParser::saveLastMode() {
+      lastMode = m_mode;
+    }
+
+    void TestSpecParser::revertBackToLastMode() {
+      m_mode = lastMode;
+    }
+
     TestSpec parseTestSpec( std::string const& arg ) {
         return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();
     }
@@ -12508,6 +14693,13 @@ std::string StringMaker<wchar_t *>::convert(wchar_t * str) {
 }
 #endif
 
+#if defined(CATCH_CONFIG_CPP17_BYTE)
+#include <cstddef>
+std::string StringMaker<std::byte>::convert(std::byte value) {
+    return ::Catch::Detail::stringify(std::to_integer<unsigned long long>(value));
+}
+#endif // defined(CATCH_CONFIG_CPP17_BYTE)
+
 std::string StringMaker<int>::convert(int value) {
     return ::Catch::Detail::stringify(static_cast<long long>(value));
 }
@@ -12570,11 +14762,16 @@ std::string StringMaker<std::nullptr_t>::convert(std::nullptr_t) {
     return "nullptr";
 }
 
+int StringMaker<float>::precision = 5;
+
 std::string StringMaker<float>::convert(float value) {
-    return fpToString(value, 5) + 'f';
+    return fpToString(value, precision) + 'f';
 }
+
+int StringMaker<double>::precision = 10;
+
 std::string StringMaker<double>::convert(double value) {
-    return fpToString(value, 10);
+    return fpToString(value, precision);
 }
 
 std::string ratio_string<std::atto>::symbol() { return "a"; }
@@ -12692,7 +14889,7 @@ namespace Catch {
     }
 
     Version const& libraryVersion() {
-        static Version version( 2, 7, 1, "", 0 );
+        static Version version( 2, 10, 0, "", 0 );
         return version;
     }
 
@@ -12700,14 +14897,12 @@ namespace Catch {
 // end catch_version.cpp
 // start catch_wildcard_pattern.cpp
 
-#include <sstream>
-
 namespace Catch {
 
     WildcardPattern::WildcardPattern( std::string const& pattern,
                                       CaseSensitive::Choice caseSensitivity )
     :   m_caseSensitivity( caseSensitivity ),
-        m_pattern( adjustCase( pattern ) )
+        m_pattern( normaliseString( pattern ) )
     {
         if( startsWith( m_pattern, '*' ) ) {
             m_pattern = m_pattern.substr( 1 );
@@ -12722,20 +14917,20 @@ namespace Catch {
     bool WildcardPattern::matches( std::string const& str ) const {
         switch( m_wildcard ) {
             case NoWildcard:
-                return m_pattern == adjustCase( str );
+                return m_pattern == normaliseString( str );
             case WildcardAtStart:
-                return endsWith( adjustCase( str ), m_pattern );
+                return endsWith( normaliseString( str ), m_pattern );
             case WildcardAtEnd:
-                return startsWith( adjustCase( str ), m_pattern );
+                return startsWith( normaliseString( str ), m_pattern );
             case WildcardAtBothEnds:
-                return contains( adjustCase( str ), m_pattern );
+                return contains( normaliseString( str ), m_pattern );
             default:
                 CATCH_INTERNAL_ERROR( "Unknown enum" );
         }
     }
 
-    std::string WildcardPattern::adjustCase( std::string const& str ) const {
-        return m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str;
+    std::string WildcardPattern::normaliseString( std::string const& str ) const {
+        return trim( m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str );
     }
 }
 // end catch_wildcard_pattern.cpp
@@ -13279,24 +15474,25 @@ private:
         if (itMessage == messages.end())
             return;
 
-        // using messages.end() directly yields (or auto) compilation error:
-        std::vector<MessageInfo>::const_iterator itEnd = messages.end();
-        const std::size_t N = static_cast<std::size_t>(std::distance(itMessage, itEnd));
+        const auto itEnd = messages.cend();
+        const auto N = static_cast<std::size_t>(std::distance(itMessage, itEnd));
 
         {
             Colour colourGuard(colour);
             stream << " with " << pluralise(N, "message") << ':';
         }
 
-        for (; itMessage != itEnd; ) {
+        while (itMessage != itEnd) {
             // If this assertion is a warning ignore any INFO messages
             if (printInfoMessages || itMessage->type != ResultWas::Info) {
-                stream << " '" << itMessage->message << '\'';
-                if (++itMessage != itEnd) {
+                printMessage();
+                if (itMessage != itEnd) {
                     Colour colourGuard(dimColour());
                     stream << " and";
                 }
+                continue;
             }
+            ++itMessage;
         }
     }
 
@@ -13369,8 +15565,13 @@ private:
 #if defined(_MSC_VER)
 #pragma warning(push)
 #pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch
- // Note that 4062 (not all labels are handled
- // and default is missing) is enabled
+ // Note that 4062 (not all labels are handled and default is missing) is enabled
+#endif
+
+#if defined(__clang__)
+#  pragma clang diagnostic push
+// For simplicity, benchmarking-only helpers are always enabled
+#  pragma clang diagnostic ignored "-Wunused-function"
 #endif
 
 namespace Catch {
@@ -13556,6 +15757,10 @@ class Duration {
     Unit m_units;
 
 public:
+	explicit Duration(double inNanoseconds, Unit units = Unit::Auto)
+        : Duration(static_cast<uint64_t>(inNanoseconds), units) {
+    }
+
     explicit Duration(uint64_t inNanoseconds, Unit units = Unit::Auto)
         : m_inNanoseconds(inNanoseconds),
         m_units(units) {
@@ -13606,7 +15811,7 @@ public:
 
     }
     friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {
-        return os << duration.value() << " " << duration.unitsAsString();
+        return os << duration.value() << ' ' << duration.unitsAsString();
     }
 };
 } // end anon namespace
@@ -13631,10 +15836,16 @@ public:
         if (!m_isOpen) {
             m_isOpen = true;
             *this << RowBreak();
-            for (auto const& info : m_columnInfos)
-                *this << info.name << ColumnBreak();
-            *this << RowBreak();
-            m_os << Catch::getLineOfChars<'-'>() << "\n";
+
+			Columns headerCols;
+			Spacer spacer(2);
+			for (auto const& info : m_columnInfos) {
+				headerCols += Column(info.name).width(static_cast<std::size_t>(info.width - 2));
+				headerCols += spacer;
+			}
+			m_os << headerCols << '\n';
+
+            m_os << Catch::getLineOfChars<'-'>() << '\n';
         }
     }
     void close() {
@@ -13653,30 +15864,29 @@ public:
 
     friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) {
         auto colStr = tp.m_oss.str();
-        // This takes account of utf8 encodings
-        auto strSize = Catch::StringRef(colStr).numberOfCharacters();
+        const auto strSize = colStr.size();
         tp.m_oss.str("");
         tp.open();
         if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {
             tp.m_currentColumn = -1;
-            tp.m_os << "\n";
+            tp.m_os << '\n';
         }
         tp.m_currentColumn++;
 
         auto colInfo = tp.m_columnInfos[tp.m_currentColumn];
-        auto padding = (strSize + 2 < static_cast<std::size_t>(colInfo.width))
-            ? std::string(colInfo.width - (strSize + 2), ' ')
+        auto padding = (strSize + 1 < static_cast<std::size_t>(colInfo.width))
+            ? std::string(colInfo.width - (strSize + 1), ' ')
             : std::string();
         if (colInfo.justification == ColumnInfo::Left)
-            tp.m_os << colStr << padding << " ";
+            tp.m_os << colStr << padding << ' ';
         else
-            tp.m_os << padding << colStr << " ";
+            tp.m_os << padding << colStr << ' ';
         return tp;
     }
 
     friend TablePrinter& operator << (TablePrinter& tp, RowBreak) {
         if (tp.m_currentColumn > 0) {
-            tp.m_os << "\n";
+            tp.m_os << '\n';
             tp.m_currentColumn = -1;
         }
         return tp;
@@ -13686,12 +15896,26 @@ public:
 ConsoleReporter::ConsoleReporter(ReporterConfig const& config)
     : StreamingReporterBase(config),
     m_tablePrinter(new TablePrinter(config.stream(),
-    {
-        { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left },
-        { "iters", 8, ColumnInfo::Right },
-        { "elapsed ns", 14, ColumnInfo::Right },
-        { "average", 14, ColumnInfo::Right }
-    })) {}
+        [&config]() -> std::vector<ColumnInfo> {
+        if (config.fullConfig()->benchmarkNoAnalysis())
+        {
+            return{
+                { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 43, ColumnInfo::Left },
+                { "     samples", 14, ColumnInfo::Right },
+                { "  iterations", 14, ColumnInfo::Right },
+                { "        mean", 14, ColumnInfo::Right }
+            };
+        }
+        else
+        {
+            return{
+                { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left },
+                { "samples      mean       std dev", 14, ColumnInfo::Right },
+                { "iterations   low mean   low std dev", 14, ColumnInfo::Right },
+                { "estimated    high mean  high std dev", 14, ColumnInfo::Right }
+            };
+        }
+    }())) {}
 ConsoleReporter::~ConsoleReporter() = default;
 
 std::string ConsoleReporter::getDescription() {
@@ -13722,6 +15946,7 @@ bool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) {
 }
 
 void ConsoleReporter::sectionStarting(SectionInfo const& _sectionInfo) {
+    m_tablePrinter->close();
     m_headerPrinted = false;
     StreamingReporterBase::sectionStarting(_sectionInfo);
 }
@@ -13745,28 +15970,53 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {
     StreamingReporterBase::sectionEnded(_sectionStats);
 }
 
-void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {
-    lazyPrintWithoutClosingBenchmarkTable();
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+void ConsoleReporter::benchmarkPreparing(std::string const& name) {
+	lazyPrintWithoutClosingBenchmarkTable();
 
-    auto nameCol = Column( info.name ).width( static_cast<std::size_t>( m_tablePrinter->columnInfos()[0].width - 2 ) );
+	auto nameCol = Column(name).width(static_cast<std::size_t>(m_tablePrinter->columnInfos()[0].width - 2));
 
-    bool firstLine = true;
-    for (auto line : nameCol) {
-        if (!firstLine)
-            (*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();
-        else
-            firstLine = false;
+	bool firstLine = true;
+	for (auto line : nameCol) {
+		if (!firstLine)
+			(*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak();
+		else
+			firstLine = false;
+
+		(*m_tablePrinter) << line << ColumnBreak();
+	}
+}
 
-        (*m_tablePrinter) << line << ColumnBreak();
+void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {
+    (*m_tablePrinter) << info.samples << ColumnBreak()
+        << info.iterations << ColumnBreak();
+    if (!m_config->benchmarkNoAnalysis())
+        (*m_tablePrinter) << Duration(info.estimatedDuration) << ColumnBreak();
+}
+void ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) {
+    if (m_config->benchmarkNoAnalysis())
+    {
+        (*m_tablePrinter) << Duration(stats.mean.point.count()) << ColumnBreak();
+    }
+    else
+    {
+        (*m_tablePrinter) << ColumnBreak()
+            << Duration(stats.mean.point.count()) << ColumnBreak()
+            << Duration(stats.mean.lower_bound.count()) << ColumnBreak()
+            << Duration(stats.mean.upper_bound.count()) << ColumnBreak() << ColumnBreak()
+            << Duration(stats.standardDeviation.point.count()) << ColumnBreak()
+            << Duration(stats.standardDeviation.lower_bound.count()) << ColumnBreak()
+            << Duration(stats.standardDeviation.upper_bound.count()) << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak() << ColumnBreak();
     }
 }
-void ConsoleReporter::benchmarkEnded(BenchmarkStats const& stats) {
-    Duration average(stats.elapsedTimeInNanoseconds / stats.iterations);
+
+void ConsoleReporter::benchmarkFailed(std::string const& error) {
+	Colour colour(Colour::Red);
     (*m_tablePrinter)
-        << stats.iterations << ColumnBreak()
-        << stats.elapsedTimeInNanoseconds << ColumnBreak()
-        << average << ColumnBreak();
+        << "Benchmark failed (" << error << ')'
+        << ColumnBreak() << RowBreak();
 }
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
 void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) {
     m_tablePrinter->close();
@@ -13845,11 +16095,9 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
 
     SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;
 
-    if (!lineInfo.empty()) {
-        stream << getLineOfChars<'-'>() << '\n';
-        Colour colourGuard(Colour::FileName);
-        stream << lineInfo << '\n';
-    }
+    stream << getLineOfChars<'-'>() << '\n';
+    Colour colourGuard(Colour::FileName);
+    stream << lineInfo << '\n';
     stream << getLineOfChars<'.'>() << '\n' << std::endl;
 }
 
@@ -13985,6 +16233,10 @@ CATCH_REGISTER_REPORTER("console", ConsoleReporter)
 #if defined(_MSC_VER)
 #pragma warning(pop)
 #endif
+
+#if defined(__clang__)
+#  pragma clang diagnostic pop
+#endif
 // end catch_reporter_console.cpp
 // start catch_reporter_junit.cpp
 
@@ -14051,22 +16303,6 @@ namespace Catch {
     void JunitReporter::testRunStarting( TestRunInfo const& runInfo )  {
         CumulativeReporterBase::testRunStarting( runInfo );
         xml.startElement( "testsuites" );
-
-        if ( m_config->hasTestFilters() || m_config->rngSeed() != 0 )
-            xml.startElement("properties");
-
-        if ( m_config->hasTestFilters() ) {
-            xml.scopedElement( "property" )
-                .writeAttribute( "name" , "filters" )
-                .writeAttribute( "value" , serializeFilters( m_config->getTestsOrTags() ) );
-        }
-
-        if( m_config->rngSeed() != 0 ) {
-            xml.scopedElement( "property" )
-                .writeAttribute( "name", "random-seed" )
-                .writeAttribute( "value", m_config->rngSeed() );
-            xml.endElement();
-        }
     }
 
     void JunitReporter::testGroupStarting( GroupInfo const& groupInfo ) {
@@ -14105,6 +16341,7 @@ namespace Catch {
 
     void JunitReporter::writeGroup( TestGroupNode const& groupNode, double suiteTime ) {
         XmlWriter::ScopedElement e = xml.scopedElement( "testsuite" );
+
         TestGroupStats const& stats = groupNode.value;
         xml.writeAttribute( "name", stats.groupInfo.name );
         xml.writeAttribute( "errors", unexpectedExceptions );
@@ -14117,6 +16354,21 @@ namespace Catch {
             xml.writeAttribute( "time", suiteTime );
         xml.writeAttribute( "timestamp", getCurrentTimestamp() );
 
+        // Write properties if there are any
+        if (m_config->hasTestFilters() || m_config->rngSeed() != 0) {
+            auto properties = xml.scopedElement("properties");
+            if (m_config->hasTestFilters()) {
+                xml.scopedElement("property")
+                    .writeAttribute("name", "filters")
+                    .writeAttribute("value", serializeFilters(m_config->getTestsOrTags()));
+            }
+            if (m_config->rngSeed() != 0) {
+                xml.scopedElement("property")
+                    .writeAttribute("name", "random-seed")
+                    .writeAttribute("value", m_config->rngSeed());
+            }
+        }
+
         // Write test cases
         for( auto const& child : groupNode.children )
             writeTestCase( *child );
@@ -14274,19 +16526,34 @@ namespace Catch {
         m_reporter->noMatchingTestCases( spec );
     }
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void ListeningReporter::benchmarkPreparing( std::string const& name ) {
+		for (auto const& listener : m_listeners) {
+			listener->benchmarkPreparing(name);
+		}
+		m_reporter->benchmarkPreparing(name);
+	}
     void ListeningReporter::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) {
         for ( auto const& listener : m_listeners ) {
             listener->benchmarkStarting( benchmarkInfo );
         }
         m_reporter->benchmarkStarting( benchmarkInfo );
     }
-    void ListeningReporter::benchmarkEnded( BenchmarkStats const& benchmarkStats ) {
+    void ListeningReporter::benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) {
         for ( auto const& listener : m_listeners ) {
             listener->benchmarkEnded( benchmarkStats );
         }
         m_reporter->benchmarkEnded( benchmarkStats );
     }
 
+	void ListeningReporter::benchmarkFailed( std::string const& error ) {
+		for (auto const& listener : m_listeners) {
+			listener->benchmarkFailed(error);
+		}
+		m_reporter->benchmarkFailed(error);
+	}
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     void ListeningReporter::testRunStarting( TestRunInfo const& testRunInfo ) {
         for ( auto const& listener : m_listeners ) {
             listener->testRunStarting( testRunInfo );
@@ -14580,6 +16847,51 @@ namespace Catch {
         m_xml.endElement();
     }
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+    void XmlReporter::benchmarkPreparing(std::string const& name) {
+        m_xml.startElement("BenchmarkResults")
+            .writeAttribute("name", name);
+    }
+
+    void XmlReporter::benchmarkStarting(BenchmarkInfo const &info) {
+        m_xml.writeAttribute("samples", info.samples)
+            .writeAttribute("resamples", info.resamples)
+            .writeAttribute("iterations", info.iterations)
+            .writeAttribute("clockResolution", static_cast<uint64_t>(info.clockResolution))
+            .writeAttribute("estimatedDuration", static_cast<uint64_t>(info.estimatedDuration))
+            .writeComment("All values in nano seconds");
+    }
+
+    void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) {
+        m_xml.startElement("mean")
+            .writeAttribute("value", static_cast<uint64_t>(benchmarkStats.mean.point.count()))
+            .writeAttribute("lowerBound", static_cast<uint64_t>(benchmarkStats.mean.lower_bound.count()))
+            .writeAttribute("upperBound", static_cast<uint64_t>(benchmarkStats.mean.upper_bound.count()))
+            .writeAttribute("ci", benchmarkStats.mean.confidence_interval);
+        m_xml.endElement();
+        m_xml.startElement("standardDeviation")
+            .writeAttribute("value", benchmarkStats.standardDeviation.point.count())
+            .writeAttribute("lowerBound", benchmarkStats.standardDeviation.lower_bound.count())
+            .writeAttribute("upperBound", benchmarkStats.standardDeviation.upper_bound.count())
+            .writeAttribute("ci", benchmarkStats.standardDeviation.confidence_interval);
+        m_xml.endElement();
+        m_xml.startElement("outliers")
+            .writeAttribute("variance", benchmarkStats.outlierVariance)
+            .writeAttribute("lowMild", benchmarkStats.outliers.low_mild)
+            .writeAttribute("lowSevere", benchmarkStats.outliers.low_severe)
+            .writeAttribute("highMild", benchmarkStats.outliers.high_mild)
+            .writeAttribute("highSevere", benchmarkStats.outliers.high_severe);
+        m_xml.endElement();
+        m_xml.endElement();
+    }
+
+    void XmlReporter::benchmarkFailed(std::string const &error) {
+        m_xml.scopedElement("failed").
+            writeAttribute("message", error);
+        m_xml.endElement();
+    }
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
     CATCH_REGISTER_REPORTER( "xml", XmlReporter )
 
 } // end namespace Catch
@@ -14682,6 +16994,7 @@ int main (int argc, char * const argv[]) {
 #endif // CATCH_CONFIG_DISABLE_MATCHERS
 
 #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg )
+#define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "CATCH_UNSCOPED_INFO", msg )
 #define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )
 #define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CATCH_CAPTURE",__VA_ARGS__ )
 
@@ -14699,14 +17012,22 @@ int main (int argc, char * const argv[]) {
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
 #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )
 #define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
 #else
 #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
 #endif
 
 #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)
@@ -14727,6 +17048,13 @@ int main (int argc, char * const argv[]) {
 #define CATCH_THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( "     Then: " << desc )
 #define CATCH_AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( "      And: " << desc )
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+#define CATCH_BENCHMARK(...) \
+    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))
+#define CATCH_BENCHMARK_ADVANCED(name) \
+    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name)
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
 // If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required
 #else
 
@@ -14779,14 +17107,26 @@ int main (int argc, char * const argv[]) {
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
 #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ )
 #define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ )
+#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE(__VA_ARGS__)
+#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #else
 #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) )
+#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
+#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
 #define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) )
+#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( __VA_ARGS__ ) )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
+#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, __VA_ARGS__ ) )
+#define TEMPLATE_LIST_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE( __VA_ARGS__ ) )
+#define TEMPLATE_LIST_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_LIST_TEST_CASE_METHOD( className, __VA_ARGS__ ) )
 #endif
 
 #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE)
@@ -14812,6 +17152,13 @@ int main (int argc, char * const argv[]) {
 #define THEN( desc )      INTERNAL_CATCH_DYNAMIC_SECTION( "     Then: " << desc )
 #define AND_THEN( desc )  INTERNAL_CATCH_DYNAMIC_SECTION( "      And: " << desc )
 
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+#define BENCHMARK(...) \
+    INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,))
+#define BENCHMARK_ADVANCED(name) \
+    INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(____C_A_T_C_H____B_E_N_C_H____), name)
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
+
 using Catch::Detail::Approx;
 
 #else // CATCH_CONFIG_DISABLE
@@ -14851,9 +17198,10 @@ using Catch::Detail::Approx;
 #define CATCH_REQUIRE_THAT( arg, matcher ) (void)(0)
 #endif // CATCH_CONFIG_DISABLE_MATCHERS
 
-#define CATCH_INFO( msg )    (void)(0)
-#define CATCH_WARN( msg )    (void)(0)
-#define CATCH_CAPTURE( msg ) (void)(0)
+#define CATCH_INFO( msg )          (void)(0)
+#define CATCH_UNSCOPED_INFO( msg ) (void)(0)
+#define CATCH_WARN( msg )          (void)(0)
+#define CATCH_CAPTURE( msg )       (void)(0)
 
 #define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ))
 #define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ))
@@ -14868,15 +17216,23 @@ using Catch::Detail::Approx;
 #define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
-#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) )
-#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className )
+#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)
+#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)
+#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)
+#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #else
-#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) ) )
-#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className ) )
+#define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )
+#define CATCH_TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )
+#define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )
+#define CATCH_TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
 #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #endif
 
 // "BDD-style" convenience wrappers
@@ -14927,6 +17283,7 @@ using Catch::Detail::Approx;
 #endif // CATCH_CONFIG_DISABLE_MATCHERS
 
 #define INFO( msg ) (void)(0)
+#define UNSCOPED_INFO( msg ) (void)(0)
 #define WARN( msg ) (void)(0)
 #define CAPTURE( msg ) (void)(0)
 
@@ -14942,15 +17299,23 @@ using Catch::Detail::Approx;
 #define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ))
 
 #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR
-#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) )
-#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className )
+#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__)
+#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__)
+#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__)
+#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #else
-#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) ) )
-#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className ) )
+#define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(__VA_ARGS__) )
+#define TEMPLATE_TEST_CASE_SIG( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_SIG_NO_REGISTRATION(__VA_ARGS__) )
+#define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(className, __VA_ARGS__ ) )
+#define TEMPLATE_TEST_CASE_METHOD_SIG( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_SIG_NO_REGISTRATION(className, __VA_ARGS__ ) )
 #define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_SIG( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ )
 #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
+#define TEMPLATE_PRODUCT_TEST_CASE_METHOD_SIG( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ )
 #endif
 
 #define STATIC_REQUIRE( ... )       (void)(0)
diff --git a/packages/Catch2/single_include/catch2/catch_reporter_teamcity.hpp b/packages/Catch2/single_include/catch2/catch_reporter_teamcity.hpp
index eca2885cd4e9fde3b5e7008388f4b57f203ce9bc..47b7e4aac30f94370156d7be8b5424e9c51eeadb 100644
--- a/packages/Catch2/single_include/catch2/catch_reporter_teamcity.hpp
+++ b/packages/Catch2/single_include/catch2/catch_reporter_teamcity.hpp
@@ -183,8 +183,7 @@ namespace Catch {
 
             SourceLineInfo lineInfo = m_sectionStack.front().lineInfo;
 
-            if( !lineInfo.empty() )
-                os << lineInfo << "\n";
+            os << lineInfo << "\n";
             os << getLineOfChars<'.'>() << "\n\n";
         }
 
diff --git a/packages/kokkos/.gitrepo b/packages/kokkos/.gitrepo
index a1e1cc09eecc83b6c04feed37c1a4cb889b6cb88..49450ce20b2e5c2b1b4f64856399fe9156bd873a 100644
--- a/packages/kokkos/.gitrepo
+++ b/packages/kokkos/.gitrepo
@@ -6,7 +6,7 @@
 [subrepo]
 	remote = git@github.com:kokkos/kokkos.git
 	branch = master
-	commit = 5d6e7fb38e96aec88d2c514e1f9be1cf2b549b57
-	parent = 5809f3aeb3dacfc19ff4e1808f64895e05d8c875
+	commit = 2983b80d9aeafabb81f2c8c1c5a49b40cc0856cb
+	parent = 95deb7c8d019dd4047dfd92b56c6576452a743a8
 	cmdver = 0.4.0
 	method = merge
diff --git a/packages/kokkos/.jenkins b/packages/kokkos/.jenkins
new file mode 100644
index 0000000000000000000000000000000000000000..cfa55f4dce8df9755159f0feae89c717d40c4bc6
--- /dev/null
+++ b/packages/kokkos/.jenkins
@@ -0,0 +1,112 @@
+pipeline {
+    agent {
+        label 'docker'
+    }
+    environment {
+        CCACHE_DIR = '/tmp/ccache'
+        CCACHE_MAXSIZE = '10G'
+        CCACHE_CPP2 = 'true'
+    }
+    stages {
+        stage('Build') {
+            parallel {
+                stage('CUDA-9.2-Clang') {
+                    agent {
+                        dockerfile {
+                            filename 'Dockerfile.clang'
+                            dir 'scripts/docker'
+                            additionalBuildArgs '--pull'
+                            label 'nvidia-docker && volta'
+                            args '-v /tmp/ccache.kokkos:/tmp/ccache'
+                        }
+                    }
+                    environment {
+                        OPTIONS = '--with-options=compiler_warnings --arch=Volta70 --compiler=/usr/local/bin/clang++ --with-cuda --with-cuda-options=enable_lambda'
+                    }
+                    steps {
+                        sh 'ln -s /usr/bin/ccache /usr/local/bin/clang++'
+                        sh 'ccache --zero-stats'
+                        sh 'rm -rf build && mkdir -p build && cd build && ../generate_makefile.bash $OPTIONS && make test -j8'
+                    }
+                    post {
+                        always {
+                            sh 'ccache --show-stats'
+                        }
+                    }
+                }
+                stage("CUDA-9.2-NVCC") {
+                    agent {
+                        dockerfile {
+                            filename 'Dockerfile.nvcc'
+                            dir 'scripts/docker'
+                            additionalBuildArgs '--pull --build-arg BASE=nvidia/cuda:9.2-devel'
+                            label 'nvidia-docker && volta'
+                            args '-v /tmp/ccache.kokkos:/tmp/ccache'
+                        }
+                    }
+                    environment {
+                        OPTIONS = '--with-options=compiler_warnings --arch=Volta70 --with-cuda --with-cuda-options=enable_lambda'
+                    }
+                    steps {
+                        sh 'ln -s /usr/bin/ccache /usr/local/bin/g++'
+                        sh 'ccache --zero-stats'
+                        sh 'rm -rf build && mkdir -p build && cd build && ../generate_makefile.bash $OPTIONS && make test -j8'
+                    }
+                    post {
+                        always {
+                            sh 'ccache --show-stats'
+                        }
+                    }
+                }
+                stage("CUDA-10.1-NVCC") {
+                    agent {
+                        dockerfile {
+                            filename 'Dockerfile.nvcc'
+                            dir 'scripts/docker'
+                            additionalBuildArgs '--pull --build-arg BASE=nvidia/cuda:10.1-devel'
+                            label 'nvidia-docker && volta'
+                            args '-v /tmp/ccache.kokkos:/tmp/ccache'
+                        }
+                    }
+                    environment {
+                        OPTIONS = '--with-options=compiler_warnings --arch=Volta70 --with-cuda --with-cuda-options=enable_lambda,rdc,force_uvm'
+                    }
+                    steps {
+                        sh 'ln -s /usr/bin/ccache /usr/local/bin/g++'
+                        sh 'ccache --zero-stats'
+                        sh 'rm -rf build && mkdir -p build && cd build && ../generate_makefile.bash $OPTIONS && make test -j8'
+                    }
+                    post {
+                        always {
+                            sh 'ccache --show-stats'
+                        }
+                    }
+                }
+                stage("CUDA-10.1-NVCC-DEBUG") {
+                    agent {
+                        dockerfile {
+                            filename 'Dockerfile.nvcc'
+                            dir 'scripts/docker'
+                            additionalBuildArgs '--pull --build-arg BASE=nvidia/cuda:10.1-devel'
+                            label 'nvidia-docker && volta'
+                            args '-v /tmp/ccache.kokkos:/tmp/ccache'
+                        }
+                    }
+                    environment {
+                        OPTIONS = '--with-options=compiler_warnings --arch=Volta70--with-cuda --with-cuda-options=enable_lambda --debug'
+                    }
+                    steps {
+                        sh 'ln -s /usr/bin/ccache /usr/local/bin/g++'
+                        sh 'ccache --zero-stats'
+                        sh 'rm -rf build && mkdir -p build && cd build && ../generate_makefile.bash $OPTIONS && make test -j8'
+                    }
+                    post {
+                        always {
+                            sh 'ccache --show-stats'
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/packages/kokkos/.travis.yml b/packages/kokkos/.travis.yml
index bdeaf4762a6aae32c6b85d1988023670412a1bcd..f2776a1ca70cd02457ea9f42f032ab4ff2eab48e 100644
--- a/packages/kokkos/.travis.yml
+++ b/packages/kokkos/.travis.yml
@@ -50,7 +50,7 @@ script:
     fi
   - mkdir build
   - cd build
-  - ../generate_makefile.bash --compiler=$CXX --with-$THREADING --with-options=compiler_warnings ${GENERATE_OPTS}
+  - ../generate_makefile.bash --compiler=$CXX --with-$THREADING --with-options=compiler_warnings --cxxflags="-O3 -Werror" ${GENERATE_OPTS}
   - make
   - make test
 
diff --git a/packages/kokkos/CHANGELOG.md b/packages/kokkos/CHANGELOG.md
index 9d503663ae7939452863205ffcd287cad58be69a..8d196e2c35abf8c6a8109a3a2f84cc781de67925 100644
--- a/packages/kokkos/CHANGELOG.md
+++ b/packages/kokkos/CHANGELOG.md
@@ -1,5 +1,39 @@
 # Change Log
 
+## [2.9.00](https://github.com/kokkos/kokkos/tree/2.9.00) (2019-06-24)
+[Full Changelog](https://github.com/kokkos/kokkos/compare/2.8.00...2.9.00)
+
+**Implemented enhancements:**
+
+- Capability: CUDA Streams [\#1723](https://github.com/kokkos/kokkos/issues/1723)
+- Capability: CUDA Stream support for parallel\_reduce [\#2061](https://github.com/kokkos/kokkos/issues/2061)
+- Capability: Feature Request: TeamVectorRange [\#713](https://github.com/kokkos/kokkos/issues/713)
+- Capability: Adding HPX backend [\#2080](https://github.com/kokkos/kokkos/issues/2080)
+- Capability: TaskScheduler to have multiple queues [\#565](https://github.com/kokkos/kokkos/issues/565)
+- Capability: Support for additional reductions in ScatterView [\#1674](https://github.com/kokkos/kokkos/issues/1674)
+- Capability: Request: deep\_copy within parallel regions [\#689](https://github.com/kokkos/kokkos/issues/689)
+- Capability: Feature Request: `create\_mirror\_view\_without\_initializing` [\#1765](https://github.com/kokkos/kokkos/issues/1765)
+- View: Use SFINAE to restrict possible View type conversions [\#2127](https://github.com/kokkos/kokkos/issues/2127)
+- Deprecation: Deprecate ExecutionSpace::fence\(\) as static function and make it non-static [\#2140](https://github.com/kokkos/kokkos/issues/2140)
+- Deprecation: Deprecate LayoutTileLeft [\#2122](https://github.com/kokkos/kokkos/issues/2122)
+- Macros: KOKKOS\_RESTRICT defined for non-Intel compilers [\#2038](https://github.com/kokkos/kokkos/issues/2038)
+
+**Fixed bugs:**
+
+- Cuda: TeamThreadRange loop count on device is passed by reference to host static constexpr [\#1733](https://github.com/kokkos/kokkos/issues/1733)
+- Cuda: Build error with relocatable device code with CUDA 10.1 GCC 7.3 [\#2134](https://github.com/kokkos/kokkos/issues/2134)
+- Cuda: cudaFuncSetCacheConfig is setting CachePreferShared too often [\#2066](https://github.com/kokkos/kokkos/issues/2066)
+- Cuda: TeamPolicy doesn't throw then created with non-viable vector length and also doesn't backscale to viable one [\#2020](https://github.com/kokkos/kokkos/issues/2020)
+- Cuda: cudaMemcpy error for large league sizes on V100 [\#1991](https://github.com/kokkos/kokkos/issues/1991)
+- Cuda: illegal warp sync in parallel\_reduce by functor on Turing 75 [\#1958](https://github.com/kokkos/kokkos/issues/1958)
+- TeamThreadRange: Inconsistent results from TeamThreadRange reduction [\#1905](https://github.com/kokkos/kokkos/issues/1905)
+- Atomics: atomic\_fetch\_oper & atomic\_oper\_fetch don't build for complex\<float\> [\#1964](https://github.com/kokkos/kokkos/issues/1964)
+- Views: Kokkos randomread Views leak memory [\#2155](https://github.com/kokkos/kokkos/issues/2155)
+- ScatterView: LayoutLeft overload currently non-functional [\#2165](https://github.com/kokkos/kokkos/issues/2165)
+- KNL: With intel 17.2.174 illegal instruction in random number test [\#2078](https://github.com/kokkos/kokkos/issues/2078)
+- Bitset: Enable copy constructor on device [\#2094](https://github.com/kokkos/kokkos/issues/2094)
+- Examples: do not compile due to template deduction error \(multi\_fem\) [\#1928](https://github.com/kokkos/kokkos/issues/1928)
+
 ## [2.8.00](https://github.com/kokkos/kokkos/tree/2.8.00) (2019-02-05)
 [Full Changelog](https://github.com/kokkos/kokkos/compare/2.7.24...2.8.00)
 
diff --git a/packages/kokkos/Makefile.kokkos b/packages/kokkos/Makefile.kokkos
index 387fde19404820c3588ece26880e018a846061fb..8301482d605d0aff4d041045250babbd8e9f8ec7 100644
--- a/packages/kokkos/Makefile.kokkos
+++ b/packages/kokkos/Makefile.kokkos
@@ -17,7 +17,7 @@ KOKKOS_DEBUG ?= "no"
 KOKKOS_USE_TPLS ?= ""
 # Options: c++11,c++14,c++1y,c++17,c++1z,c++2a
 KOKKOS_CXX_STANDARD ?= "c++11"
-# Options: aggressive_vectorization,disable_profiling,disable_deprecated_code,enable_large_mem_tests
+# Options: aggressive_vectorization,disable_profiling,enable_deprecated_code,disable_deprecated_code,enable_large_mem_tests
 KOKKOS_OPTIONS ?= ""
 # Option for setting ETI path
 KOKKOS_ETI_PATH ?= ${KOKKOS_PATH}/core/src/eti
@@ -27,11 +27,19 @@ KOKKOS_CMAKE ?= "no"
 # Options: force_uvm,use_ldg,rdc,enable_lambda
 KOKKOS_CUDA_OPTIONS ?= ""
 
+# Default settings specific options.
+# Options: enable_async_dispatch
+KOKKOS_HPX_OPTIONS ?= ""
+
 # Return a 1 if a string contains a substring and 0 if not
 # Note the search string should be without '"'
 # Example: $(call kokkos_has_string,"hwloc,librt",hwloc)
 #   Will return a 1
 kokkos_has_string=$(if $(findstring $2,$1),1,0)
+# Returns 1 if the path exists, 0 otherwise
+# Example: $(call kokkos_path_exists,/path/to/file)
+#   Will return a 1 if /path/to/file exists
+kokkos_path_exists=$(if $(wildcard $1),1,0)
 
 # Check for general settings.
 KOKKOS_INTERNAL_ENABLE_DEBUG := $(call kokkos_has_string,$(KOKKOS_DEBUG),yes)
@@ -52,6 +60,7 @@ KOKKOS_INTERNAL_ENABLE_COMPILER_WARNINGS := $(call kokkos_has_string,$(KOKKOS_OP
 KOKKOS_INTERNAL_OPT_RANGE_AGGRESSIVE_VECTORIZATION := $(call kokkos_has_string,$(KOKKOS_OPTIONS),aggressive_vectorization)
 KOKKOS_INTERNAL_DISABLE_PROFILING := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_profiling)
 KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_deprecated_code)
+KOKKOS_INTERNAL_ENABLE_DEPRECATED_CODE := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_deprecated_code)
 KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_dualview_modify_check)
 KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_profile_load_print)
 KOKKOS_INTERNAL_ENABLE_LARGE_MEM_TESTS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_large_mem_tests)
@@ -59,6 +68,7 @@ KOKKOS_INTERNAL_CUDA_USE_LDG := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),
 KOKKOS_INTERNAL_CUDA_USE_UVM := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),force_uvm)
 KOKKOS_INTERNAL_CUDA_USE_RELOC := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),rdc)
 KOKKOS_INTERNAL_CUDA_USE_LAMBDA := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),enable_lambda)
+KOKKOS_INTERNAL_HPX_ENABLE_ASYNC_DISPATCH := $(call kokkos_has_string,$(KOKKOS_HPX_OPTIONS),enable_async_dispatch)
 KOKKOS_INTERNAL_ENABLE_ETI := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_eti)
 
 
@@ -66,12 +76,15 @@ KOKKOS_INTERNAL_ENABLE_ETI := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_
 KOKKOS_INTERNAL_USE_OPENMP := $(call kokkos_has_string,$(subst OpenMPTarget,,$(KOKKOS_DEVICES)),OpenMP)
 KOKKOS_INTERNAL_USE_PTHREADS := $(call kokkos_has_string,$(KOKKOS_DEVICES),Pthread)
 KOKKOS_INTERNAL_USE_QTHREADS := $(call kokkos_has_string,$(KOKKOS_DEVICES),Qthreads)
+KOKKOS_INTERNAL_USE_HPX := $(call kokkos_has_string,$(KOKKOS_DEVICES),HPX)
 KOKKOS_INTERNAL_USE_SERIAL := $(call kokkos_has_string,$(KOKKOS_DEVICES),Serial)
 
 ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 0)
   ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 0)
     ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 0)
-      KOKKOS_INTERNAL_USE_SERIAL := 1
+      ifeq ($(KOKKOS_INTERNAL_USE_HPX), 0)
+        KOKKOS_INTERNAL_USE_SERIAL := 1
+      endif
     endif
   endif
 endif
@@ -106,7 +119,7 @@ KOKKOS_INTERNAL_COMPILER_XL          := $(strip $(shell $(CXX) -qversion       2
 KOKKOS_INTERNAL_COMPILER_CRAY        := $(strip $(shell $(CXX) -craype-verbose 2>&1 | grep "CC-"               | wc -l))
 KOKKOS_INTERNAL_COMPILER_NVCC        := $(strip $(shell export OMPI_CXX=$(OMPI_CXX); export MPICH_CXX=$(MPICH_CXX); $(CXX) --version 2>&1 | grep nvcc | wc -l))
 KOKKOS_INTERNAL_COMPILER_CLANG       := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),clang)
-KOKKOS_INTERNAL_COMPILER_APPLE_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),apple-darwin)
+KOKKOS_INTERNAL_COMPILER_APPLE_CLANG := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),Apple LLVM)
 KOKKOS_INTERNAL_COMPILER_HCC         := $(call kokkos_has_string,$(KOKKOS_CXX_VERSION),HCC)
 
 # Check Host Compiler if using NVCC through nvcc_wrapper
@@ -277,9 +290,9 @@ KOKKOS_INTERNAL_USE_ARCH_NVIDIA := $(shell expr $(KOKKOS_INTERNAL_USE_ARCH_KEPLE
                                               + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER37)  \
                                               + $(KOKKOS_INTERNAL_USE_ARCH_PASCAL61)  \
                                               + $(KOKKOS_INTERNAL_USE_ARCH_PASCAL60)  \
-					      + $(KOKKOS_INTERNAL_USE_ARCH_VOLTA70) \
-					      + $(KOKKOS_INTERNAL_USE_ARCH_VOLTA72) \
-					      + $(KOKKOS_INTERNAL_USE_ARCH_TURING75) \
+											  + $(KOKKOS_INTERNAL_USE_ARCH_VOLTA70) \
+											  + $(KOKKOS_INTERNAL_USE_ARCH_VOLTA72) \
+											  + $(KOKKOS_INTERNAL_USE_ARCH_TURING75) \
                                               + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50) \
                                               + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52) \
                                               + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53))
@@ -294,19 +307,19 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 0)
                                                 + $(KOKKOS_INTERNAL_USE_ARCH_KEPLER37)  \
                                                 + $(KOKKOS_INTERNAL_USE_ARCH_PASCAL61)  \
                                                 + $(KOKKOS_INTERNAL_USE_ARCH_PASCAL60)  \
-						+ $(KOKKOS_INTERNAL_USE_ARCH_VOLTA70) \
-						+ $(KOKKOS_INTERNAL_USE_ARCH_VOLTA72) \
-						+ $(KOKKOS_INTERNAL_USE_ARCH_TURING75) \
+												+ $(KOKKOS_INTERNAL_USE_ARCH_VOLTA70) \
+												+ $(KOKKOS_INTERNAL_USE_ARCH_VOLTA72) \
+												+ $(KOKKOS_INTERNAL_USE_ARCH_TURING75) \
                                                 + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50) \
                                                 + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52) \
                                                 + $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53))
 endif
 
 ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 1)
-  ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
-    ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
-      KOKKOS_INTERNAL_NVCC_PATH := $(shell which nvcc)
-      CUDA_PATH ?= $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=)
+  ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
+    KOKKOS_INTERNAL_NVCC_PATH := $(shell which nvcc)
+    CUDA_PATH ?= $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=)
+    ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
       KOKKOS_INTERNAL_OPENMPTARGET_FLAG := $(KOKKOS_INTERNAL_OPENMPTARGET_FLAG) --cuda-path=$(CUDA_PATH)
     endif
   endif
@@ -435,6 +448,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1)
   tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_QTHREADS")
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+  tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_HPX")
+endif
+
 ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
   tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_SERIAL")
 endif
@@ -553,9 +570,15 @@ ifeq ($(KOKKOS_INTERNAL_DISABLE_PROFILING), 0)
   tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_PROFILING")
 endif
 
-ifeq ($(KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE), 0)
-  tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEPRECATED_CODE")
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 0)
+  ifeq ($(KOKKOS_INTERNAL_ENABLE_DEPRECATED_CODE), 1)
+    tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEPRECATED_CODE")
+  endif
+  ifeq ($(KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE), 0)
+    tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEPRECATED_CODE")
+  endif
 endif
+
 ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
   tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_ETI")
 endif
@@ -587,8 +610,13 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
 
   ifeq ($(KOKKOS_INTERNAL_CUDA_USE_RELOC), 1)
     tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE")
-    KOKKOS_CXXFLAGS += --relocatable-device-code=true
-    KOKKOS_LDFLAGS += --relocatable-device-code=true
+    ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
+      KOKKOS_CXXFLAGS += -fcuda-rdc
+      KOKKOS_LDFLAGS += -fcuda-rdc
+    else
+      KOKKOS_CXXFLAGS += --relocatable-device-code=true
+      KOKKOS_LDFLAGS += --relocatable-device-code=true
+    endif
   endif
 
   ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
@@ -619,6 +647,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
   endif
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+  ifeq ($(KOKKOS_INTERNAL_HPX_ENABLE_ASYNC_DISPATCH), 1)
+    tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_HPX_ASYNC_DISPATCH")
+  endif
+endif
+
 # Add Architecture flags.
 
 ifeq ($(KOKKOS_INTERNAL_USE_ARCH_ARMV80), 1)
@@ -902,7 +936,7 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
 		KOKKOS_INTERNAL_CUDA_ARCH_FLAG=--cuda-gpu-arch
 		KOKKOS_CXXFLAGS += -x cuda
   else
-    $(error Makefile.kokkos: CUDA is enabled but the compiler is neither NVCC nor Clang)
+    $(error Makefile.kokkos: CUDA is enabled but the compiler is neither NVCC nor Clang (got version string $(KOKKOS_CXX_VERSION)) )
   endif
 
   ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER30), 1)
@@ -1052,10 +1086,18 @@ endif
     ifneq ($(KOKKOS_CMAKE), yes)
       KOKKOS_CXXFLAGS += -I$(CUDA_PATH)/include
     endif
-    KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib64
-    KOKKOS_CXXLDFLAGS += -L$(CUDA_PATH)/lib64
+    ifeq ($(call kokkos_path_exists,$(CUDA_PATH)/lib64), 1)
+      KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib64
+      KOKKOS_CXXLDFLAGS += -L$(CUDA_PATH)/lib64
+      KOKKOS_TPL_LIBRARY_DIRS += $(CUDA_PATH)/lib64
+    else ifeq ($(call kokkos_path_exists,$(CUDA_PATH)/lib), 1)
+      KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib
+      KOKKOS_CXXLDFLAGS += -L$(CUDA_PATH)/lib
+      KOKKOS_TPL_LIBRARY_DIRS += $(CUDA_PATH)/lib
+    else
+      $(error Can't find CUDA library directory: no lib64 or lib directory in $(CUDA_PATH))
+    endif
     KOKKOS_TPL_INCLUDE_DIRS += $(CUDA_PATH)/include
-    KOKKOS_TPL_LIBRARY_DIRS += $(CUDA_PATH)/lib64
     ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
       KOKKOS_CXXFLAGS += --cuda-path=$(CUDA_PATH)
     endif
@@ -1118,6 +1160,33 @@ ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1)
   KOKKOS_TPL_LIBRARY_NAMES += qthread
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+  KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/HPX/*.cpp)
+  KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/HPX/*.hpp)
+  ifneq ($(HPX_PATH),)
+    ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1)
+      KOKKOS_CXXFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --cflags hpx_application_debug)
+      KOKKOS_CXXLDFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application_debug)
+      KOKKOS_LDFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application_debug)
+    else
+      KOKKOS_CXXFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --cflags hpx_application)
+      KOKKOS_CXXLDFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application)
+      KOKKOS_LDFLAGS += $(shell PKG_CONFIG_PATH=$(HPX_PATH)/lib64/pkgconfig pkg-config --libs hpx_application)
+    endif
+  else
+    ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1)
+      KOKKOS_CXXFLAGS += $(shell pkg-config --cflags hpx_application_debug)
+      KOKKOS_CXXLDFLAGS += $(shell pkg-config --libs hpx_application_debug)
+      KOKKOS_LDFLAGS += $(shell pkg-config --libs hpx_application_debug)
+    else
+      KOKKOS_CXXFLAGS += $(shell pkg-config --cflags hpx_application)
+      KOKKOS_CXXLDFLAGS += $(shell pkg-config --libs hpx_application)
+      KOKKOS_LDFLAGS += $(shell pkg-config --libs hpx_application)
+    endif
+  endif
+  KOKKOS_TPL_LIBRARY_NAMES += hpx
+endif
+
 # Explicitly set the GCC Toolchain for Clang.
 ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
   KOKKOS_INTERNAL_GCC_PATH = $(shell which g++)
diff --git a/packages/kokkos/Makefile.targets b/packages/kokkos/Makefile.targets
index 44da1e082ae12f6293a3fb925fb8b30e76e28248..e7d5a3c90769230f31672ef9f098b42ef4bb6f7d 100644
--- a/packages/kokkos/Makefile.targets
+++ b/packages/kokkos/Makefile.targets
@@ -30,6 +30,8 @@ Kokkos_SharedAlloc.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_
 	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_SharedAlloc.cpp
 Kokkos_MemoryPool.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_MemoryPool.cpp
 	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_MemoryPool.cpp
+Kokkos_HostSpace_deepcopy.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_HostSpace_deepcopy.cpp 
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_HostSpace_deepcopy.cpp
 
 ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
 ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
@@ -38,8 +40,8 @@ endif
 endif
 
 ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
-Kokkos_Cuda_Impl.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Impl.cpp
-	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Impl.cpp
+Kokkos_Cuda_Instance.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Instance.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Instance.cpp
 Kokkos_CudaSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_CudaSpace.cpp
 	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_CudaSpace.cpp
 Kokkos_Cuda_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Task.cpp
@@ -92,6 +94,13 @@ ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
 endif
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+Kokkos_HPX.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HPX/Kokkos_HPX.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HPX/Kokkos_HPX.cpp
+Kokkos_HPX_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/HPX/Kokkos_HPX_Task.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/HPX/Kokkos_HPX_Task.cpp
+endif
+
 ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
 Kokkos_OpenMPTarget_Exec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Exec.cpp
 	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Exec.cpp
diff --git a/packages/kokkos/algorithms/cmake/Dependencies.cmake b/packages/kokkos/algorithms/cmake/Dependencies.cmake
index c36b62523fadb628e970b6eccf57a9caaa317f1e..1b413106817cc6adf18dc94189203a27e641c6d5 100644
--- a/packages/kokkos/algorithms/cmake/Dependencies.cmake
+++ b/packages/kokkos/algorithms/cmake/Dependencies.cmake
@@ -1,5 +1,5 @@
 TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
   LIB_REQUIRED_PACKAGES KokkosCore KokkosContainers
-  LIB_OPTIONAL_TPLS Pthread CUDA HWLOC
+  LIB_OPTIONAL_TPLS Pthread CUDA HWLOC HPX
   TEST_OPTIONAL_TPLS CUSPARSE
   )
diff --git a/packages/kokkos/algorithms/src/Kokkos_Sort.hpp b/packages/kokkos/algorithms/src/Kokkos_Sort.hpp
index 8bdd876723520da4672f3f58659f46d58db1539f..7fb8505fe5327470c6dac96ba17631d460443675 100644
--- a/packages/kokkos/algorithms/src/Kokkos_Sort.hpp
+++ b/packages/kokkos/algorithms/src/Kokkos_Sort.hpp
@@ -328,6 +328,8 @@ public:
 
       parallel_for("Kokkos::Sort::Copy", Kokkos::RangePolicy<execution_space>(0,len),functor);
     }
+
+    Kokkos::fence();
   }
 
   template<class ValuesViewType>
diff --git a/packages/kokkos/algorithms/unit_tests/CMakeLists.txt b/packages/kokkos/algorithms/unit_tests/CMakeLists.txt
index f5aa24e9beda5eb528d9779f55d8860536629363..e238b37c8ec933aaec930d1896957e2739b97724 100644
--- a/packages/kokkos/algorithms/unit_tests/CMakeLists.txt
+++ b/packages/kokkos/algorithms/unit_tests/CMakeLists.txt
@@ -42,6 +42,12 @@ IF(Kokkos_ENABLE_OpenMP)
   )
 ENDIF()
 
+IF(Kokkos_ENABLE_HPX)
+  LIST( APPEND SOURCES
+    TestHPX.cpp
+  )
+ENDIF()
+
 IF(Kokkos_ENABLE_Serial)
   LIST( APPEND SOURCES
     TestSerial.cpp
diff --git a/packages/kokkos/algorithms/unit_tests/Makefile b/packages/kokkos/algorithms/unit_tests/Makefile
index b5848c451e6e1b4f817f3a446911d4d246f2e6d5..3c862d03dc9a40aa5e8fb7de630ae36aa5ed7116 100644
--- a/packages/kokkos/algorithms/unit_tests/Makefile
+++ b/packages/kokkos/algorithms/unit_tests/Makefile
@@ -49,6 +49,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
 	TEST_TARGETS += test-openmp
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+	OBJ_HPX = TestHPX.o UnitTestMain.o gtest-all.o
+	TARGETS += KokkosAlgorithms_UnitTest_HPX
+	TEST_TARGETS += test-hpx
+endif
+
 ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
 	OBJ_SERIAL = TestSerial.o UnitTestMain.o gtest-all.o
 	TARGETS += KokkosAlgorithms_UnitTest_Serial
@@ -67,6 +73,9 @@ KokkosAlgorithms_UnitTest_Threads: $(OBJ_THREADS) $(KOKKOS_LINK_DEPENDS)
 KokkosAlgorithms_UnitTest_OpenMP: $(OBJ_OPENMP) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_OPENMP) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosAlgorithms_UnitTest_OpenMP
 
+KokkosAlgorithms_UnitTest_HPX: $(OBJ_HPX) $(KOKKOS_LINK_DEPENDS)
+	$(LINK) $(EXTRA_PATH) $(OBJ_HPX) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosAlgorithms_UnitTest_HPX
+
 KokkosAlgorithms_UnitTest_Serial: $(OBJ_SERIAL) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_SERIAL) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosAlgorithms_UnitTest_Serial
 
@@ -82,6 +91,9 @@ test-threads: KokkosAlgorithms_UnitTest_Threads
 test-openmp: KokkosAlgorithms_UnitTest_OpenMP
 	./KokkosAlgorithms_UnitTest_OpenMP
 
+test-hpx: KokkosAlgorithms_UnitTest_HPX
+	./KokkosAlgorithms_UnitTest_HPX
+
 test-serial: KokkosAlgorithms_UnitTest_Serial
 	./KokkosAlgorithms_UnitTest_Serial
 
diff --git a/packages/kokkos/algorithms/unit_tests/TestHPX.cpp b/packages/kokkos/algorithms/unit_tests/TestHPX.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e5b7dbdb7a32c5cee98b33d1169bf5f49e71d1cb
--- /dev/null
+++ b/packages/kokkos/algorithms/unit_tests/TestHPX.cpp
@@ -0,0 +1,96 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+
+#include <Kokkos_Macros.hpp>
+#ifdef KOKKOS_ENABLE_HPX
+
+#include <gtest/gtest.h>
+#include <Kokkos_Core.hpp>
+
+//----------------------------------------------------------------------------
+#include <TestRandom.hpp>
+#include <TestSort.hpp>
+#include <iomanip>
+
+namespace Test {
+
+class hpx : public ::testing::Test {
+protected:
+  static void SetUpTestCase()
+  {
+    std::cout << std::setprecision(5) << std::scientific;
+  }
+
+  static void TearDownTestCase()
+  {
+  }
+};
+
+#define HPX_RANDOM_XORSHIFT64( num_draws )                                \
+  TEST_F( hpx, Random_XorShift64 ) {   \
+      Impl::test_random<Kokkos::Random_XorShift64_Pool<Kokkos::Experimental::HPX> >(num_draws); \
+  }
+
+#define HPX_RANDOM_XORSHIFT1024( num_draws )                                \
+  TEST_F( hpx, Random_XorShift1024 ) {   \
+      Impl::test_random<Kokkos::Random_XorShift1024_Pool<Kokkos::Experimental::HPX> >(num_draws); \
+  }
+
+#define HPX_SORT_UNSIGNED( size )                                \
+  TEST_F( hpx, SortUnsigned ) {   \
+      Impl::test_sort< Kokkos::Experimental::HPX, unsigned >(size); \
+  }
+
+HPX_RANDOM_XORSHIFT64( 10240000 )
+HPX_RANDOM_XORSHIFT1024( 10130144 )
+HPX_SORT_UNSIGNED(171)
+
+#undef HPX_RANDOM_XORSHIFT64
+#undef HPX_RANDOM_XORSHIFT1024
+#undef HPX_SORT_UNSIGNED
+} // namespace test
+#else
+void KOKKOS_ALGORITHMS_UNITTESTS_TESTHPX_PREVENT_LINK_ERROR() {}
+#endif
+
diff --git a/packages/kokkos/algorithms/unit_tests/TestSort.hpp b/packages/kokkos/algorithms/unit_tests/TestSort.hpp
index e0c646c199be04841fbf0354905231ec00abf322..5fd7f09b50ef617b797f39305a3318e71ea354da 100644
--- a/packages/kokkos/algorithms/unit_tests/TestSort.hpp
+++ b/packages/kokkos/algorithms/unit_tests/TestSort.hpp
@@ -225,9 +225,9 @@ void test_dynamic_view_sort(unsigned int n )
   Kokkos::Random_XorShift64_Pool<ExecutionSpace> g(1931);
   Kokkos::fill_random(keys_view,g,Kokkos::Random_XorShift64_Pool<ExecutionSpace>::generator_type::MAX_URAND);
 
-  ExecutionSpace::fence();
+  ExecutionSpace().fence();
   Kokkos::deep_copy(keys,keys_view);
-  //ExecutionSpace::fence();
+  //ExecutionSpace().fence();
 
   double sum_before = 0.0;
   double sum_after = 0.0;
@@ -237,9 +237,9 @@ void test_dynamic_view_sort(unsigned int n )
 
   Kokkos::sort(keys, 0 /* begin */ , n /* end */ );
 
-  ExecutionSpace::fence(); // Need this fence to prevent BusError with Cuda
+  ExecutionSpace().fence(); // Need this fence to prevent BusError with Cuda
   Kokkos::deep_copy( keys_view , keys );
-  //ExecutionSpace::fence();
+  //ExecutionSpace().fence();
 
   Kokkos::parallel_reduce(n,sum<ExecutionSpace, KeyType>(keys_view),sum_after);
   Kokkos::parallel_reduce(n-1,is_sorted_struct<ExecutionSpace, KeyType>(keys_view),sort_fails);
diff --git a/packages/kokkos/cmake/kokkos_build.cmake b/packages/kokkos/cmake/kokkos_build.cmake
index 8178483d019f0acc4ac4717d53ca5268b92b0793..f9b995baae4f9b319adb0dbe7527f301de8d3a9e 100644
--- a/packages/kokkos/cmake/kokkos_build.cmake
+++ b/packages/kokkos/cmake/kokkos_build.cmake
@@ -76,8 +76,20 @@ IF(KOKKOS_SEPARATE_LIBS)
   )
 
   foreach(lib IN LISTS KOKKOS_TPL_LIBRARY_NAMES)
-    if ("${lib}" STREQUAL "cuda")
+    if (("${lib}" STREQUAL "cuda") AND (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
       set(LIB_cuda "-lcuda")
+    elseif ("${lib}" STREQUAL "hpx")
+      find_package(HPX REQUIRED)
+      if(${HPX_FOUND})
+        target_link_libraries(kokkoscore PUBLIC ${HPX_LIBRARIES})
+        target_link_libraries(kokkoscontainers PUBLIC ${HPX_LIBRARIES})
+        target_link_libraries(kokkosalgorithms PUBLIC ${HPX_LIBRARIES})
+        target_include_directories(kokkoscore PUBLIC ${HPX_INCLUDE_DIRS})
+        target_include_directories(kokkoscontainers PUBLIC ${HPX_INCLUDE_DIRS})
+        target_include_directories(kokkosalgorithms PUBLIC ${HPX_INCLUDE_DIRS})
+      else()
+        message(ERROR "HPX not found. Check the value of HPX_DIR (= ${HPX_DIR}) or CMAKE_PREFIX_PATH (= ${CMAKE_PREFIX_PATH}).")
+      endif()
     else()
       find_library(LIB_${lib} ${lib} PATHS ${KOKKOS_TPL_LIBRARY_DIRS})
     endif()
@@ -158,8 +170,16 @@ ELSE()
   )
 
   foreach(lib IN LISTS KOKKOS_TPL_LIBRARY_NAMES)
-    if ("${lib}" STREQUAL "cuda")
+    if (("${lib}" STREQUAL "cuda") AND (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
       set(LIB_cuda "-lcuda")
+    elseif ("${lib}" STREQUAL "hpx")
+      find_package(HPX REQUIRED)
+      if(${HPX_FOUND})
+        target_link_libraries(kokkos PUBLIC ${HPX_LIBRARIES})
+        target_include_directories(kokkos PUBLIC ${HPX_INCLUDE_DIRS})
+      else()
+        message(ERROR "HPX not found. Check the value of HPX_DIR (= ${HPX_DIR}) or CMAKE_PREFIX_PATH (= ${CMAKE_PREFIX_PATH}).")
+      endif()
     else()
       find_library(LIB_${lib} ${lib} PATHS ${KOKKOS_TPL_LIBRARY_DIRS})
     endif()
diff --git a/packages/kokkos/cmake/kokkos_functions.cmake b/packages/kokkos/cmake/kokkos_functions.cmake
index bc490115af9ae5b1dfbd4d36f1e0d7256867c627..616618753b11544367ead73b725884cbf9affee8 100644
--- a/packages/kokkos/cmake/kokkos_functions.cmake
+++ b/packages/kokkos/cmake/kokkos_functions.cmake
@@ -95,7 +95,7 @@ function(set_kokkos_cxx_compiler)
         message(FATAL_ERROR "Compiling CUDA code directly with Clang requires version 4.0.0 or higher.")
       endif()
     elseif(NOT INTERNAL_CXX_COMPILER_ID STREQUAL NVIDIA)
-      message(FATAL_ERROR "Invalid compiler for CUDA.  The compiler must be nvcc_wrapper or Clang.")
+      message(FATAL_ERROR "Invalid compiler for CUDA.  The compiler must be nvcc_wrapper or Clang, but compiler ID was ${INTERNAL_CXX_COMPILER_ID}")
     endif()
   endif()
 
diff --git a/packages/kokkos/cmake/kokkos_options.cmake b/packages/kokkos/cmake/kokkos_options.cmake
index be494e5df08748f734d197d5d43bd64d9168e7e4..e730a946645a21f202fe380062beecc14c83f158 100644
--- a/packages/kokkos/cmake/kokkos_options.cmake
+++ b/packages/kokkos/cmake/kokkos_options.cmake
@@ -14,6 +14,7 @@ list(APPEND KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST
      OpenMP
      Pthread
      Qthread
+     HPX
      Cuda
      ROCm
      HWLOC
@@ -23,6 +24,7 @@ list(APPEND KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST
      Cuda_Relocatable_Device_Code
      Cuda_UVM
      Cuda_LDG_Intrinsic
+     HPX_ASYNC_DISPATCH
      Debug
      Debug_DualView_Modify_Check
      Debug_Bounds_Check
@@ -116,6 +118,7 @@ list(APPEND KOKKOS_DEVICES_LIST
     OpenMP        # OpenMP
     Pthread       # pthread
     Qthreads      # qthreads
+    HPX           # HPX
     Serial        # serial
     ROCm          # Relocatable device code
     )
@@ -173,6 +176,19 @@ set(KOKKOS_INTERNAL_RELOCATABLE_DEVICE_CODE rdc)
 set(KOKKOS_INTERNAL_LAMBDA enable_lambda)
 
 
+#-------------------------------------------------------------------------------
+# List of possible Options for HPX
+#-------------------------------------------------------------------------------
+# From Makefile.kokkos: Options: enable_async_dispatch
+set(KOKKOS_HPX_OPTIONS_LIST)
+list(APPEND KOKKOS_HPX_OPTIONS_LIST
+    ASYNC_DISPATCH # enable_async_dispatch
+    )
+
+# Map of cmake variables to Makefile variables
+set(KOKKOS_INTERNAL_ENABLE_ASYNC_DISPATCH enable_async_dispatch)
+
+
 #-------------------------------------------------------------------------------
 #------------------------------- Create doc strings ----------------------------
 #-------------------------------------------------------------------------------
@@ -202,6 +218,11 @@ set(KOKKOS_SEPARATE_LIBS OFF CACHE BOOL "OFF = kokkos.  ON = kokkoscore, kokkosc
 # Qthreads options.
 set(KOKKOS_QTHREADS_DIR "" CACHE PATH "Location of Qthreads library.")
 
+# HPX options.
+set(KOKKOS_HPX_DIR "" CACHE PATH "Location of HPX library.")
+
+# Whether to build separate libraries or now
+set(KOKKOS_SEPARATE_TESTS OFF CACHE BOOL "Provide unit test targets with finer granularity.")
 
 #-------------------------------------------------------------------------------
 #------------------------------- KOKKOS_DEVICES --------------------------------
@@ -215,6 +236,11 @@ IF(Trilinos_ENABLE_Kokkos)
   ELSE()
     set_kokkos_default_default(QTHREADS OFF)
   ENDIF()
+  IF(TPL_ENABLE_HPX)
+    set_kokkos_default_default(HPX ON)
+  ELSE()
+    set_kokkos_default_default(HPX OFF)
+  ENDIF()
   IF(Trilinos_ENABLE_OpenMP)
     set_kokkos_default_default(OPENMP ${Trilinos_ENABLE_OpenMP})
   ELSE()
@@ -231,6 +257,7 @@ ELSE()
   set_kokkos_default_default(OPENMP OFF)
   set_kokkos_default_default(PTHREAD OFF)
   set_kokkos_default_default(QTHREAD OFF)
+  set_kokkos_default_default(HPX OFF)
   set_kokkos_default_default(CUDA OFF)
   set_kokkos_default_default(ROCM OFF)
 ENDIF()
@@ -241,6 +268,7 @@ set(KOKKOS_ENABLE_SERIAL ${KOKKOS_INTERNAL_ENABLE_SERIAL_DEFAULT} CACHE BOOL "Wh
 set(KOKKOS_ENABLE_OPENMP ${KOKKOS_INTERNAL_ENABLE_OPENMP_DEFAULT} CACHE BOOL "Enable OpenMP support in Kokkos." FORCE)
 set(KOKKOS_ENABLE_PTHREAD ${KOKKOS_INTERNAL_ENABLE_PTHREAD_DEFAULT} CACHE BOOL "Enable Pthread support in Kokkos.")
 set(KOKKOS_ENABLE_QTHREADS ${KOKKOS_INTERNAL_ENABLE_QTHREADS_DEFAULT} CACHE BOOL "Enable Qthreads support in Kokkos.")
+set(KOKKOS_ENABLE_HPX ${KOKKOS_INTERNAL_ENABLE_HPX_DEFAULT} CACHE BOOL "Enable HPX support in Kokkos.")
 set(KOKKOS_ENABLE_CUDA ${KOKKOS_INTERNAL_ENABLE_CUDA_DEFAULT} CACHE BOOL "Enable CUDA support in Kokkos.")
 set(KOKKOS_ENABLE_ROCM ${KOKKOS_INTERNAL_ENABLE_ROCM_DEFAULT} CACHE BOOL "Enable ROCm support in Kokkos.")
 
@@ -343,6 +371,18 @@ set(KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE ${KOKKOS_INTERNAL_ENABLE_CUDA_REL
 set(KOKKOS_ENABLE_CUDA_LAMBDA ${KOKKOS_INTERNAL_ENABLE_CUDA_LAMBDA_DEFAULT} CACHE BOOL "Enable lambdas for CUDA. (cuda option)")
 
 
+#-------------------------------------------------------------------------------
+#------------------------------- KOKKOS_HPX_OPTIONS ----------------------------
+#-------------------------------------------------------------------------------
+
+# HPX options.
+# Set Defaults
+set_kokkos_default_default(HPX_ASYNC_DISPATCH OFF)
+
+# Set actual options
+set(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH ${KOKKOS_INTERNAL_ENABLE_HPX_ASYNC_DISPATCH_DEFAULT} CACHE BOOL "Enable HPX async dispatch.")
+
+
 #-------------------------------------------------------------------------------
 #----------------------- HOST ARCH AND LEGACY TRIBITS --------------------------
 #-------------------------------------------------------------------------------
@@ -376,4 +416,3 @@ foreach(opt ${KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST})
     SET(Kokkos_ENABLE_${opt} ${KOKKOS_ENABLE_${OPT}} CACHE BOOL "CamelCase Compatibility setting for KOKKOS_ENABLE_${OPT}")
   ENDIF()
 endforeach()
-
diff --git a/packages/kokkos/cmake/kokkos_settings.cmake b/packages/kokkos/cmake/kokkos_settings.cmake
index 387ced6d5205105c930d547b83711031453271a2..2c622d0de91f87f59f78a598820b80bc294d0b19 100644
--- a/packages/kokkos/cmake/kokkos_settings.cmake
+++ b/packages/kokkos/cmake/kokkos_settings.cmake
@@ -198,6 +198,8 @@ if(KOKKOS_CMAKE_VERBOSE)
     message(STATUS "    Host Parallel: Pthread")
   elseif(KOKKOS_ENABLE_QTHREADS)
     message(STATUS "    Host Parallel: Qthreads")
+  elseif(KOKKOS_ENABLE_HPX)
+    message(STATUS "    Host Parallel: HPX")
   else()
     message(STATUS "    Host Parallel: None")
   endif()
@@ -244,6 +246,10 @@ if(KOKKOS_CMAKE_VERBOSE)
     message(STATUS "  KOKKOS_MEMKIND_DIR: ${KOKKOS_MEMKIND_DIR}")
   endif()
 
+  if(KOKKOS_HPX_DIR)
+    message(STATUS "  KOKKOS_HPX_DIR: ${KOKKOS_HPX_DIR}")
+  endif()
+
   message(STATUS "")
   message(STATUS "Final kokkos settings variable:")
   message(STATUS "  ${KOKKOS_SETTINGS}")
diff --git a/packages/kokkos/cmake/tribits.cmake b/packages/kokkos/cmake/tribits.cmake
index f8eebc29f8b01dab2fe1baa831d30306b0eef376..1f467f0662e0c2154a53a0c5fcb46aea8be5de43 100644
--- a/packages/kokkos/cmake/tribits.cmake
+++ b/packages/kokkos/cmake/tribits.cmake
@@ -9,6 +9,10 @@ IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_OpenMP)
   SET(${PROJECT_NAME}_ENABLE_OpenMP OFF)
 ENDIF()
 
+IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_HPX)
+  SET(${PROJECT_NAME}_ENABLE_HPX OFF)
+ENDIF()
+
 IF(NOT DEFINED ${PROJECT_NAME}_ENABLE_DEBUG)
   SET(${PROJECT_NAME}_ENABLE_DEBUG OFF)
 ENDIF()
@@ -309,6 +313,10 @@ ENDFUNCTION()
 FUNCTION(TRIBITS_TPL_TENTATIVELY_ENABLE)
 ENDFUNCTION()
 
+FUNCTION(TRIBITS_ADD_ADVANCED_TEST)
+  # TODO Write this
+ENDFUNCTION()
+
 FUNCTION(TRIBITS_ADD_EXECUTABLE_AND_TEST EXE_NAME)
 
   SET(options STANDARD_PASS_OUTPUT WILL_FAIL)
diff --git a/packages/kokkos/containers/cmake/Dependencies.cmake b/packages/kokkos/containers/cmake/Dependencies.cmake
index 1d71d8af341181f689a6a8bf63036b67584cb138..5e29157369c9ab8cab935a1bfc4c6dad2fdd0296 100644
--- a/packages/kokkos/containers/cmake/Dependencies.cmake
+++ b/packages/kokkos/containers/cmake/Dependencies.cmake
@@ -1,5 +1,5 @@
 TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
   LIB_REQUIRED_PACKAGES KokkosCore
-  LIB_OPTIONAL_TPLS Pthread CUDA HWLOC
+  LIB_OPTIONAL_TPLS Pthread CUDA HWLOC HPX
   TEST_OPTIONAL_TPLS CUSPARSE
   )
diff --git a/packages/kokkos/containers/performance_tests/CMakeLists.txt b/packages/kokkos/containers/performance_tests/CMakeLists.txt
index 1203a8bd81eab6a6e50f53c2eb8920d8e3c6159b..3c6584bc346b9e48a245e39038a99396a10c1a14 100644
--- a/packages/kokkos/containers/performance_tests/CMakeLists.txt
+++ b/packages/kokkos/containers/performance_tests/CMakeLists.txt
@@ -24,6 +24,10 @@ IF(Kokkos_ENABLE_OpenMP)
   LIST( APPEND SOURCES TestOpenMP.cpp)
 ENDIF()
 
+IF(Kokkos_ENABLE_HPX)
+  LIST( APPEND SOURCES TestHPX.cpp)
+ENDIF()
+
 # Per #374, we always want to build this test, but we only want to run
 # it as a PERFORMANCE test.  That's why we separate building the test
 # from running the test.
diff --git a/packages/kokkos/containers/performance_tests/Makefile b/packages/kokkos/containers/performance_tests/Makefile
index ebed75ccd611f73899d9285e2243d6f574bf37a1..f309a220d0f148a2e90806edd62f51bcb814d44e 100644
--- a/packages/kokkos/containers/performance_tests/Makefile
+++ b/packages/kokkos/containers/performance_tests/Makefile
@@ -49,6 +49,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
 	TEST_TARGETS += test-openmp
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+	OBJ_HPX = TestHPX.o TestMain.o gtest-all.o
+	TARGETS += KokkosContainers_PerformanceTest_HPX
+	TEST_TARGETS += test-hpx
+endif
+
 KokkosContainers_PerformanceTest_Cuda: $(OBJ_CUDA) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_CUDA) $(KOKKOS_LIBS) $(LIB) -o KokkosContainers_PerformanceTest_Cuda
 
@@ -61,6 +67,9 @@ KokkosContainers_PerformanceTest_Threads: $(OBJ_THREADS) $(KOKKOS_LINK_DEPENDS)
 KokkosContainers_PerformanceTest_OpenMP: $(OBJ_OPENMP) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_OPENMP) $(KOKKOS_LIBS) $(LIB) -o KokkosContainers_PerformanceTest_OpenMP
 
+KokkosContainers_PerformanceTest_HPX: $(OBJ_HPX) $(KOKKOS_LINK_DEPENDS)
+	$(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_HPX) $(KOKKOS_LIBS) $(LIB) -o KokkosContainers_PerformanceTest_HPX
+
 test-cuda: KokkosContainers_PerformanceTest_Cuda
 	./KokkosContainers_PerformanceTest_Cuda
 
@@ -73,6 +82,9 @@ test-threads: KokkosContainers_PerformanceTest_Threads
 test-openmp: KokkosContainers_PerformanceTest_OpenMP
 	./KokkosContainers_PerformanceTest_OpenMP
 
+test-hpx: KokkosContainers_PerformanceTest_HPX
+	./KokkosContainers_PerformanceTest_HPX
+
 build_all: $(TARGETS)
 
 test: $(TEST_TARGETS)
diff --git a/packages/kokkos/containers/performance_tests/TestDynRankView.hpp b/packages/kokkos/containers/performance_tests/TestDynRankView.hpp
index 0d2fae32a38d7d0ffe11e2790d73d45216da98de..db6274e0579747079f3274b454ade63ad1a051b3 100644
--- a/packages/kokkos/containers/performance_tests/TestDynRankView.hpp
+++ b/packages/kokkos/containers/performance_tests/TestDynRankView.hpp
@@ -197,7 +197,7 @@ void test_dynrankview_op_perf( const int par_size )
     timer.reset();
     Kokkos::RangePolicy<DeviceType> policy(0,par_size);
     Kokkos::parallel_for( policy , FunctorType(testview) );
-    DeviceType::fence();
+    DeviceType().fence();
     elapsed_time_view = timer.seconds();
     std::cout << " View time (init only): " << elapsed_time_view << std::endl;
 
@@ -205,7 +205,7 @@ void test_dynrankview_op_perf( const int par_size )
     timer.reset();
     Kokkos::View<double*,DeviceType> sumview("sumview",par_size);
     Kokkos::parallel_for( policy , typename FunctorType::SumComputationTest(testview, sumview) );
-    DeviceType::fence();
+    DeviceType().fence();
     elapsed_time_compview = timer.seconds();
     std::cout << " View sum computation time: " << elapsed_time_view << std::endl;
 
@@ -215,7 +215,7 @@ void test_dynrankview_op_perf( const int par_size )
 
     timer.reset();
     Kokkos::parallel_for( policy , FunctorStrideType(teststrideview) );
-    DeviceType::fence();
+    DeviceType().fence();
     elapsed_time_strideview = timer.seconds();
     std::cout << " Strided View time (init only): " << elapsed_time_strideview << std::endl;
   }
@@ -226,7 +226,7 @@ void test_dynrankview_op_perf( const int par_size )
     timer.reset();
     Kokkos::RangePolicy<DeviceType> policy(0,par_size);
     Kokkos::parallel_for( policy , FunctorType(testview) );
-    DeviceType::fence();
+    DeviceType().fence();
     elapsed_time_view_rank7 = timer.seconds();
     std::cout << " View Rank7 time (init only): " << elapsed_time_view_rank7 << std::endl;
   }
@@ -237,14 +237,14 @@ void test_dynrankview_op_perf( const int par_size )
     timer.reset();
     Kokkos::RangePolicy<DeviceType> policy(0,par_size);
     Kokkos::parallel_for( policy , FunctorType(testdrview) );
-    DeviceType::fence();
+    DeviceType().fence();
     elapsed_time_drview = timer.seconds();
     std::cout << " DynRankView time (init only): " << elapsed_time_drview << std::endl;
 
     timer.reset();
     Kokkos::DynRankView<double,DeviceType> sumview("sumview",par_size);
     Kokkos::parallel_for( policy , typename FunctorType::SumComputationTest(testdrview, sumview) );
-    DeviceType::fence();
+    DeviceType().fence();
     elapsed_time_compdrview = timer.seconds();
     std::cout << " DynRankView sum computation time: " << elapsed_time_compdrview << std::endl;
 
diff --git a/packages/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp b/packages/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp
index dcaca776be59b61b56ad82e78d6f715263e6082f..98997b32394b7a9d71a1e78e3041993e25bd4193 100644
--- a/packages/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp
+++ b/packages/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp
@@ -192,7 +192,7 @@ void test_global_to_local_ids(unsigned num_ids)
   {
     generate_ids<Device> gen(local_2_global);
   }
-  Device::fence();
+  Device().fence();
   // generate
   elasped_time = timer.seconds();
   std::cout << elasped_time << ", ";
@@ -201,7 +201,7 @@ void test_global_to_local_ids(unsigned num_ids)
   {
     fill_map<Device> fill(global_2_local, local_2_global);
   }
-  Device::fence();
+  Device().fence();
 
   // fill
   elasped_time = timer.seconds();
@@ -214,7 +214,7 @@ void test_global_to_local_ids(unsigned num_ids)
   {
     find_test<Device> find(global_2_local, local_2_global,num_errors);
   }
-  Device::fence();
+  Device().fence();
 
   // find
   elasped_time = timer.seconds();
diff --git a/packages/kokkos/containers/performance_tests/TestHPX.cpp b/packages/kokkos/containers/performance_tests/TestHPX.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0f43377cee499f04d14736663c92aa32e49c0a58
--- /dev/null
+++ b/packages/kokkos/containers/performance_tests/TestHPX.cpp
@@ -0,0 +1,130 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_HPX )
+
+#include <gtest/gtest.h>
+
+#include <Kokkos_Core.hpp>
+
+#include <Kokkos_UnorderedMap.hpp>
+
+#include <TestGlobal2LocalIds.hpp>
+#include <TestUnorderedMapPerformance.hpp>
+
+#include <TestDynRankView.hpp>
+#include <TestScatterView.hpp>
+
+#include <iomanip>
+#include <sstream>
+#include <string>
+#include <fstream>
+
+
+namespace Performance {
+
+class hpx : public ::testing::Test {
+protected:
+  static void SetUpTestCase()
+  {
+    std::cout << std::setprecision(5) << std::scientific;
+
+    Kokkos::initialize();
+    Kokkos::print_configuration( std::cout );
+  }
+
+  static void TearDownTestCase()
+  {
+    Kokkos::finalize();
+  }
+};
+
+TEST_F( hpx, dynrankview_perf )
+{
+  std::cout << "HPX" << std::endl;
+  std::cout << " DynRankView vs View: Initialization Only " << std::endl;
+  test_dynrankview_op_perf<Kokkos::Experimental::HPX>( 8192 );
+}
+
+TEST_F( hpx, global_2_local)
+{
+  std::cout << "HPX" << std::endl;
+  std::cout << "size, create, generate, fill, find" << std::endl;
+  for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step)
+    test_global_to_local_ids<Kokkos::Experimental::HPX>(i);
+}
+
+TEST_F( hpx, unordered_map_performance_near)
+{
+  unsigned num_hpx = 4;
+  std::ostringstream base_file_name;
+  base_file_name << "hpx-" << num_hpx << "-near";
+  Perf::run_performance_tests<Kokkos::Experimental::HPX,true>(base_file_name.str());
+}
+
+TEST_F( hpx, unordered_map_performance_far)
+{
+  unsigned num_hpx = 4;
+  std::ostringstream base_file_name;
+  base_file_name << "hpx-" << num_hpx << "-far";
+  Perf::run_performance_tests<Kokkos::Experimental::HPX,false>(base_file_name.str());
+}
+
+TEST_F( hpx, scatter_view)
+{
+  std::cout << "ScatterView data-duplicated test:\n";
+  Perf::test_scatter_view<Kokkos::Experimental::HPX, Kokkos::LayoutRight,
+    Kokkos::Experimental::ScatterDuplicated,
+    Kokkos::Experimental::ScatterNonAtomic>(10, 1000 * 1000);
+//std::cout << "ScatterView atomics test:\n";
+//Perf::test_scatter_view<Kokkos::Experimental::HPX, Kokkos::LayoutRight,
+//  Kokkos::Experimental::ScatterNonDuplicated,
+//  Kokkos::Experimental::ScatterAtomic>(10, 1000 * 1000);
+}
+
+} // namespace test
+#else
+void KOKKOS_CONTAINERS_PERFORMANCE_TESTS_TESTHPX_PREVENT_EMPTY_LINK_ERROR() {}
+#endif
+
diff --git a/packages/kokkos/containers/performance_tests/TestScatterView.hpp b/packages/kokkos/containers/performance_tests/TestScatterView.hpp
index 03129d2b09f17b03f34f8cb8a9b4442d9c570709..bd9121bb829a903bc8cb6e78b51668bcc45448e4 100644
--- a/packages/kokkos/containers/performance_tests/TestScatterView.hpp
+++ b/packages/kokkos/containers/performance_tests/TestScatterView.hpp
@@ -83,6 +83,7 @@ void test_scatter_view(int m, int n)
       for (int k = 0; k < m; ++k) {
         Kokkos::parallel_for(policy, f2, "hand_coded_duplicate_scatter_view_test");
       }
+      Kokkos::fence();
       auto t = timer.seconds();
       std::cout << "hand-coded test took " << t << " seconds\n";
     }
@@ -101,6 +102,7 @@ void test_scatter_view(int m, int n)
       for (int k = 0; k < m; ++k) {
         Kokkos::parallel_for(policy, f, "scatter_view_test");
       }
+      Kokkos::fence();
       auto t = timer.seconds();
       std::cout << "test took " << t << " seconds\n";
     }
diff --git a/packages/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp b/packages/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp
index e8734b259de911489e97ccce7bcfce6e11f3b387..8d09281ed36cc99690c40784397a448cf1c8e1d8 100644
--- a/packages/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp
+++ b/packages/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp
@@ -108,7 +108,7 @@ struct UnorderedMapTest
     std::cout << std::setprecision(2) << std::fixed << std::setw(5) << (1e9*(seconds/(inserts))) << "; " << std::flush;
 
     histogram.calculate();
-    Device::fence();
+    Device().fence();
   }
 
   void print(std::ostream & metrics_out, std::ostream & length_out, std::ostream & distance_out, std::ostream & block_distance_out)
@@ -236,7 +236,7 @@ void run_performance_tests(std::string const & base_file_name)
         uint32_t inserts = static_cast<uint32_t>(test_ratios[j]*(capacity));
         std::cout << capacity << std::flush;
         UnorderedMapTest<Device, Near> test(capacity, inserts*collisions[i], collisions[i]);
-        Device::fence();
+        Device().fence();
         test.print(metrics_out, length_out, distance_out, block_distance_out);
       }
       std::cout << "\b\b  " <<  std::endl;
diff --git a/packages/kokkos/containers/src/Kokkos_Bitset.hpp b/packages/kokkos/containers/src/Kokkos_Bitset.hpp
index bfe8080f3b92ce9d11a0c040c123745acaf7e66b..4d78430fc634ed7dad2a904a4dc5282e16501637 100644
--- a/packages/kokkos/containers/src/Kokkos_Bitset.hpp
+++ b/packages/kokkos/containers/src/Kokkos_Bitset.hpp
@@ -107,22 +107,20 @@ public:
     }
   }
 
-  /// assignment
-  Bitset<Device> & operator = (Bitset<Device> const & rhs)
-  {
-    this->m_size = rhs.m_size;
-    this->m_last_block_mask = rhs.m_last_block_mask;
-    this->m_blocks = rhs.m_blocks;
+  KOKKOS_INLINE_FUNCTION
+  Bitset (const Bitset<Device>&) = default;
 
-    return *this;
-  }
+  KOKKOS_INLINE_FUNCTION
+  Bitset& operator= (const Bitset<Device>&) = default;
 
-  /// copy constructor
-  Bitset( Bitset<Device> const & rhs)
-    : m_size( rhs.m_size )
-    , m_last_block_mask( rhs.m_last_block_mask )
-    , m_blocks( rhs.m_blocks )
-  {}
+  KOKKOS_INLINE_FUNCTION
+  Bitset (Bitset<Device>&&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  Bitset& operator= (Bitset<Device>&&) = default;
+  
+  KOKKOS_INLINE_FUNCTION
+  ~Bitset () = default;
 
   /// number of bits in the set
   /// can be call from the host or the device
diff --git a/packages/kokkos/containers/src/Kokkos_DualView.hpp b/packages/kokkos/containers/src/Kokkos_DualView.hpp
index f6631a4149c916c4760edd5377981a3812a31f2d..d9b14d67a2f02854962c2f3d127f1d80da67a46d 100644
--- a/packages/kokkos/containers/src/Kokkos_DualView.hpp
+++ b/packages/kokkos/containers/src/Kokkos_DualView.hpp
@@ -484,8 +484,8 @@ public:
       }
     }
     if(std::is_same<typename t_host::memory_space,typename t_dev::memory_space>::value) {
-      t_dev::execution_space::fence();
-      t_host::execution_space::fence();
+      typename t_dev::execution_space().fence();
+      typename t_host::execution_space().fence();
     }
   }
 
diff --git a/packages/kokkos/containers/src/Kokkos_DynRankView.hpp b/packages/kokkos/containers/src/Kokkos_DynRankView.hpp
index 3f284e6a8d79d9275f00420a90d208c4683bdd62..d1e6704a573dfd3c26ad5eaa37d69ab1dc678459 100644
--- a/packages/kokkos/containers/src/Kokkos_DynRankView.hpp
+++ b/packages/kokkos/containers/src/Kokkos_DynRankView.hpp
@@ -75,7 +75,7 @@ struct DynRankDimTraits {
                            , const size_t N4
                            , const size_t N5
                            , const size_t N6
-                           , const size_t N7 )
+                           , const size_t /* N7 */)
   {
     return
       (   (N6 == unspecified && N5 == unspecified && N4 == unspecified && N3 == unspecified && N2 == unspecified && N1 == unspecified && N0 == unspecified) ? 0
@@ -106,7 +106,7 @@ struct DynRankDimTraits {
   // Extra overload to match that for specialize types v2
   template <typename Layout, typename ... P>
   KOKKOS_INLINE_FUNCTION
-  static size_t computeRank( const Kokkos::Impl::ViewCtorProp<P...>& prop, const Layout& layout )
+  static size_t computeRank( const Kokkos::Impl::ViewCtorProp<P...>& /* prop */, const Layout& layout )
   {
     return computeRank(layout);
   }
@@ -155,7 +155,7 @@ struct DynRankDimTraits {
   // Extra overload to match that for specialize types
   template <typename Traits, typename ... P>
   KOKKOS_INLINE_FUNCTION
-  static typename std::enable_if< (std::is_same<typename Traits::array_layout , Kokkos::LayoutRight>::value || std::is_same<typename Traits::array_layout , Kokkos::LayoutLeft>::value || std::is_same<typename Traits::array_layout , Kokkos::LayoutStride>::value) , typename Traits::array_layout >::type createLayout( const Kokkos::Impl::ViewCtorProp<P...>& prop, const typename Traits::array_layout& layout )
+  static typename std::enable_if< (std::is_same<typename Traits::array_layout , Kokkos::LayoutRight>::value || std::is_same<typename Traits::array_layout , Kokkos::LayoutLeft>::value || std::is_same<typename Traits::array_layout , Kokkos::LayoutStride>::value) , typename Traits::array_layout >::type createLayout( const Kokkos::Impl::ViewCtorProp<P...>& /* prop */, const typename Traits::array_layout& layout )
   {
     return createLayout( layout );
   }
@@ -655,7 +655,7 @@ public:
       const size_t dim_scalar = m_map.dimension_scalar();
       const size_t bytes = this->span() / dim_scalar;
 
-      typedef Kokkos::View<DataType*, typename traits::array_layout, typename traits::device_type, Kokkos::MemoryTraits<Kokkos::Unmanaged | traits::memory_traits::RandomAccess | traits::memory_traits::Atomic> > tmp_view_type;
+      typedef Kokkos::View<DataType*, typename traits::array_layout, typename traits::device_type, Kokkos::MemoryTraits<traits::memory_traits::is_unmanaged | traits::memory_traits::is_random_access | traits::memory_traits::is_atomic> > tmp_view_type;
       tmp_view_type rankone_view(this->data(), bytes, dim_scalar);
       return rankone_view(i0);
     }
@@ -1060,7 +1060,7 @@ public:
       }
 
       // Copy the input allocation properties with possibly defaulted properties
-      alloc_prop prop( arg_prop );
+      alloc_prop prop_copy( arg_prop );
 
 //------------------------------------------------------------
 #if defined( KOKKOS_ENABLE_CUDA )
@@ -1070,18 +1070,18 @@ public:
       // Fence using the trait's executon space (which will be Kokkos::Cuda)
       // to avoid incomplete type errors from usng Kokkos::Cuda directly.
       if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) {
-        traits::device_type::memory_space::execution_space::fence();
+        typename traits::device_type::memory_space::execution_space().fence();
       }
 #endif
 //------------------------------------------------------------
 
       Kokkos::Impl::SharedAllocationRecord<> *
-        record = m_map.allocate_shared( prop , Impl::DynRankDimTraits<typename traits::specialize>::template createLayout<traits, P...>(arg_prop, arg_layout) );
+        record = m_map.allocate_shared( prop_copy, Impl::DynRankDimTraits<typename traits::specialize>::template createLayout<traits, P...>(arg_prop, arg_layout) );
 
 //------------------------------------------------------------
 #if defined( KOKKOS_ENABLE_CUDA )
       if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) {
-        traits::device_type::memory_space::execution_space::fence();
+        typename traits::device_type::memory_space::execution_space().fence();
       }
 #endif
 //------------------------------------------------------------
@@ -1609,7 +1609,7 @@ struct DynRankViewFill {
 
       closure.execute();
 
-      execution_space::fence();
+      execution_space().fence();
     }
 };
 
@@ -1650,6 +1650,7 @@ struct DynRankViewRemap {
       typedef Kokkos::RangePolicy< ExecSpace > Policy ;
       const Kokkos::Impl::ParallelFor< DynRankViewRemap , Policy > closure( *this , Policy( 0 , n0 ) );
       closure.execute();
+      // Kokkos::fence(); // ??
     }
 
   KOKKOS_INLINE_FUNCTION
diff --git a/packages/kokkos/containers/src/Kokkos_DynamicView.hpp b/packages/kokkos/containers/src/Kokkos_DynamicView.hpp
index ab782a82ad3fbe3dee7126a328747590c57e95c4..37d56e7cfb02d8071bc79a4bee1fc4b06bb4f692 100644
--- a/packages/kokkos/containers/src/Kokkos_DynamicView.hpp
+++ b/packages/kokkos/containers/src/Kokkos_DynamicView.hpp
@@ -288,8 +288,8 @@ public:
     >::type
   resize_serial( IntType const & n )
     {
-      typedef typename traits::value_type value_type ;
-      typedef value_type * value_pointer_type ;
+      typedef typename traits::value_type local_value_type ;
+      typedef local_value_type * value_pointer_type ;
 
       const uintptr_t NC = ( n + m_chunk_mask ) >> m_chunk_shift ; // New total number of chunks needed for resize
 
@@ -304,8 +304,8 @@ public:
       if ( *pc < NC ) {
         while ( *pc < NC ) {
           m_chunks[*pc] = reinterpret_cast<value_pointer_type>
-            ( 
-             typename traits::memory_space().allocate( sizeof(value_type) << m_chunk_shift ) 
+            (
+             typename traits::memory_space().allocate( sizeof(local_value_type) << m_chunk_shift )
             );
           ++*pc ;
         }
@@ -314,7 +314,7 @@ public:
         while ( NC + 1 <= *pc ) {
           --*pc ;
           typename traits::memory_space().deallocate( m_chunks[*pc]
-                                         , sizeof(value_type) << m_chunk_shift );
+                                         , sizeof(local_value_type) << m_chunk_shift );
           m_chunks[*pc] = 0 ;
         }
       }
@@ -376,8 +376,8 @@ public:
 
         closure.execute();
 
-        traits::execution_space::fence();
-        //Impl::ChunkArraySpace< typename traits::memory_space >::memory_space::execution_space::fence(); 
+        typename traits::execution_space().fence();
+        //Impl::ChunkArraySpace< typename traits::memory_space >::memory_space::execution_space().fence(); 
       }
 
     void construct_shared_allocation()
diff --git a/packages/kokkos/containers/src/Kokkos_OffsetView.hpp b/packages/kokkos/containers/src/Kokkos_OffsetView.hpp
index b614764ee787c778eec2b87f2c27bcb33290e265..4ce1f4d84fa51cb2419706c39ccabbf5c26048d3 100644
--- a/packages/kokkos/containers/src/Kokkos_OffsetView.hpp
+++ b/packages/kokkos/containers/src/Kokkos_OffsetView.hpp
@@ -202,8 +202,8 @@ namespace Kokkos {
 
          template <typename iType, typename std::enable_if< std::is_integral<iType>::value, iType>::type = 0>
          KOKKOS_INLINE_FUNCTION
-         int64_t begin(const iType dimension) const {
-            return dimension < Rank ? m_begins[dimension] : 0;
+         int64_t begin(const iType local_dimension) const {
+             return local_dimension < Rank ? m_begins[local_dimension] : 0;
          }
 
          KOKKOS_INLINE_FUNCTION
@@ -211,7 +211,9 @@ namespace Kokkos {
 
          template <typename iType, typename std::enable_if< std::is_integral<iType>::value, iType>::type = 0>
          KOKKOS_INLINE_FUNCTION
-         int64_t end(const iType dimension) const {return begin(dimension) + m_map.extent(dimension);}
+         int64_t end(const iType local_dimension) const {
+             return begin(local_dimension) + m_map.extent(local_dimension);
+         }
 
 
       private:
@@ -1068,7 +1070,7 @@ namespace Kokkos {
             }
 
             // Copy the input allocation properties with possibly defaulted properties
-            alloc_prop prop( arg_prop );
+            alloc_prop prop_copy( arg_prop );
 
             //------------------------------------------------------------
 #if defined( KOKKOS_ENABLE_CUDA )
@@ -1078,18 +1080,18 @@ namespace Kokkos {
             // Fence using the trait's executon space (which will be Kokkos::Cuda)
             // to avoid incomplete type errors from usng Kokkos::Cuda directly.
             if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) {
-               traits::device_type::memory_space::execution_space::fence();
+               typename traits::device_type::memory_space::execution_space().fence();
             }
 #endif
             //------------------------------------------------------------
 
             Kokkos::Impl::SharedAllocationRecord<> *
-            record = m_map.allocate_shared( prop , arg_layout );
+            record = m_map.allocate_shared( prop_copy , arg_layout );
 
             //------------------------------------------------------------
 #if defined( KOKKOS_ENABLE_CUDA )
             if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) {
-               traits::device_type::memory_space::execution_space::fence();
+               typename traits::device_type::memory_space::execution_space().fence();
             }
 #endif
             //------------------------------------------------------------
diff --git a/packages/kokkos/containers/src/Kokkos_ScatterView.hpp b/packages/kokkos/containers/src/Kokkos_ScatterView.hpp
index 8e568578872f52da170f1831c060158bf13078e4..a8c05e3f363162f10bdaa50d8af9409924f96b89 100644
--- a/packages/kokkos/containers/src/Kokkos_ScatterView.hpp
+++ b/packages/kokkos/containers/src/Kokkos_ScatterView.hpp
@@ -57,9 +57,16 @@
 namespace Kokkos {
 namespace Experimental {
 
-//TODO: replace this enum with the Kokkos::Sum, etc reducers for parallel_reduce
+/*
+ * Reduction Type list
+ *  - These corresponds to subset of the reducers in parallel_reduce
+ *  - See Implementations of ScatterValue for details.
+ */
 enum : int {
   ScatterSum,
+  ScatterProd,
+  ScatterMax,
+  ScatterMin,
 };
 
 enum : int {
@@ -114,6 +121,21 @@ struct DefaultContribution<Kokkos::OpenMP, Kokkos::Experimental::ScatterDuplicat
 };
 #endif
 
+#ifdef KOKKOS_ENABLE_HPX
+template <>
+struct DefaultDuplication<Kokkos::Experimental::HPX> {
+  enum : int { value = Kokkos::Experimental::ScatterDuplicated };
+};
+template <>
+struct DefaultContribution<Kokkos::Experimental::HPX, Kokkos::Experimental::ScatterNonDuplicated> {
+  enum : int { value = Kokkos::Experimental::ScatterAtomic };
+};
+template <>
+struct DefaultContribution<Kokkos::Experimental::HPX, Kokkos::Experimental::ScatterDuplicated> {
+  enum : int { value = Kokkos::Experimental::ScatterNonAtomic };
+};
+#endif
+
 #ifdef KOKKOS_ENABLE_THREADS
 template <>
 struct DefaultDuplication<Kokkos::Threads> {
@@ -144,39 +166,277 @@ struct DefaultContribution<Kokkos::Cuda, Kokkos::Experimental::ScatterDuplicated
 };
 #endif
 
-/* ScatterValue is the object returned by the access operator() of ScatterAccess,
-   similar to that returned by an Atomic View, it wraps Kokkos::atomic_add with convenient
-   operator+=, etc. */
+/* ScatterValue <Op=ScatterSum, contribution=ScatterNonAtomic> is the object returned by the access operator() of ScatterAccess,
+   This class inherits from the Sum<> reducer and it wraps join(dest, src) with convenient operator+=, etc. 
+   Note the addition of update(ValueType const& rhs) and reset()  so that all reducers can have common functions
+   See ReduceDuplicates and ResetDuplicates ) */
 template <typename ValueType, int Op, int contribution>
 struct ScatterValue;
 
 template <typename ValueType>
-struct ScatterValue<ValueType, Kokkos::Experimental::ScatterSum, Kokkos::Experimental::ScatterNonAtomic> {
+struct ScatterValue<ValueType, Kokkos::Experimental::ScatterSum, Kokkos::Experimental::ScatterNonAtomic> :
+  Sum<ValueType,Kokkos::DefaultExecutionSpace> {
   public:
-    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : value( value_in ) {}
-    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ScatterValue&& other) : value( other.value ) {}
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : 
+       Sum<ValueType,Kokkos::DefaultExecutionSpace>(value_in)
+    {}
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ScatterValue&& other) : 
+       Sum<ValueType,Kokkos::DefaultExecutionSpace>(other.reference())
+    {}
     KOKKOS_FORCEINLINE_FUNCTION void operator+=(ValueType const& rhs) {
-      value += rhs;
+      this->join( this->reference(), rhs );
     }
     KOKKOS_FORCEINLINE_FUNCTION void operator-=(ValueType const& rhs) {
-      value -= rhs;
+      this->join( this->reference(), -rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void update(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void reset() {
+      this->init( this->reference() );
     }
-  private:
-    ValueType& value;
 };
 
+/* ScatterValue <Op=ScatterSum, contribution=ScatterAtomic> is the object returned by the access operator() 
+ * of ScatterAccess, similar to that returned by an Atomic View, it wraps Kokkos::atomic_add with convenient
+   operator+=, etc. This version also has the update(rhs) and reset() functions. */
 template <typename ValueType>
-struct ScatterValue<ValueType, Kokkos::Experimental::ScatterSum, Kokkos::Experimental::ScatterAtomic> {
+struct ScatterValue<ValueType, Kokkos::Experimental::ScatterSum, Kokkos::Experimental::ScatterAtomic> :
+  Sum<ValueType,Kokkos::DefaultExecutionSpace> {
   public:
-    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : value( value_in ) {}
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : 
+       Sum<ValueType,Kokkos::DefaultExecutionSpace>(value_in)
+    {}
+
     KOKKOS_FORCEINLINE_FUNCTION void operator+=(ValueType const& rhs) {
-      Kokkos::atomic_add(&value, rhs);
+     this->join(this->reference(), rhs);
     }
     KOKKOS_FORCEINLINE_FUNCTION void operator-=(ValueType const& rhs) {
-      Kokkos::atomic_add(&value, -rhs);
+      this->join(this->reference(), -rhs);
+    }
+    
+    KOKKOS_INLINE_FUNCTION
+    void join(ValueType& dest, const ValueType& src)  const {
+      Kokkos::atomic_add(&dest, src);
+    }
+
+    KOKKOS_INLINE_FUNCTION
+    void join(volatile ValueType& dest, const volatile ValueType& src) const {
+      Kokkos::atomic_add(&dest, src);
+    } 
+
+    KOKKOS_FORCEINLINE_FUNCTION void update(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
+    }
+
+    KOKKOS_FORCEINLINE_FUNCTION void reset() {
+      this->init( this->reference() );
+    }
+};
+
+/* ScatterValue <Op=ScatterProd, contribution=ScatterNonAtomic> is the object returned by the access operator() of ScatterAccess,
+   This class inherits from the Prod<> reducer and it wraps join(dest, src) with convenient operator*=, etc. 
+   Note the addition of update(ValueType const& rhs) and reset()  so that all reducers can have common functions
+   See ReduceDuplicates and ResetDuplicates ) */
+template <typename ValueType>
+struct ScatterValue<ValueType, Kokkos::Experimental::ScatterProd, Kokkos::Experimental::ScatterNonAtomic> :
+  Prod<ValueType,Kokkos::DefaultExecutionSpace> {
+  public:
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : 
+       Prod<ValueType,Kokkos::DefaultExecutionSpace>(value_in)
+    {}
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ScatterValue&& other) : 
+       Prod<ValueType,Kokkos::DefaultExecutionSpace>(other.reference())
+    {}
+    KOKKOS_FORCEINLINE_FUNCTION void operator*=(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void operator/=(ValueType const& rhs) {
+      this->join( this->reference(), static_cast<ValueType>(1)/rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void update(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void reset() {
+      this->init( this->reference() );
+    }
+};
+
+/* ScatterValue <Op=ScatterProd, contribution=ScatterAtomic> is the object returned by the access operator() 
+ * of ScatterAccess, similar to that returned by an Atomic View, it wraps and atomic_prod with convenient
+   operator*=, etc. atomic_prod uses the atomic_compare_exchange. This version also has the update(rhs) and reset() functions. */
+template <typename ValueType>
+struct ScatterValue<ValueType, Kokkos::Experimental::ScatterProd, Kokkos::Experimental::ScatterAtomic> :
+  Prod<ValueType,Kokkos::DefaultExecutionSpace> {
+  public:
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : 
+       Prod<ValueType,Kokkos::DefaultExecutionSpace>(value_in)
+    {}
+
+    KOKKOS_FORCEINLINE_FUNCTION void operator*=(ValueType const& rhs) {
+     this->join(this->reference(), rhs);
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void operator/=(ValueType const& rhs) {
+      this->join(this->reference(), static_cast<ValueType>(1)/rhs);
+    }
+
+    KOKKOS_FORCEINLINE_FUNCTION 
+    void atomic_prod(ValueType & dest, const ValueType& src) const {
+
+        bool success = false;
+        while(!success) {
+            ValueType dest_old = dest;
+            ValueType dest_new = dest_old * src;
+            dest_new = Kokkos::atomic_compare_exchange<ValueType>(&dest,dest_old,dest_new);
+            success = ( (dest_new - dest_old)/dest_old <= 1e-15 );
+        }
+    }
+    
+    KOKKOS_INLINE_FUNCTION
+    void join(ValueType& dest, const ValueType& src)  const {
+      atomic_prod(dest, src);
+    }
+
+    KOKKOS_INLINE_FUNCTION
+    void join(volatile ValueType& dest, const volatile ValueType& src) const {
+      atomic_prod(dest, src);
+    } 
+
+    KOKKOS_FORCEINLINE_FUNCTION void update(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void reset() {
+      this->init( this->reference() );
+    }
+
+};
+
+/* ScatterValue <Op=ScatterMin, contribution=ScatterNonAtomic> is the object returned by the access operator() of ScatterAccess,
+   This class inherits from the Min<> reducer and it wraps join(dest, src) with convenient update(rhs). 
+   Note the addition of update(ValueType const& rhs) and reset() are so that all reducers can have a common update function
+   See ReduceDuplicates and ResetDuplicates ) */
+template <typename ValueType>
+struct ScatterValue<ValueType, Kokkos::Experimental::ScatterMin, Kokkos::Experimental::ScatterNonAtomic> :
+  Min<ValueType,Kokkos::DefaultExecutionSpace> {
+  public:
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : 
+       Min<ValueType,Kokkos::DefaultExecutionSpace>(value_in)
+    {}
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ScatterValue&& other) : 
+       Min<ValueType,Kokkos::DefaultExecutionSpace>(other.reference())
+    {}
+    KOKKOS_FORCEINLINE_FUNCTION void update(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void reset() {
+      this->init( this->reference() );
+    }
+};
+
+/* ScatterValue <Op=ScatterMin, contribution=ScatterAtomic> is the object returned by the access operator() 
+ * of ScatterAccess, similar to that returned by an Atomic View, it wraps and atomic_min with the update(rhs)
+   function. atomic_min uses the atomic_compare_exchange. This version also has the reset() function */
+template <typename ValueType>
+struct ScatterValue<ValueType, Kokkos::Experimental::ScatterMin, Kokkos::Experimental::ScatterAtomic> :
+  Min<ValueType,Kokkos::DefaultExecutionSpace> {
+  public:
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : 
+       Min<ValueType,Kokkos::DefaultExecutionSpace>(value_in)
+    {}
+
+    KOKKOS_FORCEINLINE_FUNCTION 
+    void atomic_min(ValueType & dest, const ValueType& src) const {
+
+        bool success = false;
+        while(!success) {
+            ValueType dest_old = dest;
+            ValueType dest_new = ( dest_old > src ) ? src : dest_old;
+            dest_new = Kokkos::atomic_compare_exchange<ValueType>(&dest,dest_old,dest_new);
+            success = ( (dest_new - dest_old)/dest_old <= 1e-15 );
+        }
+    }
+    
+    KOKKOS_INLINE_FUNCTION
+    void join(ValueType& dest, const ValueType& src)  const {
+      atomic_min(dest, src);
+    }
+
+    KOKKOS_INLINE_FUNCTION
+    void join(volatile ValueType& dest, const volatile ValueType& src) const {
+      atomic_min(dest, src);
+    } 
+
+    KOKKOS_FORCEINLINE_FUNCTION void update(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
     }
-  private:
-    ValueType& value;
+    KOKKOS_FORCEINLINE_FUNCTION void reset() {
+      this->init( this->reference() );
+    }
+
+};
+
+/* ScatterValue <Op=ScatterMax, contribution=ScatterNonAtomic> is the object returned by the access operataor() of ScatterAccess,
+   This class inherits from the Max<> reducer and it wraps join(dest, src) with convenient update(rhs). 
+   Note the addition of update(ValueType const& rhs) and reset() are so that all reducers can have a common update function
+   See ReduceDuplicates and ResetDuplicates ) */
+template <typename ValueType>
+struct ScatterValue<ValueType, Kokkos::Experimental::ScatterMax, Kokkos::Experimental::ScatterNonAtomic> :
+  Max<ValueType,Kokkos::DefaultExecutionSpace> {
+  public:
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : 
+       Max<ValueType,Kokkos::DefaultExecutionSpace>(value_in)
+    {}
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ScatterValue&& other) : 
+       Max<ValueType,Kokkos::DefaultExecutionSpace>(other.reference())
+    {}
+    KOKKOS_FORCEINLINE_FUNCTION void update(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void reset() {
+      this->init( this->reference() );
+    }
+};
+
+/* ScatterValue <Op=ScatterMax, contribution=ScatterAtomic> is the object returned by the access operator() 
+ * of ScatterAccess, similar to that returned by an Atomic View, it wraps and atomic_max with the update(rhs)
+   function. atomic_max uses the atomic_compare_exchange. This version also has the reset() function  */
+template <typename ValueType>
+struct ScatterValue<ValueType, Kokkos::Experimental::ScatterMax, Kokkos::Experimental::ScatterAtomic> :
+  Max<ValueType,Kokkos::DefaultExecutionSpace> {
+  public:
+    KOKKOS_FORCEINLINE_FUNCTION ScatterValue(ValueType& value_in) : 
+       Max<ValueType,Kokkos::DefaultExecutionSpace>(value_in)
+    {}
+
+    KOKKOS_FORCEINLINE_FUNCTION 
+    void atomic_max(ValueType & dest, const ValueType& src) const {
+
+        bool success = false;
+        while(!success) {
+            ValueType dest_old = dest;
+            ValueType dest_new = ( dest_old < src ) ? src : dest_old;
+            dest_new = Kokkos::atomic_compare_exchange<ValueType>(&dest,dest_old,dest_new);
+            success = ( (dest_new - dest_old)/dest_old <= 1e-15 );
+        }
+    }
+    
+    KOKKOS_INLINE_FUNCTION
+    void join(ValueType& dest, const ValueType& src)  const {
+      atomic_max(dest, src);
+    }
+
+    KOKKOS_INLINE_FUNCTION
+    void join(volatile ValueType& dest, const volatile ValueType& src) const {
+      atomic_max(dest, src);
+    } 
+
+    KOKKOS_FORCEINLINE_FUNCTION void update(ValueType const& rhs) {
+      this->join( this->reference(), rhs );
+    }
+    KOKKOS_FORCEINLINE_FUNCTION void reset() {
+      this->init( this->reference() );
+    }
+
 };
 
 /* DuplicatedDataType, given a View DataType, will create a new DataType
@@ -226,6 +486,18 @@ struct DuplicatedDataType<T*, Kokkos::LayoutLeft> {
   typedef typename DuplicatedDataType<T, Kokkos::LayoutLeft>::value_type* value_type;
 };
 
+/* Insert integer argument pack into array */
+
+template<class T>
+void args_to_array(size_t* array, int pos, T dim0) {
+  array[pos] = dim0;
+}
+template<class T, class ... Dims>
+void args_to_array(size_t* array, int pos, T dim0, Dims ... dims) {
+  array[pos] = dim0;
+  args_to_array(array,pos+1,dims...);
+}
+
 /* Slice is just responsible for stuffing the correct number of Kokkos::ALL
    arguments on the correct side of the index in a call to subview() to get a
    subview where the index specified is the largest-stride one. */
@@ -304,21 +576,26 @@ struct ReduceDuplicatesBase {
   }
 };
 
-template <typename ExecSpace, typename ValueType>
-struct ReduceDuplicates<ExecSpace, ValueType, Kokkos::Experimental::ScatterSum> :
-  public ReduceDuplicatesBase<ExecSpace, ValueType, Kokkos::Experimental::ScatterSum>
+/* ReduceDuplicates -- Perform reduction on destination array using strided source 
+ *    Use ScatterValue<> specific to operation to wrap destination array so that
+ *    the reduction operation can be accessed via the update(rhs) function */
+template <typename ExecSpace, typename ValueType, int Op>
+struct ReduceDuplicates :
+  public ReduceDuplicatesBase<ExecSpace, ValueType, Op>
 {
-  typedef ReduceDuplicatesBase<ExecSpace, ValueType, Kokkos::Experimental::ScatterSum> Base;
+  typedef ReduceDuplicatesBase<ExecSpace, ValueType, Op> Base;
   ReduceDuplicates(ValueType const* src_in, ValueType* dst_in, size_t stride_in, size_t start_in, size_t n_in, std::string const& name):
     Base(src_in, dst_in, stride_in, start_in, n_in, name)
   {}
   KOKKOS_FORCEINLINE_FUNCTION void operator()(size_t i) const {
     for (size_t j = Base::start; j < Base::n; ++j) {
-      Base::dst[i] += Base::src[i + Base::stride * j];
+      ScatterValue<ValueType, Op, Kokkos::Experimental::ScatterNonAtomic> sv(Base::dst[i]);
+      sv.update( Base::src[i + Base::stride * j] );
     }
   }
 };
 
+
 template <typename ExecSpace, typename ValueType, int Op>
 struct ResetDuplicates;
 
@@ -347,19 +624,24 @@ struct ResetDuplicatesBase {
   }
 };
 
-template <typename ExecSpace, typename ValueType>
-struct ResetDuplicates<ExecSpace, ValueType, Kokkos::Experimental::ScatterSum> :
-  public ResetDuplicatesBase<ExecSpace, ValueType, Kokkos::Experimental::ScatterSum>
+/* ResetDuplicates -- Perform reset on destination array
+ *    Use ScatterValue<> specific to operation to wrap destination array so that
+ *    the reset operation can be accessed via the reset() function */
+template <typename ExecSpace, typename ValueType, int Op>
+struct ResetDuplicates :
+  public ResetDuplicatesBase<ExecSpace, ValueType, Op>
 {
-  typedef ResetDuplicatesBase<ExecSpace, ValueType, Kokkos::Experimental::ScatterSum> Base;
+  typedef ResetDuplicatesBase<ExecSpace, ValueType, Op> Base;
   ResetDuplicates(ValueType* data_in, size_t size_in, std::string const& name):
     Base(data_in, size_in, name)
   {}
   KOKKOS_FORCEINLINE_FUNCTION void operator()(size_t i) const {
-    Base::data[i] = Kokkos::reduction_identity<ValueType>::sum();
+    ScatterValue<ValueType, Op, Kokkos::Experimental::ScatterNonAtomic> sv(Base::data[i]);
+    sv.reset();
   }
 };
 
+
 }}} // Kokkos::Impl::Experimental
 
 namespace Kokkos {
@@ -519,12 +801,22 @@ public:
   typedef Kokkos::Impl::Experimental::ScatterValue<
       original_value_type, Op, override_contribution> value_type;
 
+  KOKKOS_INLINE_FUNCTION
+  ScatterAccess() :
+    view(view_type())  {
+  }
+
   KOKKOS_INLINE_FUNCTION
   ScatterAccess(view_type const& view_in)
     : view(view_in)
   {
   }
 
+  KOKKOS_INLINE_FUNCTION
+  ~ScatterAccess()
+  {
+  }
+
   template <typename ... Args>
   KOKKOS_FORCEINLINE_FUNCTION
   value_type operator()(Args ... args) const {
@@ -608,7 +900,7 @@ public:
   }
 
   template <int override_contribution = contribution>
-  inline
+  KOKKOS_FORCEINLINE_FUNCTION
   ScatterAccess<DataType, Op, ExecSpace, Kokkos::LayoutRight, ScatterDuplicated, contribution, override_contribution>
   access() const {
     return ScatterAccess<DataType, Op, ExecSpace, Kokkos::LayoutRight, ScatterDuplicated, contribution, override_contribution>{*this};
@@ -729,14 +1021,14 @@ public:
   : unique_token()
   {
     size_t arg_N[8] = {
-      original_view.extent(0),
-      original_view.extent(1),
-      original_view.extent(2),
-      original_view.extent(3),
-      original_view.extent(4),
-      original_view.extent(5),
-      original_view.extent(6),
-      0
+      original_view.rank>0?original_view.extent(0):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>1?original_view.extent(1):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>2?original_view.extent(2):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>3?original_view.extent(3):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>4?original_view.extent(4):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>5?original_view.extent(5):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>6?original_view.extent(6):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      KOKKOS_IMPL_CTOR_DEFAULT_ARG
     };
     arg_N[internal_view_type::rank - 1] = unique_token.size();
     internal_view = internal_view_type(
@@ -748,14 +1040,28 @@ public:
   }
 
   template <typename ... Dims>
-  ScatterView(std::string const& name, Dims ... dims)
-  : internal_view(Kokkos::ViewAllocateWithoutInitializing(name), dims ..., unique_token.size())
-  {
+  ScatterView(std::string const& name, Dims ... dims) {
+    original_view_type original_view;
+    size_t arg_N[8] = {
+      original_view.rank>0?original_view.static_extent(0):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>1?original_view.static_extent(1):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>2?original_view.static_extent(2):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>3?original_view.static_extent(3):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>4?original_view.static_extent(4):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>5?original_view.static_extent(5):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      original_view.rank>6?original_view.static_extent(6):KOKKOS_IMPL_CTOR_DEFAULT_ARG,
+      KOKKOS_IMPL_CTOR_DEFAULT_ARG
+    };
+    Kokkos::Impl::Experimental::args_to_array(arg_N,0,dims ...);
+    arg_N[internal_view_type::rank - 1] = unique_token.size();
+    internal_view = internal_view_type(Kokkos::ViewAllocateWithoutInitializing(name),
+     arg_N[0], arg_N[1], arg_N[2], arg_N[3],
+     arg_N[4], arg_N[5], arg_N[6], arg_N[7]);
     reset();
   }
 
   template <int override_contribution = contribution>
-  inline
+  KOKKOS_FORCEINLINE_FUNCTION
   ScatterAccess<DataType, Op, ExecSpace, Kokkos::LayoutLeft, ScatterDuplicated, contribution, override_contribution>
   access() const {
     return ScatterAccess<DataType, Op, ExecSpace, Kokkos::LayoutLeft, ScatterDuplicated, contribution, override_contribution>{*this};
@@ -770,9 +1076,13 @@ public:
   }
 
   template <typename ... RP>
-  void contribute_into(View<DataType, RP...> const& dest) const
+  void contribute_into(View<RP...> const& dest) const
   {
-    typedef View<DataType, RP...> dest_type;
+    typedef View<RP...> dest_type;
+    static_assert(std::is_same<
+        typename dest_type::value_type,
+        typename original_view_type::non_const_value_type>::value,
+        "ScatterView deep_copy destination has wrong value_type");
     static_assert(std::is_same<
         typename dest_type::array_layout,
         Kokkos::LayoutLeft>::value,
@@ -891,12 +1201,14 @@ public:
   typedef Kokkos::Impl::Experimental::ScatterValue<
       original_value_type, Op, override_contribution> value_type;
 
-  inline ScatterAccess(view_type const& view_in)
+  KOKKOS_FORCEINLINE_FUNCTION
+  ScatterAccess(view_type const& view_in)
     : view(view_in)
     , thread_id(view_in.unique_token.acquire()) {
   }
 
-  inline ~ScatterAccess() {
+  KOKKOS_FORCEINLINE_FUNCTION
+  ~ScatterAccess() {
     if (thread_id != ~thread_id_type(0)) view.unique_token.release(thread_id);
   }
 
@@ -926,8 +1238,9 @@ private:
 public:
   // do need to allow moves though, for the common
   // auto b = a.access();
-  // that assignments turns into a move constructor call 
-  inline ScatterAccess(ScatterAccess&& other)
+  // that assignments turns into a move constructor call  
+  KOKKOS_FORCEINLINE_FUNCTION
+  ScatterAccess(ScatterAccess&& other)
     : view(other.view)
     , thread_id(other.thread_id)
   {
diff --git a/packages/kokkos/containers/src/Kokkos_UnorderedMap.hpp b/packages/kokkos/containers/src/Kokkos_UnorderedMap.hpp
index 64601e6b5989678f6dcf24ef704f9e0ca9a6452a..aed723288f9fa9616b8f93bb377a091d0aa214de 100644
--- a/packages/kokkos/containers/src/Kokkos_UnorderedMap.hpp
+++ b/packages/kokkos/containers/src/Kokkos_UnorderedMap.hpp
@@ -437,9 +437,9 @@ public:
   {
     bool result = !erasable();
     if (is_insertable_map && result) {
-      execution_space::fence();
+      execution_space().fence();
       set_flag(erasable_idx);
-      execution_space::fence();
+      execution_space().fence();
     }
     return result;
   }
@@ -448,10 +448,10 @@ public:
   {
     bool result = erasable();
     if (is_insertable_map && result) {
-      execution_space::fence();
+      execution_space().fence();
       Impl::UnorderedMapErase<declared_map_type> f(*this);
       f.apply();
-      execution_space::fence();
+      execution_space().fence();
       reset_flag(erasable_idx);
     }
     return result;
diff --git a/packages/kokkos/containers/src/Kokkos_Vector.hpp b/packages/kokkos/containers/src/Kokkos_Vector.hpp
index 76c515941e8d0a04bb2491bceec5caf14de56ec3..9b151d9505a29a38eaaba2dc6698dc992db97101 100644
--- a/packages/kokkos/containers/src/Kokkos_Vector.hpp
+++ b/packages/kokkos/containers/src/Kokkos_Vector.hpp
@@ -121,12 +121,12 @@ public:
     if( DV::template need_sync<typename DV::t_dev::device_type>() ) {
       set_functor_host f(DV::h_view,val);
       parallel_for(n,f);
-      DV::t_host::execution_space::fence();
+      typename DV::t_host::execution_space().fence();
       DV::template modify<typename DV::t_host::device_type>();
     } else {
       set_functor f(DV::d_view,val);
       parallel_for(n,f);
-      DV::t_dev::execution_space::fence();
+      typename DV::t_dev::execution_space().fence();
       DV::template modify<typename DV::t_dev::device_type>();
     }
   }
diff --git a/packages/kokkos/containers/unit_tests/CMakeLists.txt b/packages/kokkos/containers/unit_tests/CMakeLists.txt
index 0f94afec8c2aba5cee8a69bd8fcd0b7d661fd6ef..8564bd9ddd652af73d834dd784fd3598b9801f56 100644
--- a/packages/kokkos/containers/unit_tests/CMakeLists.txt
+++ b/packages/kokkos/containers/unit_tests/CMakeLists.txt
@@ -86,6 +86,31 @@ TRIBITS_ADD_EXECUTABLE_AND_TEST(
   )
 ENDIF()
 
+IF(Kokkos_ENABLE_HPX)
+TRIBITS_ADD_EXECUTABLE_AND_TEST(
+  UnitTest_HPX
+  SOURCES
+    UnitTestMain.cpp
+    hpx/TestHPX_BitSet.cpp
+    hpx/TestHPX_DualView.cpp
+    hpx/TestHPX_DynamicView.cpp
+    hpx/TestHPX_DynRankViewAPI_generic.cpp
+    hpx/TestHPX_DynRankViewAPI_rank12345.cpp
+    hpx/TestHPX_DynRankViewAPI_rank67.cpp
+    hpx/TestHPX_ErrorReporter.cpp
+    hpx/TestHPX_OffsetView.cpp
+    hpx/TestHPX_ScatterView.cpp
+    hpx/TestHPX_StaticCrsGraph.cpp
+    hpx/TestHPX_UnorderedMap.cpp
+    hpx/TestHPX_Vector.cpp
+    hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp
+  COMM serial mpi
+  NUM_MPI_PROCS 1
+  FAIL_REGULAR_EXPRESSION "  FAILED  "
+  TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+  )
+ENDIF()
+
 IF(Kokkos_ENABLE_Cuda)
 TRIBITS_ADD_EXECUTABLE_AND_TEST(
   UnitTest_Cuda
diff --git a/packages/kokkos/containers/unit_tests/Makefile b/packages/kokkos/containers/unit_tests/Makefile
index c0e5d2820cf8a23a42759c522db5f2d70a6aa2a7..a7e0233f8a58790bcd8f845a314703d0f2b6e2f5 100644
--- a/packages/kokkos/containers/unit_tests/Makefile
+++ b/packages/kokkos/containers/unit_tests/Makefile
@@ -4,6 +4,7 @@ GTEST_PATH = ../../TPL/gtest
 
 vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests
 vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/openmp
+vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/hpx
 vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/serial
 vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/threads
 vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/rocm
@@ -106,6 +107,25 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
 	TEST_TARGETS += test-openmp
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+	OBJ_HPX = UnitTestMain.o gtest-all.o
+	OBJ_HPX += TestHPX_BitSet.o
+	OBJ_HPX += TestHPX_DualView.o
+	OBJ_HPX += TestHPX_DynamicView.o
+	OBJ_HPX += TestHPX_DynRankViewAPI_generic.o
+	OBJ_HPX += TestHPX_DynRankViewAPI_rank12345.o
+	OBJ_HPX += TestHPX_DynRankViewAPI_rank67.o
+	OBJ_HPX += TestHPX_ErrorReporter.o
+	OBJ_HPX += TestHPX_OffsetView.o
+	OBJ_HPX += TestHPX_ScatterView.o
+	OBJ_HPX += TestHPX_StaticCrsGraph.o
+	OBJ_HPX += TestHPX_UnorderedMap.o
+	OBJ_HPX += TestHPX_Vector.o
+	OBJ_HPX += TestHPX_ViewCtorPropEmbeddedDim.o
+	TARGETS += KokkosContainers_UnitTest_HPX
+	TEST_TARGETS += test-hpx
+endif
+
 ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
 	OBJ_SERIAL = UnitTestMain.o gtest-all.o
 	OBJ_SERIAL += TestSerial_BitSet.o
@@ -137,6 +157,9 @@ KokkosContainers_UnitTest_Threads: $(OBJ_THREADS) $(KOKKOS_LINK_DEPENDS)
 KokkosContainers_UnitTest_OpenMP: $(OBJ_OPENMP) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_OPENMP) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosContainers_UnitTest_OpenMP
 
+KokkosContainers_UnitTest_HPX: $(OBJ_HPX) $(KOKKOS_LINK_DEPENDS)
+	$(LINK) $(EXTRA_PATH) $(OBJ_HPX) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosContainers_UnitTest_HPX
+
 KokkosContainers_UnitTest_Serial: $(OBJ_SERIAL) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_SERIAL) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosContainers_UnitTest_Serial
 
@@ -152,6 +175,9 @@ test-threads: KokkosContainers_UnitTest_Threads
 test-openmp: KokkosContainers_UnitTest_OpenMP
 	./KokkosContainers_UnitTest_OpenMP
 
+test-hpx: KokkosContainers_UnitTest_HPX
+	./KokkosContainers_UnitTest_HPX
+
 test-serial: KokkosContainers_UnitTest_Serial
 	./KokkosContainers_UnitTest_Serial
 
diff --git a/packages/kokkos/containers/unit_tests/TestBitset.hpp b/packages/kokkos/containers/unit_tests/TestBitset.hpp
index 6200124644e2121d00268320fcd79956e6eea7e1..371c0288b1a2840bd4270f0fdea9d70da66fc82c 100644
--- a/packages/kokkos/containers/unit_tests/TestBitset.hpp
+++ b/packages/kokkos/containers/unit_tests/TestBitset.hpp
@@ -66,7 +66,7 @@ struct TestBitset
 
   unsigned testit(unsigned collisions)
   {
-    execution_space::fence();
+    execution_space().fence();
 
     unsigned count = 0;
     Kokkos::parallel_reduce( m_bitset.size()*collisions, *this, count);
@@ -114,7 +114,7 @@ struct TestBitsetTest
 
   unsigned testit()
   {
-    execution_space::fence();
+    execution_space().fence();
 
     unsigned count = 0;
     Kokkos::parallel_reduce( m_bitset.size(), *this, count);
@@ -151,7 +151,7 @@ struct TestBitsetAny
 
   unsigned testit()
   {
-    execution_space::fence();
+    execution_space().fence();
 
     unsigned count = 0;
     Kokkos::parallel_reduce( m_bitset.size(), *this, count);
diff --git a/packages/kokkos/containers/unit_tests/TestDynViewAPI.hpp b/packages/kokkos/containers/unit_tests/TestDynViewAPI.hpp
index 6684a55452934a0d460279f34513bd1b20211ed5..13e56c9f8d7a47f17c9f75ab5076bd039fc091bd 100644
--- a/packages/kokkos/containers/unit_tests/TestDynViewAPI.hpp
+++ b/packages/kokkos/containers/unit_tests/TestDynViewAPI.hpp
@@ -1276,6 +1276,7 @@ public:
       Kokkos::deep_copy( dx , hx );
       Kokkos::deep_copy( dy , dx );
       Kokkos::deep_copy( hy , dy );
+      Kokkos::fence();
 
       for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
       for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
@@ -1286,6 +1287,7 @@ public:
 
       Kokkos::deep_copy( dx , T(0) );
       Kokkos::deep_copy( hx , dx );
+      Kokkos::fence();
 
       for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
       for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
diff --git a/packages/kokkos/containers/unit_tests/TestErrorReporter.hpp b/packages/kokkos/containers/unit_tests/TestErrorReporter.hpp
index ecb7542232c917202dfa0006a52ec4f29499c014..7e48089b432f5133ab8961ac2a2ed9b7ddc38317 100644
--- a/packages/kokkos/containers/unit_tests/TestErrorReporter.hpp
+++ b/packages/kokkos/containers/unit_tests/TestErrorReporter.hpp
@@ -162,6 +162,7 @@ struct ErrorReporterDriver : public ErrorReporterDriverBase<DeviceType>
   void execute(int reporter_capacity, int test_size)
   {
     Kokkos::parallel_for(Kokkos::RangePolicy<execution_space>(0,test_size), *this);
+    Kokkos::fence();
     driver_base::check_expectations(reporter_capacity, test_size);
   }
 
@@ -194,6 +195,7 @@ struct ErrorReporterDriverUseLambda : public ErrorReporterDriverBase<DeviceType>
         driver_base::m_errorReporter.add_report(work_idx, report);
       }
     });
+    Kokkos::fence();
     driver_base::check_expectations(reporter_capacity, test_size);
   }
 
diff --git a/packages/kokkos/containers/unit_tests/TestScatterView.hpp b/packages/kokkos/containers/unit_tests/TestScatterView.hpp
index d402a91b9f6dbc05cdcc8a8b0d79dc48b802b329..a9d97b32f39f1e150dea8fa2d1784de9b1660e2f 100644
--- a/packages/kokkos/containers/unit_tests/TestScatterView.hpp
+++ b/packages/kokkos/containers/unit_tests/TestScatterView.hpp
@@ -48,79 +48,387 @@
 
 namespace Test {
 
+template <typename ExecSpace, typename Layout, int duplication, int contribution, int op>
+struct test_scatter_view_impl_cls;
+
 template <typename ExecSpace, typename Layout, int duplication, int contribution>
-void test_scatter_view_config(int n)
+struct test_scatter_view_impl_cls<ExecSpace, Layout, duplication, contribution, Kokkos::Experimental::ScatterSum>   
 {
-  Kokkos::View<double *[3], Layout, ExecSpace> original_view("original_view", n);
-  {
-    auto scatter_view = Kokkos::Experimental::create_scatter_view
-      < Kokkos::Experimental::ScatterSum
-      , duplication
-      , contribution
-      > (original_view);
-#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA )
-    auto policy = Kokkos::RangePolicy<ExecSpace, int>(0, n);
-    auto f = KOKKOS_LAMBDA(int i) {
+public:   
+
+   typedef Kokkos::Experimental::ScatterView
+       < double*[3]
+       , Layout
+       , ExecSpace
+       , Kokkos::Experimental::ScatterSum
+       , duplication
+       , contribution
+        > scatter_view_type;
+
+   typedef Kokkos::View<double *[3], Layout, ExecSpace> orig_view_type; 
+
+
+   scatter_view_type scatter_view;
+   int scatterSize;
+
+   test_scatter_view_impl_cls(const scatter_view_type& view){
+      scatter_view = view;
+      scatterSize = 0;
+   }
+
+   void initialize(orig_view_type orig) {
+      auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig);
+      Kokkos::fence();
+      for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
+        host_view(i, 0) = 0.0;
+        host_view(i, 1) = 0.0;
+        host_view(i, 2) = 0.0;
+      }
+      Kokkos::fence();
+      Kokkos::deep_copy(orig, host_view);
+   }
+
+   void run_parallel(int n) {
+        scatterSize = n;
+        auto policy = Kokkos::RangePolicy<ExecSpace, int>(0, n);
+        Kokkos::parallel_for(policy, *this, "scatter_view_test: Sum");
+   }
+
+   KOKKOS_INLINE_FUNCTION
+   void operator()(int i) const {
       auto scatter_access = scatter_view.access();
       auto scatter_access_atomic = scatter_view.template access<Kokkos::Experimental::ScatterAtomic>();
       for (int j = 0; j < 10; ++j) {
-        auto k = (i + j) % n;
+        auto k = (i + j) % scatterSize;
         scatter_access(k, 0) += 4.2;
         scatter_access_atomic(k, 1) += 2.0;
         scatter_access(k, 2) += 1.0;
       }
-    };
-    Kokkos::parallel_for(policy, f, "scatter_view_test");
-#endif
-    Kokkos::Experimental::contribute(original_view, scatter_view);
-    scatter_view.reset_except(original_view);
-#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA )
-    Kokkos::parallel_for(policy, f, "scatter_view_test");
-#endif
-    Kokkos::Experimental::contribute(original_view, scatter_view);
-  }
-#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA )
-  Kokkos::fence();
-  auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), original_view);
-  Kokkos::fence();
-  for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
-    auto val0 = host_view(i, 0);
-    auto val1 = host_view(i, 1);
-    auto val2 = host_view(i, 2);
-    EXPECT_TRUE(std::fabs((val0 - 84.0) / 84.0) < 1e-15);
-    EXPECT_TRUE(std::fabs((val1 - 40.0) / 40.0) < 1e-15);
-    EXPECT_TRUE(std::fabs((val2 - 20.0) / 20.0) < 1e-15);
-  }
-#endif
-  {
-    Kokkos::Experimental::ScatterView
-      < double*[3]
-      , Layout
-      , ExecSpace
-      , Kokkos::Experimental::ScatterSum
-      , duplication
-      , contribution
-      >
-      persistent_view("persistent", n);
-    auto result_view = persistent_view.subview();
-    contribute(result_view, persistent_view);
-  }
-}
+    }
+
+    void validateResults(orig_view_type orig) {
+      auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig);
+      Kokkos::fence();
+      for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
+        auto val0 = host_view(i, 0);
+        auto val1 = host_view(i, 1);
+        auto val2 = host_view(i, 2);
+        EXPECT_TRUE(std::fabs((val0 - 84.0) / 84.0) < 1e-14);
+        EXPECT_TRUE(std::fabs((val1 - 40.0) / 40.0) < 1e-14);
+        EXPECT_TRUE(std::fabs((val2 - 20.0) / 20.0) < 1e-14);
+      }
+    }
+};
+
+
+template <typename ExecSpace, typename Layout, int duplication, int contribution>
+struct test_scatter_view_impl_cls<ExecSpace, Layout, duplication, contribution, Kokkos::Experimental::ScatterProd>   
+{
+public:   
+
+   typedef Kokkos::Experimental::ScatterView
+       < double*[3]
+       , Layout
+       , ExecSpace
+       , Kokkos::Experimental::ScatterProd
+       , duplication
+       , contribution
+        > scatter_view_type;
+
+   typedef Kokkos::View<double *[3], Layout, ExecSpace> orig_view_type; 
+
+
+   scatter_view_type scatter_view;
+   int scatterSize;
+
+   test_scatter_view_impl_cls(const scatter_view_type& view){
+      scatter_view = view;
+      scatterSize = 0;
+   }
+
+   void initialize(orig_view_type orig) {
+      auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig);
+      Kokkos::fence();
+      for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
+        host_view(i, 0) = 1.0;
+        host_view(i, 1) = 1.0;
+        host_view(i, 2) = 1.0;
+      }
+      Kokkos::fence();
+      Kokkos::deep_copy(orig, host_view);
+   }
+
+   void run_parallel(int n) {
+        scatterSize = n;
+        auto policy = Kokkos::RangePolicy<ExecSpace, int>(0, n);
+        Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod");
+   }
+
+   KOKKOS_INLINE_FUNCTION
+   void operator()(int i) const {
+      auto scatter_access = scatter_view.access();
+      auto scatter_access_atomic = scatter_view.template access<Kokkos::Experimental::ScatterAtomic>();
+      for (int j = 0; j < 4; ++j) {
+        auto k = (i + j) % scatterSize;
+        scatter_access(k, 0) *= 4.0;
+        scatter_access_atomic(k, 1) *= 2.0;
+        scatter_access(k, 2) *= 1.0;
+      }
+    }
+
+    void validateResults(orig_view_type orig) {
+      auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig);
+      Kokkos::fence();
+      for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
+        auto val0 = host_view(i, 0);
+        auto val1 = host_view(i, 1);
+        auto val2 = host_view(i, 2);
+        EXPECT_TRUE(std::fabs((val0 - 65536.0) / 65536.0) < 1e-14);
+        EXPECT_TRUE(std::fabs((val1 - 256.0) / 256.0) < 1e-14);
+        EXPECT_TRUE(std::fabs((val2 - 1.0) / 1.0) < 1e-14);
+      }
+    }
+};
+
+
+template <typename ExecSpace, typename Layout, int duplication, int contribution>
+struct test_scatter_view_impl_cls<ExecSpace, Layout, duplication, contribution, Kokkos::Experimental::ScatterMin>   
+{
+public:   
+
+   typedef Kokkos::Experimental::ScatterView
+       < double*[3]
+       , Layout
+       , ExecSpace
+       , Kokkos::Experimental::ScatterMin
+       , duplication
+       , contribution
+        > scatter_view_type;
+
+   typedef Kokkos::View<double *[3], Layout, ExecSpace> orig_view_type; 
+
+
+   scatter_view_type scatter_view;
+   int scatterSize;
+
+   test_scatter_view_impl_cls(const scatter_view_type& view){
+      scatter_view = view;
+      scatterSize = 0;
+   }
+
+   void initialize(orig_view_type orig) {
+      auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig);
+      Kokkos::fence();
+      for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
+        host_view(i, 0) = 999999.0;
+        host_view(i, 1) = 999999.0;
+        host_view(i, 2) = 999999.0;
+      }
+      Kokkos::fence();
+      Kokkos::deep_copy(orig, host_view);
+   }
 
-template <typename ExecSpace>
+   void run_parallel(int n) {
+        scatterSize = n;
+        auto policy = Kokkos::RangePolicy<ExecSpace, int>(0, n);
+        Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod");
+   }
+
+   KOKKOS_INLINE_FUNCTION
+   void operator()(int i) const {
+      auto scatter_access = scatter_view.access();
+      auto scatter_access_atomic = scatter_view.template access<Kokkos::Experimental::ScatterAtomic>();
+      for (int j = 0; j < 4; ++j) {
+        auto k = (i + j) % scatterSize;
+        scatter_access(k, 0).update((double)(j+1)*4);
+        scatter_access_atomic(k, 1).update((double)(j+1)*2.0);
+        scatter_access(k, 2).update((double)(j+1)*1.0);
+      }
+    }
+
+    void validateResults(orig_view_type orig) {
+      auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig);
+      Kokkos::fence();
+      for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
+        auto val0 = host_view(i, 0);
+        auto val1 = host_view(i, 1);
+        auto val2 = host_view(i, 2);
+        EXPECT_TRUE(std::fabs((val0 - 4.0) / 4.0) < 1e-14);
+        EXPECT_TRUE(std::fabs((val1 - 2.0) / 2.0) < 1e-14);
+        EXPECT_TRUE(std::fabs((val2 - 1.0) / 1.0) < 1e-14);
+      }
+    }
+};
+
+
+template <typename ExecSpace, typename Layout, int duplication, int contribution>
+struct test_scatter_view_impl_cls<ExecSpace, Layout, duplication, contribution, Kokkos::Experimental::ScatterMax>   
+{
+public:   
+
+   typedef Kokkos::Experimental::ScatterView
+       < double*[3]
+       , Layout
+       , ExecSpace
+       , Kokkos::Experimental::ScatterMax
+       , duplication
+       , contribution
+        > scatter_view_type;
+
+   typedef Kokkos::View<double *[3], Layout, ExecSpace> orig_view_type; 
+
+
+   scatter_view_type scatter_view;
+   int scatterSize;
+
+   test_scatter_view_impl_cls(const scatter_view_type& view){
+      scatter_view = view;
+      scatterSize = 0;
+   }
+
+   void initialize(orig_view_type orig) {
+      auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig);
+      Kokkos::fence();
+      for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
+        host_view(i, 0) = 0.0;
+        host_view(i, 1) = 0.0;
+        host_view(i, 2) = 0.0;
+      }
+      Kokkos::fence();
+      Kokkos::deep_copy(orig, host_view);
+   }
+
+   void run_parallel(int n) {
+        scatterSize = n;
+        auto policy = Kokkos::RangePolicy<ExecSpace, int>(0, n);
+        Kokkos::parallel_for(policy, *this, "scatter_view_test: Prod");
+   }
+
+   KOKKOS_INLINE_FUNCTION
+   void operator()(int i) const {
+      auto scatter_access = scatter_view.access();
+      auto scatter_access_atomic = scatter_view.template access<Kokkos::Experimental::ScatterAtomic>();
+      for (int j = 0; j < 4; ++j) {
+        auto k = (i + j) % scatterSize;
+        scatter_access(k, 0).update((double)(j+1)*4);
+        scatter_access_atomic(k, 1).update((double)(j+1)*2.0);
+        scatter_access(k, 2).update((double)(j+1)*1.0);
+      }
+    }
+
+    void validateResults(orig_view_type orig) {
+      auto host_view = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), orig);
+      Kokkos::fence();
+      for (typename decltype(host_view)::size_type i = 0; i < host_view.extent(0); ++i) {
+        auto val0 = host_view(i, 0);
+        auto val1 = host_view(i, 1);
+        auto val2 = host_view(i, 2);
+        EXPECT_TRUE(std::fabs((val0 - 16.0) / 16.0) < 1e-14);
+        EXPECT_TRUE(std::fabs((val1 - 8.0) / 8.0) < 1e-14);
+        EXPECT_TRUE(std::fabs((val2 - 4.0) / 4.0) < 1e-14);
+      }
+    }
+};
+
+
+
+template <typename ExecSpace, typename Layout, int duplication, int contribution, int op>
+struct test_scatter_view_config
+{
+ public:
+   typedef typename test_scatter_view_impl_cls<ExecSpace, Layout, 
+         duplication, contribution, op>::scatter_view_type scatter_view_def;
+   typedef typename test_scatter_view_impl_cls<ExecSpace, Layout, 
+         duplication, contribution, op>::orig_view_type orig_view_def;
+
+   test_scatter_view_config() {
+   }
+
+   void run_test(int n)
+   {
+     //Test creation via create_scatter_view
+     {
+     orig_view_def original_view("original_view", n);
+     scatter_view_def scatter_view = Kokkos::Experimental::create_scatter_view
+       < op
+       , duplication
+       , contribution
+       > (original_view);
+
+     test_scatter_view_impl_cls<ExecSpace, Layout, duplication, contribution, op> scatter_view_test_impl(scatter_view);
+     scatter_view_test_impl.initialize(original_view);
+     scatter_view_test_impl.run_parallel(n);
+
+     Kokkos::Experimental::contribute(original_view, scatter_view);
+     scatter_view.reset_except(original_view);
+
+     scatter_view_test_impl.run_parallel(n);
+
+     Kokkos::Experimental::contribute(original_view, scatter_view);
+     Kokkos::fence();
+
+     scatter_view_test_impl.validateResults(original_view);
+
+     {
+        scatter_view_def persistent_view("persistent", n);
+        auto result_view = persistent_view.subview();
+        contribute(result_view, persistent_view);
+        Kokkos::fence();
+     }
+     }
+     //Test creation via constructor
+     {
+     orig_view_def original_view("original_view", n);
+     scatter_view_def scatter_view(original_view);
+
+     test_scatter_view_impl_cls<ExecSpace, Layout, duplication, contribution, op> scatter_view_test_impl(scatter_view);
+     scatter_view_test_impl.initialize(original_view);
+     scatter_view_test_impl.run_parallel(n);
+
+     Kokkos::Experimental::contribute(original_view, scatter_view);
+     scatter_view.reset_except(original_view);
+
+     scatter_view_test_impl.run_parallel(n);
+
+     Kokkos::Experimental::contribute(original_view, scatter_view);
+     Kokkos::fence();
+
+     scatter_view_test_impl.validateResults(original_view);
+
+     {
+        scatter_view_def persistent_view("persistent", n);
+        auto result_view = persistent_view.subview();
+        contribute(result_view, persistent_view);
+        Kokkos::fence();
+     }
+     }
+   }
+
+};
+
+
+template <typename ExecSpace, int ScatterType>
 struct TestDuplicatedScatterView {
   TestDuplicatedScatterView(int n) {
+    // ScatterSum test
     test_scatter_view_config<ExecSpace, Kokkos::LayoutRight,
       Kokkos::Experimental::ScatterDuplicated,
-      Kokkos::Experimental::ScatterNonAtomic>(n);
+      Kokkos::Experimental::ScatterNonAtomic,
+      ScatterType> test_sv_right_config;
+    test_sv_right_config.run_test(n);
+    test_scatter_view_config<ExecSpace, Kokkos::LayoutLeft,
+      Kokkos::Experimental::ScatterDuplicated,
+      Kokkos::Experimental::ScatterNonAtomic,
+      ScatterType> test_sv_left_config;
+    test_sv_left_config.run_test(n);
   }
 };
 
 #ifdef KOKKOS_ENABLE_CUDA
 // disable duplicated instantiation with CUDA until
 // UniqueToken can support it
-template <>
-struct TestDuplicatedScatterView<Kokkos::Cuda> {
+template <int ScatterType>
+struct TestDuplicatedScatterView<Kokkos::Cuda, ScatterType> {
   TestDuplicatedScatterView(int) {
   }
 };
@@ -129,14 +437,14 @@ struct TestDuplicatedScatterView<Kokkos::Cuda> {
 #ifdef KOKKOS_ENABLE_ROCM
 // disable duplicated instantiation with ROCm until
 // UniqueToken can support it
-template <>
-struct TestDuplicatedScatterView<Kokkos::Experimental::ROCm> {
+template <int ScatterType>
+struct TestDuplicatedScatterView<Kokkos::Experimental::ROCm, ScatterType> {
   TestDuplicatedScatterView(int) {
   }
 };
 #endif
 
-template <typename ExecSpace>
+template <typename ExecSpace, int ScatterType>
 void test_scatter_view(int n)
 {
   // all of these configurations should compile okay, but only some of them are
@@ -149,29 +457,47 @@ void test_scatter_view(int n)
   if (unique_token.size() == 1) {
     test_scatter_view_config<ExecSpace, Kokkos::LayoutRight,
       Kokkos::Experimental::ScatterNonDuplicated,
-      Kokkos::Experimental::ScatterNonAtomic>(n);
+      Kokkos::Experimental::ScatterNonAtomic,
+      ScatterType> test_sv_config;
+    test_sv_config.run_test(n);
   }
 #ifdef KOKKOS_ENABLE_SERIAL
   if (!std::is_same<ExecSpace, Kokkos::Serial>::value) {
 #endif
   test_scatter_view_config<ExecSpace, Kokkos::LayoutRight,
     Kokkos::Experimental::ScatterNonDuplicated,
-    Kokkos::Experimental::ScatterAtomic>(n);
+    Kokkos::Experimental::ScatterAtomic,
+    ScatterType> test_sv_config;
+  test_sv_config.run_test(n);
 #ifdef KOKKOS_ENABLE_SERIAL
   }
 #endif
-
-  TestDuplicatedScatterView<ExecSpace> duptest(n);
+  // with hundreds of threads we were running out of memory.
+  // limit (n) so that duplication doesn't exceed 8GB
+  constexpr std::size_t maximum_allowed_total_bytes = 8ull * 1024ull * 1024ull * 1024ull;
+  std::size_t const maximum_allowed_copy_bytes = maximum_allowed_total_bytes / std::size_t(unique_token.size());
+  constexpr std::size_t bytes_per_value = sizeof(double) * 3;
+  std::size_t const maximum_allowed_copy_values = maximum_allowed_copy_bytes / bytes_per_value;
+  n = std::min(n, int(maximum_allowed_copy_values));
+  TestDuplicatedScatterView<ExecSpace, ScatterType> duptest(n);
 }
 
 TEST_F( TEST_CATEGORY, scatterview) {
 #ifndef KOKKOS_ENABLE_ROCM
-  test_scatter_view<TEST_EXECSPACE>(10);
+  test_scatter_view<TEST_EXECSPACE, Kokkos::Experimental::ScatterSum>(10);
+  test_scatter_view<TEST_EXECSPACE, Kokkos::Experimental::ScatterProd>(10);
+  test_scatter_view<TEST_EXECSPACE, Kokkos::Experimental::ScatterMin>(10);
+  test_scatter_view<TEST_EXECSPACE, Kokkos::Experimental::ScatterMax>(10);
+  // tests were timing out in DEBUG mode, reduce the amount of work
 #ifdef KOKKOS_ENABLE_DEBUG
-  test_scatter_view<TEST_EXECSPACE>(100000);
+  int big_n = 100 * 1000;
 #else
-  test_scatter_view<TEST_EXECSPACE>(10000000);
+  int big_n = 10 * 1000 * 1000;
 #endif
+  test_scatter_view<TEST_EXECSPACE,Kokkos::Experimental::ScatterSum>(big_n);
+  test_scatter_view<TEST_EXECSPACE,Kokkos::Experimental::ScatterProd>(big_n);
+  test_scatter_view<TEST_EXECSPACE,Kokkos::Experimental::ScatterMin>(big_n);
+  test_scatter_view<TEST_EXECSPACE,Kokkos::Experimental::ScatterMax>(big_n);
 #endif
 }
 
diff --git a/packages/kokkos/containers/unit_tests/TestUnorderedMap.hpp b/packages/kokkos/containers/unit_tests/TestUnorderedMap.hpp
index 426db1dbf0c0ec1eef6fe98c982aa4f3ab40ad4f..2d34267df308947f304e930f70e695370940a01b 100644
--- a/packages/kokkos/containers/unit_tests/TestUnorderedMap.hpp
+++ b/packages/kokkos/containers/unit_tests/TestUnorderedMap.hpp
@@ -69,7 +69,7 @@ struct TestInsert
 
   void testit( bool rehash_on_fail = true )
   {
-    execution_space::fence();
+    execution_space().fence();
 
     uint32_t failed_count = 0;
     do {
@@ -82,7 +82,7 @@ struct TestInsert
       }
     } while (rehash_on_fail && failed_count > 0u);
 
-    execution_space::fence();
+    execution_space().fence();
   }
 
 
@@ -122,9 +122,9 @@ struct TestInsert
 
     void testit()
     {
-      execution_space::fence();
+      execution_space().fence();
       Kokkos::parallel_for(m_num_erase, *this);
-      execution_space::fence();
+      execution_space().fence();
     }
 
     KOKKOS_INLINE_FUNCTION
@@ -161,9 +161,9 @@ struct TestInsert
 
     void testit(value_type &errors)
     {
-      execution_space::execution_space::fence();
+      execution_space().fence();
       Kokkos::parallel_reduce(m_map.capacity(), *this, errors);
-      execution_space::execution_space::fence();
+      execution_space().fence();
     }
 
     KOKKOS_INLINE_FUNCTION
@@ -247,7 +247,7 @@ void test_failed_insert( uint32_t num_nodes)
   map_type map(num_nodes);
   Impl::TestInsert<map_type> test_insert(map, 2u*num_nodes, 1u);
   test_insert.testit(false /*don't rehash on fail*/);
-  Device::execution_space::fence();
+  typename Device::execution_space().fence();
 
   EXPECT_TRUE( map.failed_insert() );
 }
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_BitSet.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_BitSet.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cec24e00c7d9d4d6c30a40c6ea19c87734930a05
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_BitSet.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestBitset.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_Category.hpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_Category.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..358b42d1aaaef441d40c957c06f4e92e2abbaffb
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_Category.hpp
@@ -0,0 +1,65 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_TEST_HPX_HPP
+#define KOKKOS_TEST_HPX_HPP
+
+#include <gtest/gtest.h>
+
+namespace Test {
+
+class hpx : public ::testing::Test {
+protected:
+  static void SetUpTestCase() {
+  }
+
+  static void TearDownTestCase() {
+  }
+};
+
+} // namespace Test
+
+#define TEST_CATEGORY hpx
+#define TEST_EXECSPACE Kokkos::Experimental::HPX
+
+#endif
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_DualView.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DualView.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..80af9dc33ad88b5b20321908cb2728a1d40344be
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DualView.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestDualView.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_generic.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_generic.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..95d49c8acf5d59c0290f63713df0eb402e61a2fb
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_generic.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestDynViewAPI_generic.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank12345.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank12345.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..72e0bc661635425b31a9efa088a5d357b5360cdc
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank12345.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestDynViewAPI_rank12345.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank67.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank67.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5a104f0de260a09212b7fbafd265d83558c848ea
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynRankViewAPI_rank67.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestDynViewAPI_rank67.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynamicView.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynamicView.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..718b322684c880cd5cc973752808f2a459fe3167
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_DynamicView.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestDynamicView.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_ErrorReporter.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_ErrorReporter.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ea819ae3438ba18c9ca94c03b0e5b69d17499759
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_ErrorReporter.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestErrorReporter.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_OffsetView.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_OffsetView.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4d3684923f2559a3bfa71b12fa506c3a94b21fb2
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_OffsetView.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestOffsetView.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_ScatterView.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_ScatterView.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6a871cc12131275a22db9e11dc4e02346a3911de
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_ScatterView.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestScatterView.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_StaticCrsGraph.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_StaticCrsGraph.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fbb70a762b2d80a5edce941b417e30abbf20709f
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_StaticCrsGraph.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestStaticCrsGraph.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_UnorderedMap.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_UnorderedMap.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7e7aad309fe38b0d57beb60d9ab53147361fd4d9
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_UnorderedMap.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestUnorderedMap.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_Vector.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_Vector.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5fb3664197f139928f8e102388493a87dcb72467
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_Vector.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestVector.hpp>
+
diff --git a/packages/kokkos/containers/unit_tests/hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp b/packages/kokkos/containers/unit_tests/hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fb9c263c8300c771061cb00de5341ffcec211a65
--- /dev/null
+++ b/packages/kokkos/containers/unit_tests/hpx/TestHPX_ViewCtorPropEmbeddedDim.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestViewCtorPropEmbeddedDim.hpp>
+
diff --git a/packages/kokkos/core/cmake/Dependencies.cmake b/packages/kokkos/core/cmake/Dependencies.cmake
index 8d9872725e59655f256a9e62bf3f706a79e80e59..9ad7660bdf675f00758ddbaf7ef5a0555946d5cc 100644
--- a/packages/kokkos/core/cmake/Dependencies.cmake
+++ b/packages/kokkos/core/cmake/Dependencies.cmake
@@ -1,5 +1,5 @@
 TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
-  LIB_OPTIONAL_TPLS Pthread CUDA HWLOC QTHREADS DLlib
+  LIB_OPTIONAL_TPLS Pthread CUDA HWLOC QTHREADS DLlib HPX
   TEST_OPTIONAL_TPLS CUSPARSE
   )
 
diff --git a/packages/kokkos/core/perf_test/CMakeLists.txt b/packages/kokkos/core/perf_test/CMakeLists.txt
index d9c0f8941381abc92f7052dcf8dee94f94290492..d92462a357cba28dc3a0ba5cb4f8e193e5b5348b 100644
--- a/packages/kokkos/core/perf_test/CMakeLists.txt
+++ b/packages/kokkos/core/perf_test/CMakeLists.txt
@@ -47,6 +47,7 @@ TRIBITS_ADD_EXECUTABLE(
   PerformanceTest_TaskDAG
   SOURCES test_taskdag.cpp
   COMM serial mpi
+  TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
   )
 
 TRIBITS_ADD_TEST(
diff --git a/packages/kokkos/core/perf_test/Makefile b/packages/kokkos/core/perf_test/Makefile
index a0ce1e2c3105e96c7ed6b007b13ab803887799c1..ca98ca6dded94d267cfa53c1c0cda61ddb83609c 100644
--- a/packages/kokkos/core/perf_test/Makefile
+++ b/packages/kokkos/core/perf_test/Makefile
@@ -30,6 +30,7 @@ TARGETS =
 #
 
 OBJ_PERF = PerfTestMain.o gtest-all.o
+OBJ_PERF += PerfTest_ExecSpacePartitioning.o
 OBJ_PERF += PerfTestGramSchmidt.o
 OBJ_PERF += PerfTestHexGrad.o
 OBJ_PERF += PerfTest_CustomReduction.o
diff --git a/packages/kokkos/core/perf_test/PerfTestBlasKernels.hpp b/packages/kokkos/core/perf_test/PerfTestBlasKernels.hpp
index bb2fb5fce5fa339efeea145cffc822fefd1b2055..ff9bf5a91b852326917829a1dc672af0b825b9d6 100644
--- a/packages/kokkos/core/perf_test/PerfTestBlasKernels.hpp
+++ b/packages/kokkos/core/perf_test/PerfTestBlasKernels.hpp
@@ -44,6 +44,8 @@
 #ifndef KOKKOS_BLAS_KERNELS_HPP
 #define KOKKOS_BLAS_KERNELS_HPP
 
+#include <type_traits>
+
 namespace Kokkos {
 
 template< class ConstVectorType ,
@@ -123,14 +125,9 @@ struct Dot
 {
   typedef typename Device::execution_space execution_space ;
 
-  typedef typename
-    Impl::StaticAssertSame< Impl::unsigned_< 1 > ,
-                            Impl::unsigned_< Type::Rank > >::type ok_rank ;
-
+  static_assert( static_cast<unsigned>(Type::Rank) == static_cast<unsigned>(1),
+    "Dot static_assert Fail: Rank != 1");
 
-/*  typedef typename
-    Impl::StaticAssertSame< execution_space ,
-                            typename Type::execution_space >::type ok_device ;*/
 
   typedef double value_type ;
 
@@ -164,13 +161,8 @@ struct DotSingle
 {
   typedef typename Device::execution_space execution_space ;
 
-  typedef typename
-    Impl::StaticAssertSame< Impl::unsigned_< 1 > ,
-                            Impl::unsigned_< Type::Rank > >::type ok_rank ;
-
-/*  typedef typename
-    Impl::StaticAssertSame< execution_space ,
-                            typename Type::execution_space >::type ok_device ;*/
+  static_assert( static_cast<unsigned>(Type::Rank) == static_cast<unsigned>(1),
+    "DotSingle static_assert Fail: Rank != 1");
 
   typedef double value_type ;
 
@@ -204,25 +196,11 @@ struct Scale
 {
   typedef typename Device::execution_space execution_space ;
 
-/*  typedef typename
-    Impl::StaticAssertSame< execution_space ,
-                            typename ScalarType::execution_space >::type
-      ok_scalar_device ;
-
-  typedef typename
-    Impl::StaticAssertSame< execution_space ,
-                            typename VectorType::execution_space >::type
-      ok_vector_device ;*/
+  static_assert( static_cast<unsigned>(ScalarType::Rank) == static_cast<unsigned>(0),
+    "Scale static_assert Fail: ScalarType::Rank != 0");
 
-  typedef typename
-    Impl::StaticAssertSame< Impl::unsigned_< 0 > ,
-                            Impl::unsigned_< ScalarType::Rank > >::type
-      ok_scalar_rank ;
-
-  typedef typename
-    Impl::StaticAssertSame< Impl::unsigned_< 1 > ,
-                            Impl::unsigned_< VectorType::Rank > >::type
-      ok_vector_rank ;
+  static_assert( static_cast<unsigned>(VectorType::Rank) == static_cast<unsigned>(1),
+    "Scale static_assert Fail: VectorType::Rank != 1");
 
 #if 1
   typename ScalarType::const_type alpha ;
@@ -251,35 +229,14 @@ struct AXPBY
 {
   typedef typename Device::execution_space execution_space ;
 
-/*  typedef typename
-    Impl::StaticAssertSame< execution_space ,
-                            typename ScalarType::execution_space >::type
-      ok_scalar_device ;
-
-  typedef typename
-    Impl::StaticAssertSame< execution_space ,
-                            typename ConstVectorType::execution_space >::type
-      ok_const_vector_device ;
-
-  typedef typename
-    Impl::StaticAssertSame< execution_space ,
-                            typename VectorType::execution_space >::type
-      ok_vector_device ;*/
-
-  typedef typename
-    Impl::StaticAssertSame< Impl::unsigned_< 0 > ,
-                            Impl::unsigned_< ScalarType::Rank > >::type
-      ok_scalar_rank ;
-
-  typedef typename
-    Impl::StaticAssertSame< Impl::unsigned_< 1 > ,
-                            Impl::unsigned_< ConstVectorType::Rank > >::type
-      ok_const_vector_rank ;
-
-  typedef typename
-    Impl::StaticAssertSame< Impl::unsigned_< 1 > ,
-                            Impl::unsigned_< VectorType::Rank > >::type
-      ok_vector_rank ;
+  static_assert( static_cast<unsigned>(ScalarType::Rank) == static_cast<unsigned>(0),
+    "AXPBY static_assert Fail: ScalarType::Rank != 0");
+
+  static_assert( static_cast<unsigned>(ConstVectorType::Rank) == static_cast<unsigned>(1),
+    "AXPBY static_assert Fail: ConstVectorType::Rank != 1");
+
+  static_assert( static_cast<unsigned>(VectorType::Rank) == static_cast<unsigned>(1),
+    "AXPBY static_assert Fail: VectorType::Rank != 1");
 
 #if 1
   typename ScalarType::const_type alpha , beta ;
diff --git a/packages/kokkos/core/perf_test/PerfTestGramSchmidt.cpp b/packages/kokkos/core/perf_test/PerfTestGramSchmidt.cpp
index b169b02903ed4589bace5f83ee880937bba328b8..d812b16d85eaec14430ce952616776e5483cfd10 100644
--- a/packages/kokkos/core/perf_test/PerfTestGramSchmidt.cpp
+++ b/packages/kokkos/core/perf_test/PerfTestGramSchmidt.cpp
@@ -183,7 +183,7 @@ struct ModifiedGramSchmidt
       }
     }
 
-    execution_space::fence();
+    execution_space().fence();
 
     return timer.seconds();
   }
diff --git a/packages/kokkos/core/perf_test/PerfTestHexGrad.cpp b/packages/kokkos/core/perf_test/PerfTestHexGrad.cpp
index b228dd2e2eb604cd7b23bb51282a248af75406dc..03285a375c40443c3a830c370a206f0f95d4ce20 100644
--- a/packages/kokkos/core/perf_test/PerfTestHexGrad.cpp
+++ b/packages/kokkos/core/perf_test/PerfTestHexGrad.cpp
@@ -253,12 +253,12 @@ struct HexGrad
     double dt_min = 0 ;
 
     Kokkos::parallel_for( count , Init( coord ) );
-    execution_space::fence();
+    execution_space().fence();
 
     for ( int i = 0 ; i < iter ; ++i ) {
       Kokkos::Timer timer ;
       Kokkos::parallel_for( count , HexGrad<execution_space>( coord , grad ) );
-      execution_space::fence();
+      execution_space().fence();
       const double dt = timer.seconds();
       if ( 0 == i ) dt_min = dt ;
       else dt_min = dt < dt_min ? dt : dt_min ;
diff --git a/packages/kokkos/core/perf_test/PerfTestMDRange.hpp b/packages/kokkos/core/perf_test/PerfTestMDRange.hpp
index 51affa6a2e240798fbc50e063f4df676f7ef4272..f433451f789265f8a41d91def0c51f42145921de 100644
--- a/packages/kokkos/core/perf_test/PerfTestMDRange.hpp
+++ b/packages/kokkos/core/perf_test/PerfTestMDRange.hpp
@@ -125,15 +125,15 @@ struct MultiDimRangePerf3D
       Kokkos::MDRangePolicy<Kokkos::Rank<3, iterate_type::Right, iterate_type::Right>, execution_space > policy(point_type{{0,0,0}},point_type{{icount,jcount,kcount}},tile_type{{Ti,Tj,Tk}} );
 
       Kokkos::parallel_for( policy_initA, Init(Atest, icount, jcount, kcount) );
-      execution_space::fence();
+      execution_space().fence();
       Kokkos::parallel_for( policy_initB, Init(Btest, icount+2, jcount+2, kcount+2) );
-      execution_space::fence();
+      execution_space().fence();
 
     for (int i = 0; i < iter; ++i)
     {
       Kokkos::Timer timer;
       Kokkos::parallel_for( policy, FunctorType(Atest, Btest, icount, jcount, kcount) );
-      execution_space::fence();
+      execution_space().fence();
       const double dt = timer.seconds();
       if ( 0 == i ) dt_min = dt ;
       else dt_min = dt < dt_min ? dt : dt_min ;
@@ -189,15 +189,15 @@ struct MultiDimRangePerf3D
       Kokkos::MDRangePolicy<Kokkos::Rank<3, iterate_type::Left, iterate_type::Left>, execution_space > policy({{0,0,0}},{{icount,jcount,kcount}},{{Ti,Tj,Tk}} ); 
 
       Kokkos::parallel_for( policy_initA, Init(Atest, icount, jcount, kcount) );
-      execution_space::fence();
+      execution_space().fence();
       Kokkos::parallel_for( policy_initB, Init(Btest, icount+2, jcount+2, kcount+2) );
-      execution_space::fence();
+      execution_space().fence();
 
     for (int i = 0; i < iter; ++i)
     {
       Kokkos::Timer timer;
       Kokkos::parallel_for( policy, FunctorType(Atest, Btest, icount, jcount, kcount) );
-      execution_space::fence();
+      execution_space().fence();
       const double dt = timer.seconds();
       if ( 0 == i ) dt_min = dt ;
       else dt_min = dt < dt_min ? dt : dt_min ;
@@ -368,15 +368,15 @@ struct RangePolicyCollapseTwo
     double dt_min = 0;
 
     Kokkos::parallel_for( policy, Init(Atest,icount,jcount,kcount) );
-    execution_space::fence();
+    execution_space().fence();
     Kokkos::parallel_for( policy_initB, Init(Btest,icount+2,jcount+2,kcount+2) );
-    execution_space::fence();
+    execution_space().fence();
 
     for (int i = 0; i < iter; ++i)
     {
       Kokkos::Timer timer;
       Kokkos::parallel_for(policy, FunctorType(Atest, Btest, icount, jcount, kcount));
-      execution_space::fence();
+      execution_space().fence();
       const double dt = timer.seconds();
       if ( 0 == i ) dt_min = dt ;
       else dt_min = dt < dt_min ? dt : dt_min ;
@@ -513,15 +513,15 @@ struct RangePolicyCollapseAll
     double dt_min = 0;
 
     Kokkos::parallel_for( policy, Init(Atest,icount,jcount,kcount) );
-    execution_space::fence();
+    execution_space().fence();
     Kokkos::parallel_for( policy_initB, Init(Btest,icount+2,jcount+2,kcount+2) );
-    execution_space::fence();
+    execution_space().fence();
 
     for (int i = 0; i < iter; ++i)
     {
       Kokkos::Timer timer;
       Kokkos::parallel_for(policy, FunctorType(Atest, Btest, icount, jcount, kcount));
-      execution_space::fence();
+      execution_space().fence();
       const double dt = timer.seconds();
       if ( 0 == i ) dt_min = dt ;
       else dt_min = dt < dt_min ? dt : dt_min ;
diff --git a/packages/kokkos/core/perf_test/PerfTest_ExecSpacePartitioning.cpp b/packages/kokkos/core/perf_test/PerfTest_ExecSpacePartitioning.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2fc889beedee31030e213dc5da3359c43cbe6b1f
--- /dev/null
+++ b/packages/kokkos/core/perf_test/PerfTest_ExecSpacePartitioning.cpp
@@ -0,0 +1,564 @@
+#include <Kokkos_Core.hpp>
+#include <gtest/gtest.h>
+#include <PerfTest_Category.hpp>
+
+
+namespace Test {
+
+namespace {
+  template<class ExecSpace>
+  struct SpaceInstance {
+    static ExecSpace create() {
+      return ExecSpace();
+    }
+    static void destroy(ExecSpace&) {
+    }
+    static bool overlap() {
+      return false;
+    }
+  };
+
+  #ifndef KOKKOS_ENABLE_DEBUG
+  #ifdef KOKKOS_ENABLE_CUDA
+  template<>
+  struct SpaceInstance<Kokkos::Cuda> {
+    static Kokkos::Cuda create() {
+      cudaStream_t stream;
+      cudaStreamCreate(&stream);
+      return Kokkos::Cuda(stream);
+    }
+    static void destroy(Kokkos::Cuda& space) {
+      cudaStream_t stream = space.cuda_stream();
+      cudaStreamDestroy(stream);
+    }
+    static bool overlap() {
+      bool value = true;
+      auto local_rank_str = std::getenv("CUDA_LAUNCH_BLOCKING");
+      if(local_rank_str) {
+        value = (std::atoi(local_rank_str)==0);
+      }
+      return value;
+    }
+  };
+  #endif
+  #endif
+}
+
+struct FunctorRange {
+  int M,R;
+  Kokkos::View<double**,TEST_EXECSPACE> a;
+  FunctorRange(int M_, int R_, Kokkos::View<double**,TEST_EXECSPACE> a_):M(M_),R(R_),a(a_){}
+  KOKKOS_INLINE_FUNCTION
+  void operator() (const int i) const {
+    for(int r=0;r<R;r++)
+    for(int j=0;j<M;j++) {
+      a(i,j)+=1.0;
+    }
+  }
+};
+
+struct FunctorMDRange {
+  int M,R;
+  Kokkos::View<double**,TEST_EXECSPACE> a;
+  FunctorMDRange(int M_, int R_, Kokkos::View<double**,TEST_EXECSPACE> a_):M(M_),R(R_),a(a_){}
+  KOKKOS_INLINE_FUNCTION
+  void operator() (const int i, const int) const {
+    for(int j=0;j<M;j++)
+      a(i,j)+=1.0;
+  }
+};
+
+struct FunctorTeam {
+  int M,R;
+  Kokkos::View<double**,Kokkos::LayoutRight,TEST_EXECSPACE> a;
+  FunctorTeam(int M_, int R_, Kokkos::View<double**,Kokkos::LayoutRight,TEST_EXECSPACE> a_):M(M_),R(R_),a(a_){}
+  KOKKOS_INLINE_FUNCTION
+  void operator() (const Kokkos::TeamPolicy<TEST_EXECSPACE>::member_type& team) const {
+    int i = team.league_rank();
+    for(int r=0;r<R;r++) {
+      Kokkos::parallel_for(Kokkos::TeamThreadRange(team,M), [&] (const int j) {
+        a(i,j)+=1.0;
+      });
+    }
+  }
+};
+
+struct FunctorRangeReduce {
+  int M,R;
+  Kokkos::View<double**,TEST_EXECSPACE> a;
+  FunctorRangeReduce(int M_, int R_, Kokkos::View<double**,TEST_EXECSPACE> a_):M(M_),R(R_),a(a_){}
+  KOKKOS_INLINE_FUNCTION
+  void operator() (const int i, double& tmp) const {
+    for(int r=0;r<R;r++)
+    for(int j=0;j<M;j++) {
+      tmp += a(i,j);
+    }
+  }
+};
+
+struct FunctorMDRangeReduce {
+  int M,R;
+  Kokkos::View<double**,TEST_EXECSPACE> a;
+  FunctorMDRangeReduce(int M_, int R_, Kokkos::View<double**,TEST_EXECSPACE> a_):M(M_),R(R_),a(a_){}
+  KOKKOS_INLINE_FUNCTION
+  void operator() (const int i, const int, double& tmp) const {
+    for(int j=0;j<M;j++)
+      tmp += a(i,j);
+  }
+};
+
+struct FunctorTeamReduce {
+  int M,R;
+  Kokkos::View<double**,Kokkos::LayoutRight,TEST_EXECSPACE> a;
+  FunctorTeamReduce(int M_, int R_, Kokkos::View<double**,Kokkos::LayoutRight,TEST_EXECSPACE> a_):M(M_),R(R_),a(a_){}
+  KOKKOS_INLINE_FUNCTION
+  void operator() (const Kokkos::TeamPolicy<TEST_EXECSPACE>::member_type& team, double& tmp) const {
+    int i = team.league_rank();
+    for(int r=0;r<R;r++) {
+      double val;
+      Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,M), [&] (const int j, double& tmp2) {
+        tmp2 += a(i,j);
+      },val);
+      tmp+=val;
+    }
+  }
+};
+
+TEST_F( default_exec, overlap_range_policy ) {
+  int N = 2000;
+   int M = 10000;
+   int R =  10;
+
+   TEST_EXECSPACE space;
+   TEST_EXECSPACE space1 = SpaceInstance<TEST_EXECSPACE>::create();
+   TEST_EXECSPACE space2 = SpaceInstance<TEST_EXECSPACE>::create();
+
+   Kokkos::View<double**,TEST_EXECSPACE> a("A",N,M);
+   FunctorRange f(M,R,a);
+   FunctorRangeReduce fr(M,R,a);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel0",
+       Kokkos::RangePolicy<TEST_EXECSPACE>(0,N), FunctorRange(M,R,a));
+
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel1",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space1,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel2",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space2,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+
+   Kokkos::Timer timer;
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel3",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel4",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+
+   timer.reset();
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel5",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space1,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , FunctorRange(M,R,a));
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel6",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space2,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , FunctorRange(M,R,a));
+   Kokkos::fence();
+   double time_overlap = timer.seconds();
+
+   timer.reset();
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel7",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel8",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+   double time_end = timer.seconds();
+
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE( (time_end > 1.5*time_overlap) );
+   }
+   printf("Time RangePolicy: NonOverlap: %lf Time Overlap: %lf\n",time_end,time_overlap);
+
+   Kokkos::View<double,TEST_EXECSPACE> result("result");
+   Kokkos::View<double,TEST_EXECSPACE> result1("result1");
+   Kokkos::View<double,TEST_EXECSPACE> result2("result2");
+   Kokkos::View<double,Kokkos::HostSpace> h_result("h_result");
+   Kokkos::View<double,Kokkos::HostSpace> h_result1("h_result1");
+   Kokkos::View<double,Kokkos::HostSpace> h_result2("h_result2");
+
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+   Kokkos::fence();
+   double time_fenced = timer.seconds();
+   Kokkos::deep_copy(h_result,result);
+   
+   timer.reset();  
+   Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);   
+   double time_not_fenced = timer.seconds();
+   Kokkos::fence();
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE(time_fenced>2.0*time_not_fenced);
+   }
+
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+   Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+  Kokkos::fence();
+  double time_no_overlapped_reduce = timer.seconds();
+
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space1,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result1);
+   Kokkos::parallel_reduce("default_exec::overlap_range_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::RangePolicy<TEST_EXECSPACE>(space2,0,N),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result2);
+  Kokkos::fence();
+  double time_overlapped_reduce = timer.seconds();
+
+  Kokkos::deep_copy(h_result2,result2);
+  Kokkos::deep_copy(h_result1,result1);
+
+  ASSERT_EQ(h_result1(),h_result()); 
+  ASSERT_EQ(h_result2(),h_result()); 
+
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE(time_overlapped_reduce < 1.5*time_no_overlapped_reduce);
+   }
+   printf("Time RangePolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n",time_no_overlapped_reduce,time_overlapped_reduce);
+   SpaceInstance<TEST_EXECSPACE>::destroy(space1);
+   SpaceInstance<TEST_EXECSPACE>::destroy(space2);
+}
+
+TEST_F( default_exec, overlap_mdrange_policy ) {
+   int N = 200;
+   int M = 10000;
+   int R =  10;
+
+   TEST_EXECSPACE space;
+   TEST_EXECSPACE space1 = SpaceInstance<TEST_EXECSPACE>::create();
+   TEST_EXECSPACE space2 = SpaceInstance<TEST_EXECSPACE>::create();
+
+   Kokkos::View<double**,TEST_EXECSPACE> a("A",N,M);
+   FunctorMDRange f(M,R,a);
+   FunctorMDRangeReduce fr(M,R,a);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel0",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>({0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , FunctorMDRange(M,R,a));
+
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel1",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space1,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel2",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space2,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+
+   Kokkos::Timer timer;
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel3",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel4",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+
+   timer.reset();
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel5",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space1,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , FunctorMDRange(M,R,a));
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel6",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space2,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , FunctorMDRange(M,R,a));
+   Kokkos::fence();
+   double time_overlap = timer.seconds();
+
+   timer.reset();
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel7",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel8",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+   double time_end = timer.seconds();
+
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE( (time_end > 1.5*time_overlap) );
+   }
+   printf("Time MDRangePolicy: NonOverlap: %lf Time Overlap: %lf\n",time_end,time_overlap);
+
+   Kokkos::View<double,TEST_EXECSPACE> result("result");
+   Kokkos::View<double,TEST_EXECSPACE> result1("result1");
+   Kokkos::View<double,TEST_EXECSPACE> result2("result2");
+   Kokkos::View<double,Kokkos::HostSpace> h_result("h_result");
+   Kokkos::View<double,Kokkos::HostSpace> h_result1("h_result1");
+   Kokkos::View<double,Kokkos::HostSpace> h_result2("h_result2");
+
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+   Kokkos::fence();
+   double time_fenced = timer.seconds();
+   Kokkos::deep_copy(h_result,result);
+   
+   timer.reset();  
+   Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);   
+   double time_not_fenced = timer.seconds();
+   Kokkos::fence();
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE(time_fenced>2.0*time_not_fenced);
+   }
+
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+   Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+  Kokkos::fence();
+  double time_no_overlapped_reduce = timer.seconds();
+
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space1,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result1);
+   Kokkos::parallel_reduce("default_exec::overlap_mdrange_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::MDRangePolicy<TEST_EXECSPACE,Kokkos::Rank<2>>(space2,{0,0},{N,R}),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result2);
+  Kokkos::fence();
+  double time_overlapped_reduce = timer.seconds();
+
+  Kokkos::deep_copy(h_result2,result2);
+  Kokkos::deep_copy(h_result1,result1);
+
+  ASSERT_EQ(h_result1(),h_result()); 
+  ASSERT_EQ(h_result2(),h_result()); 
+
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE(time_overlapped_reduce < 1.5*time_no_overlapped_reduce);
+   }
+   printf("Time MDRangePolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n",time_no_overlapped_reduce,time_overlapped_reduce);
+   SpaceInstance<TEST_EXECSPACE>::destroy(space2);
+   SpaceInstance<TEST_EXECSPACE>::destroy(space1);
+
+}
+
+TEST_F( default_exec, overlap_team_policy ) {
+  int N = 20;
+   int M = 1000000;
+   int R =  10;
+
+   TEST_EXECSPACE space;
+   TEST_EXECSPACE space1 = SpaceInstance<TEST_EXECSPACE>::create();
+   TEST_EXECSPACE space2 = SpaceInstance<TEST_EXECSPACE>::create();
+
+   Kokkos::View<double**,Kokkos::LayoutRight,TEST_EXECSPACE> a("A",N,M);
+   FunctorTeam f(M,R,a);
+   FunctorTeamReduce fr(M,R,a);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel0",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , FunctorTeam(M,R,a));
+
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel1",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space1,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel2",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space2,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+
+   Kokkos::Timer timer;
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel3",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel4",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+
+   timer.reset();
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel5",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space1,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , FunctorTeam(M,R,a));
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel6",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space2,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , FunctorTeam(M,R,a));
+   Kokkos::fence();
+   double time_overlap = timer.seconds();
+
+   timer.reset();
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel7",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::parallel_for("default_exec::overlap_range_policy::kernel8",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , f);
+   Kokkos::fence();
+   double time_end = timer.seconds();
+
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE( (time_end > 1.5*time_overlap) );
+   }
+   printf("Time TeamPolicy: NonOverlap: %lf Time Overlap: %lf\n",time_end,time_overlap);
+
+   Kokkos::View<double,TEST_EXECSPACE> result("result");
+   Kokkos::View<double,TEST_EXECSPACE> result1("result1");
+   Kokkos::View<double,TEST_EXECSPACE> result2("result2");
+   Kokkos::View<double,Kokkos::HostSpace> h_result("h_result");
+   Kokkos::View<double,Kokkos::HostSpace> h_result1("h_result1");
+   Kokkos::View<double,Kokkos::HostSpace> h_result2("h_result2");
+
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+   Kokkos::fence();
+   double time_fenced = timer.seconds();
+   Kokkos::deep_copy(h_result,result);
+   
+   timer.reset();  
+   Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);   
+   double time_not_fenced = timer.seconds();
+   Kokkos::fence();
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE(time_fenced>2.0*time_not_fenced);
+   }
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+   Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result);
+  Kokkos::fence();
+  double time_no_overlapped_reduce = timer.seconds();
+
+   timer.reset();
+   Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space1,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result1);
+   Kokkos::parallel_reduce("default_exec::overlap_team_policy::kernel_reduce",
+       Kokkos::Experimental::require(
+           Kokkos::TeamPolicy<TEST_EXECSPACE>(space2,N,Kokkos::AUTO),
+           Kokkos::Experimental::WorkItemProperty::HintLightWeight)
+       , fr, result2);
+  Kokkos::fence();
+  double time_overlapped_reduce = timer.seconds();
+
+  Kokkos::deep_copy(h_result2,result2);
+  Kokkos::deep_copy(h_result1,result1);
+
+  ASSERT_EQ(h_result1(),h_result()); 
+  ASSERT_EQ(h_result2(),h_result()); 
+
+   if(SpaceInstance<TEST_EXECSPACE>::overlap()) {
+     ASSERT_TRUE(time_overlapped_reduce < 1.5*time_no_overlapped_reduce);
+   }
+   printf("Time TeamPolicy Reduce: NonOverlap: %lf Time Overlap: %lf\n",time_no_overlapped_reduce,time_overlapped_reduce);
+   SpaceInstance<TEST_EXECSPACE>::destroy(space1);
+   SpaceInstance<TEST_EXECSPACE>::destroy(space2);
+}
+}
diff --git a/packages/kokkos/core/perf_test/PerfTest_ViewAllocate.cpp b/packages/kokkos/core/perf_test/PerfTest_ViewAllocate.cpp
index 7d64591d9fadd45e8a876b9fc70a006e53ef0762..685194c15018a4ef4b3126a3645873ca968a8a44 100644
--- a/packages/kokkos/core/perf_test/PerfTest_ViewAllocate.cpp
+++ b/packages/kokkos/core/perf_test/PerfTest_ViewAllocate.cpp
@@ -121,6 +121,7 @@ void run_allocateview_tests(int N, int R) {
       Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) {
         a_ptr[i] = 0.0;
       });
+      Kokkos::fence();
       Kokkos::kokkos_free(a_ptr);
     }
     time_raw = timer.seconds()/R;
diff --git a/packages/kokkos/core/perf_test/PerfTest_ViewCopy.hpp b/packages/kokkos/core/perf_test/PerfTest_ViewCopy.hpp
index 3f46187957e2e7c8ce30c552b81af85ff28bd201..eff31c69bb68c1539dc5a9d8d8c06e20bc8cd1fb 100644
--- a/packages/kokkos/core/perf_test/PerfTest_ViewCopy.hpp
+++ b/packages/kokkos/core/perf_test/PerfTest_ViewCopy.hpp
@@ -95,6 +95,7 @@ void run_deepcopyview_tests123(int N, int R) {
         a_ptr[i] = b_ptr[i];
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -135,6 +136,7 @@ void run_deepcopyview_tests45(int N, int R) {
         a_ptr[i] = b_ptr[i];
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -169,6 +171,7 @@ void run_deepcopyview_tests6(int N, int R) {
         a_ptr[i] = b_ptr[i];
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -202,6 +205,7 @@ void run_deepcopyview_tests7(int N, int R) {
         a_ptr[i] = b_ptr[i];
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -235,6 +239,7 @@ void run_deepcopyview_tests8(int N, int R) {
         a_ptr[i] = b_ptr[i];
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
diff --git a/packages/kokkos/core/perf_test/PerfTest_ViewFill.hpp b/packages/kokkos/core/perf_test/PerfTest_ViewFill.hpp
index c50d13d1ed16d581342abb47a33971337ac2b584..b17356f0c85969dc8fb202183cb2dfb1a823e030 100644
--- a/packages/kokkos/core/perf_test/PerfTest_ViewFill.hpp
+++ b/packages/kokkos/core/perf_test/PerfTest_ViewFill.hpp
@@ -90,6 +90,7 @@ void run_fillview_tests123(int N, int R) {
         a_ptr[i] = 1.1;
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -126,6 +127,7 @@ void run_fillview_tests45(int N, int R) {
         a_ptr[i] = 1.1;
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -157,6 +159,7 @@ void run_fillview_tests6(int N, int R) {
         a_ptr[i] = 1.1;
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -187,6 +190,7 @@ void run_fillview_tests7(int N, int R) {
         a_ptr[i] = 1.1;
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -217,6 +221,7 @@ void run_fillview_tests8(int N, int R) {
         a_ptr[i] = 1.1;
       });
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
diff --git a/packages/kokkos/core/perf_test/PerfTest_ViewResize.hpp b/packages/kokkos/core/perf_test/PerfTest_ViewResize.hpp
index 2720f4855c8fc0a5443c9851ddc137465b00fd53..b5019b467a3d3c62309bfb871ad2cf43b4658e5e 100644
--- a/packages/kokkos/core/perf_test/PerfTest_ViewResize.hpp
+++ b/packages/kokkos/core/perf_test/PerfTest_ViewResize.hpp
@@ -95,7 +95,9 @@ void run_resizeview_tests123(int N, int R) {
       Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) {
         a1_ptr[i] = a_ptr[i];
       });
+      Kokkos::fence();
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -143,7 +145,9 @@ void run_resizeview_tests45(int N, int R) {
       Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) {
         a1_ptr[i] = a_ptr[i];
       });
+      Kokkos::fence();
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -181,7 +185,9 @@ void run_resizeview_tests6(int N, int R) {
       Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) {
         a1_ptr[i] = a_ptr[i];
       });
+      Kokkos::fence();
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -218,7 +224,9 @@ void run_resizeview_tests7(int N, int R) {
       Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) {
         a1_ptr[i] = a_ptr[i];
       });
+      Kokkos::fence();
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
@@ -255,7 +263,9 @@ void run_resizeview_tests8(int N, int R) {
       Kokkos::parallel_for(N8, KOKKOS_LAMBDA (const int& i) {
         a1_ptr[i] = a_ptr[i];
       });
+      Kokkos::fence();
     }
+    Kokkos::fence();
     time_raw = timer.seconds()/R;
   }
   #endif
diff --git a/packages/kokkos/core/perf_test/test_atomic.cpp b/packages/kokkos/core/perf_test/test_atomic.cpp
index 6bb22e4e301aa3ef190e17fb9f292f50bd8c3d69..24e4f015d3e65c58b07412ac0860be589de0a85c 100644
--- a/packages/kokkos/core/perf_test/test_atomic.cpp
+++ b/packages/kokkos/core/perf_test/test_atomic.cpp
@@ -69,7 +69,7 @@ typedef Kokkos::DefaultExecutionSpace exec_space;
 #define	WHITE		8
 
 void textcolor(int attr, int fg, int bg)
-{	char command[13];
+{	char command[40];
 
 	/* Command is the control command to the terminal */
 	sprintf(command, "%c[%d;%d;%dm", 0x1B, attr, fg + 30, bg + 40);
@@ -85,7 +85,7 @@ struct ZeroFunctor{
   typedef typename Kokkos::View<T,execution_space>::HostMirror h_type;
   type data;
   KOKKOS_INLINE_FUNCTION
-  void operator()(int i) const {
+  void operator()(int) const {
     data() = 0;
   }
 };
@@ -101,7 +101,7 @@ struct AddFunctor{
   type data;
 
   KOKKOS_INLINE_FUNCTION
-  void operator()(int i) const {
+  void operator()(int) const {
     Kokkos::atomic_fetch_add(&data(),(T)1);
   }
 };
@@ -113,12 +113,12 @@ T AddLoop(int loop) {
   typename ZeroFunctor<T,exec_space>::h_type h_data("HData");
   f_zero.data = data;
   Kokkos::parallel_for(1,f_zero);
-  exec_space::fence();
+  exec_space().fence();
 
   struct AddFunctor<T,exec_space> f_add;
   f_add.data = data;
   Kokkos::parallel_for(loop,f_add);
-  exec_space::fence();
+  exec_space().fence();
 
   Kokkos::deep_copy(h_data,data);
   T val = h_data();
@@ -132,7 +132,7 @@ struct AddNonAtomicFunctor{
   type data;
 
   KOKKOS_INLINE_FUNCTION
-  void operator()(int i) const {
+  void operator()(int) const {
     data()+=(T)1;
   }
 };
@@ -145,12 +145,12 @@ T AddLoopNonAtomic(int loop) {
 
   f_zero.data = data;
   Kokkos::parallel_for(1,f_zero);
-  exec_space::fence();
+  exec_space().fence();
 
   struct AddNonAtomicFunctor<T,exec_space> f_add;
   f_add.data = data;
   Kokkos::parallel_for(loop,f_add);
-  exec_space::fence();
+  exec_space().fence();
 
   Kokkos::deep_copy(h_data,data);
   T val = h_data();
@@ -178,7 +178,7 @@ struct CASFunctor{
   type data;
 
   KOKKOS_INLINE_FUNCTION
-  void operator()(int i) const {
+  void operator()(int) const {
 	  T old = data();
 	  T newval, assumed;
 	  do {
@@ -197,12 +197,12 @@ T CASLoop(int loop) {
   typename ZeroFunctor<T,exec_space>::h_type h_data("HData");
   f_zero.data = data;
   Kokkos::parallel_for(1,f_zero);
-  exec_space::fence();
+  exec_space().fence();
 
   struct CASFunctor<T,exec_space> f_cas;
   f_cas.data = data;
   Kokkos::parallel_for(loop,f_cas);
-  exec_space::fence();
+  exec_space().fence();
 
   Kokkos::deep_copy(h_data,data);
   T val = h_data();
@@ -217,7 +217,7 @@ struct CASNonAtomicFunctor{
   type data;
 
   KOKKOS_INLINE_FUNCTION
-  void operator()(int i) const {
+  void operator()(int) const {
 	  volatile T assumed;
 	  volatile T newval;
 	  bool fail=1;
@@ -240,12 +240,12 @@ T CASLoopNonAtomic(int loop) {
   typename ZeroFunctor<T,exec_space>::h_type h_data("HData");
   f_zero.data = data;
   Kokkos::parallel_for(1,f_zero);
-  exec_space::fence();
+  exec_space().fence();
 
   struct CASNonAtomicFunctor<T,exec_space> f_cas;
   f_cas.data = data;
   Kokkos::parallel_for(loop,f_cas);
-  exec_space::fence();
+  exec_space().fence();
 
   Kokkos::deep_copy(h_data,data);
   T val = h_data();
@@ -296,19 +296,19 @@ T ExchLoop(int loop) {
   typename ZeroFunctor<T,exec_space>::h_type h_data("HData");
   f_zero.data = data;
   Kokkos::parallel_for(1,f_zero);
-  exec_space::fence();
+  exec_space().fence();
 
   typename ZeroFunctor<T,exec_space>::type data2("Data");
   typename ZeroFunctor<T,exec_space>::h_type h_data2("HData");
   f_zero.data = data2;
   Kokkos::parallel_for(1,f_zero);
-  exec_space::fence();
+  exec_space().fence();
 
   struct ExchFunctor<T,exec_space> f_exch;
   f_exch.data = data;
   f_exch.data2 = data2;
   Kokkos::parallel_for(loop,f_exch);
-  exec_space::fence();
+  exec_space().fence();
 
   Kokkos::deep_copy(h_data,data);
   Kokkos::deep_copy(h_data2,data2);
@@ -339,19 +339,19 @@ T ExchLoopNonAtomic(int loop) {
   typename ZeroFunctor<T,exec_space>::h_type h_data("HData");
   f_zero.data = data;
   Kokkos::parallel_for(1,f_zero);
-  exec_space::fence();
+  exec_space().fence();
 
   typename ZeroFunctor<T,exec_space>::type data2("Data");
   typename ZeroFunctor<T,exec_space>::h_type h_data2("HData");
   f_zero.data = data2;
   Kokkos::parallel_for(1,f_zero);
-  exec_space::fence();
+  exec_space().fence();
 
   struct ExchNonAtomicFunctor<T,exec_space> f_exch;
   f_exch.data = data;
   f_exch.data2 = data2;
   Kokkos::parallel_for(loop,f_exch);
-  exec_space::fence();
+  exec_space().fence();
 
   Kokkos::deep_copy(h_data,data);
   Kokkos::deep_copy(h_data2,data2);
diff --git a/packages/kokkos/core/perf_test/test_mempool.cpp b/packages/kokkos/core/perf_test/test_mempool.cpp
index 9fd58eda9145fd327b4fbf21e951b9bc9a9ad868..c47730ec69746143cb4dc7c6b8f510984c306217 100644
--- a/packages/kokkos/core/perf_test/test_mempool.cpp
+++ b/packages/kokkos/core/perf_test/test_mempool.cpp
@@ -153,6 +153,7 @@ struct TestFunctor {
       typedef Kokkos::RangePolicy< ExecSpace , TagDel > policy ;
 
       Kokkos::parallel_for( policy(0,range_iter), *this );
+      Kokkos::fence();
     }
 
   //----------------------------------------
diff --git a/packages/kokkos/core/perf_test/test_taskdag.cpp b/packages/kokkos/core/perf_test/test_taskdag.cpp
index 8d5e1c475f1751e9371980db3722e7bc9d13df30..41198edfe156274eb3a89be9fe0b3dd132b37a04 100644
--- a/packages/kokkos/core/perf_test/test_taskdag.cpp
+++ b/packages/kokkos/core/perf_test/test_taskdag.cpp
@@ -92,27 +92,26 @@ long fib_alloc_count( long n )
   return count[ n & mask ];
 }
 
-template< class Space >
+template< class Scheduler >
 struct TestFib {
 
-  using Scheduler   = Kokkos::TaskScheduler< Space > ;
   using MemorySpace = typename Scheduler::memory_space ;
   using MemberType  = typename Scheduler::member_type ;
-  using FutureType  = Kokkos::Future< long , Space > ;
+  using FutureType  = Kokkos::BasicFuture< long , Scheduler > ;
 
   typedef long value_type ;
 
-  Scheduler  sched ;
   FutureType dep[2] ;
   const value_type n ;
 
   KOKKOS_INLINE_FUNCTION
-  TestFib( const Scheduler & arg_sched , const value_type arg_n )
-    : sched( arg_sched ), dep{} , n( arg_n ) {}
+  TestFib( const value_type arg_n )
+    : dep{} , n( arg_n ) {}
 
   KOKKOS_INLINE_FUNCTION
-  void operator()( const MemberType & , value_type & result ) noexcept
+  void operator()( MemberType & member, value_type & result ) noexcept
     {
+      auto& sched = member.scheduler();
       if ( n < 2 ) {
         result = n ;
       }
@@ -126,13 +125,13 @@ struct TestFib {
 
         dep[1] = Kokkos::task_spawn
           ( Kokkos::TaskSingle( sched, Kokkos::TaskPriority::High )
-          , TestFib( sched, n - 2 ) );
+          , TestFib( n - 2 ) );
 
         dep[0] = Kokkos::task_spawn
           ( Kokkos::TaskSingle( sched )
-          , TestFib( sched, n - 1 ) );
+          , TestFib( n - 1 ) );
 
-        Kokkos::Future< ExecSpace > fib_all = Kokkos::when_all( dep, 2 );
+        auto fib_all = sched.when_all( dep, 2 );
 
         if ( ! dep[0].is_null() && ! dep[1].is_null() && ! fib_all.is_null() ) {
           // High priority to retire this branch.
@@ -202,13 +201,15 @@ int main( int argc , char* argv[] )
     return -1;
   }
 
-  typedef TestFib< ExecSpace >  Functor ;
+  using Scheduler = Kokkos::TaskSchedulerMultiple<ExecSpace>;
+
+  typedef TestFib< Scheduler >  Functor ;
 
   Kokkos::initialize(argc,argv);
 
   {
 
-    Functor::Scheduler sched( Functor::MemorySpace()
+    Scheduler sched( Functor::MemorySpace()
                             , total_alloc_size
                             , min_block_size
                             , max_block_size
@@ -217,21 +218,21 @@ int main( int argc , char* argv[] )
 
     Functor::FutureType f =
       Kokkos::host_spawn( Kokkos::TaskSingle( sched )
-                        , Functor( sched , fib_input )
+                        , Functor( fib_input )
                         );
 
     Kokkos::wait( sched );
 
     test_result = f.get();
 
-    task_count_max   = sched.allocated_task_count_max();
-    task_count_accum = sched.allocated_task_count_accum();
+    //task_count_max   = sched.allocated_task_count_max();
+    //task_count_accum = sched.allocated_task_count_accum();
 
-    if ( number_alloc != task_count_accum ) {
-      std::cout << " number_alloc( " << number_alloc << " )"
-                << " != task_count_accum( " << task_count_accum << " )"
-                << std::endl ;
-    }
+    //if ( number_alloc != task_count_accum ) {
+    //  std::cout << " number_alloc( " << number_alloc << " )"
+    //            << " != task_count_accum( " << task_count_accum << " )"
+    //            << std::endl ;
+    //}
 
     if ( fib_output != test_result ) {
       std::cout << " answer( " << fib_output << " )"
@@ -239,7 +240,7 @@ int main( int argc , char* argv[] )
                 << std::endl ;
     }
 
-    if ( fib_output != test_result || number_alloc != task_count_accum ) {
+    if ( fib_output != test_result) { // || number_alloc != task_count_accum ) {
       printf("  TEST FAILED\n");
       return -1;
     }
@@ -252,7 +253,7 @@ int main( int argc , char* argv[] )
 
       Functor::FutureType ftmp =
         Kokkos::host_spawn( Kokkos::TaskSingle( sched )
-                          , Functor( sched , fib_input )
+                          , Functor( fib_input )
                           );
 
       Kokkos::wait( sched );
diff --git a/packages/kokkos/core/src/CMakeLists.txt b/packages/kokkos/core/src/CMakeLists.txt
index ab7f3f55c72be040aad805a30aaaf58a14e5636d..a941c5da0c390754a1e47cd4d38c0d142861ca86 100644
--- a/packages/kokkos/core/src/CMakeLists.txt
+++ b/packages/kokkos/core/src/CMakeLists.txt
@@ -61,6 +61,16 @@ IF(KOKKOS_LEGACY_TRIBITS)
 
   #-----------------------------------------------------------------------------
 
+  FILE(GLOB HEADERS_HPX HPX/*.hpp)
+  FILE(GLOB SOURCES_HPX HPX/*.cpp)
+
+  LIST(APPEND HEADERS_PRIVATE ${HEADERS_HPX} )
+  LIST(APPEND SOURCES         ${SOURCES_HPX} )
+
+  INSTALL(FILES ${HEADERS_HPX} DESTINATION ${TRILINOS_INCDIR}/HPX/)
+
+  #-----------------------------------------------------------------------------
+
   FILE(GLOB HEADERS_CUDA Cuda/*.hpp)
   FILE(GLOB SOURCES_CUDA Cuda/*.cpp)
 
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp b/packages/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp
deleted file mode 100644
index c31b7f5b5dcfb35687d331d8a53af26021e9f0d7..0000000000000000000000000000000000000000
--- a/packages/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
-//@HEADER
-// ************************************************************************
-//
-//                        Kokkos v. 2.0
-//              Copyright (2014) Sandia Corporation
-//
-// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
-// the U.S. Government retains certain rights in this software.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// 3. Neither the name of the Corporation nor the names of the
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
-// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
-// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
-//
-// ************************************************************************
-//@HEADER
-*/
-
-#ifndef KOKKOS_CUDAEXEC_HPP
-#define KOKKOS_CUDAEXEC_HPP
-
-#include <Kokkos_Macros.hpp>
-#ifdef KOKKOS_ENABLE_CUDA
-
-#include <string>
-#include <cstdint>
-#include <Kokkos_Parallel.hpp>
-#include <impl/Kokkos_Error.hpp>
-#include <Cuda/Kokkos_Cuda_abort.hpp>
-#include <Cuda/Kokkos_Cuda_Error.hpp>
-#include <Cuda/Kokkos_Cuda_Locks.hpp>
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-namespace Kokkos {
-namespace Impl {
-
-struct CudaTraits {
-  enum { WarpSize       = 32      /* 0x0020 */ };
-  enum { WarpIndexMask  = 0x001f  /* Mask for warpindex */ };
-  enum { WarpIndexShift = 5       /* WarpSize == 1 << WarpShift */ };
-
-  enum { SharedMemoryBanks    = 32      /* Compute device 2.0 */ };
-  enum { SharedMemoryCapacity = 0x0C000 /* 48k shared / 16k L1 Cache */ };
-  enum { SharedMemoryUsage    = 0x04000 /* 16k shared / 48k L1 Cache */ };
-
-  enum { UpperBoundGridCount    = 65535 /* Hard upper bound */ };
-  enum { ConstantMemoryCapacity = 0x010000 /* 64k bytes */ };
-  enum { ConstantMemoryUsage    = 0x008000 /* 32k bytes */ };
-  enum { ConstantMemoryCache    = 0x002000 /*  8k bytes */ };
-
-  typedef unsigned long
-    ConstantGlobalBufferType[ ConstantMemoryUsage / sizeof(unsigned long) ];
-
-  enum { ConstantMemoryUseThreshold = 0x000200 /* 512 bytes */ };
-
-  KOKKOS_INLINE_FUNCTION static
-  CudaSpace::size_type warp_count( CudaSpace::size_type i )
-    { return ( i + WarpIndexMask ) >> WarpIndexShift ; }
-
-  KOKKOS_INLINE_FUNCTION static
-  CudaSpace::size_type warp_align( CudaSpace::size_type i )
-    {
-      enum { Mask = ~CudaSpace::size_type( WarpIndexMask ) };
-      return ( i + WarpIndexMask ) & Mask ;
-    }
-};
-
-//----------------------------------------------------------------------------
-
-CudaSpace::size_type cuda_internal_multiprocessor_count();
-CudaSpace::size_type cuda_internal_maximum_warp_count();
-CudaSpace::size_type cuda_internal_maximum_grid_count();
-CudaSpace::size_type cuda_internal_maximum_shared_words();
-
-CudaSpace::size_type cuda_internal_maximum_concurrent_block_count();
-
-CudaSpace::size_type * cuda_internal_scratch_flags( const CudaSpace::size_type size );
-CudaSpace::size_type * cuda_internal_scratch_space( const CudaSpace::size_type size );
-CudaSpace::size_type * cuda_internal_scratch_unified( const CudaSpace::size_type size );
-
-} // namespace Impl
-} // namespace Kokkos
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-#if defined( __CUDACC__ )
-
-/** \brief  Access to constant memory on the device */
-#ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE
-
-__device__ __constant__
-extern unsigned long kokkos_impl_cuda_constant_memory_buffer[] ;
-
-#else
-
-__device__ __constant__
-unsigned long kokkos_impl_cuda_constant_memory_buffer[ Kokkos::Impl::CudaTraits::ConstantMemoryUsage / sizeof(unsigned long) ] ;
-
-#endif
-
-namespace Kokkos {
-namespace Impl {
-  void* cuda_resize_scratch_space(std::int64_t bytes, bool force_shrink = false);
-}
-}
-
-template< typename T >
-inline
-__device__
-T * kokkos_impl_cuda_shared_memory()
-{ extern __shared__ Kokkos::CudaSpace::size_type sh[]; return (T*) sh ; }
-
-namespace Kokkos {
-namespace Impl {
-
-//----------------------------------------------------------------------------
-// See section B.17 of Cuda C Programming Guide Version 3.2
-// for discussion of
-//   __launch_bounds__(maxThreadsPerBlock,minBlocksPerMultiprocessor)
-// function qualifier which could be used to improve performance.
-//----------------------------------------------------------------------------
-// Maximize L1 cache and minimize shared memory:
-//   cudaFuncSetCacheConfig(MyKernel, cudaFuncCachePreferL1 );
-// For 2.0 capability: 48 KB L1 and 16 KB shared
-//----------------------------------------------------------------------------
-
-template< class DriverType>
-__global__
-static void cuda_parallel_launch_constant_memory()
-{
-  const DriverType & driver =
-    *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer );
-
-  driver();
-}
-
-template< class DriverType, unsigned int maxTperB, unsigned int minBperSM >
-__global__
-__launch_bounds__(maxTperB, minBperSM)
-static void cuda_parallel_launch_constant_memory()
-{
-  const DriverType & driver =
-    *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer );
-
-  driver();
-}
-
-template< class DriverType>
-__global__
-static void cuda_parallel_launch_local_memory( const DriverType driver )
-{
-  driver();
-}
-
-template< class DriverType, unsigned int maxTperB, unsigned int minBperSM >
-__global__
-__launch_bounds__(maxTperB, minBperSM)
-static void cuda_parallel_launch_local_memory( const DriverType driver )
-{
-  driver();
-}
-
-template < class DriverType
-         , class LaunchBounds = Kokkos::LaunchBounds<>
-         , bool Large = ( CudaTraits::ConstantMemoryUseThreshold < sizeof(DriverType) ) >
-struct CudaParallelLaunch ;
-
-template < class DriverType
-         , unsigned int MaxThreadsPerBlock
-         , unsigned int MinBlocksPerSM >
-struct CudaParallelLaunch< DriverType
-                         , Kokkos::LaunchBounds< MaxThreadsPerBlock 
-                                               , MinBlocksPerSM >
-                         , true >
-{
-  inline
-  CudaParallelLaunch( const DriverType & driver
-                    , const dim3       & grid
-                    , const dim3       & block
-                    , const int          shmem
-                    , const cudaStream_t stream = 0 )
-  {
-    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
-
-      if ( sizeof( Kokkos::Impl::CudaTraits::ConstantGlobalBufferType ) <
-           sizeof( DriverType ) ) {
-        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: Functor is too large") );
-      }
-
-      // Fence before changing settings and copying closure
-      Kokkos::Cuda::fence();
-
-      if ( CudaTraits::SharedMemoryCapacity < shmem ) {
-        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
-      }
-      #ifndef KOKKOS_ARCH_KEPLER
-      // On Kepler the L1 has no benefit since it doesn't cache reads
-      else {
-        CUDA_SAFE_CALL(
-          cudaFuncSetCacheConfig
-            ( cuda_parallel_launch_constant_memory
-                < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
-            , ( shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
-            ) );
-      }
-      #endif
-
-      // Copy functor to constant memory on the device
-      cudaMemcpyToSymbol(
-        kokkos_impl_cuda_constant_memory_buffer, &driver, sizeof(DriverType) );
-
-      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
-
-      // Invoke the driver function on the device
-      cuda_parallel_launch_constant_memory
-        < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
-          <<< grid , block , shmem , stream >>>();
-
-#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
-      CUDA_SAFE_CALL( cudaGetLastError() );
-      Kokkos::Cuda::fence();
-#endif
-    }
-  }
-};
-
-template < class DriverType >
-struct CudaParallelLaunch< DriverType
-                         , Kokkos::LaunchBounds<>
-                         , true >
-{
-  inline
-  CudaParallelLaunch( const DriverType & driver
-                    , const dim3       & grid
-                    , const dim3       & block
-                    , const int          shmem
-                    , const cudaStream_t stream = 0 )
-  {
-    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
-
-      if ( sizeof( Kokkos::Impl::CudaTraits::ConstantGlobalBufferType ) <
-           sizeof( DriverType ) ) {
-        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: Functor is too large") );
-      }
-
-      // Fence before changing settings and copying closure
-      Kokkos::Cuda::fence();
-
-      if ( CudaTraits::SharedMemoryCapacity < shmem ) {
-        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
-      }
-      #ifndef KOKKOS_ARCH_KEPLER
-      // On Kepler the L1 has no benefit since it doesn't cache reads
-      else {
-        CUDA_SAFE_CALL(
-          cudaFuncSetCacheConfig
-            ( cuda_parallel_launch_constant_memory< DriverType >
-            , ( shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
-            ) );
-      }
-      #endif
-
-      // Copy functor to constant memory on the device
-      cudaMemcpyToSymbol(
-        kokkos_impl_cuda_constant_memory_buffer, &driver, sizeof(DriverType) );
-
-      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
-
-      // Invoke the driver function on the device
-      cuda_parallel_launch_constant_memory< DriverType >
-          <<< grid , block , shmem , stream >>>();
-
-#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
-      CUDA_SAFE_CALL( cudaGetLastError() );
-      Kokkos::Cuda::fence();
-#endif
-    }
-  }
-};
-
-template < class DriverType
-         , unsigned int MaxThreadsPerBlock
-         , unsigned int MinBlocksPerSM >
-struct CudaParallelLaunch< DriverType
-                         , Kokkos::LaunchBounds< MaxThreadsPerBlock 
-                                               , MinBlocksPerSM >
-                         , false >
-{
-  inline
-  CudaParallelLaunch( const DriverType & driver
-                    , const dim3       & grid
-                    , const dim3       & block
-                    , const int          shmem
-                    , const cudaStream_t stream = 0 )
-  {
-    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
-
-      if ( sizeof( Kokkos::Impl::CudaTraits::ConstantGlobalBufferType ) <
-           sizeof( DriverType ) ) {
-        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: Functor is too large") );
-      }
-
-      if ( CudaTraits::SharedMemoryCapacity < shmem ) {
-        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
-      }
-      #ifndef KOKKOS_ARCH_KEPLER
-      // On Kepler the L1 has no benefit since it doesn't cache reads
-      else {
-        CUDA_SAFE_CALL(
-          cudaFuncSetCacheConfig
-            ( cuda_parallel_launch_local_memory
-                < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
-            , ( shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
-            ) );
-      }
-      #endif
-
-      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
-
-      // Invoke the driver function on the device
-      cuda_parallel_launch_local_memory
-        < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
-          <<< grid , block , shmem , stream >>>( driver );
-
-#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
-      CUDA_SAFE_CALL( cudaGetLastError() );
-      Kokkos::Cuda::fence();
-#endif
-    }
-  }
-};
-
-template < class DriverType >
-struct CudaParallelLaunch< DriverType
-                         , Kokkos::LaunchBounds<>
-                         , false >
-{
-  inline
-  CudaParallelLaunch( const DriverType & driver
-                    , const dim3       & grid
-                    , const dim3       & block
-                    , const int          shmem
-                    , const cudaStream_t stream = 0 )
-  {
-    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
-
-      if ( sizeof( Kokkos::Impl::CudaTraits::ConstantGlobalBufferType ) <
-           sizeof( DriverType ) ) {
-        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: Functor is too large") );
-      }
-
-      if ( CudaTraits::SharedMemoryCapacity < shmem ) {
-        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
-      }
-      #ifndef KOKKOS_ARCH_KEPLER
-      // On Kepler the L1 has no benefit since it doesn't cache reads
-      else {
-        CUDA_SAFE_CALL(
-          cudaFuncSetCacheConfig
-            ( cuda_parallel_launch_local_memory< DriverType >
-            , ( shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
-            ) );
-      }
-      #endif
-
-      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
-
-      // Invoke the driver function on the device
-      cuda_parallel_launch_local_memory< DriverType >
-          <<< grid , block , shmem , stream >>>( driver );
-
-#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
-      CUDA_SAFE_CALL( cudaGetLastError() );
-      Kokkos::Cuda::fence();
-#endif
-    }
-  }
-};
-
-//----------------------------------------------------------------------------
-
-} // namespace Impl
-} // namespace Kokkos
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-#endif /* defined( __CUDACC__ ) */
-#endif /* defined( KOKKOS_ENABLE_CUDA ) */
-#endif /* #ifndef KOKKOS_CUDAEXEC_HPP */
-
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp b/packages/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp
index e13744e32790837c704903946eaddb5549c9dfde..4c9ed47085cc5a30b683d7c43fea75fc259cc89a 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp
@@ -55,7 +55,7 @@
 #include <Kokkos_Cuda.hpp>
 #include <Kokkos_CudaSpace.hpp>
 
-#include <Cuda/Kokkos_Cuda_Internal.hpp>
+//#include <Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp>
 #include <impl/Kokkos_Error.hpp>
 
 #if defined(KOKKOS_ENABLE_PROFILING)
@@ -183,7 +183,7 @@ void * CudaUVMSpace::allocate( const size_t arg_alloc_size ) const
 
   enum { max_uvm_allocations = 65536 };
 
-  Cuda::fence();
+  Cuda::impl_static_fence();
   if ( arg_alloc_size > 0 )
   {
     Kokkos::Impl::num_uvm_allocations++;
@@ -194,7 +194,7 @@ void * CudaUVMSpace::allocate( const size_t arg_alloc_size ) const
 
     CUDA_SAFE_CALL( cudaMallocManaged( &ptr, arg_alloc_size , cudaMemAttachGlobal ) );
   }
-  Cuda::fence();
+  Cuda::impl_static_fence();
 
   return ptr ;
 }
@@ -217,14 +217,14 @@ void CudaSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_all
 
 void CudaUVMSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_alloc_size */ ) const
 {
-  Cuda::fence();
+  Cuda::impl_static_fence();
   try {
     if ( arg_alloc_ptr != nullptr ) {
       Kokkos::Impl::num_uvm_allocations--;
       CUDA_SAFE_CALL( cudaFree( arg_alloc_ptr ) );
     }
   } catch(...) {}
-  Cuda::fence();
+  Cuda::impl_static_fence();
 }
 
 void CudaHostPinnedSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_alloc_size */ ) const
@@ -390,7 +390,7 @@ SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::
 {
   #if defined(KOKKOS_ENABLE_PROFILING)
   if(Kokkos::Profiling::profileLibraryLoaded()) {
-    Cuda::fence(); //Make sure I can access the label ...
+    Cuda::impl_static_fence(); //Make sure I can access the label ...
     Kokkos::Profiling::deallocateData(
       Kokkos::Profiling::SpaceHandle(Kokkos::CudaUVMSpace::name()),RecordBase::m_alloc_ptr->m_label,
       data(),size());
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..9d4bcbc8cf196f9e198c801f6d6df41d77d44c51
--- /dev/null
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp
@@ -0,0 +1,657 @@
+/*
+@HEADER
+================================================================================
+
+ORIGINAL LICENSE
+----------------
+
+Copyright (c) 2018, NVIDIA Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+================================================================================
+
+LICENSE ASSOCIATED WITH SUBSEQUENT MODIFICATIONS
+------------------------------------------------
+
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2019) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+@HEADER
+*/
+
+#include <Kokkos_Macros.hpp>
+#if defined(__CUDA_ARCH__) && defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+
+#include <cassert>
+
+#ifndef _SIMT_DETAILS_CONFIG
+#define _SIMT_DETAILS_CONFIG
+
+namespace Kokkos {
+namespace Impl {
+
+
+#ifndef __simt_scope
+// Modification: Kokkos GPU atomics should default to `gpu` scope
+#define __simt_scope "gpu"
+#endif
+
+#define __simt_fence_signal_() asm volatile("":::"memory")
+#define __simt_fence_sc_() asm volatile("fence.sc." __simt_scope ";":::"memory")
+#define __simt_fence_() asm volatile("fence." __simt_scope ";":::"memory")
+
+#define __simt_load_acquire_8_as_32(ptr,ret) asm volatile("ld.acquire." __simt_scope ".b8 %0, [%1];" : "=r"(ret) : "l"(ptr) : "memory")
+#define __simt_load_relaxed_8_as_32(ptr,ret) asm volatile("ld.relaxed." __simt_scope ".b8 %0, [%1];" : "=r"(ret) : "l"(ptr) : "memory")
+#define __simt_store_release_8_as_32(ptr,desired) asm volatile("st.release." __simt_scope ".b8 [%0], %1;" :: "l"(ptr), "r"(desired) : "memory")
+#define __simt_store_relaxed_8_as_32(ptr,desired) asm volatile("st.relaxed." __simt_scope ".b8 [%0], %1;" :: "l"(ptr), "r"(desired) : "memory")
+
+#define __simt_load_acquire_16(ptr,ret) asm volatile("ld.acquire." __simt_scope ".b16 %0, [%1];" : "=h"(ret) : "l"(ptr) : "memory")
+#define __simt_load_relaxed_16(ptr,ret) asm volatile("ld.relaxed." __simt_scope ".b16 %0, [%1];" : "=h"(ret) : "l"(ptr) : "memory")
+#define __simt_store_release_16(ptr,desired) asm volatile("st.release." __simt_scope ".b16 [%0], %1;" :: "l"(ptr), "h"(desired) : "memory")
+#define __simt_store_relaxed_16(ptr,desired) asm volatile("st.relaxed." __simt_scope ".b16 [%0], %1;" :: "l"(ptr), "h"(desired) : "memory")
+
+#define __simt_load_acquire_32(ptr,ret) asm volatile("ld.acquire." __simt_scope ".b32 %0, [%1];" : "=r"(ret) : "l"(ptr) : "memory")
+#define __simt_load_relaxed_32(ptr,ret) asm volatile("ld.relaxed." __simt_scope ".b32 %0, [%1];" : "=r"(ret) : "l"(ptr) : "memory")
+#define __simt_store_release_32(ptr,desired) asm volatile("st.release." __simt_scope ".b32 [%0], %1;" :: "l"(ptr), "r"(desired) : "memory")
+#define __simt_store_relaxed_32(ptr,desired) asm volatile("st.relaxed." __simt_scope ".b32 [%0], %1;" :: "l"(ptr), "r"(desired) : "memory")
+#define __simt_exch_release_32(ptr,old,desired) asm volatile("atom.exch.release." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(desired) : "memory")
+#define __simt_exch_acquire_32(ptr,old,desired) asm volatile("atom.exch.acquire." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(desired) : "memory")
+#define __simt_exch_acq_rel_32(ptr,old,desired) asm volatile("atom.exch.acq_rel." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(desired) : "memory")
+#define __simt_exch_relaxed_32(ptr,old,desired) asm volatile("atom.exch.relaxed." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(desired) : "memory")
+#define __simt_cas_release_32(ptr,old,expected,desired) asm volatile("atom.cas.release." __simt_scope ".b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory")
+#define __simt_cas_acquire_32(ptr,old,expected,desired) asm volatile("atom.cas.acquire." __simt_scope ".b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory")
+#define __simt_cas_acq_rel_32(ptr,old,expected,desired) asm volatile("atom.cas.acq_rel." __simt_scope ".b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory")
+#define __simt_cas_relaxed_32(ptr,old,expected,desired) asm volatile("atom.cas.relaxed." __simt_scope ".b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory")
+#define __simt_add_release_32(ptr,old,addend) asm volatile("atom.add.release." __simt_scope ".u32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(addend) : "memory")
+#define __simt_add_acquire_32(ptr,old,addend) asm volatile("atom.add.acquire." __simt_scope ".u32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(addend) : "memory")
+#define __simt_add_acq_rel_32(ptr,old,addend) asm volatile("atom.add.acq_rel." __simt_scope ".u32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(addend) : "memory")
+#define __simt_add_relaxed_32(ptr,old,addend) asm volatile("atom.add.relaxed." __simt_scope ".u32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(addend) : "memory")
+#define __simt_and_release_32(ptr,old,andend) asm volatile("atom.and.release." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(andend) : "memory")
+#define __simt_and_acquire_32(ptr,old,andend) asm volatile("atom.and.acquire." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(andend) : "memory")
+#define __simt_and_acq_rel_32(ptr,old,andend) asm volatile("atom.and.acq_rel." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(andend) : "memory")
+#define __simt_and_relaxed_32(ptr,old,andend) asm volatile("atom.and.relaxed." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(andend) : "memory")
+#define __simt_or_release_32(ptr,old,orend) asm volatile("atom.or.release." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(orend) : "memory")
+#define __simt_or_acquire_32(ptr,old,orend) asm volatile("atom.or.acquire." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(orend) : "memory")
+#define __simt_or_acq_rel_32(ptr,old,orend) asm volatile("atom.or.acq_rel." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(orend) : "memory")
+#define __simt_or_relaxed_32(ptr,old,orend) asm volatile("atom.or.relaxed." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(orend) : "memory")
+#define __simt_xor_release_32(ptr,old,xorend) asm volatile("atom.xor.release." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(xorend) : "memory")
+#define __simt_xor_acquire_32(ptr,old,xorend) asm volatile("atom.xor.acquire." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(xorend) : "memory")
+#define __simt_xor_acq_rel_32(ptr,old,xorend) asm volatile("atom.xor.acq_rel." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(xorend) : "memory")
+#define __simt_xor_relaxed_32(ptr,old,xorend) asm volatile("atom.xor.relaxed." __simt_scope ".b32 %0, [%1], %2;" : "=r"(old) : "l"(ptr), "r"(xorend) : "memory")
+
+#define __simt_load_acquire_64(ptr,ret) asm volatile("ld.acquire." __simt_scope ".b64 %0, [%1];" : "=l"(ret) : "l"(ptr) : "memory")
+#define __simt_load_relaxed_64(ptr,ret) asm volatile("ld.relaxed." __simt_scope ".b64 %0, [%1];" : "=l"(ret) : "l"(ptr) : "memory")
+#define __simt_store_release_64(ptr,desired) asm volatile("st.release." __simt_scope ".b64 [%0], %1;" :: "l"(ptr), "l"(desired) : "memory")
+#define __simt_store_relaxed_64(ptr,desired) asm volatile("st.relaxed." __simt_scope ".b64 [%0], %1;" :: "l"(ptr), "l"(desired) : "memory")
+#define __simt_exch_release_64(ptr,old,desired) asm volatile("atom.exch.release." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(desired) : "memory")
+#define __simt_exch_acquire_64(ptr,old,desired) asm volatile("atom.exch.acquire." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(desired) : "memory")
+#define __simt_exch_acq_rel_64(ptr,old,desired) asm volatile("atom.exch.acq_rel." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(desired) : "memory")
+#define __simt_exch_relaxed_64(ptr,old,desired) asm volatile("atom.exch.relaxed." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(desired) : "memory")
+#define __simt_cas_release_64(ptr,old,expected,desired) asm volatile("atom.cas.release." __simt_scope ".b64 %0, [%1], %2, %3;" : "=l"(old) : "l"(ptr), "l"(expected), "l"(desired) : "memory")
+#define __simt_cas_acquire_64(ptr,old,expected,desired) asm volatile("atom.cas.acquire." __simt_scope ".b64 %0, [%1], %2, %3;" : "=l"(old) : "l"(ptr), "l"(expected), "l"(desired) : "memory")
+#define __simt_cas_acq_rel_64(ptr,old,expected,desired) asm volatile("atom.cas.acq_rel." __simt_scope ".b64 %0, [%1], %2, %3;" : "=l"(old) : "l"(ptr), "l"(expected), "l"(desired) : "memory")
+#define __simt_cas_relaxed_64(ptr,old,expected,desired) asm volatile("atom.cas.relaxed." __simt_scope ".b64 %0, [%1], %2, %3;" : "=l"(old) : "l"(ptr), "l"(expected), "l"(desired) : "memory")
+#define __simt_add_release_64(ptr,old,addend) asm volatile("atom.add.release." __simt_scope ".u64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(addend) : "memory")
+#define __simt_add_acquire_64(ptr,old,addend) asm volatile("atom.add.acquire." __simt_scope ".u64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(addend) : "memory")
+#define __simt_add_acq_rel_64(ptr,old,addend) asm volatile("atom.add.acq_rel." __simt_scope ".u64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(addend) : "memory")
+#define __simt_add_relaxed_64(ptr,old,addend) asm volatile("atom.add.relaxed." __simt_scope ".u64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(addend) : "memory")
+#define __simt_and_release_64(ptr,old,andend) asm volatile("atom.and.release." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(andend) : "memory")
+#define __simt_and_acquire_64(ptr,old,andend) asm volatile("atom.and.acquire." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(andend) : "memory")
+#define __simt_and_acq_rel_64(ptr,old,andend) asm volatile("atom.and.acq_rel." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(andend) : "memory")
+#define __simt_and_relaxed_64(ptr,old,andend) asm volatile("atom.and.relaxed." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(andend) : "memory")
+#define __simt_or_release_64(ptr,old,orend) asm volatile("atom.or.release." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(orend) : "memory")
+#define __simt_or_acquire_64(ptr,old,orend) asm volatile("atom.or.acquire." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(orend) : "memory")
+#define __simt_or_acq_rel_64(ptr,old,orend) asm volatile("atom.or.acq_rel." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(orend) : "memory")
+#define __simt_or_relaxed_64(ptr,old,orend) asm volatile("atom.or.relaxed." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(orend) : "memory")
+#define __simt_xor_release_64(ptr,old,xorend) asm volatile("atom.xor.release." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(xorend) : "memory")
+#define __simt_xor_acquire_64(ptr,old,xorend) asm volatile("atom.xor.acquire." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(xorend) : "memory")
+#define __simt_xor_acq_rel_64(ptr,old,xorend) asm volatile("atom.xor.acq_rel." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(xorend) : "memory")
+#define __simt_xor_relaxed_64(ptr,old,xorend) asm volatile("atom.xor.relaxed." __simt_scope ".b64 %0, [%1], %2;" : "=l"(old) : "l"(ptr), "l"(xorend) : "memory")
+
+#define __simt_nanosleep(timeout) asm volatile("nanosleep.u32 %0;" :: "r"(unsigned(timeout)) : )
+
+/*
+    definitions
+*/
+
+#ifndef __GCC_ATOMIC_BOOL_LOCK_FREE
+#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
+#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
+#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
+#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
+#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
+#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
+#define __GCC_ATOMIC_INT_LOCK_FREE 2
+#define __GCC_ATOMIC_LONG_LOCK_FREE 2
+#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
+#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
+#endif
+
+#ifndef __ATOMIC_RELAXED
+#define __ATOMIC_RELAXED 0
+#define __ATOMIC_CONSUME 1
+#define __ATOMIC_ACQUIRE 2
+#define __ATOMIC_RELEASE 3
+#define __ATOMIC_ACQ_REL 4
+#define __ATOMIC_SEQ_CST 5
+#endif
+
+inline __device__ int __stronger_order_simt_(int a, int b) {
+    if (b == __ATOMIC_SEQ_CST) return __ATOMIC_SEQ_CST;
+    if (b == __ATOMIC_RELAXED) return a;
+    switch (a) {
+    case __ATOMIC_SEQ_CST:
+    case __ATOMIC_ACQ_REL: return a;
+    case __ATOMIC_CONSUME:
+    case __ATOMIC_ACQUIRE: if (b != __ATOMIC_ACQUIRE) return __ATOMIC_ACQ_REL; else return __ATOMIC_ACQUIRE;
+    case __ATOMIC_RELEASE: if (b != __ATOMIC_RELEASE) return __ATOMIC_ACQ_REL; else return __ATOMIC_RELEASE;
+    case __ATOMIC_RELAXED: return b;
+    default: assert(0);
+    }
+    return __ATOMIC_SEQ_CST;
+}
+
+/*
+    base
+*/
+
+#define DO__atomic_load_simt_(bytes, bits) \
+template<class type, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+void __device__ __atomic_load_simt_ (const type *ptr, type *ret, int memorder) { \
+    int##bits##_t tmp = 0; \
+    switch (memorder) { \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_CONSUME: \
+    case __ATOMIC_ACQUIRE: __simt_load_acquire_##bits(ptr, tmp); break; \
+    case __ATOMIC_RELAXED: __simt_load_relaxed_##bits(ptr, tmp); break; \
+    default: assert(0); \
+    } \
+    memcpy(ret, &tmp, bytes); \
+}
+DO__atomic_load_simt_(1,32)
+DO__atomic_load_simt_(2,16)
+DO__atomic_load_simt_(4,32)
+DO__atomic_load_simt_(8,64)
+
+template<class type>
+type __device__ __atomic_load_n_simt_(const type *ptr, int memorder) {
+    type ret;
+    __atomic_load_simt_(ptr, &ret, memorder);
+    return ret;
+}
+
+#define DO__atomic_store_simt_(bytes, bits) \
+template<class type, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+void __device__ __atomic_store_simt_ (type *ptr, type *val, int memorder) { \
+    int##bits##_t tmp = 0; \
+    memcpy(&tmp, val, bytes); \
+    switch (memorder) { \
+    case __ATOMIC_RELEASE: __simt_store_release_##bits(ptr, tmp); break; \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_RELAXED: __simt_store_relaxed_##bits(ptr, tmp); break; \
+    default: assert(0); \
+    } \
+}
+DO__atomic_store_simt_(1,32)
+DO__atomic_store_simt_(2,16)
+DO__atomic_store_simt_(4,32)
+DO__atomic_store_simt_(8,64)
+
+template<class type>
+void __device__ __atomic_store_n_simt_(type *ptr, type val, int memorder) {
+    __atomic_store_simt_(ptr, &val, memorder);
+}
+
+#define DO__atomic_compare_exchange_simt_(bytes, bits) \
+template<class type, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+bool __device__ __atomic_compare_exchange_simt_ (type *ptr, type *expected, const type *desired, bool, int success_memorder, int failure_memorder) { \
+    int##bits##_t tmp = 0, old = 0, old_tmp; \
+    memcpy(&tmp, desired, bytes); \
+    memcpy(&old, expected, bytes); \
+    old_tmp = old; \
+    switch (__stronger_order_simt_(success_memorder, failure_memorder)) { \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_CONSUME: \
+    case __ATOMIC_ACQUIRE: __simt_cas_acquire_##bits(ptr, old, old_tmp, tmp); break; \
+    case __ATOMIC_ACQ_REL: __simt_cas_acq_rel_##bits(ptr, old, old_tmp, tmp); break; \
+    case __ATOMIC_RELEASE: __simt_cas_release_##bits(ptr, old, old_tmp, tmp); break; \
+    case __ATOMIC_RELAXED: __simt_cas_relaxed_##bits(ptr, old, old_tmp, tmp); break; \
+    default: assert(0); \
+    } \
+    bool const ret = old == old_tmp; \
+    memcpy(expected, &old, bytes); \
+    return ret; \
+}
+DO__atomic_compare_exchange_simt_(4, 32)
+DO__atomic_compare_exchange_simt_(8, 64)
+
+template<class type, typename std::enable_if<sizeof(type) <= 2, int>::type = 0> \
+bool __device__ __atomic_compare_exchange_simt_(type *ptr, type *expected, const type *desired, bool, int success_memorder, int failure_memorder) {
+
+    using R = typename std::conditional<std::is_volatile<type>::value, volatile uint32_t, uint32_t>::type;
+    auto const aligned = (R*)((intptr_t)ptr & ~(sizeof(uint32_t) - 1));
+    auto const offset = uint32_t((intptr_t)ptr & (sizeof(uint32_t) - 1)) * 8;
+    auto const mask = ((1 << sizeof(type)*8) - 1) << offset;
+
+    uint32_t old = *expected << offset, old_value;
+    while (1) {
+        old_value = (old & mask) >> offset;
+        if (old_value != *expected)
+            break;
+        uint32_t const attempt = (old & ~mask) | (*desired << offset);
+        if (__atomic_compare_exchange_simt_ (aligned, &old, &attempt, true, success_memorder, failure_memorder))
+            return true;
+    }
+    *expected = old_value;
+    return false;
+}
+
+template<class type>
+bool __device__ __atomic_compare_exchange_n_simt_(type *ptr, type *expected, type desired, bool weak, int success_memorder, int failure_memorder) {
+    return __atomic_compare_exchange_simt_(ptr, expected, &desired, weak, success_memorder, failure_memorder);
+}
+
+#define DO__atomic_exchange_simt_(bytes, bits) \
+template<class type, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+void __device__ __atomic_exchange_simt_ (type *ptr, type *val, type *ret, int memorder) { \
+    int##bits##_t tmp = 0; \
+    memcpy(&tmp, val, bytes); \
+    switch (memorder) { \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_CONSUME: \
+    case __ATOMIC_ACQUIRE: __simt_exch_acquire_##bits(ptr, tmp, tmp); break; \
+    case __ATOMIC_ACQ_REL: __simt_exch_acq_rel_##bits(ptr, tmp, tmp); break; \
+    case __ATOMIC_RELEASE: __simt_exch_release_##bits(ptr, tmp, tmp); break; \
+    case __ATOMIC_RELAXED: __simt_exch_relaxed_##bits(ptr, tmp, tmp); break; \
+    default: assert(0); \
+    } \
+    memcpy(ret, &tmp, bytes); \
+}
+DO__atomic_exchange_simt_(4,32)
+DO__atomic_exchange_simt_(8,64)
+
+template<class type, typename std::enable_if<sizeof(type)<=2, int>::type = 0>
+void __device__ __atomic_exchange_simt_ (type *ptr, type *val, type *ret, int memorder) {
+
+    type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED);
+    while(!__atomic_compare_exchange_simt_(ptr, &expected, val, true, memorder, memorder))
+        ;
+    *ret = expected;
+}
+
+template<class type>
+type __device__ __atomic_exchange_n_simt_(type *ptr, type val, int memorder) {
+    type ret;
+    __atomic_exchange_simt_(ptr, &val, &ret, memorder);
+    return ret;
+}
+
+#define DO__atomic_fetch_add_simt_(bytes, bits) \
+template<class type, class delta, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+type __device__ __atomic_fetch_add_simt_ (type *ptr, delta val, int memorder) { \
+    type ret; \
+    switch (memorder) { \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_CONSUME: \
+    case __ATOMIC_ACQUIRE: __simt_add_acquire_##bits(ptr, ret, val); break; \
+    case __ATOMIC_ACQ_REL: __simt_add_acq_rel_##bits(ptr, ret, val); break; \
+    case __ATOMIC_RELEASE: __simt_add_release_##bits(ptr, ret, val); break; \
+    case __ATOMIC_RELAXED: __simt_add_relaxed_##bits(ptr, ret, val); break; \
+    default: assert(0); \
+    } \
+    return ret; \
+}
+DO__atomic_fetch_add_simt_(4, 32)
+DO__atomic_fetch_add_simt_(8, 64)
+
+template<class type, class delta, typename std::enable_if<sizeof(type)<=2, int>::type = 0>
+type __device__ __atomic_fetch_add_simt_ (type *ptr, delta val, int memorder) {
+
+    type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED);
+    type const desired = expected + val;
+    while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder))
+        ;
+    return expected;
+}
+
+#define DO__atomic_fetch_sub_simt_(bytes, bits) \
+template<class type, class delta, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+type __device__ __atomic_fetch_sub_simt_ (type *ptr, delta val, int memorder) { \
+    type ret; \
+    switch (memorder) { \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_CONSUME: \
+    case __ATOMIC_ACQUIRE: __simt_add_acquire_##bits(ptr, ret, -val); break; \
+    case __ATOMIC_ACQ_REL: __simt_add_acq_rel_##bits(ptr, ret, -val); break; \
+    case __ATOMIC_RELEASE: __simt_add_release_##bits(ptr, ret, -val); break; \
+    case __ATOMIC_RELAXED: __simt_add_relaxed_##bits(ptr, ret, -val); break; \
+    default: assert(0); \
+    } \
+    return ret; \
+}
+DO__atomic_fetch_sub_simt_(4,32)
+DO__atomic_fetch_sub_simt_(8,64)
+
+template<class type, class delta, typename std::enable_if<sizeof(type)<=2, int>::type = 0>
+type __device__ __atomic_fetch_sub_simt_ (type *ptr, delta val, int memorder) {
+
+    type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED);
+    type const desired = expected - val;
+    while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder))
+        ;
+    return expected;
+}
+
+#define DO__atomic_fetch_and_simt_(bytes, bits) \
+template<class type, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+type __device__ __atomic_fetch_and_simt_ (type *ptr, type val, int memorder) { \
+    type ret; \
+    switch (memorder) { \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_CONSUME: \
+    case __ATOMIC_ACQUIRE: __simt_and_acquire_##bits(ptr, ret, val); break; \
+    case __ATOMIC_ACQ_REL: __simt_and_acq_rel_##bits(ptr, ret, val); break; \
+    case __ATOMIC_RELEASE: __simt_and_release_##bits(ptr, ret, val); break; \
+    case __ATOMIC_RELAXED: __simt_and_relaxed_##bits(ptr, ret, val); break; \
+    default: assert(0); \
+    } \
+    return ret; \
+}
+DO__atomic_fetch_and_simt_(4,32)
+DO__atomic_fetch_and_simt_(8,64)
+
+template<class type, class delta, typename std::enable_if<sizeof(type)<=2, int>::type = 0>
+type __device__ __atomic_fetch_and_simt_ (type *ptr, delta val, int memorder) {
+
+    type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED);
+    type const desired = expected & val;
+    while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder))
+        ;
+    return expected;
+}
+
+#define DO__atomic_fetch_xor_simt_(bytes, bits) \
+template<class type, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+type __device__ __atomic_fetch_xor_simt_ (type *ptr, type val, int memorder) { \
+    type ret; \
+    switch (memorder) { \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_CONSUME: \
+    case __ATOMIC_ACQUIRE: __simt_xor_acquire_##bits(ptr, ret, val); break; \
+    case __ATOMIC_ACQ_REL: __simt_xor_acq_rel_##bits(ptr, ret, val); break; \
+    case __ATOMIC_RELEASE: __simt_xor_release_##bits(ptr, ret, val); break; \
+    case __ATOMIC_RELAXED: __simt_xor_relaxed_##bits(ptr, ret, val); break; \
+    default: assert(0); \
+    } \
+    return ret; \
+}
+DO__atomic_fetch_xor_simt_(4,32)
+DO__atomic_fetch_xor_simt_(8,64)
+
+template<class type, class delta, typename std::enable_if<sizeof(type)<=2, int>::type = 0>
+type __device__ __atomic_fetch_xor_simt_ (type *ptr, delta val, int memorder) {
+
+    type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED);
+    type const desired = expected ^ val;
+    while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder))
+        ;
+    return expected;
+}
+
+#define DO__atomic_fetch_or_simt_(bytes, bits) \
+template<class type, typename std::enable_if<sizeof(type)==bytes, int>::type = 0> \
+type __device__ __atomic_fetch_or_simt_ (type *ptr, type val, int memorder) { \
+    type ret; \
+    switch (memorder) { \
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); \
+    case __ATOMIC_CONSUME: \
+    case __ATOMIC_ACQUIRE: __simt_or_acquire_##bits(ptr, ret, val); break; \
+    case __ATOMIC_ACQ_REL: __simt_or_acq_rel_##bits(ptr, ret, val); break; \
+    case __ATOMIC_RELEASE: __simt_or_release_##bits(ptr, ret, val); break; \
+    case __ATOMIC_RELAXED: __simt_or_relaxed_##bits(ptr, ret, val); break; \
+    default: assert(0); \
+    } \
+    return ret; \
+}
+DO__atomic_fetch_or_simt_(4,32)
+DO__atomic_fetch_or_simt_(8,64)
+
+template<class type, class delta, typename std::enable_if<sizeof(type)<=2, int>::type = 0>
+type __device__ __atomic_fetch_or_simt_ (type *ptr, delta val, int memorder) {
+
+    type expected = __atomic_load_n_simt_(ptr, __ATOMIC_RELAXED);
+    type const desired = expected | val;
+    while(!__atomic_compare_exchange_simt_(ptr, &expected, &desired, true, memorder, memorder))
+        ;
+    return expected;
+}
+
+template<class type>
+inline bool __device__ __atomic_test_and_set_simt_(type *ptr, int memorder) {
+    return __atomic_exchange_n_simt_((char*)ptr, (char)1, memorder) == 1;
+}
+template<class type>
+inline void __device__ __atomic_clear_simt_(type *ptr, int memorder) {
+    return __atomic_store_n_simt_((char*)ptr, (char)0, memorder);
+}
+
+inline constexpr __device__ bool __atomic_always_lock_free_simt_ (size_t size, void *) {
+    return size <= 8;
+}
+inline __device__ bool __atomic_is_lock_free_simt_(size_t size, void * ptr) {
+    return __atomic_always_lock_free_simt_(size, ptr);
+}
+
+/*
+    fences
+*/
+
+inline void __device__ __atomic_thread_fence_simt(int memorder) {
+    switch (memorder) {
+    case __ATOMIC_SEQ_CST: __simt_fence_sc_(); break;
+    case __ATOMIC_CONSUME:
+    case __ATOMIC_ACQUIRE:
+    case __ATOMIC_ACQ_REL:
+    case __ATOMIC_RELEASE: __simt_fence_(); break;
+    case __ATOMIC_RELAXED: break;
+    default: assert(0);
+    }
+}
+inline void __device__ __atomic_signal_fence_simt(int memorder) { 
+    __atomic_thread_fence_simt(memorder);
+}
+
+/*
+    non-volatile
+*/
+
+template<class type> type __device__ __atomic_load_n_simt(const type *ptr, int memorder) {
+    return __atomic_load_n_simt_(const_cast<const type*>(ptr), memorder);
+}
+template<class type> void __device__ __atomic_load_simt(const type *ptr, type *ret, int memorder) {
+    __atomic_load_simt_(const_cast<const type*>(ptr), ret, memorder);
+}
+template<class type> void __device__ __atomic_store_n_simt(type *ptr, type val, int memorder) {
+    __atomic_store_n_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> void __device__ __atomic_store_simt(type *ptr, type *val, int memorder) {
+    __atomic_store_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> type __device__ __atomic_exchange_n_simt(type *ptr, type val, int memorder) {
+    return __atomic_exchange_n_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> void __device__ __atomic_exchange_simt(type *ptr, type *val, type *ret, int memorder) {
+    __atomic_exchange_simt_(const_cast<type*>(ptr), val, ret, memorder);
+}
+template<class type> bool __device__ __atomic_compare_exchange_n_simt(type *ptr, type *expected, type desired, bool weak, int success_memorder, int failure_memorder) {
+    return __atomic_compare_exchange_n_simt_(const_cast<type*>(ptr), expected, desired, weak, success_memorder, failure_memorder);
+}
+template<class type> bool __device__ __atomic_compare_exchange_simt(type *ptr, type *expected, type *desired, bool weak, int success_memorder, int failure_memorder) {
+    return __atomic_compare_exchange_simt_(const_cast<type*>(ptr), expected, desired, weak, success_memorder, failure_memorder);
+}
+template<class type, class delta> type __device__ __atomic_fetch_add_simt(type *ptr, delta val, int memorder) {
+    return __atomic_fetch_add_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type, class delta> type __device__ __atomic_fetch_sub_simt(type *ptr, delta val, int memorder) {
+    return __atomic_fetch_sub_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> type __device__ __atomic_fetch_and_simt(type *ptr, type val, int memorder) {
+    return __atomic_fetch_and_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> type __device__ __atomic_fetch_xor_simt(type *ptr, type val, int memorder) {
+    return __atomic_fetch_xor_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> type __device__ __atomic_fetch_or_simt(type *ptr, type val, int memorder) {
+    return __atomic_fetch_or_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> bool __device__ __atomic_test_and_set_simt(void *ptr, int memorder) {
+    return __atomic_test_and_set_simt_(const_cast<void*>(ptr), memorder);
+}
+template<class type> void __device__ __atomic_clear_simt(void *ptr, int memorder) {
+    return __atomic_clear_simt_(const_cast<void*>(ptr), memorder);
+}
+inline bool __device__ __atomic_always_lock_free_simt(size_t size, void *ptr) {
+    return __atomic_always_lock_free_simt_(size, const_cast<void*>(ptr));
+}
+inline bool __device__ __atomic_is_lock_free_simt(size_t size, void *ptr) {
+    return __atomic_is_lock_free_simt_(size, const_cast<void*>(ptr));
+}
+
+/*
+    volatile 
+*/
+
+template<class type> type __device__ __atomic_load_n_simt(const volatile type *ptr, int memorder) {
+    return __atomic_load_n_simt_(const_cast<const type*>(ptr), memorder);
+}
+template<class type> void __device__ __atomic_load_simt(const volatile type *ptr, type *ret, int memorder) {
+    __atomic_load_simt_(const_cast<const type*>(ptr), ret, memorder);
+}
+template<class type> void __device__ __atomic_store_n_simt(volatile type *ptr, type val, int memorder) {
+    __atomic_store_n_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> void __device__ __atomic_store_simt(volatile type *ptr, type *val, int memorder) {
+    __atomic_store_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> type __device__ __atomic_exchange_n_simt(volatile type *ptr, type val, int memorder) {
+    return __atomic_exchange_n_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> void __device__ __atomic_exchange_simt(volatile type *ptr, type *val, type *ret, int memorder) {
+    __atomic_exchange_simt_(const_cast<type*>(ptr), val, ret, memorder);
+}
+template<class type> bool __device__ __atomic_compare_exchange_n_simt(volatile type *ptr, type *expected, type desired, bool weak, int success_memorder, int failure_memorder) {
+    return __atomic_compare_exchange_n_simt_(const_cast<type*>(ptr), expected, desired, weak, success_memorder, failure_memorder);
+}
+template<class type> bool __device__ __atomic_compare_exchange_simt(volatile type *ptr, type *expected, type *desired, bool weak, int success_memorder, int failure_memorder) {
+    return __atomic_compare_exchange_simt_(const_cast<type*>(ptr), expected, desired, weak, success_memorder, failure_memorder);
+}
+template<class type, class delta> type __device__ __atomic_fetch_add_simt(volatile type *ptr, delta val, int memorder) {
+    return __atomic_fetch_add_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type, class delta> type __device__ __atomic_fetch_sub_simt(volatile type *ptr, delta val, int memorder) {
+    return __atomic_fetch_sub_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> type __device__ __atomic_fetch_and_simt(volatile type *ptr, type val, int memorder) {
+    return __atomic_fetch_and_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> type __device__ __atomic_fetch_xor_simt(volatile type *ptr, type val, int memorder) {
+    return __atomic_fetch_xor_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> type __device__ __atomic_fetch_or_simt(volatile type *ptr, type val, int memorder) {
+    return __atomic_fetch_or_simt_(const_cast<type*>(ptr), val, memorder);
+}
+template<class type> bool __device__ __atomic_test_and_set_simt(volatile void *ptr, int memorder) {
+    return __atomic_test_and_set_simt_(const_cast<void*>(ptr), memorder);
+}
+template<class type> void __device__ __atomic_clear_simt(volatile void *ptr, int memorder) {
+    return __atomic_clear_simt_(const_cast<void*>(ptr), memorder);
+}
+
+
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+#endif //_SIMT_DETAILS_CONFIG
+
+#ifndef KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED
+/*
+    builtins
+*/
+
+#define __atomic_load_n __atomic_load_n_simt
+#define __atomic_load __atomic_load_simt
+#define __atomic_store_n __atomic_store_n_simt
+#define __atomic_store __atomic_store_simt
+#define __atomic_exchange_n __atomic_exchange_n_simt
+#define __atomic_exchange __atomic_exchange_simt
+#define __atomic_compare_exchange_n __atomic_compare_exchange_n_simt
+#define __atomic_compare_exchange __atomic_compare_exchange_simt
+#define __atomic_fetch_add __atomic_fetch_add_simt
+#define __atomic_fetch_sub __atomic_fetch_sub_simt
+#define __atomic_fetch_and __atomic_fetch_and_simt
+#define __atomic_fetch_xor __atomic_fetch_xor_simt
+#define __atomic_fetch_or __atomic_fetch_or_simt
+#define __atomic_test_and_set __atomic_test_and_set_simt
+#define __atomic_clear __atomic_clear_simt
+#define __atomic_always_lock_free __atomic_always_lock_free_simt
+#define __atomic_is_lock_free __atomic_is_lock_free_simt
+#define __atomic_thread_fence __atomic_thread_fence_simt
+#define __atomic_signal_fence __atomic_signal_fence_simt
+
+#define KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED
+
+#endif //__CUDA_ARCH__ && KOKKOS_ENABLE_CUDA_ASM_ATOMICS
+#endif // KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bedb1472275cd640b475b393b4f1c52eadf49d05
--- /dev/null
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp
@@ -0,0 +1,68 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2019) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifdef KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED
+
+#undef __atomic_load_n
+#undef __atomic_load
+#undef __atomic_store_n
+#undef __atomic_store
+#undef __atomic_exchange_n
+#undef __atomic_exchange
+#undef __atomic_compare_exchange_n
+#undef __atomic_compare_exchange
+#undef __atomic_fetch_add
+#undef __atomic_fetch_sub
+#undef __atomic_fetch_and
+#undef __atomic_fetch_xor
+#undef __atomic_fetch_or
+#undef __atomic_test_and_set
+#undef __atomic_clear
+#undef __atomic_always_lock_free
+#undef __atomic_is_lock_free
+#undef __atomic_thread_fence
+#undef __atomic_signal_fence
+
+#undef KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED
+
+#endif // KOKKOS_SIMT_ATOMIC_BUILTIN_REPLACEMENTS_DEFINED
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Internal.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp
similarity index 69%
rename from packages/kokkos/core/src/Cuda/Kokkos_Cuda_Internal.hpp
rename to packages/kokkos/core/src/Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp
index 145d93ed76b3a0ef4f574bab1c4dd6bfae1ee67d..932bde2b37e8835acab7805c79e4ba2e13ee1337 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Internal.hpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp
@@ -58,7 +58,68 @@ struct CudaGetMaxBlockSize;
 template<class DriverType, class LaunchBounds>
 int cuda_get_max_block_size(const typename DriverType::functor_type & f, const size_t vector_length,
                             const size_t shmem_extra_block, const size_t shmem_extra_thread) {
-  return CudaGetMaxBlockSize<DriverType,LaunchBounds,(CudaTraits::ConstantMemoryUseThreshold < sizeof(DriverType))>::get_block_size(f,vector_length, shmem_extra_block,shmem_extra_thread);
+  return CudaGetMaxBlockSize<DriverType,LaunchBounds
+          , true
+      >::get_block_size(f,vector_length, shmem_extra_block,shmem_extra_thread);
+}
+
+template<class FunctorType, class LaunchBounds>
+int cuda_get_max_block_size(const CudaInternal* cuda_instance, const cudaFuncAttributes& attr, const FunctorType& f, const size_t vector_length,
+    const size_t shmem_block, const size_t shmem_thread) {
+
+  const int min_blocks_per_sm = LaunchBounds::minBperSM == 0 ?
+                                     1 : LaunchBounds::minBperSM ;
+  const int max_threads_per_block = LaunchBounds::maxTperB == 0 ?
+                                     cuda_instance->m_maxThreadsPerBlock : LaunchBounds::maxTperB ;
+
+  const int regs_per_thread = attr.numRegs;
+  const int regs_per_sm = cuda_instance->m_regsPerSM;
+  const int shmem_per_sm = cuda_instance->m_shmemPerSM;
+  const int max_shmem_per_block = cuda_instance->m_maxShmemPerBlock;
+  const int max_blocks_per_sm = cuda_instance->m_maxBlocksPerSM;
+  const int max_threads_per_sm = cuda_instance->m_maxThreadsPerSM;
+
+  int block_size = std::min(attr.maxThreadsPerBlock,max_threads_per_block);
+
+  int functor_shmem = FunctorTeamShmemSize< FunctorType  >::value( f , block_size/vector_length );
+  int total_shmem = shmem_block + shmem_thread*(block_size/vector_length) + functor_shmem + attr.sharedSizeBytes;
+  int max_blocks_regs = regs_per_sm/(regs_per_thread*block_size);
+  int max_blocks_shmem = (total_shmem<max_shmem_per_block)?(total_shmem>0?shmem_per_sm/total_shmem:max_blocks_regs):0;
+  int blocks_per_sm = std::min(max_blocks_regs,max_blocks_shmem);
+  int threads_per_sm = blocks_per_sm * block_size;
+  if(threads_per_sm > max_threads_per_sm) {
+    blocks_per_sm = max_threads_per_sm/block_size;
+    threads_per_sm = blocks_per_sm * block_size;
+  }
+  int opt_block_size = (blocks_per_sm>=min_blocks_per_sm) ? block_size : 0;
+  int opt_threads_per_sm = threads_per_sm;
+  //printf("BlockSizeMax: %i Shmem: %i %i %i %i Regs: %i %i Blocks: %i %i Achieved: %i %i Opt: %i %i\n",block_size,
+  //   shmem_per_sm,max_shmem_per_block,functor_shmem,total_shmem,
+  //   regs_per_sm,regs_per_thread,max_blocks_shmem,max_blocks_regs,blocks_per_sm,threads_per_sm,opt_block_size,opt_threads_per_sm);
+  block_size-=32;
+  while ((blocks_per_sm==0) && (block_size>=32)) {
+    functor_shmem = FunctorTeamShmemSize< FunctorType  >::value( f , block_size/vector_length );
+    total_shmem = shmem_block + shmem_thread*(block_size/vector_length) + functor_shmem + attr.sharedSizeBytes;
+    max_blocks_regs = regs_per_sm/(regs_per_thread*block_size);
+    max_blocks_shmem = (total_shmem<max_shmem_per_block)?(total_shmem>0?shmem_per_sm/total_shmem:max_blocks_regs):0;
+    blocks_per_sm = std::min(max_blocks_regs,max_blocks_shmem);
+    threads_per_sm = blocks_per_sm * block_size;
+    if(threads_per_sm > max_threads_per_sm) {
+      blocks_per_sm = max_threads_per_sm/block_size;
+      threads_per_sm = blocks_per_sm * block_size;
+    }
+    if((blocks_per_sm >= min_blocks_per_sm) && (blocks_per_sm <= max_blocks_per_sm)) {
+      if(threads_per_sm>=opt_threads_per_sm) {
+        opt_block_size = block_size;
+        opt_threads_per_sm = threads_per_sm;
+      }
+    }
+  //printf("BlockSizeMax: %i Shmem: %i %i %i %i Regs: %i %i Blocks: %i %i Achieved: %i %i Opt: %i %i\n",block_size,
+  //   shmem_per_sm,max_shmem_per_block,functor_shmem,total_shmem,
+  //   regs_per_sm,regs_per_thread,max_blocks_shmem,max_blocks_regs,blocks_per_sm,threads_per_sm,opt_block_size,opt_threads_per_sm);
+    block_size-=32;
+  }
+  return opt_block_size;
 }
 
 
@@ -241,11 +302,71 @@ struct CudaGetOptBlockSize;
 template<class DriverType, class LaunchBounds>
 int cuda_get_opt_block_size(const typename DriverType::functor_type & f, const size_t vector_length,
                             const size_t shmem_extra_block, const size_t shmem_extra_thread) {
-  return CudaGetOptBlockSize<DriverType,LaunchBounds,(CudaTraits::ConstantMemoryUseThreshold < sizeof(DriverType))>::get_block_size(f,vector_length,shmem_extra_block,shmem_extra_thread);
+  return CudaGetOptBlockSize<DriverType,LaunchBounds,
+      //LaunchBounds::launch_mechanism == Kokkos::Experimental::LaunchDefault ?
+      //            (( CudaTraits::ConstantMemoryUseThreshold < sizeof(DriverType) )?
+      //                   Kokkos::Experimental::CudaLaunchConstantMemory:Kokkos::Experimental::CudaLaunchLocalMemory):
+      //             LaunchBounds::launch_mechanism
+      (CudaTraits::ConstantMemoryUseThreshold < sizeof(DriverType))
+      >::get_block_size(f,vector_length,shmem_extra_block,shmem_extra_thread);
+}
+
+template<class FunctorType, class LaunchBounds>
+int cuda_get_opt_block_size(const CudaInternal* cuda_instance, const cudaFuncAttributes& attr, const FunctorType& f, const size_t vector_length,
+    const size_t shmem_block, const size_t shmem_thread) {
+
+  const int min_blocks_per_sm = LaunchBounds::minBperSM == 0 ?
+                                     1 : LaunchBounds::minBperSM ;
+  const int max_threads_per_block = LaunchBounds::maxTperB == 0 ?
+                                     cuda_instance->m_maxThreadsPerBlock : LaunchBounds::maxTperB ;
+
+  const int regs_per_thread = attr.numRegs;
+  const int regs_per_sm = cuda_instance->m_regsPerSM;
+  const int shmem_per_sm = cuda_instance->m_shmemPerSM;
+  const int max_shmem_per_block = cuda_instance->m_maxShmemPerBlock;
+  const int max_blocks_per_sm = cuda_instance->m_maxBlocksPerSM;
+  const int max_threads_per_sm = cuda_instance->m_maxThreadsPerSM;
+
+  int block_size = std::min(attr.maxThreadsPerBlock,max_threads_per_block);
+
+  int functor_shmem = FunctorTeamShmemSize< FunctorType  >::value( f , block_size/vector_length );
+  int total_shmem = shmem_block + shmem_thread*(block_size/vector_length) + functor_shmem + attr.sharedSizeBytes;
+  int max_blocks_regs = regs_per_sm/(regs_per_thread*block_size);
+  int max_blocks_shmem = (total_shmem<max_shmem_per_block)?(total_shmem>0?shmem_per_sm/total_shmem:max_blocks_regs):0;
+  int blocks_per_sm = std::min(max_blocks_regs,max_blocks_shmem);
+  int threads_per_sm = blocks_per_sm * block_size;
+  if(threads_per_sm > max_threads_per_sm) {
+    blocks_per_sm = max_threads_per_sm/block_size;
+    threads_per_sm = blocks_per_sm * block_size;
+  }
+  int opt_block_size = (blocks_per_sm>=min_blocks_per_sm) ? block_size : 0;
+  int opt_threads_per_sm = threads_per_sm;
+
+  block_size-=32;
+  while ((block_size>=32)) {
+    functor_shmem = FunctorTeamShmemSize< FunctorType  >::value( f , block_size/vector_length );
+    total_shmem = shmem_block + shmem_thread*(block_size/vector_length) + functor_shmem + attr.sharedSizeBytes;
+    max_blocks_regs = regs_per_sm/(regs_per_thread*block_size);
+    max_blocks_shmem = (total_shmem<max_shmem_per_block)?(total_shmem>0?shmem_per_sm/total_shmem:max_blocks_regs):0;
+    blocks_per_sm = std::min(max_blocks_regs,max_blocks_shmem);
+    threads_per_sm = blocks_per_sm * block_size;
+    if(threads_per_sm > max_threads_per_sm) {
+      blocks_per_sm = max_threads_per_sm/block_size;
+      threads_per_sm = blocks_per_sm * block_size;
+    }
+    if((blocks_per_sm >= min_blocks_per_sm) && (blocks_per_sm <= max_blocks_per_sm)) {
+      if(threads_per_sm>=opt_threads_per_sm) {
+        opt_block_size = block_size;
+        opt_threads_per_sm = threads_per_sm;
+      }
+    }
+    block_size-=32;
+  }
+  return opt_block_size;
 }
 
 template<class DriverType>
-struct CudaGetOptBlockSize<DriverType,Kokkos::LaunchBounds<>,true> {
+struct CudaGetOptBlockSize<DriverType,Kokkos::LaunchBounds<0,0>,true> {
   static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length,
                             const size_t shmem_extra_block, const size_t shmem_extra_thread) {
     int blockSize=16;
@@ -275,7 +396,7 @@ struct CudaGetOptBlockSize<DriverType,Kokkos::LaunchBounds<>,true> {
 };
 
 template<class DriverType>
-struct CudaGetOptBlockSize<DriverType,Kokkos::LaunchBounds<>,false> {
+struct CudaGetOptBlockSize<DriverType,Kokkos::LaunchBounds<0,0>,false> {
   static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length,
                             const size_t shmem_extra_block, const size_t shmem_extra_thread) {
     int blockSize=16;
@@ -305,7 +426,7 @@ struct CudaGetOptBlockSize<DriverType,Kokkos::LaunchBounds<>,false> {
 };
 
 template<class DriverType, unsigned int MaxThreadsPerBlock, unsigned int MinBlocksPerSM>
-struct CudaGetOptBlockSize<DriverType,Kokkos::LaunchBounds< MaxThreadsPerBlock, MinBlocksPerSM >,true> {
+struct CudaGetOptBlockSize<DriverType,Kokkos::LaunchBounds< MaxThreadsPerBlock, MinBlocksPerSM>,true> {
   static int get_block_size(const typename DriverType::functor_type & f, const size_t vector_length,
                             const size_t shmem_extra_block, const size_t shmem_extra_thread) {
     int blockSize=16;
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp
similarity index 86%
rename from packages/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp
rename to packages/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp
index 4fd7a9c69e2aa6457606c35e150ba0fa9630ad49..0ca9e3c16050ed300f5240406502d3b93f716308 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.cpp
@@ -50,7 +50,8 @@
 #include <Kokkos_Core.hpp>
 
 #include <Cuda/Kokkos_Cuda_Error.hpp>
-#include <Cuda/Kokkos_Cuda_Internal.hpp>
+#include <Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp>
+#include <Cuda/Kokkos_Cuda_Instance.hpp>
 #include <Cuda/Kokkos_Cuda_Locks.hpp>
 #include <impl/Kokkos_Error.hpp>
 #include <impl/Kokkos_Profiling_Interface.hpp>
@@ -217,78 +218,6 @@ const CudaInternalDevices & CudaInternalDevices::singleton()
 
 }
 
-//----------------------------------------------------------------------------
-
-class CudaInternal {
-private:
-
-  CudaInternal( const CudaInternal & );
-  CudaInternal & operator = ( const CudaInternal & );
-
-
-public:
-
-  typedef Cuda::size_type size_type ;
-
-  int         m_cudaDev ;
-  int         m_cudaArch ;
-  unsigned    m_multiProcCount ;
-  unsigned    m_maxWarpCount ;
-  unsigned    m_maxBlock ;
-  unsigned    m_maxSharedWords ;
-  uint32_t    m_maxConcurrency ;
-  size_type   m_scratchSpaceCount ;
-  size_type   m_scratchFlagsCount ;
-  size_type   m_scratchUnifiedCount ;
-  size_type   m_scratchUnifiedSupported ;
-  size_type   m_streamCount ;
-  size_type * m_scratchSpace ;
-  size_type * m_scratchFlags ;
-  size_type * m_scratchUnified ;
-  uint32_t  * m_scratchConcurrentBitset ;
-  cudaStream_t * m_stream ;
-
-  static int was_initialized;
-  static int was_finalized;
-
-  static CudaInternal & singleton();
-
-  int verify_is_initialized( const char * const label ) const ;
-
-  int is_initialized() const
-    { return 0 != m_scratchSpace && 0 != m_scratchFlags ; }
-
-  void initialize( int cuda_device_id , int stream_count );
-  void finalize();
-
-  void print_configuration( std::ostream & ) const ;
-
-  ~CudaInternal();
-
-  CudaInternal()
-    : m_cudaDev( -1 )
-    , m_cudaArch( -1 )
-    , m_multiProcCount( 0 )
-    , m_maxWarpCount( 0 )
-    , m_maxBlock( 0 )
-    , m_maxSharedWords( 0 )
-    , m_maxConcurrency( 0 )
-    , m_scratchSpaceCount( 0 )
-    , m_scratchFlagsCount( 0 )
-    , m_scratchUnifiedCount( 0 )
-    , m_scratchUnifiedSupported( 0 )
-    , m_streamCount( 0 )
-    , m_scratchSpace( 0 )
-    , m_scratchFlags( 0 )
-    , m_scratchUnified( 0 )
-    , m_scratchConcurrentBitset( 0 )
-    , m_stream( 0 )
-    {}
-
-  size_type * scratch_space( const size_type size );
-  size_type * scratch_flags( const size_type size );
-  size_type * scratch_unified( const size_type size );
-};
 
 int CudaInternal::was_initialized = 0;
 int CudaInternal::was_finalized = 0;
@@ -366,8 +295,11 @@ CudaInternal & CudaInternal::singleton()
   static CudaInternal self ;
   return self ;
 }
+void CudaInternal::fence() const {
+  cudaStreamSynchronize(m_stream);
+}
 
-void CudaInternal::initialize( int cuda_device_id , int stream_count )
+void CudaInternal::initialize( int cuda_device_id , cudaStream_t stream )
 {
   if ( was_finalized ) Kokkos::abort("Calling Cuda::initialize after Cuda::finalize is illegal\n");
   was_initialized = 1;
@@ -454,6 +386,15 @@ void CudaInternal::initialize( int cuda_device_id , int stream_count )
 
     m_maxBlock = cudaProp.maxGridSize[0] ;
 
+    m_shmemPerSM = cudaProp.sharedMemPerMultiprocessor ;
+    m_maxShmemPerBlock = cudaProp.sharedMemPerBlock ;
+    m_regsPerSM = cudaProp.regsPerMultiprocessor ;
+    m_maxBlocksPerSM = m_cudaArch < 500 ? 16 : (
+                       m_cudaArch < 750 ? 32 : (
+                       m_cudaArch == 750 ? 16 : 32));
+    m_maxThreadsPerSM = cudaProp.maxThreadsPerMultiProcessor ;
+    m_maxThreadsPerBlock = cudaProp.maxThreadsPerBlock ;
+
     //----------------------------------
 
     m_scratchUnifiedSupported = cudaProp.unifiedAddressing ;
@@ -482,10 +423,9 @@ void CudaInternal::initialize( int cuda_device_id , int stream_count )
     // Concurrent bitset for obtaining unique tokens from within
     // an executing kernel.
     {
-      const unsigned max_threads_per_sm = 2048 ; // up to capability 7.0
 
       m_maxConcurrency =
-        max_threads_per_sm * cudaProp.multiProcessorCount ;
+        m_maxThreadsPerSM * cudaProp.multiProcessorCount ;
 
       const int32_t buffer_bound =
          Kokkos::Impl::concurrent_bitset::buffer_bound( m_maxConcurrency );
@@ -507,11 +447,6 @@ void CudaInternal::initialize( int cuda_device_id , int stream_count )
     }
     //----------------------------------
 
-    if ( stream_count ) {
-      m_stream = (cudaStream_t*) ::malloc( stream_count * sizeof(cudaStream_t) );
-      m_streamCount = stream_count ;
-      for ( size_type i = 0 ; i < m_streamCount ; ++i ) m_stream[i] = 0 ;
-    }
   }
   else {
 
@@ -539,7 +474,7 @@ void CudaInternal::initialize( int cuda_device_id , int stream_count )
     if( Kokkos::show_warnings() && !cuda_launch_blocking() ) {
       std::cerr << "Kokkos::Cuda::initialize WARNING: Cuda is allocating into UVMSpace by default" << std::endl;
       std::cerr << "                                  without setting CUDA_LAUNCH_BLOCKING=1." << std::endl;
-      std::cerr << "                                  The code must call Cuda::fence() after each kernel" << std::endl;
+      std::cerr << "                                  The code must call Cuda().fence() after each kernel" << std::endl;
       std::cerr << "                                  or will likely crash when accessing data on the host." << std::endl;
     }
 
@@ -568,7 +503,10 @@ void CudaInternal::initialize( int cuda_device_id , int stream_count )
   #endif
 
   // Init the array for used for arbitrarily sized atomics
-  Impl::initialize_host_cuda_lock_arrays();
+  if(stream == 0)
+    Impl::initialize_host_cuda_lock_arrays();
+
+  m_stream = stream;
 }
 
 //----------------------------------------------------------------------------
@@ -578,7 +516,7 @@ enum { sizeScratchGrain = sizeof(ScratchGrain) };
 
 
 Cuda::size_type *
-CudaInternal::scratch_flags( const Cuda::size_type size )
+CudaInternal::scratch_flags( const Cuda::size_type size ) const 
 {
   if ( verify_is_initialized("scratch_flags") && m_scratchFlagsCount * sizeScratchGrain < size ) {
 
@@ -587,6 +525,9 @@ CudaInternal::scratch_flags( const Cuda::size_type size )
 
     typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > Record ;
 
+    if( m_scratchFlags )
+      Record::decrement( Record::get_record( m_scratchFlags ) );
+
     Record * const r = Record::allocate( Kokkos::CudaSpace()
                                        , "InternalScratchFlags"
                                        , ( sizeof( ScratchGrain ) * m_scratchFlagsCount ) );
@@ -602,7 +543,7 @@ CudaInternal::scratch_flags( const Cuda::size_type size )
 }
 
 Cuda::size_type *
-CudaInternal::scratch_space( const Cuda::size_type size )
+CudaInternal::scratch_space( const Cuda::size_type size ) const 
 {
   if ( verify_is_initialized("scratch_space") && m_scratchSpaceCount * sizeScratchGrain < size ) {
 
@@ -610,6 +551,9 @@ CudaInternal::scratch_space( const Cuda::size_type size )
 
      typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > Record ;
 
+     if( m_scratchSpace )
+       Record::decrement( Record::get_record( m_scratchSpace ) );
+
      Record * const r = Record::allocate( Kokkos::CudaSpace()
                                         , "InternalScratchSpace"
                                         , ( sizeof( ScratchGrain ) * m_scratchSpaceCount ) );
@@ -623,7 +567,7 @@ CudaInternal::scratch_space( const Cuda::size_type size )
 }
 
 Cuda::size_type *
-CudaInternal::scratch_unified( const Cuda::size_type size )
+CudaInternal::scratch_unified( const Cuda::size_type size ) const
 {
   if ( verify_is_initialized("scratch_unified") &&
        m_scratchUnifiedSupported && m_scratchUnifiedCount * sizeScratchGrain < size ) {
@@ -632,6 +576,9 @@ CudaInternal::scratch_unified( const Cuda::size_type size )
 
     typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > Record ;
 
+    if( m_scratchUnified )
+      Record::decrement( Record::get_record( m_scratchUnified ) );
+
     Record * const r = Record::allocate( Kokkos::CudaHostPinnedSpace()
                                        , "InternalScratchUnified"
                                        , ( sizeof( ScratchGrain ) * m_scratchUnifiedCount ) );
@@ -644,6 +591,31 @@ CudaInternal::scratch_unified( const Cuda::size_type size )
   return m_scratchUnified ;
 }
 
+Cuda::size_type *
+CudaInternal::scratch_functor( const Cuda::size_type size ) const
+{
+  if ( verify_is_initialized("scratch_functor") &&
+       m_scratchFunctorSize < size ) {
+
+    m_scratchFunctorSize = size ;
+
+    typedef Kokkos::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > Record ;
+
+    if( m_scratchFunctor )
+      Record::decrement( Record::get_record( m_scratchFunctor ) );
+
+    Record * const r = Record::allocate( Kokkos::CudaSpace()
+                                       , "InternalScratchFunctor"
+                                       , m_scratchFunctorSize );
+
+    Record::increment( r );
+
+    m_scratchFunctor = reinterpret_cast<size_type *>( r->data() );
+  }
+
+  return m_scratchFunctor ;
+}
+
 //----------------------------------------------------------------------------
 
 void CudaInternal::finalize()
@@ -653,13 +625,7 @@ void CudaInternal::finalize()
 
     Impl::finalize_host_cuda_lock_arrays();
 
-    if ( m_stream ) {
-      for ( size_type i = 1 ; i < m_streamCount ; ++i ) {
-        cudaStreamDestroy( m_stream[i] );
-        m_stream[i] = 0 ;
-      }
-      ::free( m_stream );
-    }
+    if(m_stream!=0) cudaStreamDestroy(m_stream);
 
     typedef Kokkos::Impl::SharedAllocationRecord< CudaSpace > RecordCuda ;
     typedef Kokkos::Impl::SharedAllocationRecord< CudaHostPinnedSpace > RecordHost ;
@@ -668,6 +634,8 @@ void CudaInternal::finalize()
     RecordCuda::decrement( RecordCuda::get_record( m_scratchSpace ) );
     RecordHost::decrement( RecordHost::get_record( m_scratchUnified ) );
     RecordCuda::decrement( RecordCuda::get_record( m_scratchConcurrentBitset ) );
+    if(m_scratchFunctorSize>0)
+    RecordCuda::decrement( RecordCuda::get_record( m_scratchFunctor ) );
 
     m_cudaDev             = -1 ;
     m_multiProcCount      = 0 ;
@@ -713,14 +681,14 @@ Cuda::size_type cuda_internal_maximum_grid_count()
 Cuda::size_type cuda_internal_maximum_shared_words()
 { return CudaInternal::singleton().m_maxSharedWords ; }
 
-Cuda::size_type * cuda_internal_scratch_space( const Cuda::size_type size )
-{ return CudaInternal::singleton().scratch_space( size ); }
+Cuda::size_type * cuda_internal_scratch_space( const Cuda& instance, const Cuda::size_type size )
+{ return instance.impl_internal_space_instance()->scratch_space( size ); }
 
-Cuda::size_type * cuda_internal_scratch_flags( const Cuda::size_type size )
-{ return CudaInternal::singleton().scratch_flags( size ); }
+Cuda::size_type * cuda_internal_scratch_flags( const Cuda& instance, const Cuda::size_type size )
+{ return instance.impl_internal_space_instance()->scratch_flags( size ); }
 
-Cuda::size_type * cuda_internal_scratch_unified( const Cuda::size_type size )
-{ return CudaInternal::singleton().scratch_unified( size ); }
+Cuda::size_type * cuda_internal_scratch_unified( const Cuda& instance, const Cuda::size_type size )
+{ return instance.impl_internal_space_instance()->scratch_unified( size ); }
 
 
 } // namespace Impl
@@ -749,7 +717,7 @@ void Cuda::initialize( const Cuda::SelectDevice config , size_t num_instances )
 void Cuda::impl_initialize( const Cuda::SelectDevice config , size_t num_instances )
 #endif
 {
-  Impl::CudaInternal::singleton().initialize( config.cuda_device_id , num_instances );
+  Impl::CudaInternal::singleton().initialize( config.cuda_device_id , 0 );
 
   #if defined(KOKKOS_ENABLE_PROFILING)
     Kokkos::Profiling::initialize();
@@ -800,19 +768,17 @@ void Cuda::impl_finalize()
 }
 
 Cuda::Cuda()
-  : m_device( Impl::CudaInternal::singleton().m_cudaDev )
-  , m_stream( 0 )
+  : m_space_instance( &Impl::CudaInternal::singleton() )
 {
   Impl::CudaInternal::singleton().verify_is_initialized( "Cuda instance constructor" );
 }
 
-Cuda::Cuda( const int instance_id )
-  : m_device( Impl::CudaInternal::singleton().m_cudaDev )
-  , m_stream(
-      Impl::CudaInternal::singleton().verify_is_initialized( "Cuda instance constructor" )
-        ? Impl::CudaInternal::singleton().m_stream[ instance_id % Impl::CudaInternal::singleton().m_streamCount ]
-        : 0 )
-{}
+Cuda::Cuda(cudaStream_t stream)
+  :   m_space_instance(new Impl::CudaInternal)
+{
+  Impl::CudaInternal::singleton().verify_is_initialized( "Cuda instance constructor" );
+  m_space_instance->initialize(Impl::CudaInternal::singleton().m_cudaDev,stream);
+}
 
 void Cuda::print_configuration( std::ostream & s , const bool )
 { Impl::CudaInternal::singleton().print_configuration( s ); }
@@ -823,13 +789,27 @@ bool Cuda::sleep() { return false ; }
 bool Cuda::wake() { return true ; }
 #endif
 
-void Cuda::fence()
+void Cuda::impl_static_fence()
 {
   Kokkos::Impl::cuda_device_synchronize();
 }
 
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+void Cuda::fence() {
+  impl_static_fence();
+}
+#else
+void Cuda::fence() const {
+  m_space_instance->fence();
+}
+#endif
+
 const char* Cuda::name() { return "Cuda"; }
 
+cudaStream_t Cuda::cuda_stream() const { return m_space_instance->m_stream ; }
+int          Cuda::cuda_device() const { return m_space_instance->m_cudaDev ; }
+
+
 } // namespace Kokkos
 
 namespace Kokkos {
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..f9e333fcf0b954e7f0ceb39ee68f8b74e60574c6
--- /dev/null
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Instance.hpp
@@ -0,0 +1,156 @@
+#ifndef KOKKOS_CUDA_INSTANCE_HPP_
+#define KOKKOS_CUDA_INSTANCE_HPP_
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+struct CudaTraits {
+  enum { WarpSize       = 32      /* 0x0020 */ };
+  enum { WarpIndexMask  = 0x001f  /* Mask for warpindex */ };
+  enum { WarpIndexShift = 5       /* WarpSize == 1 << WarpShift */ };
+
+  enum { ConstantMemoryUsage    = 0x008000 /* 32k bytes */ };
+  enum { ConstantMemoryCache    = 0x002000 /*  8k bytes */ };
+  enum { KernelArgumentLimit    = 0x001000 /*  4k bytes */ };
+
+  typedef unsigned long
+    ConstantGlobalBufferType[ ConstantMemoryUsage / sizeof(unsigned long) ];
+
+#if defined(KOKKOS_ARCH_VOLTA) || \
+    defined(KOKKOS_ARCH_PASCAL)
+  enum { ConstantMemoryUseThreshold = 0x000200 /* 0 bytes -> always use constant (or global)*/ };
+#else
+  enum { ConstantMemoryUseThreshold = 0x000200 /* 512 bytes */ };
+#endif
+
+  KOKKOS_INLINE_FUNCTION static
+  CudaSpace::size_type warp_count( CudaSpace::size_type i )
+    { return ( i + WarpIndexMask ) >> WarpIndexShift ; }
+
+  KOKKOS_INLINE_FUNCTION static
+  CudaSpace::size_type warp_align( CudaSpace::size_type i )
+    {
+      enum { Mask = ~CudaSpace::size_type( WarpIndexMask ) };
+      return ( i + WarpIndexMask ) & Mask ;
+    }
+};
+
+//----------------------------------------------------------------------------
+
+CudaSpace::size_type cuda_internal_multiprocessor_count();
+CudaSpace::size_type cuda_internal_maximum_warp_count();
+CudaSpace::size_type cuda_internal_maximum_grid_count();
+CudaSpace::size_type cuda_internal_maximum_shared_words();
+
+CudaSpace::size_type cuda_internal_maximum_concurrent_block_count();
+
+CudaSpace::size_type * cuda_internal_scratch_flags( const Cuda&, const CudaSpace::size_type size );
+CudaSpace::size_type * cuda_internal_scratch_space( const Cuda&, const CudaSpace::size_type size );
+CudaSpace::size_type * cuda_internal_scratch_unified( const Cuda&, const CudaSpace::size_type size );
+
+} // namespace Impl
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+namespace Kokkos {
+namespace Impl {
+
+class CudaInternal {
+private:
+
+  CudaInternal( const CudaInternal & );
+  CudaInternal & operator = ( const CudaInternal & );
+
+
+public:
+
+  typedef Cuda::size_type size_type ;
+
+  int         m_cudaDev ;
+
+  // Device Properties
+  int         m_cudaArch ;
+  unsigned    m_multiProcCount ;
+  unsigned    m_maxWarpCount ;
+  unsigned    m_maxBlock ;
+  unsigned    m_maxSharedWords ;
+  uint32_t    m_maxConcurrency ;
+  int         m_shmemPerSM ;
+  int         m_maxShmemPerBlock ;
+  int         m_regsPerSM ;
+  int         m_maxBlocksPerSM ;
+  int         m_maxThreadsPerSM ;
+  int         m_maxThreadsPerBlock ;
+
+  mutable size_type   m_scratchSpaceCount ;
+  mutable size_type   m_scratchFlagsCount ;
+  mutable size_type   m_scratchUnifiedCount ;
+  mutable size_type   m_scratchFunctorSize ;
+  size_type   m_scratchUnifiedSupported ;
+  size_type   m_streamCount ;
+  mutable size_type * m_scratchSpace ;
+  mutable size_type * m_scratchFlags ;
+  mutable size_type * m_scratchUnified ;
+  mutable size_type * m_scratchFunctor ;
+  uint32_t  * m_scratchConcurrentBitset ;
+  cudaStream_t m_stream ;
+
+  static int was_initialized;
+  static int was_finalized;
+
+  static CudaInternal & singleton();
+
+  int verify_is_initialized( const char * const label ) const ;
+
+  int is_initialized() const
+    { return 0 != m_scratchSpace && 0 != m_scratchFlags ; }
+
+  void initialize( int cuda_device_id , cudaStream_t stream = 0 );
+  void finalize();
+
+  void print_configuration( std::ostream & ) const ;
+
+  void fence() const ;
+
+  ~CudaInternal();
+
+  CudaInternal()
+    : m_cudaDev( -1 )
+    , m_cudaArch( -1 )
+    , m_multiProcCount( 0 )
+    , m_maxWarpCount( 0 )
+    , m_maxBlock( 0 )
+    , m_maxSharedWords( 0 )
+    , m_maxConcurrency( 0 )
+    , m_shmemPerSM( 0 )
+    , m_maxShmemPerBlock( 0 )
+    , m_regsPerSM( 0 )
+    , m_maxBlocksPerSM( 0 )
+    , m_maxThreadsPerSM( 0 )
+    , m_maxThreadsPerBlock( 0 )
+    , m_scratchSpaceCount( 0 )
+    , m_scratchFlagsCount( 0 )
+    , m_scratchUnifiedCount( 0 )
+    , m_scratchFunctorSize( 0 )
+    , m_scratchUnifiedSupported( 0 )
+    , m_streamCount( 0 )
+    , m_scratchSpace( 0 )
+    , m_scratchFlags( 0 )
+    , m_scratchUnified( 0 )
+    , m_scratchFunctor( 0 )
+    , m_scratchConcurrentBitset( 0 )
+    , m_stream( 0 )
+    {}
+
+  size_type * scratch_space( const size_type size ) const ;
+  size_type * scratch_flags( const size_type size ) const ;
+  size_type * scratch_unified( const size_type size ) const ;
+  size_type * scratch_functor( const size_type size ) const ;
+};
+
+} // Namespace Impl
+} // Namespace Kokkos
+#endif
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_KernelLaunch.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_KernelLaunch.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..2ec868c1f173d451444341362bfe665aae3a0929
--- /dev/null
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_KernelLaunch.hpp
@@ -0,0 +1,579 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_CUDAEXEC_HPP
+#define KOKKOS_CUDAEXEC_HPP
+
+#include <Kokkos_Macros.hpp>
+#ifdef KOKKOS_ENABLE_CUDA
+
+#include <string>
+#include <cstdint>
+#include <Kokkos_Parallel.hpp>
+#include <impl/Kokkos_Error.hpp>
+#include <Cuda/Kokkos_Cuda_abort.hpp>
+#include <Cuda/Kokkos_Cuda_Error.hpp>
+#include <Cuda/Kokkos_Cuda_Locks.hpp>
+#include <Cuda/Kokkos_Cuda_Instance.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#if defined( __CUDACC__ )
+
+/** \brief  Access to constant memory on the device */
+#ifdef KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE
+
+__device__ __constant__
+extern unsigned long kokkos_impl_cuda_constant_memory_buffer[] ;
+
+#else
+
+__device__ __constant__
+unsigned long kokkos_impl_cuda_constant_memory_buffer[ Kokkos::Impl::CudaTraits::ConstantMemoryUsage / sizeof(unsigned long) ] ;
+
+#endif
+
+namespace Kokkos {
+namespace Impl {
+  void* cuda_resize_scratch_space(std::int64_t bytes, bool force_shrink = false);
+}
+}
+
+template< typename T >
+inline
+__device__
+T * kokkos_impl_cuda_shared_memory()
+{ extern __shared__ Kokkos::CudaSpace::size_type sh[]; return (T*) sh ; }
+
+namespace Kokkos {
+namespace Impl {
+
+//----------------------------------------------------------------------------
+// See section B.17 of Cuda C Programming Guide Version 3.2
+// for discussion of
+//   __launch_bounds__(maxThreadsPerBlock,minBlocksPerMultiprocessor)
+// function qualifier which could be used to improve performance.
+//----------------------------------------------------------------------------
+// Maximize L1 cache and minimize shared memory:
+//   cudaFuncSetCacheConfig(MyKernel, cudaFuncCachePreferL1 );
+// For 2.0 capability: 48 KB L1 and 16 KB shared
+//----------------------------------------------------------------------------
+
+template< class DriverType>
+__global__
+static void cuda_parallel_launch_constant_memory()
+{
+  const DriverType & driver =
+    *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer );
+
+  driver();
+}
+
+template< class DriverType, unsigned int maxTperB, unsigned int minBperSM >
+__global__
+__launch_bounds__(maxTperB, minBperSM)
+static void cuda_parallel_launch_constant_memory()
+{
+  const DriverType & driver =
+    *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer );
+
+  driver();
+}
+
+template< class DriverType>
+__global__
+static void cuda_parallel_launch_local_memory( const DriverType driver )
+{
+  driver();
+}
+
+template< class DriverType, unsigned int maxTperB, unsigned int minBperSM >
+__global__
+__launch_bounds__(maxTperB, minBperSM)
+static void cuda_parallel_launch_local_memory( const DriverType driver )
+{
+  driver();
+}
+
+template< class DriverType>
+__global__
+static void cuda_parallel_launch_global_memory( const DriverType* driver )
+{
+  driver->operator()();
+}
+
+template< class DriverType, unsigned int maxTperB, unsigned int minBperSM >
+__global__
+__launch_bounds__(maxTperB, minBperSM)
+static void cuda_parallel_launch_global_memory( const DriverType* driver )
+{
+  driver->operator()();
+}
+
+template< class DriverType>
+__global__
+static void cuda_parallel_launch_constant_or_global_memory( const DriverType* driver_ptr )
+{
+  const DriverType & driver = driver_ptr!=NULL ? *driver_ptr :
+    *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer );
+
+  driver();
+}
+
+template< class DriverType, unsigned int maxTperB, unsigned int minBperSM >
+__global__
+__launch_bounds__(maxTperB, minBperSM)
+static void cuda_parallel_launch_constant_or_global_memory( const DriverType* driver_ptr )
+{
+  const DriverType & driver = driver_ptr!=NULL ? *driver_ptr :
+    *((const DriverType *) kokkos_impl_cuda_constant_memory_buffer );
+
+  driver();
+}
+
+template< class DriverType >
+struct DeduceCudaLaunchMechanism {
+  constexpr static const Kokkos::Experimental::WorkItemProperty::HintLightWeight_t light_weight = Kokkos::Experimental::WorkItemProperty::HintLightWeight;
+  constexpr static const Kokkos::Experimental::WorkItemProperty::HintHeavyWeight_t heavy_weight = Kokkos::Experimental::WorkItemProperty::HintHeavyWeight ;
+  constexpr static const typename DriverType::Policy::work_item_property property = typename DriverType::Policy::work_item_property();
+
+  static constexpr const Experimental::CudaLaunchMechanism valid_launch_mechanism =
+      // BuildValidMask
+      (sizeof(DriverType)<CudaTraits::KernelArgumentLimit?
+          Experimental::CudaLaunchMechanism::LocalMemory:Experimental::CudaLaunchMechanism::Default)|
+      (sizeof(DriverType)<CudaTraits::ConstantMemoryUsage?
+          Experimental::CudaLaunchMechanism::ConstantMemory:Experimental::CudaLaunchMechanism::Default)|
+      Experimental::CudaLaunchMechanism::GlobalMemory;
+
+  static constexpr const Experimental::CudaLaunchMechanism requested_launch_mechanism =
+      (((property&light_weight)==light_weight)?
+           Experimental::CudaLaunchMechanism::LocalMemory :
+           Experimental::CudaLaunchMechanism::ConstantMemory)
+    | Experimental::CudaLaunchMechanism::GlobalMemory;
+
+  static constexpr const Experimental::CudaLaunchMechanism default_launch_mechanism =
+      // BuildValidMask
+      (sizeof(DriverType)<CudaTraits::ConstantMemoryUseThreshold)?
+          Experimental::CudaLaunchMechanism::LocalMemory:(
+      (sizeof(DriverType)<CudaTraits::ConstantMemoryUsage)?
+          Experimental::CudaLaunchMechanism::ConstantMemory:
+          Experimental::CudaLaunchMechanism::GlobalMemory);
+
+  //              None                LightWeight    HeavyWeight
+  // F<UseT       LCG LCG L  L        LCG  LG L  L    LCG  CG L  C
+  // UseT<F<KAL   LCG LCG C  C        LCG  LG C  L    LCG  CG C  C
+  // Kal<F<CMU     CG LCG C  C         CG  LG C  G     CG  CG C  C
+  // CMU<F          G LCG G  G          G  LG G  G      G  CG G  G
+  static constexpr const Experimental::CudaLaunchMechanism launch_mechanism =
+      ((property&light_weight)==light_weight)?
+          (sizeof(DriverType)<CudaTraits::KernelArgumentLimit?
+              Experimental::CudaLaunchMechanism::LocalMemory:
+              Experimental::CudaLaunchMechanism::GlobalMemory):(
+        ((property&heavy_weight)==heavy_weight)?
+          (sizeof(DriverType)<CudaTraits::ConstantMemoryUsage?
+              Experimental::CudaLaunchMechanism::ConstantMemory:
+              Experimental::CudaLaunchMechanism::GlobalMemory):
+          (default_launch_mechanism)
+      );
+};
+// Use local memory up to ConstantMemoryUseThreshold
+// Use global memory above ConstantMemoryUsage
+// In between use ConstantMemory
+template < class DriverType
+         , class LaunchBounds = Kokkos::LaunchBounds<>
+         , Experimental::CudaLaunchMechanism LaunchMechanism =
+             DeduceCudaLaunchMechanism<DriverType>::launch_mechanism >
+struct CudaParallelLaunch ;
+
+template < class DriverType
+         , unsigned int MaxThreadsPerBlock
+         , unsigned int MinBlocksPerSM>
+struct CudaParallelLaunch< DriverType
+                         , Kokkos::LaunchBounds< MaxThreadsPerBlock 
+                                               , MinBlocksPerSM >
+                          , Experimental::CudaLaunchMechanism::ConstantMemory>
+{
+  static_assert(sizeof(DriverType)<CudaTraits::ConstantMemoryUsage,"Kokkos Error: Requested CudaLaunchConstantMemory with a Functor larger than 32kB.");
+  inline
+  CudaParallelLaunch( const DriverType & driver
+                    , const dim3       & grid
+                    , const dim3       & block
+                    , const int          shmem
+                    , const CudaInternal* cuda_instance
+                    , const bool prefer_shmem )
+  {
+    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
+
+      // Fence before changing settings and copying closure
+      Kokkos::Cuda().fence();
+
+      if ( cuda_instance->m_maxShmemPerBlock < shmem ) {
+        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
+      }
+      #ifndef KOKKOS_ARCH_KEPLER
+      // On Kepler the L1 has no benefit since it doesn't cache reads
+      else {
+        CUDA_SAFE_CALL(
+          cudaFuncSetCacheConfig
+            ( cuda_parallel_launch_constant_memory
+                < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
+            , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
+            ) );
+      }
+      #endif
+
+      // Copy functor to constant memory on the device
+      cudaMemcpyToSymbolAsync(
+        kokkos_impl_cuda_constant_memory_buffer, &driver, sizeof(DriverType), 0, cudaMemcpyHostToDevice, cudaStream_t(cuda_instance->m_stream));
+
+      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
+
+      // Invoke the driver function on the device
+      cuda_parallel_launch_constant_memory
+        < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
+          <<< grid , block , shmem , cuda_instance->m_stream >>>();
+
+#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
+      CUDA_SAFE_CALL( cudaGetLastError() );
+      Kokkos::Cuda().fence();
+#endif
+    }
+  }
+
+  static cudaFuncAttributes get_cuda_func_attributes() {
+    cudaFuncAttributes attr;
+    cudaFuncGetAttributes(&attr,cuda_parallel_launch_constant_memory
+            < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >);
+    return attr;
+  }
+};
+
+template < class DriverType>
+struct CudaParallelLaunch< DriverType
+                         , Kokkos::LaunchBounds<0,0>
+                         , Experimental::CudaLaunchMechanism::ConstantMemory >
+{
+  static_assert(sizeof(DriverType)<CudaTraits::ConstantMemoryUsage,"Kokkos Error: Requested CudaLaunchConstantMemory with a Functor larger than 32kB.");
+  inline
+  CudaParallelLaunch( const DriverType & driver
+                    , const dim3       & grid
+                    , const dim3       & block
+                    , const int          shmem
+                    , const CudaInternal* cuda_instance
+                    , const bool prefer_shmem )
+  {
+    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
+
+      // Fence before changing settings and copying closure
+      Kokkos::Cuda().fence();
+
+      if ( cuda_instance->m_maxShmemPerBlock < shmem ) {
+        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
+      }
+      #ifndef KOKKOS_ARCH_KEPLER
+      // On Kepler the L1 has no benefit since it doesn't cache reads
+      else {
+        CUDA_SAFE_CALL(
+          cudaFuncSetCacheConfig
+            ( cuda_parallel_launch_constant_memory< DriverType >
+            , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
+            ) );
+      }
+      #endif
+
+      // Copy functor to constant memory on the device
+      cudaMemcpyToSymbolAsync(
+        kokkos_impl_cuda_constant_memory_buffer, &driver, sizeof(DriverType), 0, cudaMemcpyHostToDevice, cudaStream_t(cuda_instance->m_stream));
+
+      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
+
+      // Invoke the driver function on the device
+      cuda_parallel_launch_constant_memory< DriverType >
+          <<< grid , block , shmem , cuda_instance->m_stream >>>();
+
+#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
+      CUDA_SAFE_CALL( cudaGetLastError() );
+      Kokkos::Cuda().fence();
+#endif
+    }
+  }
+
+  static cudaFuncAttributes get_cuda_func_attributes() {
+    cudaFuncAttributes attr;
+    cudaFuncGetAttributes(&attr,cuda_parallel_launch_constant_memory
+            < DriverType >);
+    return attr;
+  }
+};
+
+template < class DriverType
+         , unsigned int MaxThreadsPerBlock
+         , unsigned int MinBlocksPerSM >
+struct CudaParallelLaunch< DriverType
+                         , Kokkos::LaunchBounds< MaxThreadsPerBlock 
+                                               , MinBlocksPerSM >
+                         , Experimental::CudaLaunchMechanism::LocalMemory >
+{
+  static_assert(sizeof(DriverType)<CudaTraits::KernelArgumentLimit,"Kokkos Error: Requested CudaLaunchLocalMemory with a Functor larger than 4096 bytes.");
+  inline
+  CudaParallelLaunch( const DriverType & driver
+                    , const dim3       & grid
+                    , const dim3       & block
+                    , const int          shmem
+                    , const CudaInternal* cuda_instance
+                    , const bool prefer_shmem )
+  {
+    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
+
+      if ( cuda_instance->m_maxShmemPerBlock < shmem ) {
+        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
+      }
+      #ifndef KOKKOS_ARCH_KEPLER
+      // On Kepler the L1 has no benefit since it doesn't cache reads
+      else {
+        CUDA_SAFE_CALL(
+          cudaFuncSetCacheConfig
+            ( cuda_parallel_launch_local_memory
+                < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
+            , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
+            ) );
+      }
+      #endif
+
+      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
+
+      // Invoke the driver function on the device
+      cuda_parallel_launch_local_memory
+        < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
+          <<< grid , block , shmem , cuda_instance->m_stream >>>( driver );
+
+#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
+      CUDA_SAFE_CALL( cudaGetLastError() );
+      Kokkos::Cuda().fence();
+#endif
+    }
+  }
+
+  static cudaFuncAttributes get_cuda_func_attributes() {
+    cudaFuncAttributes attr;
+    cudaFuncGetAttributes(&attr,cuda_parallel_launch_local_memory
+            < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >);
+    return attr;
+  }
+};
+
+template < class DriverType>
+struct CudaParallelLaunch< DriverType
+                         , Kokkos::LaunchBounds<0,0>
+                         , Experimental::CudaLaunchMechanism::LocalMemory >
+{
+  static_assert(sizeof(DriverType)<CudaTraits::KernelArgumentLimit,"Kokkos Error: Requested CudaLaunchLocalMemory with a Functor larger than 4096 bytes.");
+  inline
+  CudaParallelLaunch( const DriverType & driver
+                    , const dim3       & grid
+                    , const dim3       & block
+                    , const int          shmem
+                    , const CudaInternal* cuda_instance
+                    , const bool prefer_shmem)
+  {
+    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
+
+      if ( cuda_instance->m_maxShmemPerBlock < shmem ) {
+        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
+      }
+      #ifndef KOKKOS_ARCH_KEPLER
+      // On Kepler the L1 has no benefit since it doesn't cache reads
+      else {
+        CUDA_SAFE_CALL(
+          cudaFuncSetCacheConfig
+            ( cuda_parallel_launch_local_memory< DriverType >
+            , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
+            ) );
+      }
+      #endif
+
+      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
+
+      // Invoke the driver function on the device
+      cuda_parallel_launch_local_memory< DriverType >
+          <<< grid , block , shmem , cuda_instance->m_stream >>>( driver );
+
+#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
+      CUDA_SAFE_CALL( cudaGetLastError() );
+      Kokkos::Cuda().fence();
+#endif
+    }
+  }
+
+  static cudaFuncAttributes get_cuda_func_attributes() {
+    cudaFuncAttributes attr;
+    cudaFuncGetAttributes(&attr,cuda_parallel_launch_local_memory
+            < DriverType >);
+    return attr;
+  }
+};
+
+template < class DriverType
+         , unsigned int MaxThreadsPerBlock
+         , unsigned int MinBlocksPerSM>
+struct CudaParallelLaunch< DriverType
+                         , Kokkos::LaunchBounds< MaxThreadsPerBlock
+                                               , MinBlocksPerSM>
+                         , Experimental::CudaLaunchMechanism::GlobalMemory >
+{
+  inline
+  CudaParallelLaunch( const DriverType & driver
+                    , const dim3       & grid
+                    , const dim3       & block
+                    , const int          shmem
+                    , CudaInternal* cuda_instance
+                    , const bool prefer_shmem )
+  {
+    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
+
+      if ( cuda_instance->m_maxShmemPerBlock < shmem ) {
+        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
+      }
+      #ifndef KOKKOS_ARCH_KEPLER
+      // On Kepler the L1 has no benefit since it doesn't cache reads
+      else {
+        CUDA_SAFE_CALL(
+          cudaFuncSetCacheConfig
+            ( cuda_parallel_launch_global_memory
+                < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
+            , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
+            ) );
+      }
+      #endif
+
+      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
+
+      DriverType* driver_ptr = NULL;
+      driver_ptr = reinterpret_cast<DriverType*>(cuda_instance->scratch_functor(sizeof(DriverType)));
+      cudaMemcpyAsync(driver_ptr,&driver, sizeof(DriverType), cudaMemcpyDefault, cuda_instance->m_stream);
+
+      // Invoke the driver function on the device
+      cuda_parallel_launch_global_memory
+        < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >
+          <<< grid , block , shmem , cuda_instance->m_stream >>>( driver_ptr );
+
+#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
+      CUDA_SAFE_CALL( cudaGetLastError() );
+      Kokkos::Cuda().fence();
+#endif
+    }
+  }
+  static cudaFuncAttributes get_cuda_func_attributes() {
+    cudaFuncAttributes attr;
+    cudaFuncGetAttributes(&attr,cuda_parallel_launch_global_memory
+            < DriverType, MaxThreadsPerBlock, MinBlocksPerSM >);
+    return attr;
+  }
+
+};
+
+template < class DriverType>
+struct CudaParallelLaunch< DriverType
+                         , Kokkos::LaunchBounds<0,0>
+                         , Experimental::CudaLaunchMechanism::GlobalMemory >
+{
+  inline
+  CudaParallelLaunch( const DriverType & driver
+                    , const dim3       & grid
+                    , const dim3       & block
+                    , const int          shmem
+                    , CudaInternal* cuda_instance
+                    , const bool prefer_shmem)
+  {
+    if ( (grid.x != 0) && ( ( block.x * block.y * block.z ) != 0 ) ) {
+
+      if ( cuda_instance->m_maxShmemPerBlock < shmem ) {
+        Kokkos::Impl::throw_runtime_exception( std::string("CudaParallelLaunch FAILED: shared memory request is too large") );
+      }
+      #ifndef KOKKOS_ARCH_KEPLER
+      // On Kepler the L1 has no benefit since it doesn't cache reads
+      else {
+        CUDA_SAFE_CALL(
+          cudaFuncSetCacheConfig
+            ( cuda_parallel_launch_global_memory< DriverType >
+            , ( prefer_shmem ? cudaFuncCachePreferShared : cudaFuncCachePreferL1 )
+            ) );
+      }
+      #endif
+
+      KOKKOS_ENSURE_CUDA_LOCK_ARRAYS_ON_DEVICE();
+
+      DriverType* driver_ptr = NULL;
+      driver_ptr = reinterpret_cast<DriverType*>(cuda_instance->scratch_functor(sizeof(DriverType)));
+      cudaMemcpyAsync(driver_ptr,&driver, sizeof(DriverType), cudaMemcpyDefault, cuda_instance->m_stream);
+
+      cuda_parallel_launch_global_memory< DriverType >
+          <<< grid , block , shmem , cuda_instance->m_stream >>>( driver_ptr );
+
+#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
+      CUDA_SAFE_CALL( cudaGetLastError() );
+      Kokkos::Cuda().fence();
+#endif
+    }
+  }
+
+  static cudaFuncAttributes get_cuda_func_attributes() {
+    cudaFuncAttributes attr;
+    cudaFuncGetAttributes(&attr,cuda_parallel_launch_global_memory
+            < DriverType >);
+    return attr;
+  }
+};
+//----------------------------------------------------------------------------
+
+} // namespace Impl
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* defined( __CUDACC__ ) */
+#endif /* defined( KOKKOS_ENABLE_CUDA ) */
+#endif /* #ifndef KOKKOS_CUDAEXEC_HPP */
+
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp
index 665d0732a74863b3d245ee4fee8a740f9a0e4812..c05fbcc6c1b40dd6d0f30fcdaeca6fa1293ecc58 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp
@@ -55,9 +55,9 @@
 #include <utility>
 #include <Kokkos_Parallel.hpp>
 
-#include <Cuda/Kokkos_CudaExec.hpp>
+#include <Cuda/Kokkos_Cuda_KernelLaunch.hpp>
 #include <Cuda/Kokkos_Cuda_ReduceScan.hpp>
-#include <Cuda/Kokkos_Cuda_Internal.hpp>
+#include <Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp>
 #include <Cuda/Kokkos_Cuda_Locks.hpp>
 #include <Kokkos_Vectorization.hpp>
 #include <Cuda/Kokkos_Cuda_Version_9_8_Compatibility.hpp>
@@ -73,6 +73,9 @@
 //----------------------------------------------------------------------------
 
 namespace Kokkos {
+
+extern bool show_warnings() noexcept;
+
 namespace Impl {
 
 template< class ... Properties >
@@ -85,10 +88,14 @@ public:
 
   typedef PolicyTraits<Properties ... > traits;
 
+  template< class ExecSpace, class ... OtherProperties >
+  friend class TeamPolicyInternal;
+
 private:
 
   enum { MAX_WARP = 8 };
 
+  typename traits::execution_space m_space;
   int m_league_size ;
   int m_team_size ;
   int m_vector_length ;
@@ -101,6 +108,19 @@ public:
   //! Execution space of this execution policy
   typedef Kokkos::Cuda  execution_space ;
 
+  template<class ... OtherProperties>
+  TeamPolicyInternal( const TeamPolicyInternal<OtherProperties...>& p ) {
+    m_league_size = p.m_league_size;
+    m_team_size = p.m_team_size;
+    m_vector_length = p.m_vector_length;
+    m_team_scratch_size[0] = p.m_team_scratch_size[0];
+    m_team_scratch_size[1] = p.m_team_scratch_size[1];
+    m_thread_scratch_size[0] = p.m_thread_scratch_size[0];
+    m_thread_scratch_size[1] = p.m_thread_scratch_size[1];
+    m_chunk_size = p.m_chunk_size;
+    m_space = p.m_space;
+  }
+
   TeamPolicyInternal& operator = (const TeamPolicyInternal& p) {
     m_league_size = p.m_league_size;
     m_team_size = p.m_team_size;
@@ -110,6 +130,7 @@ public:
     m_thread_scratch_size[0] = p.m_thread_scratch_size[0];
     m_thread_scratch_size[1] = p.m_thread_scratch_size[1];
     m_chunk_size = p.m_chunk_size;
+    m_space = p.m_space;
     return *this;
   }
 
@@ -117,7 +138,7 @@ public:
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
   template< class FunctorType >
-  inline static
+  static inline
   int team_size_max( const FunctorType & functor )
     {
       int n = MAX_WARP * Impl::CudaTraits::WarpSize ;
@@ -128,7 +149,7 @@ public:
           /* for team   reduce */ + ( n + 2 ) * sizeof(double)
           /* for team   shared */ + Impl::FunctorTeamShmemSize< FunctorType >::value( functor , n );
 
-        if ( shmem_size < Impl::CudaTraits::SharedMemoryCapacity ) break ;
+        if ( shmem_size < typename traits::execution_space().impl_internal_space_instance()->m_maxShmemPerBlock ) break ;
       }
 
       return n ;
@@ -138,7 +159,10 @@ public:
   template<class FunctorType>
   int team_size_max( const FunctorType& f, const ParallelForTag& ) const {
     typedef Impl::ParallelFor< FunctorType , TeamPolicy<Properties...> > closure_type;
-    int block_size = Kokkos::Impl::cuda_get_max_block_size< closure_type, typename traits::launch_bounds >( f ,(size_t) vector_length(),
+    cudaFuncAttributes attr = CudaParallelLaunch< closure_type, typename traits::launch_bounds >::
+        get_cuda_func_attributes();
+    int block_size = Kokkos::Impl::cuda_get_max_block_size< FunctorType, typename traits::launch_bounds >( 
+        space().impl_internal_space_instance(),attr,f ,(size_t) vector_length(),
         (size_t) team_scratch_size(0) + 2*sizeof(double), (size_t) thread_scratch_size(0) + sizeof(double) );
     return block_size/vector_length();
   }
@@ -150,7 +174,10 @@ public:
     typedef Impl::ParallelReduce< FunctorType , TeamPolicy<Properties...>, reducer_type > closure_type;
     typedef Impl::FunctorValueTraits< FunctorType , typename traits::work_tag > functor_value_traits;
 
-    int block_size = Kokkos::Impl::cuda_get_max_block_size< closure_type, typename traits::launch_bounds >( f ,(size_t) vector_length(),
+    cudaFuncAttributes attr = CudaParallelLaunch< closure_type, typename traits::launch_bounds >::
+        get_cuda_func_attributes();
+    int block_size = Kokkos::Impl::cuda_get_max_block_size< FunctorType, typename traits::launch_bounds >( 
+        space().impl_internal_space_instance(),attr,f ,(size_t) vector_length(),
         (size_t) team_scratch_size(0) + 2*sizeof(double), (size_t) thread_scratch_size(0) + sizeof(double) +
                                                           ((functor_value_traits::StaticValueSize!=0)?0:functor_value_traits::value_size( f )));
 
@@ -178,7 +205,11 @@ public:
   template<class FunctorType>
   int team_size_recommended( const FunctorType& f, const ParallelForTag& ) const {
     typedef Impl::ParallelFor< FunctorType , TeamPolicy<Properties...> > closure_type;
-    int block_size = Kokkos::Impl::cuda_get_opt_block_size< closure_type, typename traits::launch_bounds >( f ,(size_t) vector_length(),
+    cudaFuncAttributes attr = CudaParallelLaunch< closure_type, typename traits::launch_bounds >::
+        get_cuda_func_attributes();
+    const int block_size = Kokkos::Impl::cuda_get_opt_block_size< FunctorType, typename traits::launch_bounds>(
+        space().impl_internal_space_instance(),
+        attr, f , (size_t) vector_length(),
         (size_t) team_scratch_size(0) + 2*sizeof(double), (size_t) thread_scratch_size(0) + sizeof(double));
     return block_size/vector_length();
   }
@@ -190,10 +221,18 @@ public:
     typedef Impl::ParallelReduce< FunctorType , TeamPolicy<Properties...>, reducer_type > closure_type;
     typedef Impl::FunctorValueTraits< FunctorType , typename traits::work_tag > functor_value_traits;
 
-    int block_size = Kokkos::Impl::cuda_get_opt_block_size< closure_type, typename traits::launch_bounds >( f ,(size_t) vector_length(),
+    cudaFuncAttributes attr = CudaParallelLaunch< closure_type, typename traits::launch_bounds >::
+        get_cuda_func_attributes();
+    const int block_size = Kokkos::Impl::cuda_get_opt_block_size< FunctorType, typename traits::launch_bounds>(
+        space().impl_internal_space_instance(),
+        attr, f , (size_t) vector_length(),
         (size_t) team_scratch_size(0) + 2*sizeof(double), (size_t) thread_scratch_size(0) + sizeof(double) +
                                                           ((functor_value_traits::StaticValueSize!=0)?0:functor_value_traits::value_size( f )));
-    return block_size/vector_length();
+    // Currently we require Power-of-2 team size for reductions.
+    int p2 = 1;
+    while(p2<=block_size) p2*=2;
+    p2/=2;
+    return p2/vector_length();
   }
 
 
@@ -201,6 +240,25 @@ public:
   int vector_length_max()
     { return Impl::CudaTraits::WarpSize; }
 
+  inline static
+  int verify_requested_vector_length( int requested_vector_length ) {
+      int test_vector_length = std::min( requested_vector_length, vector_length_max() );
+
+      // Allow only power-of-two vector_length
+      if ( !(is_integral_power_of_two( test_vector_length ) ) ) {
+         int test_pow2 = 1;
+         for (int i = 0; i < 5; i++) {
+            test_pow2 = test_pow2 << 1;
+            if (test_pow2 > test_vector_length) {
+               break;
+            }
+         }
+         test_vector_length = test_pow2 >> 1;
+      }
+
+      return test_vector_length;
+  }
+
   inline static
   int scratch_size_max(int level)
     { return (level==0?
@@ -224,9 +282,14 @@ public:
     return m_thread_scratch_size[level];
   }
 
+  inline typename traits::execution_space space() const {
+    return m_space;
+  }
+
   TeamPolicyInternal()
-    : m_league_size( 0 )
-    , m_team_size( 0 )
+    : m_space(typename traits::execution_space())
+    , m_league_size( 0 )
+    , m_team_size( -1 )
     , m_vector_length( 0 )
     , m_team_scratch_size {0,0}
     , m_thread_scratch_size {0,0}
@@ -234,22 +297,18 @@ public:
    {}
 
   /** \brief  Specify league size, request team size */
-  TeamPolicyInternal( execution_space &
+  TeamPolicyInternal( const execution_space space_
             , int league_size_
             , int team_size_request
             , int vector_length_request = 1 )
-    : m_league_size( league_size_ )
+    : m_space( space_ )
+    , m_league_size( league_size_ )
     , m_team_size( team_size_request )
-    , m_vector_length( vector_length_request )
+    , m_vector_length( verify_requested_vector_length(vector_length_request) )
     , m_team_scratch_size {0,0}
     , m_thread_scratch_size {0,0}
     , m_chunk_size ( 32 )
     {
-      // Allow only power-of-two vector_length
-      if ( ! Kokkos::Impl::is_integral_power_of_two( vector_length_request ) ) {
-        Impl::throw_runtime_exception( "Requested non-power-of-two vector length for TeamPolicy.");
-      }
-
       // Make sure league size is permissable
       if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count()))
         Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space.");
@@ -261,22 +320,18 @@ public:
     }
 
   /** \brief  Specify league size, request team size */
-  TeamPolicyInternal( execution_space &
+  TeamPolicyInternal( const execution_space space_
             , int league_size_
             , const Kokkos::AUTO_t & /* team_size_request */
             , int vector_length_request = 1 )
-    : m_league_size( league_size_ )
+    : m_space( space_ )
+    , m_league_size( league_size_ )
     , m_team_size( -1 )
-    , m_vector_length( vector_length_request )
+    , m_vector_length( verify_requested_vector_length(vector_length_request) )
     , m_team_scratch_size {0,0}
     , m_thread_scratch_size {0,0}
     , m_chunk_size ( 32 )
     {
-      // Allow only power-of-two vector_length
-      if ( ! Kokkos::Impl::is_integral_power_of_two( vector_length_request ) ) {
-        Impl::throw_runtime_exception( "Requested non-power-of-two vector length for TeamPolicy.");
-      }
-
       // Make sure league size is permissable
       if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count()))
         Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space.");
@@ -285,18 +340,14 @@ public:
   TeamPolicyInternal( int league_size_
             , int team_size_request
             , int vector_length_request = 1 )
-    : m_league_size( league_size_ )
+    : m_space( typename traits::execution_space() )
+    , m_league_size( league_size_ )
     , m_team_size( team_size_request )
-    , m_vector_length ( vector_length_request )
+    , m_vector_length ( verify_requested_vector_length(vector_length_request) )
     , m_team_scratch_size {0,0}
     , m_thread_scratch_size {0,0}
     , m_chunk_size ( 32 )
     {
-      // Allow only power-of-two vector_length
-      if ( ! Kokkos::Impl::is_integral_power_of_two( vector_length_request ) ) {
-        Impl::throw_runtime_exception( "Requested non-power-of-two vector length for TeamPolicy.");
-      }
-
       // Make sure league size is permissable
       if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count()))
         Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space.");
@@ -310,18 +361,14 @@ public:
   TeamPolicyInternal( int league_size_
             , const Kokkos::AUTO_t & /* team_size_request */
             , int vector_length_request = 1 )
-    : m_league_size( league_size_ )
+    : m_space( typename traits::execution_space() )
+    , m_league_size( league_size_ )
     , m_team_size( -1 )
-    , m_vector_length ( vector_length_request )
+    , m_vector_length ( verify_requested_vector_length(vector_length_request) )
     , m_team_scratch_size {0,0}
     , m_thread_scratch_size {0,0}
     , m_chunk_size ( 32 )
     {
-      // Allow only power-of-two vector_length
-      if ( ! Kokkos::Impl::is_integral_power_of_two( vector_length_request ) ) {
-        Impl::throw_runtime_exception( "Requested non-power-of-two vector length for TeamPolicy.");
-      }
-
       // Make sure league size is permissable
       if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count()))
         Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space.");
@@ -431,9 +478,10 @@ class ParallelFor< FunctorType
                  , Kokkos::Cuda
                  >
 {
+public:
+  typedef Kokkos::RangePolicy< Traits ... > Policy;
 private:
 
-  typedef Kokkos::RangePolicy< Traits ... > Policy;
   typedef typename Policy::member_type  Member ;
   typedef typename Policy::work_tag     WorkTag ;
   typedef typename Policy::launch_bounds LaunchBounds ;
@@ -479,11 +527,17 @@ public:
   void execute() const
     {
       const typename Policy::index_type nwork = m_policy.end() - m_policy.begin();
-      const int block_size = Kokkos::Impl::cuda_get_opt_block_size< ParallelFor, LaunchBounds>( m_functor , 1, 0 , 0 );
+
+      cudaFuncAttributes attr = CudaParallelLaunch< ParallelFor, LaunchBounds >::
+          get_cuda_func_attributes();
+      const int block_size = Kokkos::Impl::cuda_get_opt_block_size< FunctorType, LaunchBounds>(
+          m_policy.space().impl_internal_space_instance(),
+          attr, m_functor , 1, 0 , 0 );
       const dim3 block(  1 , block_size , 1);
-      const dim3 grid( std::min( typename Policy::index_type(( nwork + block.y - 1 ) / block.y) , typename Policy::index_type(cuda_internal_maximum_grid_count()) ) , 1 , 1);
+      const dim3 grid( std::min( typename Policy::index_type(( nwork + block.y - 1 ) / block.y) ,
+                       typename Policy::index_type(cuda_internal_maximum_grid_count()) ) , 1 , 1);
 
-      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 );
+      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_policy.space().impl_internal_space_instance() , false );
     }
 
   ParallelFor( const FunctorType  & arg_functor ,
@@ -491,6 +545,7 @@ public:
     : m_functor( arg_functor )
     , m_policy(  arg_policy )
     { }
+
 };
 
 
@@ -501,8 +556,9 @@ class ParallelFor< FunctorType
                  , Kokkos::Cuda
                  >
 {
-private:
+public:
   typedef Kokkos::MDRangePolicy< Traits ...  > Policy ;
+private:
   using RP = Policy;
   typedef typename Policy::array_index_type array_index_type;
   typedef typename Policy::index_type index_type;
@@ -526,7 +582,7 @@ public:
   void execute() const
   {
     if(m_rp.m_num_tiles==0) return;
-    const array_index_type maxblocks = static_cast<array_index_type>(Kokkos::Impl::CudaTraits::UpperBoundGridCount);
+    const array_index_type maxblocks = static_cast<array_index_type>(m_rp.space().impl_internal_space_instance()->m_maxBlock);
     if ( RP::rank == 2 )
     {
       const dim3 block( m_rp.m_tile[0] , m_rp.m_tile[1] , 1);
@@ -535,7 +591,7 @@ public:
           , std::min( ( m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1 ) / block.y , maxblocks )
           , 1
           );
-      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 );
+      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false );
     }
     else if ( RP::rank == 3 )
     {
@@ -545,7 +601,7 @@ public:
         , std::min( ( m_rp.m_upper[1] - m_rp.m_lower[1] + block.y - 1 ) / block.y , maxblocks )
         , std::min( ( m_rp.m_upper[2] - m_rp.m_lower[2] + block.z - 1 ) / block.z , maxblocks )
         );
-      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 );
+      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false );
     }
     else if ( RP::rank == 4 )
     {
@@ -557,7 +613,7 @@ public:
         , std::min( ( m_rp.m_upper[2] - m_rp.m_lower[2] + block.y - 1 ) / block.y , maxblocks )
         , std::min( ( m_rp.m_upper[3] - m_rp.m_lower[3] + block.z - 1 ) / block.z , maxblocks )
         );
-      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 );
+      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false );
     }
     else if ( RP::rank == 5 )
     {
@@ -570,7 +626,7 @@ public:
                   , static_cast<index_type>(maxblocks) )
         , std::min( ( m_rp.m_upper[4] - m_rp.m_lower[4] + block.z - 1 ) / block.z , maxblocks )
         );
-      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 );
+      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false );
     }
     else if ( RP::rank == 6 )
     {
@@ -584,7 +640,7 @@ public:
         , std::min( static_cast<index_type>( m_rp.m_tile_end[4] * m_rp.m_tile_end[5] )
                   , static_cast<index_type>(maxblocks) )
         );
-      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 );
+      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this , grid , block , 0 , m_rp.space().impl_internal_space_instance() , false );
     }
     else
     {
@@ -609,9 +665,10 @@ class ParallelFor< FunctorType
                  , Kokkos::Cuda
                  >
 {
+public:
+  typedef TeamPolicyInternal< Kokkos::Cuda , Properties ... >   Policy ;
 private:
 
-  typedef TeamPolicyInternal< Kokkos::Cuda , Properties ... >   Policy ;
   typedef typename Policy::member_type  Member ;
   typedef typename Policy::work_tag     WorkTag ;
   typedef typename Policy::launch_bounds  LaunchBounds ;
@@ -631,13 +688,14 @@ private:
   //
 
   const FunctorType  m_functor ;
+  const Policy       m_policy ;
   const size_type    m_league_size ;
-  const size_type    m_team_size ;
+  int    m_team_size ;
   const size_type    m_vector_size ;
-  const int m_shmem_begin ;
-  const int m_shmem_size ;
+  int m_shmem_begin ;
+  int m_shmem_size ;
   void*              m_scratch_ptr[2] ;
-  const int m_scratch_size[2] ;
+  int m_scratch_size[2] ;
 
   template< class TagType >
   __device__ inline
@@ -705,7 +763,7 @@ public:
       const dim3 grid( int(m_league_size) , 1 , 1 );
       const dim3 block( int(m_vector_size) , int(m_team_size) , 1 );
 
-      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this, grid, block, shmem_size_total ); // copy to device and execute
+      CudaParallelLaunch< ParallelFor, LaunchBounds >( *this, grid, block, shmem_size_total, m_policy.space().impl_internal_space_instance() , true ); // copy to device and execute
 
     }
 
@@ -713,26 +771,37 @@ public:
              , const Policy       & arg_policy
              )
     : m_functor( arg_functor )
+    , m_policy( arg_policy )
     , m_league_size( arg_policy.league_size() )
-    , m_team_size( 0 <= arg_policy.team_size() ? arg_policy.team_size() :
-        Kokkos::Impl::cuda_get_opt_block_size< ParallelFor, LaunchBounds >( arg_functor , arg_policy.vector_length(), arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) / arg_policy.vector_length() )
+    , m_team_size( arg_policy.team_size() )
     , m_vector_size( arg_policy.vector_length() )
-    , m_shmem_begin( sizeof(double) * ( m_team_size + 2 ) )
-    , m_shmem_size( arg_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( m_functor , m_team_size ) )
-    , m_scratch_ptr{NULL,NULL}
-    , m_scratch_size{arg_policy.scratch_size(0,m_team_size),arg_policy.scratch_size(1,m_team_size)}
     {
+      cudaFuncAttributes attr = CudaParallelLaunch< ParallelFor, LaunchBounds >::
+          get_cuda_func_attributes();
+      m_team_size = m_team_size>=0?m_team_size:Kokkos::Impl::cuda_get_opt_block_size< FunctorType, LaunchBounds>(
+        m_policy.space().impl_internal_space_instance(),
+        attr, m_functor , m_vector_size,
+        m_policy.team_scratch_size(0), m_policy.thread_scratch_size(0) )/m_vector_size;
+
+      m_shmem_begin = ( sizeof(double) * ( m_team_size + 2 ) );
+      m_shmem_size = ( m_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( m_functor , m_team_size ) );
+      m_scratch_size[0] = m_policy.scratch_size(0,m_team_size);
+      m_scratch_size[1] = m_policy.scratch_size(1,m_team_size);
+
       // Functor's reduce memory, team scan memory, and team shared memory depend upon team size.
-      m_scratch_ptr[1] = cuda_resize_scratch_space(m_scratch_size[1]*(Cuda::concurrency()/(m_team_size*m_vector_size)));
+      m_scratch_ptr[0] = NULL;
+      m_scratch_ptr[1] = m_team_size<=0?NULL:cuda_resize_scratch_space(static_cast<ptrdiff_t>(m_scratch_size[1])*static_cast<ptrdiff_t>(Cuda::concurrency()/(m_team_size*m_vector_size)));
 
       const int shmem_size_total = m_shmem_begin + m_shmem_size ;
-      if ( CudaTraits::SharedMemoryCapacity < shmem_size_total ) {
+      if ( m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size_total ) {
+        printf("%i %i\n",m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock,shmem_size_total);
         Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelFor< Cuda > insufficient shared memory"));
       }
 
       if ( int(m_team_size) >
-           int(Kokkos::Impl::cuda_get_max_block_size< ParallelFor, LaunchBounds >
-                 ( arg_functor , arg_policy.vector_length(), arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) / arg_policy.vector_length())) {
+           int(Kokkos::Impl::cuda_get_max_block_size< FunctorType, LaunchBounds >
+                 ( m_policy.space().impl_internal_space_instance(),
+        attr, arg_functor , arg_policy.vector_length(), arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) / arg_policy.vector_length())) {
         Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelFor< Cuda > requested too large team size."));
       }
     }
@@ -754,9 +823,10 @@ class ParallelReduce< FunctorType
                     , Kokkos::Cuda
                     >
 {
+public:
+  typedef Kokkos::RangePolicy< Traits ... >         Policy ;
 private:
 
-  typedef Kokkos::RangePolicy< Traits ... >         Policy ;
 
   typedef typename Policy::WorkRange    WorkRange ;
   typedef typename Policy::work_tag     WorkTag ;
@@ -897,11 +967,16 @@ public:
    }*/
 
   // Determine block size constrained by shared memory:
-  static inline
+  inline
   unsigned local_block_size( const FunctorType & f )
     {
       unsigned n = CudaTraits::WarpSize * 8 ;
-      while ( n && CudaTraits::SharedMemoryCapacity < cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n ) ) { n >>= 1 ; }
+      int shmem_size = cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n );
+      while ( (n && (m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size)) ||
+          (n > static_cast<unsigned>(Kokkos::Impl::cuda_get_max_block_size< ParallelReduce, LaunchBounds>( f , 1, shmem_size , 0 )))) {
+        n >>= 1 ;
+        shmem_size = cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n );
+      }
       return n ;
     }
 
@@ -912,9 +987,9 @@ public:
       if ( nwork ) {
         const int block_size = local_block_size( m_functor );
 
-        m_scratch_space = cuda_internal_scratch_space( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_size /* block_size == max block_count */ );
-        m_scratch_flags = cuda_internal_scratch_flags( sizeof(size_type) );
-        m_unified_space = cuda_internal_scratch_unified( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) );
+        m_scratch_space = cuda_internal_scratch_space( m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_size /* block_size == max block_count */ );
+        m_scratch_flags = cuda_internal_scratch_flags( m_policy.space(), sizeof(size_type) );
+        m_unified_space = cuda_internal_scratch_unified( m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) );
 
         // REQUIRED ( 1 , N , 1 )
         const dim3 block( 1 , block_size , 1 );
@@ -923,10 +998,10 @@ public:
 
       const int shmem = UseShflReduction?0:cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( m_functor , block.y );
 
-      CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem ); // copy to device and execute
+      CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute
 
       if(!m_result_ptr_device_accessible) {
-        Cuda::fence();
+        Cuda().fence();
 
         if ( m_result_ptr ) {
           if ( m_unified_space ) {
@@ -987,9 +1062,10 @@ class ParallelReduce< FunctorType
                     , Kokkos::Cuda
                     >
 {
+public:
+  typedef Kokkos::MDRangePolicy< Traits ... > Policy ;
 private:
 
-  typedef Kokkos::MDRangePolicy< Traits ... > Policy ;
   typedef typename Policy::array_index_type                 array_index_type;
   typedef typename Policy::index_type                       index_type;
 
@@ -1121,11 +1197,16 @@ public:
    }
 */
   // Determine block size constrained by shared memory:
-  static inline
+  inline
   unsigned local_block_size( const FunctorType & f )
     {
       unsigned n = CudaTraits::WarpSize * 8 ;
-      while ( n && CudaTraits::SharedMemoryCapacity < cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n ) ) { n >>= 1 ; }
+      int shmem_size = cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n );
+      while ( (n && (m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size)) ||
+          (n > static_cast<unsigned>(Kokkos::Impl::cuda_get_max_block_size< ParallelReduce, LaunchBounds>( f , 1, shmem_size , 0 )))) {
+        n >>= 1 ;
+        shmem_size = cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n );
+      }
       return n ;
     }
 
@@ -1144,9 +1225,9 @@ public:
         block_size = (block_size > suggested_blocksize) ? block_size : suggested_blocksize ; //Note: block_size must be less than or equal to 512
 
 
-        m_scratch_space = cuda_internal_scratch_space( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_size /* block_size == max block_count */ );
-        m_scratch_flags = cuda_internal_scratch_flags( sizeof(size_type) );
-        m_unified_space = cuda_internal_scratch_unified( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) );
+        m_scratch_space = cuda_internal_scratch_space( m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_size /* block_size == max block_count */ );
+        m_scratch_flags = cuda_internal_scratch_flags( m_policy.space(), sizeof(size_type) );
+        m_unified_space = cuda_internal_scratch_unified( m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) );
 
         // REQUIRED ( 1 , N , 1 )
         const dim3 block( 1 , block_size , 1 );
@@ -1155,10 +1236,10 @@ public:
 
       const int shmem = UseShflReduction?0:cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( m_functor , block.y );
 
-      CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem ); // copy to device and execute
+      CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute
 
       if(!m_result_ptr_device_accessible) {
-        Cuda::fence();
+        Cuda().fence();
 
         if ( m_result_ptr ) {
           if ( m_unified_space ) {
@@ -1213,8 +1294,6 @@ public:
 
 //----------------------------------------------------------------------------
 
-#if 1
-
 template< class FunctorType , class ReducerType, class ... Properties >
 class ParallelReduce< FunctorType
                     , Kokkos::TeamPolicy< Properties ... >
@@ -1222,9 +1301,10 @@ class ParallelReduce< FunctorType
                     , Kokkos::Cuda
                     >
 {
+public:
+  typedef TeamPolicyInternal< Kokkos::Cuda, Properties ... >  Policy ;
 private:
 
-  typedef TeamPolicyInternal< Kokkos::Cuda, Properties ... >  Policy ;
   typedef typename Policy::member_type  Member ;
   typedef typename Policy::work_tag     WorkTag ;
   typedef typename Policy::launch_bounds     LaunchBounds ;
@@ -1261,6 +1341,7 @@ private:
   //
 
   const FunctorType   m_functor ;
+  const Policy        m_policy ;
   const ReducerType   m_reducer ;
   const pointer_type  m_result_ptr ;
   const bool          m_result_ptr_device_accessible ;
@@ -1273,7 +1354,7 @@ private:
   void*               m_scratch_ptr[2] ;
   int                 m_scratch_size[2] ;
   const size_type     m_league_size ;
-  const size_type     m_team_size ;
+  int                 m_team_size ;
   const size_type     m_vector_size ;
 
   template< class TagType >
@@ -1412,20 +1493,20 @@ public:
       const int nwork = m_league_size * m_team_size ;
       if ( nwork ) {
         const int block_count = UseShflReduction? std::min( m_league_size , size_type(1024*32) )
-          :std::min( m_league_size , m_team_size );
+          :std::min( int(m_league_size) , m_team_size );
 
-        m_scratch_space = cuda_internal_scratch_space( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_count );
-        m_scratch_flags = cuda_internal_scratch_flags( sizeof(size_type) );
-        m_unified_space = cuda_internal_scratch_unified( ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) );
+        m_scratch_space = cuda_internal_scratch_space(m_policy.space(), ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) * block_count );
+        m_scratch_flags = cuda_internal_scratch_flags(m_policy.space(), sizeof(size_type) );
+        m_unified_space = cuda_internal_scratch_unified( m_policy.space(),ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer) ) );
 
         const dim3 block( m_vector_size , m_team_size , 1 );
         const dim3 grid( block_count , 1 , 1 );
         const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size ;
 
-        CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem_size_total ); // copy to device and execute
+        CudaParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem_size_total , m_policy.space().impl_internal_space_instance() , true ); // copy to device and execute
 
         if(!m_result_ptr_device_accessible) {
-          Cuda::fence();
+          Cuda().fence();
 
           if ( m_result_ptr ) {
             if ( m_unified_space ) {
@@ -1454,6 +1535,7 @@ public:
                                    Kokkos::is_view< ViewType >::value
                                 ,void*>::type = NULL)
   : m_functor( arg_functor )
+  , m_policy ( arg_policy )
   , m_reducer( InvalidType() )
   , m_result_ptr( arg_result.data() )
   , m_result_ptr_device_accessible(MemorySpaceAccess< Kokkos::CudaSpace , typename ViewType::memory_space>::accessible )
@@ -1464,35 +1546,30 @@ public:
   , m_shmem_begin( 0 )
   , m_shmem_size( 0 )
   , m_scratch_ptr{NULL,NULL}
-  , m_scratch_size{
-    arg_policy.scratch_size(0,( 0 <= arg_policy.team_size() ? arg_policy.team_size() :
-        Kokkos::Impl::cuda_get_opt_block_size< ParallelReduce, LaunchBounds >( arg_functor , arg_policy.vector_length(),
-                                                                 arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) /
-                                                                 arg_policy.vector_length() )
-    ), arg_policy.scratch_size(1,( 0 <= arg_policy.team_size() ? arg_policy.team_size() :
-        Kokkos::Impl::cuda_get_opt_block_size< ParallelReduce, LaunchBounds >( arg_functor , arg_policy.vector_length(),
-                                                                 arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) /
-                                                                 arg_policy.vector_length() )
-        )}
   , m_league_size( arg_policy.league_size() )
-  , m_team_size( 0 <= arg_policy.team_size() ? arg_policy.team_size() :
-      Kokkos::Impl::cuda_get_opt_block_size< ParallelReduce, LaunchBounds >( arg_functor , arg_policy.vector_length(),
-                                                               arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) /
-                                                               arg_policy.vector_length() )
+  , m_team_size( arg_policy.team_size() )
   , m_vector_size( arg_policy.vector_length() )
   {
+    cudaFuncAttributes attr = CudaParallelLaunch< ParallelReduce, LaunchBounds >::
+        get_cuda_func_attributes();
+    m_team_size = m_team_size>=0?m_team_size:
+        Kokkos::Impl::cuda_get_opt_block_size< FunctorType, LaunchBounds>(
+      m_policy.space().impl_internal_space_instance(),
+      attr, m_functor , m_vector_size,
+      m_policy.team_scratch_size(0), m_policy.thread_scratch_size(0) )/m_vector_size;
+
     // Return Init value if the number of worksets is zero
-    if( arg_policy.league_size() == 0) {
+    if( m_league_size*m_team_size == 0) {
       ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , arg_result.data() );
       return ;
     }
 
     m_team_begin = UseShflReduction?0:cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( arg_functor , m_team_size );
     m_shmem_begin = sizeof(double) * ( m_team_size + 2 );
-    m_shmem_size = arg_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , m_team_size );
-    m_scratch_ptr[1] = cuda_resize_scratch_space(static_cast<std::int64_t>(m_scratch_size[1])*(static_cast<std::int64_t>(Cuda::concurrency()/(m_team_size*m_vector_size))));
+    m_shmem_size = m_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , m_team_size );
     m_scratch_size[0] = m_shmem_size;
-    m_scratch_size[1] = arg_policy.scratch_size(1,m_team_size);
+    m_scratch_size[1] = m_policy.scratch_size(1,m_team_size);
+    m_scratch_ptr[1] = m_team_size<=0?NULL:cuda_resize_scratch_space(static_cast<std::int64_t>(m_scratch_size[1])*(static_cast<std::int64_t>(Cuda::concurrency()/(m_team_size*m_vector_size))));
 
     // The global parallel_reduce does not support vector_length other than 1 at the moment
     if( (arg_policy.vector_length() > 1) && !UseShflReduction )
@@ -1509,7 +1586,7 @@ public:
       Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > bad team size"));
     }
 
-    if ( CudaTraits::SharedMemoryCapacity < shmem_size_total ) {
+    if ( m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size_total ) {
       Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > requested too much L0 scratch memory"));
     }
 
@@ -1523,6 +1600,7 @@ public:
                 , const Policy       & arg_policy
                 , const ReducerType & reducer)
   : m_functor( arg_functor )
+  , m_policy( arg_policy )
   , m_reducer( reducer )
   , m_result_ptr( reducer.view().data() )
   , m_result_ptr_device_accessible(MemorySpaceAccess< Kokkos::CudaSpace , typename ReducerType::result_view_type::memory_space>::accessible )
@@ -1534,12 +1612,17 @@ public:
   , m_shmem_size( 0 )
   , m_scratch_ptr{NULL,NULL}
   , m_league_size( arg_policy.league_size() )
-  , m_team_size( 0 <= arg_policy.team_size() ? arg_policy.team_size() :
-      Kokkos::Impl::cuda_get_opt_block_size< ParallelReduce, LaunchBounds >( arg_functor , arg_policy.vector_length(),
-                                                               arg_policy.team_scratch_size(0),arg_policy.thread_scratch_size(0) ) /
-      arg_policy.vector_length() )
+  , m_team_size( arg_policy.team_size() )
   , m_vector_size( arg_policy.vector_length() )
   {
+    cudaFuncAttributes attr = CudaParallelLaunch< ParallelReduce, LaunchBounds >::
+        get_cuda_func_attributes();
+    m_team_size = m_team_size>=0?m_team_size:
+        Kokkos::Impl::cuda_get_opt_block_size< FunctorType, LaunchBounds>(
+      m_policy.space().impl_internal_space_instance(),
+      attr, m_functor , m_vector_size,
+      m_policy.team_scratch_size(0), m_policy.thread_scratch_size(0) )/m_vector_size;
+
     // Return Init value if the number of worksets is zero
     if( arg_policy.league_size() == 0) {
       ValueInit::init( ReducerConditional::select(m_functor , m_reducer) , m_result_ptr );
@@ -1548,10 +1631,10 @@ public:
 
     m_team_begin = UseShflReduction?0:cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( arg_functor , m_team_size );
     m_shmem_begin = sizeof(double) * ( m_team_size + 2 );
-    m_shmem_size = arg_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , m_team_size );
-    m_scratch_ptr[1] = cuda_resize_scratch_space(m_scratch_size[1]*(Cuda::concurrency()/(m_team_size*m_vector_size)));
+    m_shmem_size = m_policy.scratch_size(0,m_team_size) + FunctorTeamShmemSize< FunctorType >::value( arg_functor , m_team_size );
     m_scratch_size[0] = m_shmem_size;
-    m_scratch_size[1] = arg_policy.scratch_size(1,m_team_size);
+    m_scratch_size[1] = m_policy.scratch_size(1,m_team_size);
+    m_scratch_ptr[1] = m_team_size<=0?NULL:cuda_resize_scratch_space(static_cast<ptrdiff_t>(m_scratch_size[1])*static_cast<ptrdiff_t>(Cuda::concurrency()/(m_team_size*m_vector_size)));
 
     // The global parallel_reduce does not support vector_length other than 1 at the moment
     if( (arg_policy.vector_length() > 1) && !UseShflReduction )
@@ -1565,7 +1648,7 @@ public:
     const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size ;
 
     if ( (! Kokkos::Impl::is_integral_power_of_two( m_team_size )  && !UseShflReduction ) ||
-         CudaTraits::SharedMemoryCapacity < shmem_size_total ) {
+         m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock < shmem_size_total ) {
       Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > bad team size"));
     }
     if ( int(m_team_size) > arg_policy.team_size_max(m_functor,ParallelReduceTag()) ) {
@@ -1575,365 +1658,6 @@ public:
   }
 };
 
-//----------------------------------------------------------------------------
-#else
-//----------------------------------------------------------------------------
-
-template< class FunctorType , class ReducerType, class ... Properties >
-class ParallelReduce< FunctorType
-                    , Kokkos::TeamPolicy< Properties ... >
-                    , ReducerType
-                    , Kokkos::Cuda
-                    >
-{
-private:
-
-  enum : int { align_scratch_value = 0x0100 /* 256 */ };
-  enum : int { align_scratch_mask  = align_scratch_value - 1 };
-
-  KOKKOS_INLINE_FUNCTION static constexpr
-  int align_scratch( const int n )
-    {
-      return ( n & align_scratch_mask )
-             ? n + align_scratch_value - ( n & align_scratch_mask ) : n ;
-    }
-
-  //----------------------------------------
-  // Reducer does not wrap a functor
-  template< class R = ReducerType , class F = void >
-  struct reducer_type : public R {
-
-    template< class S >
-    using rebind = reducer_type< typename R::rebind<S> , void > ;
-
-    KOKKOS_INLINE_FUNCTION
-    reducer_type( FunctorType const *
-                , ReducerType const * arg_reducer
-                , typename R::value_type * arg_value )
-      : R( *arg_reducer , arg_value ) {}
-  };
-
-  // Reducer does wrap a functor
-  template< class R >
-  struct reducer_type< R , FunctorType > : public R {
-
-    template< class S >
-    using rebind = reducer_type< typename R::rebind<S> , FunctorType > ;
-
-    KOKKOS_INLINE_FUNCTION
-    reducer_type( FunctorType const * arg_functor
-                , ReducerType const *
-                , typename R::value_type * arg_value )
-      : R( arg_functor , arg_value ) {}
-  };
-
-  //----------------------------------------
-
-  typedef TeamPolicyInternal< Kokkos::Cuda, Properties ... >  Policy ;
-  typedef CudaTeamMember                           Member ;
-  typedef typename Policy::work_tag                WorkTag ;
-  typedef typename reducer_type<>::pointer_type    pointer_type ;
-  typedef typename reducer_type<>::reference_type  reference_type ;
-  typedef typename reducer_type<>::value_type      value_type ;
-  typedef typename Policy::launch_bounds           LaunchBounds ;
-
-  typedef Kokkos::Impl::FunctorAnalysis
-    < Kokkos::Impl::FunctorPatternInterface::REDUCE
-    , Policy
-    , FunctorType
-    > Analysis ;
-
-public:
-
-  typedef FunctorType      functor_type ;
-  typedef Cuda::size_type  size_type ;
-
-private:
-
-  const FunctorType     m_functor ;
-  const reducer_type<>  m_reducer ;
-  size_type *           m_scratch_space ;
-  size_type *           m_unified_space ;
-  size_type             m_team_begin ;
-  size_type             m_shmem_begin ;
-  size_type             m_shmem_size ;
-  void*                 m_scratch_ptr[2] ;
-  int                   m_scratch_size[2] ;
-  const size_type       m_league_size ;
-  const size_type       m_team_size ;
-  const size_type       m_vector_size ;
-
-  template< class TagType >
-  __device__ inline
-  typename std::enable_if< std::is_same< TagType , void >::value >::type
-  exec_team( const Member & member , reference_type update ) const
-    { m_functor( member , update ); }
-
-  template< class TagType >
-  __device__ inline
-  typename std::enable_if< ! std::is_same< TagType , void >::value >::type
-  exec_team( const Member & member , reference_type update ) const
-    { m_functor( TagType() , member , update ); }
-
-
-public:
-
-  __device__ inline
-  void operator() () const
-    {
-      void * const shmem = kokkos_impl_cuda_shared_memory<char>();
-
-      const bool reduce_to_host =
-        std::is_same< typename reducer_type<>::memory_space
-                    , Kokkos::HostSpace >::value &&
-        m_reducer.data();
-
-      value_type value ;
-
-      typename reducer_type<>::rebind< CudaSpace >
-        reduce( & m_functor , & m_reducer , & value );
-
-      reduce.init( reduce.data() );
-
-      // Iterate this block through the league
-
-      for ( int league_rank = blockIdx.x
-          ; league_rank < m_league_size
-          ; league_rank += gridDim.x ) {
-
-        // Initialization of team member data:
-
-        const Member member
-          ( shmem
-          , m_shmem_team_begin
-          , m_shmem_team_size
-          , reinterpret_cast<char*>(m_scratch_space) + m_global_team_begin
-          , m_global_team_size
-          , league_rank
-          , m_league_size );
-
-        ParallelReduce::template
-          exec_team< WorkTag >( member , reduce.reference() );
-      }
-
-      if ( Member::global_reduce( reduce
-                                , m_scratch_space
-                                , reinterpret_cast<char*>(m_scratch_space)
-                                  + aligned_flag_size
-                                , shmem
-                                , m_shmem_size ) ) {
-
-        // Single thread with data in value
-
-        reduce.final( reduce.data() );
-
-        if ( reduce_to_host ) {
-          reducer.copy( m_unified_space , reduce.data() );
-        }
-      }
-    }
-
-
-  inline
-  void execute()
-    {
-      const bool reduce_to_host =
-        std::is_same< typename reducer_type<>::memory_space
-                    , Kokkos::HostSpace >::value &&
-        m_reducer.data();
-
-      const bool reduce_to_gpu =
-        std::is_same< typename reducer_type<>::memory_space
-                    , Kokkos::CudaSpace >::value &&
-        m_reducer.data();
-
-      if ( m_league_size && m_team_size ) {
-
-        const int value_size = Analysis::value_size( m_functor );
-
-        m_scratch_space = cuda_internal_scratch_space( m_scratch_size );
-        m_unified_space = cuda_internal_scratch_unified( value_size );
-
-        const dim3 block( m_vector_size , m_team_size , m_team_per_block );
-        const dim3 grid( m_league_size , 1 , 1 );
-        const int  shmem = m_shmem_team_begin + m_shmem_team_size ;
-
-        // copy to device and execute
-        CudaParallelLaunch<ParallelReduce,LaunchBounds>( *this, grid, block, shmem );
-
-        Cuda::fence();
-
-        if ( reduce_to_host ) {
-          m_reducer.copy( m_reducer.data() , pointer_type(m_unified_space) );
-        }
-      }
-      else if ( reduce_to_host ) {
-        m_reducer.init( m_reducer.data() );
-      }
-      else if ( reduce_to_gpu ) {
-        value_type tmp ;
-        m_reduce.init( & tmp );
-        cudaMemcpy( m_reduce.data() , & tmp , cudaMemcpyHostToDevice );
-      }
-    }
-
-
-  /**\brief  Set up parameters and allocations for kernel launch.
-   *
-   *  block = { vector_size , team_size , team_per_block }
-   *  grid  = { number_of_teams , 1 , 1 }
-   *
-   *  shmem = shared memory for:
-   *    [ team_reduce_buffer
-   *    , team_scratch_buffer_level_0 ]
-   *  reused by:
-   *    [ global_reduce_buffer ]
-   *
-   *  global_scratch for:
-   *    [ global_reduce_flag_buffer
-   *    , global_reduce_value_buffer
-   *    , team_scratch_buffer_level_1 * max_concurrent_team ]
-   */
-
-  ParallelReduce( FunctorType && arg_functor
-                , Policy      && arg_policy
-                , ReducerType const & arg_reducer
-                )
-  : m_functor( arg_functor )
-    // the input reducer may wrap the input functor so must
-    // generate a reducer bound to the copied functor.
-  , m_reducer( & m_functor , & arg_reducer , arg_reducer.data() )
-  , m_scratch_space( 0 )
-  , m_unified_space( 0 )
-  , m_team_begin( 0 )
-  , m_shmem_begin( 0 )
-  , m_shmem_size( 0 )
-  , m_scratch_ptr{NULL,NULL}
-  , m_league_size( arg_policy.league_size() )
-  , m_team_per_block( 0 )
-  , m_team_size( arg_policy.team_size() )
-  , m_vector_size( arg_policy.vector_length() )
-  {
-    if ( 0 == m_league_size ) return ;
-
-    const int value_size = Analysis::value_size( m_functor );
-
-    //----------------------------------------
-    // Vector length must be <= WarpSize and power of two
-
-    const bool ok_vector = m_vector_size < CudaTraits::WarpSize &&
-      Kokkos::Impl::is_integral_power_of_two( m_vector_size );
-
-    //----------------------------------------
-
-    if ( 0 == m_team_size ) {
-      // Team size is AUTO, use a whole block per team.
-      // Calculate block size using the occupance calculator.
-      // Occupancy calculator assumes whole block.
-
-      m_team_size =
-        Kokkos::Impl::cuda_get_opt_block_size< ParallelReduce, LaunchBounds >
-          ( arg_functor
-          , arg_policy.vector_length()
-          , arg_policy.team_scratch_size(0)
-          , arg_policy.thread_scratch_size(0) / arg_policy.vector_length() );
-
-      m_team_per_block = 1 ;
-    }
-
-    //----------------------------------------
-    // How many CUDA threads per team.
-    // If more than a warp or multiple teams cannot exactly fill a warp
-    // then only one team per block.
-
-    const int team_threads = m_team_size * m_vector_size ;
-
-    if ( ( CudaTraits::WarpSize < team_threads ) ||
-         ( CudaTraits::WarpSize % team_threads ) ) {
-      m_team_per_block = 1 ;
-    }
-
-    //----------------------------------------
-    // How much team scratch shared memory determined from
-    // either the functor or the policy:
-
-    if ( CudaTraits::WarpSize < team_threads ) {
-      // Need inter-warp team reduction (collectives) shared memory
-      // Speculate an upper bound for the value size
-
-      m_shmem_team_begin =
-        align_scratch( CudaTraits::warp_count(team_threads) * sizeof(double) );
-    }
-
-    m_shmem_team_size = arg_policy.scratch_size(0,m_team_size);
-
-    if ( 0 == m_shmem_team_size ) {
-      m_shmem_team_size = Analysis::team_shmem_size( m_functor , m_team_size );
-    }
-
-    m_shmem_team_size = align_scratch( m_shmem_team_size );
-
-    // Can fit a team in a block:
-
-    const bool ok_shmem_team =
-      ( m_shmem_team_begin + m_shmem_team_size )
-      < CudaTraits::SharedMemoryCapacity ;
-
-    //----------------------------------------
-
-    if ( 0 == m_team_per_block ) {
-      // Potentially more than one team per block.
-      // Determine number of teams per block based upon
-      // how much team scratch can fit and exactly filling each warp.
-
-      const int team_per_warp = team_threads / CudaTraits::WarpSize ;
-
-      const int max_team_per_block =
-        Kokkos::Impl::CudaTraits::SharedMemoryCapacity
-        / shmem_team_scratch_size ;
-
-      for ( m_team_per_block = team_per_warp ;
-            m_team_per_block + team_per_warp < max_team_per_block ;
-            m_team_per_block += team_per_warp );
-    }
-
-    //----------------------------------------
-    // How much global reduce scratch shared memory.
-
-    int shmem_global_reduce_size = 8 * value_size ;
-
-    //----------------------------------------
-    // Global scratch memory requirements.
-
-    const int aligned_flag_size = align_scratch( sizeof(int) );
-
-    const int max_concurrent_block =
-      cuda_internal_maximum_concurrent_block_count();
-
-    // Reduce space has claim flag followed by vaue buffer
-    const int global_reduce_value_size =
-      max_concurrent_block *
-      ( aligned_flag_size + align_scratch( value_size ) );
-
-    // Scratch space has claim flag followed by scratch buffer
-    const int global_team_scratch_size =
-      max_concurrent_block * m_team_per_block *
-      ( aligned_flag_size +
-        align_scratch( arg_policy.scratch_size(1,m_team_size) / m_vector_size )
-      );
-
-    const int global_size = aligned_flag_size
-                          + global_reduce_value_size
-                          + global_team_scratch_size ;
-
-    m_global_reduce_begin = aligned_flag_size ;
-    m_global_team_begin   = m_global_reduce_begin + global_reduce_value_size ;
-    m_global_size         = m_global_team_begin + global_team_scratch_size ;
-  }
-};
-
-#endif
-
 } // namespace Impl
 } // namespace Kokkos
 
@@ -1949,9 +1673,9 @@ class ParallelScan< FunctorType
                   , Kokkos::Cuda
                   >
 {
-private:
-
+public:
   typedef Kokkos::RangePolicy< Traits ... >  Policy ;
+private:
   typedef typename Policy::member_type  Member ;
   typedef typename Policy::work_tag     WorkTag ;
   typedef typename Policy::WorkRange    WorkRange ;
@@ -2105,7 +1829,7 @@ public:
   }
 
   // Determine block size constrained by shared memory:
-  static inline
+  inline
   unsigned local_block_size( const FunctorType & f )
     {
       // blockDim.y must be power of two = 128 (4 warps) or 256 (8 warps) or 512 (16 warps)
@@ -2114,7 +1838,7 @@ public:
       // 4 warps was 10% faster than 8 warps and 20% faster than 16 warps in unit testing
 
       unsigned n = CudaTraits::WarpSize * 4 ;
-      while ( n && CudaTraits::SharedMemoryCapacity < cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n ) ) { n >>= 1 ; }
+      while ( n && unsigned(m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock) < cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n ) ) { n >>= 1 ; }
       return n ;
     }
 
@@ -2140,18 +1864,18 @@ public:
         // How many block are really needed for this much work:
         const int grid_x = ( nwork + work_per_block - 1 ) / work_per_block ;
 
-        m_scratch_space = cuda_internal_scratch_space( ValueTraits::value_size( m_functor ) * grid_x );
-        m_scratch_flags = cuda_internal_scratch_flags( sizeof(size_type) * 1 );
+        m_scratch_space = cuda_internal_scratch_space( m_policy.space(), ValueTraits::value_size( m_functor ) * grid_x );
+        m_scratch_flags = cuda_internal_scratch_flags( m_policy.space(), sizeof(size_type) * 1 );
 
         const dim3 grid( grid_x , 1 , 1 );
         const dim3 block( 1 , block_size , 1 ); // REQUIRED DIMENSIONS ( 1 , N , 1 )
         const int shmem = ValueTraits::value_size( m_functor ) * ( block_size + 2 );
 
         m_final = false ;
-        CudaParallelLaunch< ParallelScan, LaunchBounds >( *this, grid, block, shmem ); // copy to device and execute
+        CudaParallelLaunch< ParallelScan, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute
 
         m_final = true ;
-        CudaParallelLaunch< ParallelScan, LaunchBounds >( *this, grid, block, shmem ); // copy to device and execute
+        CudaParallelLaunch< ParallelScan, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute
       }
     }
 
@@ -2173,9 +1897,10 @@ class ParallelScanWithTotal< FunctorType
                            , Kokkos::Cuda
                            >
 {
-private:
-
+public:
   typedef Kokkos::RangePolicy< Traits ... >  Policy ;
+
+private:
   typedef typename Policy::member_type  Member ;
   typedef typename Policy::work_tag     WorkTag ;
   typedef typename Policy::WorkRange    WorkRange ;
@@ -2332,7 +2057,7 @@ public:
   }
 
   // Determine block size constrained by shared memory:
-  static inline
+  inline
   unsigned local_block_size( const FunctorType & f )
     {
       // blockDim.y must be power of two = 128 (4 warps) or 256 (8 warps) or 512 (16 warps)
@@ -2341,7 +2066,7 @@ public:
       // 4 warps was 10% faster than 8 warps and 20% faster than 16 warps in unit testing
 
       unsigned n = CudaTraits::WarpSize * 4 ;
-      while ( n && CudaTraits::SharedMemoryCapacity < cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n ) ) { n >>= 1 ; }
+      while ( n && unsigned(m_policy.space().impl_internal_space_instance()->m_maxShmemPerBlock) < cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,WorkTag>( f , n ) ) { n >>= 1 ; }
       return n ;
     }
 
@@ -2367,18 +2092,18 @@ public:
         // How many block are really needed for this much work:
         const int grid_x = ( nwork + work_per_block - 1 ) / work_per_block ;
 
-        m_scratch_space = cuda_internal_scratch_space( ValueTraits::value_size( m_functor ) * grid_x );
-        m_scratch_flags = cuda_internal_scratch_flags( sizeof(size_type) * 1 );
+        m_scratch_space = cuda_internal_scratch_space( m_policy.space(), ValueTraits::value_size( m_functor ) * grid_x );
+        m_scratch_flags = cuda_internal_scratch_flags( m_policy.space(), sizeof(size_type) * 1 );
 
         const dim3 grid( grid_x , 1 , 1 );
         const dim3 block( 1 , block_size , 1 ); // REQUIRED DIMENSIONS ( 1 , N , 1 )
         const int shmem = ValueTraits::value_size( m_functor ) * ( block_size + 2 );
 
         m_final = false ;
-        CudaParallelLaunch< ParallelScanWithTotal, LaunchBounds >( *this, grid, block, shmem ); // copy to device and execute
+        CudaParallelLaunch< ParallelScanWithTotal, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute
 
         m_final = true ;
-        CudaParallelLaunch< ParallelScanWithTotal, LaunchBounds >( *this, grid, block, shmem ); // copy to device and execute
+        CudaParallelLaunch< ParallelScanWithTotal, LaunchBounds >( *this, grid, block, shmem , m_policy.space().impl_internal_space_instance() , false ); // copy to device and execute
 
         const int size = ValueTraits::value_size( m_functor );
         DeepCopy<HostSpace,CudaSpace>( &m_returnvalue, m_scratch_space + (grid_x - 1)*size/sizeof(int), size );
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp
index d09854c3a5e7a4d20336f8c7e6f539a0fc21c6b8..c39dddb19822519be550b8ef2b9592578415cbd6 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp
@@ -376,13 +376,13 @@ template< class ReducerType >
 __device__ inline
 typename std::enable_if< Kokkos::is_reducer<ReducerType>::value >::type
 cuda_intra_warp_reduction( const ReducerType& reducer,
+                           typename ReducerType::value_type& result,
                            const uint32_t max_active_thread = blockDim.y) {
 
   typedef typename ReducerType::value_type ValueType;
 
   unsigned int shift = 1;
 
-  ValueType result = reducer.reference();
   //Reduce over values from threads with different threadIdx.y
   while(blockDim.x * shift < 32 ) {
     const ValueType tmp = shfl_down(result, blockDim.x*shift,32u);
@@ -400,6 +400,7 @@ template< class ReducerType >
 __device__ inline
 typename std::enable_if< Kokkos::is_reducer<ReducerType>::value >::type
 cuda_inter_warp_reduction( const ReducerType& reducer,
+                           typename ReducerType::value_type value,
                            const int max_active_thread = blockDim.y) {
 
   typedef typename ReducerType::value_type ValueType;
@@ -410,7 +411,6 @@ cuda_inter_warp_reduction( const ReducerType& reducer,
   // could lead to race conditions
   __shared__ double sh_result[(sizeof(ValueType)+7)/8*STEP_WIDTH];
   ValueType* result = (ValueType*) & sh_result;
-  ValueType value = reducer.reference();
   const int step = 32 / blockDim.x;
   int shift = STEP_WIDTH;
   const int id = threadIdx.y%step==0?threadIdx.y/step:65000;
@@ -438,9 +438,18 @@ template< class ReducerType >
 __device__ inline
 typename std::enable_if< Kokkos::is_reducer<ReducerType>::value >::type
 cuda_intra_block_reduction( const ReducerType& reducer,
+                            typename ReducerType::value_type value,
                             const int max_active_thread = blockDim.y) {
-  cuda_intra_warp_reduction(reducer,max_active_thread);
-  cuda_inter_warp_reduction(reducer,max_active_thread);
+  cuda_intra_warp_reduction(reducer,value,max_active_thread);
+  cuda_inter_warp_reduction(reducer,value,max_active_thread);
+}
+
+template< class ReducerType >
+__device__ inline
+typename std::enable_if< Kokkos::is_reducer<ReducerType>::value >::type
+cuda_intra_block_reduction( const ReducerType& reducer,
+                            const int max_active_thread = blockDim.y) {
+  cuda_intra_block_reduction(reducer,reducer.reference(),max_active_thread);
 }
 
 template< class ReducerType>
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp
index ee949583f1363a6f8dd03dd636c9da62cf98e3d6..ac36cfd67e3e74cd99db374e2c3ef50463b44bde 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Task.cpp
@@ -54,194 +54,8 @@
 namespace Kokkos {
 namespace Impl {
 
-template class TaskQueue< Kokkos::Cuda > ;
-
-//----------------------------------------------------------------------------
-
-__device__
-void TaskQueueSpecialization< Kokkos::Cuda >::driver
-  ( TaskQueueSpecialization< Kokkos::Cuda >::queue_type * const queue 
-  , int32_t shmem_per_warp )
-{
-  using Member = TaskExec< Kokkos::Cuda > ;
-  using Queue  = TaskQueue< Kokkos::Cuda > ;
-  using task_root_type = TaskBase< void , void , void > ;
-
-  extern __shared__ int32_t shmem_all[];
-
-  task_root_type * const end = (task_root_type *) task_root_type::EndTag ;
-
-  int32_t * const warp_shmem =
-    shmem_all + ( threadIdx.z * shmem_per_warp ) / sizeof(int32_t);
-
-  task_root_type * const task_shmem = (task_root_type *) warp_shmem ;
-
-  const int warp_lane = threadIdx.x + threadIdx.y * blockDim.x ;
-
-  Member single_exec( warp_shmem , 1 );
-  Member team_exec( warp_shmem , blockDim.y );
-
-  task_root_type * task_ptr ;
-
-  // Loop until all queues are empty and no tasks in flight
-
-  do {
-
-    // Each team lead attempts to acquire either a thread team task
-    // or collection of single thread tasks for the team.
-
-    if ( 0 == warp_lane ) {
-
-      task_ptr = 0 < *((volatile int *) & queue->m_ready_count) ? end : 0 ;
-
-      // Loop by priority and then type
-      for ( int i = 0 ; i < Queue::NumQueue && end == task_ptr ; ++i ) {
-        for ( int j = 0 ; j < 2 && end == task_ptr ; ++j ) {
-          task_ptr = Queue::pop_ready_task( & queue->m_ready[i][j] );
-        }
-      }
-
-#if 0
-printf("TaskQueue<Cuda>::driver(%d,%d) task(%lx)\n",threadIdx.z,blockIdx.x
-      , uintptr_t(task_ptr));
-#endif
-
-    }
-
-    // Synchronize warp with memory fence before broadcasting task pointer:
-
-    // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "A" );
-    KOKKOS_IMPL_CUDA_SYNCWARP ;
-
-    // Broadcast task pointer:
-
-    ((int*) & task_ptr )[0] = KOKKOS_IMPL_CUDA_SHFL( ((int*) & task_ptr )[0] , 0 , 32 );
-    ((int*) & task_ptr )[1] = KOKKOS_IMPL_CUDA_SHFL( ((int*) & task_ptr )[1] , 0 , 32 );
-
-#if defined( KOKKOS_DEBUG )
-    KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "TaskQueue CUDA task_ptr" );
-#endif
-
-    if ( 0 == task_ptr ) break ; // 0 == queue->m_ready_count
-
-    if ( end != task_ptr ) {
-
-      // Whole warp copy task's closure to/from shared memory.
-      // Use all threads of warp for coalesced read/write.
-
-      int32_t const b = sizeof(task_root_type) / sizeof(int32_t);
-      int32_t const e = *((int32_t volatile *)( & task_ptr->m_alloc_size )) / sizeof(int32_t);
-
-      int32_t volatile * const task_mem = (int32_t volatile *) task_ptr ;
-
-      // copy task closure from global to shared memory:
-
-      for ( int32_t i = warp_lane ; i < e ; i += CudaTraits::WarpSize ) {
-        warp_shmem[i] = task_mem[i] ;
-      }
-
-      // Synchronize threads of the warp and insure memory
-      // writes are visible to all threads in the warp.
-
-      // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "B" );
-      KOKKOS_IMPL_CUDA_SYNCWARP ;
-
-      if ( task_root_type::TaskTeam == task_shmem->m_task_type ) {
-        // Thread Team Task
-        (*task_shmem->m_apply)( task_shmem , & team_exec );
-      }
-      else if ( 0 == threadIdx.y ) {
-        // Single Thread Task
-        (*task_shmem->m_apply)( task_shmem , & single_exec );
-      }
-
-      // Synchronize threads of the warp and insure memory
-      // writes are visible to all threads in the warp.
-
-      // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "C" );
-      KOKKOS_IMPL_CUDA_SYNCWARP ;
-
-      // copy task closure from shared to global memory:
-
-      for ( int32_t i = b + warp_lane ; i < e ; i += CudaTraits::WarpSize ) {
-        task_mem[i] = warp_shmem[i] ;
-      }
-
-      // Synchronize threads of the warp and insure memory
-      // writes are visible to root thread of the warp for
-      // respawn or completion.
-
-      // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "D" );
-      KOKKOS_IMPL_CUDA_SYNCWARP ;
-
-      // If respawn requested copy respawn data back to main memory
-
-      if ( 0 == warp_lane ) {
-
-        if ( ((task_root_type *) task_root_type::LockTag) != task_shmem->m_next ) {
-          ( (volatile task_root_type *) task_ptr )->m_next = task_shmem->m_next ;
-          ( (volatile task_root_type *) task_ptr )->m_priority = task_shmem->m_priority ;
-        }
-
-        queue->complete( task_ptr );
-      }
-    }
-  } while(1);
-}
-
-namespace {
-
-__global__
-void cuda_task_queue_execute( TaskQueue< Kokkos::Cuda > * queue 
-                            , int32_t shmem_size )
-{ TaskQueueSpecialization< Kokkos::Cuda >::driver( queue , shmem_size ); }
-
-}
-
-void TaskQueueSpecialization< Kokkos::Cuda >::execute
-  ( TaskQueue< Kokkos::Cuda > * const queue )
-{
-  const int shared_per_warp = 2048 ;
-  const int warps_per_block = 4 ;
-  const dim3 grid( Kokkos::Impl::cuda_internal_multiprocessor_count() , 1 , 1 );
-  const dim3 block( 1 , Kokkos::Impl::CudaTraits::WarpSize , warps_per_block );
-  const int shared_total = shared_per_warp * warps_per_block ;
-  const cudaStream_t stream = 0 ;
-
-  CUDA_SAFE_CALL( cudaDeviceSynchronize() );
-
-#if 0
-printf("cuda_task_queue_execute before\n");
-#endif
-
-  // Query the stack size, in bytes:
-
-  size_t previous_stack_size = 0 ;
-  CUDA_SAFE_CALL( cudaDeviceGetLimit( & previous_stack_size , cudaLimitStackSize ) );
-
-  // If not large enough then set the stack size, in bytes:
-
-  const size_t larger_stack_size = 2048 ;
-
-  if ( previous_stack_size < larger_stack_size ) {
-    CUDA_SAFE_CALL( cudaDeviceSetLimit( cudaLimitStackSize , larger_stack_size ) );
-  }
-
-  cuda_task_queue_execute<<< grid , block , shared_total , stream >>>( queue , shared_per_warp );
-
-  CUDA_SAFE_CALL( cudaGetLastError() );
-
-  CUDA_SAFE_CALL( cudaDeviceSynchronize() );
-
-  if ( previous_stack_size < larger_stack_size ) {
-    CUDA_SAFE_CALL( cudaDeviceSetLimit( cudaLimitStackSize , previous_stack_size ) );
-  }
-
-#if 0
-printf("cuda_task_queue_execute after\n");
-#endif
-
-}
+template class TaskQueue< Kokkos::Cuda, Impl::default_tasking_memory_space_for_execution_space_t<Kokkos::Cuda> > ;
+template class TaskQueueMultiple< Kokkos::Cuda, Impl::default_tasking_memory_space_for_execution_space_t<Kokkos::Cuda> > ;
 
 }} /* namespace Kokkos::Impl */
 
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp
index 8fa11925672259f24b86212d9cfa4c1c21007361..c35987e49ed6ec209652617dcffb63650b21cde6 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Task.hpp
@@ -50,6 +50,14 @@
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 
+#include <Kokkos_Core_fwd.hpp>
+
+#include <impl/Kokkos_TaskBase.hpp>
+#include <Cuda/Kokkos_Cuda_Error.hpp> // CUDA_SAFE_CALL
+#include <impl/Kokkos_TaskTeamMember.hpp>
+
+//----------------------------------------------------------------------------
+
 namespace Kokkos {
 namespace Impl {
 namespace {
@@ -57,54 +65,498 @@ namespace {
 template< typename TaskType >
 __global__
 void set_cuda_task_base_apply_function_pointer
-  ( TaskBase<void,void,void>::function_type * ptr )
-{ *ptr = TaskType::apply ; }
+  ( typename TaskType::function_type * ptr, typename TaskType::destroy_type* dtor )
+{ 
+  *ptr = TaskType::apply;
+  *dtor = TaskType::destroy;
+}
 
+template< typename Scheduler >
+__global__
+void cuda_task_queue_execute( Scheduler scheduler, int32_t shmem_size ) {
+  TaskQueueSpecialization< Scheduler >::driver( std::move(scheduler) , shmem_size );
 }
 
-template< class > class TaskExec ;
+}
+
+template <class, class> class TaskExec ;
+
+template<class QueueType>
+class TaskQueueSpecialization<
+  SimpleTaskScheduler<Kokkos::Cuda, QueueType>
+>
+{
+public:
+
+  using scheduler_type = SimpleTaskScheduler<Kokkos::Cuda, QueueType>;
+  using execution_space = Kokkos::Cuda;
+  using memory_space = Kokkos::CudaUVMSpace;
+  using member_type = TaskExec<Kokkos::Cuda, scheduler_type> ;
+
+  enum : long { max_league_size = 16 };
+  enum : int { warps_per_block = 4 };
+
+  KOKKOS_INLINE_FUNCTION
+  static
+  void iff_single_thread_recursive_execute( scheduler_type const& ) {}
+
+  static int get_max_team_count(
+    execution_space const&
+  ) {
+    return Kokkos::Impl::cuda_internal_multiprocessor_count() * warps_per_block;
+  }
+
+  __device__
+  static void driver(scheduler_type scheduler, int32_t shmem_per_warp)
+  {
+    using queue_type = typename scheduler_type::task_queue_type;
+    using task_base_type = typename scheduler_type::task_base_type;
+    using runnable_task_base_type = typename scheduler_type::runnable_task_base_type;
+    using scheduling_info_storage_type =
+      SchedulingInfoStorage<
+        runnable_task_base_type,
+        typename scheduler_type::task_scheduling_info_type
+      >;
+
+    extern __shared__ int32_t shmem_all[];
+
+    int32_t* const warp_shmem = shmem_all + (threadIdx.z * shmem_per_warp) / sizeof(int32_t);
+
+    task_base_type* const shared_memory_task_copy = (task_base_type*)warp_shmem;
+
+    const int warp_lane = threadIdx.x + threadIdx.y * blockDim.x;
+
+    member_type single_exec(scheduler, warp_shmem, 1);
+    member_type team_exec(scheduler, warp_shmem, blockDim.y);
+
+    auto& queue = scheduler.queue();
+    auto& team_scheduler = team_exec.scheduler();
+
+    auto current_task = OptionalRef<task_base_type>();
+
+    // Loop until all queues are empty and no tasks in flight
+    while(not queue.is_done()) {
+
+      if(warp_lane == 0) {  // should be (?) same as team_exec.team_rank() == 0
+        // pop off a task
+        current_task = queue.pop_ready_task(team_scheduler.team_scheduler_info());
+      }
+
+      // Broadcast task pointer:
+
+      // Sync before the broadcast
+      KOKKOS_IMPL_CUDA_SYNCWARP;
+      
+      // pretend it's an int* for shuffle purposes
+      ((int*) &current_task)[0] = KOKKOS_IMPL_CUDA_SHFL(((int*) &current_task)[0], 0, 32);
+      ((int*) &current_task)[1] = KOKKOS_IMPL_CUDA_SHFL(((int*) &current_task)[1], 0, 32);
+
+      if(current_task) {
+
+        KOKKOS_ASSERT(!current_task->as_runnable_task().get_respawn_flag());
+
+        int32_t b = sizeof(scheduling_info_storage_type) / sizeof(int32_t);
+        static_assert(
+          sizeof(scheduling_info_storage_type) % sizeof(int32_t) == 0,
+          "bad task size"
+        );
+        int32_t const e = current_task->get_allocation_size() / sizeof(int32_t);
+        KOKKOS_ASSERT(current_task->get_allocation_size() % sizeof(int32_t) == 0);
+
+        int32_t volatile* const task_mem = (int32_t volatile*)current_task.get();
+
+        // do a coordinated copy of the task closure from global to shared memory:
+        for(int32_t i = warp_lane; i < e; i += CudaTraits::WarpSize) {
+          warp_shmem[i] = task_mem[i];
+        }
+
+        // Synchronize threads of the warp and insure memory
+        // writes are visible to all threads in the warp.
+        KOKKOS_IMPL_CUDA_SYNCWARP;
+
+        if(shared_memory_task_copy->is_team_runnable()) {
+          // Thread Team Task
+          shared_memory_task_copy->as_runnable_task().run(team_exec);
+        }
+        else if(threadIdx.y == 0) {
+          // TODO @tasking @optimization DSH Change this to warp_lane == 0 when we allow blockDim.x to be more than 1
+          // Single Thread Task
+          shared_memory_task_copy->as_runnable_task().run(single_exec);
+        }
+
+        // Synchronize threads of the warp and insure memory
+        // writes are visible to all threads in the warp.
+
+        KOKKOS_IMPL_CUDA_SYNCWARP;
+
+        //if(warp_lane < b % CudaTraits::WarpSize) b += CudaTraits::WarpSize;
+        //b -= b % CudaTraits::WarpSize;
+
+        // copy task closure from shared to global memory:
+        for (int32_t i = b + warp_lane; i < e; i += CudaTraits::WarpSize) {
+          task_mem[i] = warp_shmem[i];
+        }
+
+        // Synchronize threads of the warp and insure memory
+        // writes are visible to root thread of the warp for
+        // respawn or completion.
+
+        KOKKOS_IMPL_CUDA_SYNCWARP;
+
+
+        if (warp_lane == 0) {
+          // If respawn requested copy respawn data back to main memory
+          if(shared_memory_task_copy->as_runnable_task().get_respawn_flag()) {
+            if(shared_memory_task_copy->as_runnable_task().has_predecessor()) {
+              // It's not necessary to make this a volatile write because
+              // the next read of the predecessor is on this thread in complete,
+              // and the predecessor is cleared there (using a volatile write)
+              current_task->as_runnable_task().acquire_predecessor_from(
+                shared_memory_task_copy->as_runnable_task()
+              );
+            }
+
+            // It may not necessary to make this a volatile write, since the
+            // next read will be done by this thread in complete where the
+            // rescheduling occurs, but since the task could be stolen later
+            // before this is written again, we should do the volatile write
+            // here.  (It might not be necessary though because I don't know
+            // where else the priority would be read after it is scheduled
+            // by this thread; for now, we leave it volatile, but we should
+            // benchmark the cost of this.)
+            current_task.as_volatile()->set_priority(shared_memory_task_copy->get_priority());
+
+            // It's not necessary to make this a volatile write, since the
+            // next read of it (if true) will be by this thread in `complete()`,
+            // which will unset the flag (using volatile) once it has handled
+            // the respawn
+            current_task->as_runnable_task().set_respawn_flag();
+
+          }
+
+          queue.complete(
+            (*std::move(current_task)).as_runnable_task(),
+            team_scheduler.team_scheduler_info()
+          );
+        }
+
+      }
+    }
+  }
+
+  static
+  void execute(scheduler_type const& scheduler)
+  {
+    const int shared_per_warp = 2048 ;
+    const dim3 grid(Kokkos::Impl::cuda_internal_multiprocessor_count(), 1, 1);
+    const dim3 block(1, Kokkos::Impl::CudaTraits::WarpSize, warps_per_block);
+    const int shared_total = shared_per_warp * warps_per_block;
+    const cudaStream_t stream = nullptr;
+
+    KOKKOS_ASSERT(
+      static_cast<long>(grid.x * grid.y * grid.z * block.x * block.y * block.z)
+        == static_cast<long>(get_max_team_count(scheduler.get_execution_space()) * Kokkos::Impl::CudaTraits::WarpSize)
+    );
+
+    auto& queue = scheduler.queue();
+
+    CUDA_SAFE_CALL(cudaDeviceSynchronize());
+
+    // Query the stack size, in bytes:
+
+    size_t previous_stack_size = 0;
+    CUDA_SAFE_CALL(cudaDeviceGetLimit(&previous_stack_size, cudaLimitStackSize));
+
+    // If not large enough then set the stack size, in bytes:
 
-template<>
-class TaskQueueSpecialization< Kokkos::Cuda >
+    const size_t larger_stack_size = 1 << 11;
+
+    if (previous_stack_size < larger_stack_size) {
+      CUDA_SAFE_CALL(cudaDeviceSetLimit(cudaLimitStackSize, larger_stack_size));
+    }
+
+    cuda_task_queue_execute<<<grid, block, shared_total, stream>>>(scheduler, shared_per_warp);
+
+    CUDA_SAFE_CALL(cudaGetLastError());
+
+    CUDA_SAFE_CALL(cudaDeviceSynchronize());
+
+    if (previous_stack_size < larger_stack_size) {
+      CUDA_SAFE_CALL(cudaDeviceSetLimit(cudaLimitStackSize, previous_stack_size));
+    }
+  }
+
+  template <typename TaskType>
+  static
+  // TODO @tasking @optimiazation DSH specialize this for trivially destructible types
+  void
+  get_function_pointer(
+    typename TaskType::function_type& ptr,
+    typename TaskType::destroy_type& dtor
+  )
+  {
+    using function_type = typename TaskType::function_type;
+    using destroy_type = typename TaskType::destroy_type;
+
+    // TODO @tasking @minor DSH make sure there aren't any alignment concerns?
+    void* storage = cuda_internal_scratch_unified( 
+      Kokkos::Cuda(),
+      sizeof(function_type) + sizeof(destroy_type)
+    );
+    function_type* ptr_ptr = (function_type*)storage;
+    destroy_type* dtor_ptr = (destroy_type*)((char*)storage + sizeof(function_type));
+
+    CUDA_SAFE_CALL( cudaDeviceSynchronize() );
+
+    set_cuda_task_base_apply_function_pointer<TaskType><<<1,1>>>(ptr_ptr, dtor_ptr);
+
+    CUDA_SAFE_CALL( cudaGetLastError() );
+    CUDA_SAFE_CALL( cudaDeviceSynchronize() );
+
+    ptr = *ptr_ptr;
+    dtor = *dtor_ptr;
+  }
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template<class Scheduler>
+class TaskQueueSpecializationConstrained<
+  Scheduler,
+  typename std::enable_if<
+    std::is_same<typename Scheduler::execution_space, Kokkos::Cuda>::value
+  >::type
+>
 {
 public:
 
-  using execution_space = Kokkos::Cuda ;
-  using memory_space    = Kokkos::CudaUVMSpace ;
-  using queue_type      = TaskQueue< execution_space > ;
-  using member_type     = TaskExec< Kokkos::Cuda > ;
+  using scheduler_type = Scheduler;
+  using execution_space = Kokkos::Cuda;
+  using memory_space = Kokkos::CudaUVMSpace;
+  using member_type = TaskExec<Kokkos::Cuda, Scheduler> ;
 
+  enum : long { max_league_size = 16 };
+
+  KOKKOS_INLINE_FUNCTION
   static
-  void iff_single_thread_recursive_execute( queue_type * const ) {}
+  void iff_single_thread_recursive_execute( scheduler_type const& ) {}
 
   __device__
-  static void driver( queue_type * const , int32_t );
+  static void driver(scheduler_type scheduler, int32_t shmem_per_warp)
+  {
+    using queue_type = typename scheduler_type::queue_type;
+    using task_root_type = TaskBase;
+
+    extern __shared__ int32_t shmem_all[];
+
+    task_root_type* const end = (task_root_type *) task_root_type::EndTag ;
+    task_root_type* const no_more_tasks_sentinel = nullptr;
+
+    int32_t * const warp_shmem =
+      shmem_all + ( threadIdx.z * shmem_per_warp ) / sizeof(int32_t);
+
+    task_root_type * const task_shmem = (task_root_type *) warp_shmem ;
+
+    const int warp_lane = threadIdx.x + threadIdx.y * blockDim.x ;
+
+    member_type single_exec(scheduler, warp_shmem, 1);
+    member_type team_exec(scheduler, warp_shmem, blockDim.y);
+
+    auto& team_queue = team_exec.scheduler().queue();
+
+    task_root_type * task_ptr = no_more_tasks_sentinel;
+
+    // Loop until all queues are empty and no tasks in flight
+
+    do {
+
+      // Each team lead attempts to acquire either a thread team task
+      // or collection of single thread tasks for the team.
+
+      if ( 0 == warp_lane ) {
+
+        if( *((volatile int *) & team_queue.m_ready_count) > 0 ) {
+          task_ptr = end;
+          // Attempt to acquire a task
+          // Loop by priority and then type
+          for ( int i = 0 ; i < queue_type::NumQueue && end == task_ptr ; ++i ) {
+            for ( int j = 0 ; j < 2 && end == task_ptr ; ++j ) {
+              task_ptr = queue_type::pop_ready_task( & team_queue.m_ready[i][j] );
+            }
+          }
+        }
+        else {
+          // returns nullptr if and only if all other queues have a ready
+          // count of 0 also. Otherwise, returns a task from another queue
+          // or `end` if one couldn't be popped
+          task_ptr = team_queue.attempt_to_steal_task();
+          #if 0
+          if(task != no_more_tasks_sentinel && task != end) {
+            std::printf("task stolen on rank %d\n", team_exec.league_rank());
+          }
+          #endif
+        }
+
+      }
+
+      // Synchronize warp with memory fence before broadcasting task pointer:
+
+      // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "A" );
+      KOKKOS_IMPL_CUDA_SYNCWARP ;
+
+      // Broadcast task pointer:
+
+      ((int*) & task_ptr )[0] = KOKKOS_IMPL_CUDA_SHFL( ((int*) & task_ptr )[0] , 0 , 32 );
+      ((int*) & task_ptr )[1] = KOKKOS_IMPL_CUDA_SHFL( ((int*) & task_ptr )[1] , 0 , 32 );
+
+      #if defined( KOKKOS_DEBUG )
+      KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "TaskQueue CUDA task_ptr" );
+      #endif
+
+      if ( 0 == task_ptr ) break ; // 0 == queue->m_ready_count
+
+      if ( end != task_ptr ) {
+
+        // Whole warp copy task's closure to/from shared memory.
+        // Use all threads of warp for coalesced read/write.
+
+        int32_t const b = sizeof(task_root_type) / sizeof(int32_t);
+        int32_t const e = *((int32_t volatile *)( & task_ptr->m_alloc_size )) / sizeof(int32_t);
+
+        int32_t volatile * const task_mem = (int32_t volatile *) task_ptr ;
+
+        KOKKOS_ASSERT(e * sizeof(int32_t) < shmem_per_warp);
+
+        // copy task closure from global to shared memory:
+
+        for ( int32_t i = warp_lane ; i < e ; i += CudaTraits::WarpSize ) {
+          warp_shmem[i] = task_mem[i] ;
+        }
+
+        // Synchronize threads of the warp and insure memory
+        // writes are visible to all threads in the warp.
+
+        // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "B" );
+        KOKKOS_IMPL_CUDA_SYNCWARP ;
+
+        if ( task_root_type::TaskTeam == task_shmem->m_task_type ) {
+          // Thread Team Task
+          (*task_shmem->m_apply)( task_shmem , & team_exec );
+        }
+        else if ( 0 == threadIdx.y ) {
+          // Single Thread Task
+          (*task_shmem->m_apply)( task_shmem , & single_exec );
+        }
+
+        // Synchronize threads of the warp and insure memory
+        // writes are visible to all threads in the warp.
+
+        // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "C" );
+        KOKKOS_IMPL_CUDA_SYNCWARP ;
+
+        // copy task closure from shared to global memory:
+
+        for ( int32_t i = b + warp_lane ; i < e ; i += CudaTraits::WarpSize ) {
+          task_mem[i] = warp_shmem[i] ;
+        }
+
+        // Synchronize threads of the warp and insure memory
+        // writes are visible to root thread of the warp for
+        // respawn or completion.
+
+        // KOKKOS_IMPL_CUDA_SYNCWARP_OR_RETURN( "D" );
+        KOKKOS_IMPL_CUDA_SYNCWARP ;
+
+        // If respawn requested copy respawn data back to main memory
+
+        if ( 0 == warp_lane ) {
+
+          if ( ((task_root_type *) task_root_type::LockTag) != task_shmem->m_next ) {
+            ( (volatile task_root_type *) task_ptr )->m_next = task_shmem->m_next ;
+            ( (volatile task_root_type *) task_ptr )->m_priority = task_shmem->m_priority ;
+          }
+
+          team_queue.complete( task_ptr );
+        }
+
+      }
+    } while(1);
+  }
 
   static
-  void execute( queue_type * const );
+  void execute(scheduler_type const& scheduler)
+  {
+    const int shared_per_warp = 2048 ;
+    const int warps_per_block = 4 ;
+    const dim3 grid( Kokkos::Impl::cuda_internal_multiprocessor_count() , 1 , 1 );
+    //const dim3 grid( 1 , 1 , 1 );
+    const dim3 block( 1 , Kokkos::Impl::CudaTraits::WarpSize , warps_per_block );
+    const int shared_total = shared_per_warp * warps_per_block ;
+    const cudaStream_t stream = 0 ;
+
+    auto& queue = scheduler.queue();
+    queue.initialize_team_queues(warps_per_block * grid.x);
+
+    CUDA_SAFE_CALL( cudaDeviceSynchronize() );
+
+    // Query the stack size, in bytes:
+
+    size_t previous_stack_size = 0 ;
+    CUDA_SAFE_CALL( cudaDeviceGetLimit( & previous_stack_size , cudaLimitStackSize ) );
+
+    // If not large enough then set the stack size, in bytes:
+
+    const size_t larger_stack_size = 2048 ;
+
+    if ( previous_stack_size < larger_stack_size ) {
+      CUDA_SAFE_CALL( cudaDeviceSetLimit( cudaLimitStackSize , larger_stack_size ) );
+    }
+
+    cuda_task_queue_execute<<< grid , block , shared_total , stream >>>( scheduler , shared_per_warp );
+
+    CUDA_SAFE_CALL( cudaGetLastError() );
+
+    CUDA_SAFE_CALL( cudaDeviceSynchronize() );
+
+    if ( previous_stack_size < larger_stack_size ) {
+      CUDA_SAFE_CALL( cudaDeviceSetLimit( cudaLimitStackSize , previous_stack_size ) );
+    }
+
+  }
 
   template< typename TaskType >
   static
-  typename TaskType::function_type
-  get_function_pointer()
+  void
+  get_function_pointer(
+    typename TaskType::function_type& ptr,
+    typename TaskType::destroy_type& dtor
+  )
     {
-      using function_type = typename TaskType::function_type ;
+      using function_type = typename TaskType::function_type;
+      using destroy_type = typename TaskType::destroy_type;
 
-      function_type * const ptr =
-        (function_type*) cuda_internal_scratch_unified( sizeof(function_type) );
+      void* storage = cuda_internal_scratch_unified(
+        Kokkos::Cuda(),
+        sizeof(function_type) + sizeof(destroy_type)
+      );
+      function_type* ptr_ptr = (function_type*)storage;
+      destroy_type* dtor_ptr = (destroy_type*)((char*)storage + sizeof(function_type));
 
       CUDA_SAFE_CALL( cudaDeviceSynchronize() );
 
-      set_cuda_task_base_apply_function_pointer<TaskType><<<1,1>>>(ptr);
+      set_cuda_task_base_apply_function_pointer<TaskType><<<1,1>>>(ptr_ptr, dtor_ptr);
 
       CUDA_SAFE_CALL( cudaGetLastError() );
       CUDA_SAFE_CALL( cudaDeviceSynchronize() );
 
-      return *ptr ;
+      ptr = *ptr_ptr;
+      dtor = *dtor_ptr;
+
     }
 };
 
-extern template class TaskQueue< Kokkos::Cuda > ;
+extern template class TaskQueue< Kokkos::Cuda, default_tasking_memory_space_for_execution_space_t<Kokkos::Cuda> > ;
 
 }} /* namespace Kokkos::Impl */
 
@@ -136,8 +588,8 @@ namespace Impl {
  *  When executing a single thread task the syncwarp or other
  *  warp synchronizing functions must not be called.
  */
-template<>
-class TaskExec< Kokkos::Cuda >
+template <class Scheduler>
+class TaskExec<Kokkos::Cuda, Scheduler>
 {
 private:
 
@@ -148,24 +600,39 @@ private:
   TaskExec & operator = ( TaskExec && ) = delete ;
   TaskExec & operator = ( TaskExec const & ) = delete ;
 
-  friend class Kokkos::Impl::TaskQueue< Kokkos::Cuda > ;
-  friend class Kokkos::Impl::TaskQueueSpecialization< Kokkos::Cuda > ;
+  friend class Kokkos::Impl::TaskQueue< Kokkos::Cuda, default_tasking_memory_space_for_execution_space_t<Kokkos::Cuda> > ;
+  template <class, class>
+  friend class Kokkos::Impl::TaskQueueSpecializationConstrained;
+  template <class>
+  friend class Kokkos::Impl::TaskQueueSpecialization;
 
   int32_t * m_team_shmem ;
   const int m_team_size ;
+  Scheduler m_scheduler;
 
   // If constructed with arg_team_size == 1 the object
   // can only be used by 0 == threadIdx.y.
-  __device__
-  TaskExec( int32_t * arg_team_shmem , int arg_team_size = blockDim.y )
-    : m_team_shmem( arg_team_shmem )
-    , m_team_size( arg_team_size ) {}
+  KOKKOS_INLINE_FUNCTION
+  TaskExec(
+    Scheduler const& parent_scheduler,
+    int32_t* arg_team_shmem,
+    int arg_team_size = blockDim.y
+  )
+    : m_team_shmem(arg_team_shmem),
+      m_team_size(arg_team_size),
+      m_scheduler(parent_scheduler.get_team_scheduler(league_rank()))
+  { }
 
 public:
 
+  using thread_team_member = TaskExec;
+
 #if defined( __CUDA_ARCH__ )
-  __device__ int  team_rank() const { return threadIdx.y ; }
-  __device__ int  team_size() const { return m_team_size ; }
+  __device__ int team_rank() const { return threadIdx.y ; }
+  __device__ int team_size() const { return m_team_size ; }
+  //__device__ int league_rank() const { return threadIdx.z; }
+  __device__ int league_rank() const { return blockIdx.x * blockDim.z + threadIdx.z; }
+  __device__ int league_size() const { return blockDim.z * gridDim.x; }
 
   __device__ void team_barrier() const
     {
@@ -186,13 +653,18 @@ public:
     }
 
 #else
-  __host__ int  team_rank() const { return 0 ; }
-  __host__ int  team_size() const { return 0 ; }
+  __host__ int team_rank() const { return 0 ; }
+  __host__ int team_size() const { return 0 ; }
+  __host__ int league_rank() const { return 0; }
+  __host__ int league_size() const { return 0; }
   __host__ void team_barrier() const {}
   template< class ValueType >
   __host__ void team_broadcast( ValueType & , const int ) const {}
 #endif
 
+  KOKKOS_INLINE_FUNCTION Scheduler const& scheduler() const noexcept { return m_scheduler; }
+  KOKKOS_INLINE_FUNCTION Scheduler& scheduler() noexcept { return m_scheduler; }
+
 };
 
 }} /* namespace Kokkos::Impl */
@@ -203,20 +675,22 @@ public:
 namespace Kokkos {
 namespace Impl {
 
-template<typename iType>
-struct TeamThreadRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda > >
+template<typename iType, typename Scheduler>
+struct TeamThreadRangeBoundariesStruct<iType, TaskExec<Kokkos::Cuda, Scheduler>>
 {
-  typedef iType index_type;
+  using index_type = iType;
+  using member_type = TaskExec<Kokkos::Cuda, Scheduler>;
+
   const iType start ;
   const iType end ;
   const iType increment ;
-  const TaskExec< Kokkos::Cuda > & thread;
+  member_type const& thread;
 
 #if defined( __CUDA_ARCH__ )
 
   __device__ inline
   TeamThreadRangeBoundariesStruct
-    ( const TaskExec< Kokkos::Cuda > & arg_thread, const iType& arg_count)
+    ( member_type const& arg_thread, const iType& arg_count)
     : start( threadIdx.y )
     , end(arg_count)
     , increment( blockDim.y )
@@ -225,7 +699,7 @@ struct TeamThreadRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda > >
 
   __device__ inline
   TeamThreadRangeBoundariesStruct
-    ( const TaskExec< Kokkos::Cuda > & arg_thread
+    ( member_type const& arg_thread
     , const iType & arg_start
     , const iType & arg_end
     )
@@ -238,10 +712,10 @@ struct TeamThreadRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda > >
 #else
 
   TeamThreadRangeBoundariesStruct
-    ( const TaskExec< Kokkos::Cuda > & arg_thread, const iType& arg_count);
+    ( member_type const& arg_thread, const iType& arg_count);
 
   TeamThreadRangeBoundariesStruct
-    ( const TaskExec< Kokkos::Cuda > & arg_thread
+    ( member_type const& arg_thread
     , const iType & arg_start
     , const iType & arg_end
     );
@@ -252,20 +726,22 @@ struct TeamThreadRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda > >
 
 //----------------------------------------------------------------------------
 
-template<typename iType>
-struct ThreadVectorRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda > >
+template<typename iType, typename Scheduler>
+struct ThreadVectorRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda, Scheduler > >
 {
-  typedef iType index_type;
+  using index_type = iType;
+  using member_type = TaskExec<Kokkos::Cuda, Scheduler>;
+
   const index_type start ;
   const index_type end ;
   const index_type increment ;
-  const TaskExec< Kokkos::Cuda > & thread;
+  const member_type& thread;
 
 #if defined( __CUDA_ARCH__ )
 
   __device__ inline
   ThreadVectorRangeBoundariesStruct
-    ( const TaskExec< Kokkos::Cuda > & arg_thread, const index_type& arg_count )
+    ( member_type const& arg_thread, const index_type& arg_count )
     : start( threadIdx.x )
     , end(arg_count)
     , increment( blockDim.x )
@@ -274,9 +750,9 @@ struct ThreadVectorRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda > >
 
   __device__ inline
   ThreadVectorRangeBoundariesStruct
-    ( const TaskExec< Kokkos::Cuda > & arg_thread, const index_type& arg_begin, const index_type& arg_end )
+    ( member_type const& arg_thread, const index_type& arg_begin, const index_type& arg_end )
     : start( arg_begin + threadIdx.x )
-    , end(arg_count)
+    , end(arg_end)
     , increment( blockDim.x )
     , thread(arg_thread)
     {}
@@ -284,10 +760,10 @@ struct ThreadVectorRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda > >
 #else
 
   ThreadVectorRangeBoundariesStruct
-    ( const TaskExec< Kokkos::Cuda > & arg_thread, const index_type& arg_count );
+    ( member_type const& arg_thread, const index_type& arg_count );
 
   ThreadVectorRangeBoundariesStruct
-    ( const TaskExec< Kokkos::Cuda > & arg_thread, const index_type& arg_begin, const index_type& arg_end);
+    ( member_type const& arg_thread, const index_type& arg_begin, const index_type& arg_end);
 
 #endif
 
@@ -299,69 +775,69 @@ struct ThreadVectorRangeBoundariesStruct<iType, TaskExec< Kokkos::Cuda > >
 
 namespace Kokkos {
 
-template<typename iType>
-KOKKOS_INLINE_FUNCTION
-Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > >
-TeamThreadRange( const Impl::TaskExec< Kokkos::Cuda > & thread, const iType & count )
-{
-  return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > >( thread, count );
-}
-
-template<typename iType1, typename iType2>
-KOKKOS_INLINE_FUNCTION
-Impl::TeamThreadRangeBoundariesStruct
-  < typename std::common_type<iType1,iType2>::type
-  , Impl::TaskExec< Kokkos::Cuda > >
-TeamThreadRange( const Impl::TaskExec< Kokkos::Cuda > & thread
-               , const iType1 & begin, const iType2 & end )
-{
-  typedef typename std::common_type< iType1, iType2 >::type iType;
-  return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > >(
-           thread, iType(begin), iType(end) );
-}
-
-template<typename iType>
-KOKKOS_INLINE_FUNCTION
-Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >
-ThreadVectorRange( const Impl::TaskExec< Kokkos::Cuda > & thread
-                 , const iType & count )
-{
-  return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >(thread,count);
-}
-
-template<typename iType>
-KOKKOS_INLINE_FUNCTION
-Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >
-ThreadVectorRange( const Impl::TaskExec< Kokkos::Cuda > & thread
-                 , const iType & arg_begin
-                 , const iType & arg_end )
-{
-  return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >(thread,arg_begin,arg_end);
-}
-
-KOKKOS_INLINE_FUNCTION
-Impl::ThreadSingleStruct<Impl::TaskExec< Kokkos::Cuda > >
-PerTeam(const Impl::TaskExec< Kokkos::Cuda >& thread)
-{
-  return Impl::ThreadSingleStruct<Impl::TaskExec< Kokkos::Cuda > >(thread);
-}
-
-KOKKOS_INLINE_FUNCTION
-Impl::VectorSingleStruct<Impl::TaskExec< Kokkos::Cuda > >
-PerThread(const Impl::TaskExec< Kokkos::Cuda >& thread)
-{
-  return Impl::VectorSingleStruct<Impl::TaskExec< Kokkos::Cuda > >(thread);
-}
+//template<typename iType>
+//KOKKOS_INLINE_FUNCTION
+//Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > >
+//TeamThreadRange( const Impl::TaskExec< Kokkos::Cuda > & thread, const iType & count )
+//{
+//  return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > >( thread, count );
+//}
+//
+//template<typename iType1, typename iType2>
+//KOKKOS_INLINE_FUNCTION
+//Impl::TeamThreadRangeBoundariesStruct
+//  < typename std::common_type<iType1,iType2>::type
+//  , Impl::TaskExec< Kokkos::Cuda > >
+//TeamThreadRange( const Impl::TaskExec< Kokkos::Cuda > & thread
+//               , const iType1 & begin, const iType2 & end )
+//{
+//  typedef typename std::common_type< iType1, iType2 >::type iType;
+//  return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::TaskExec< Kokkos::Cuda > >(
+//           thread, iType(begin), iType(end) );
+//}
+//
+//template<typename iType>
+//KOKKOS_INLINE_FUNCTION
+//Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >
+//ThreadVectorRange( const Impl::TaskExec< Kokkos::Cuda > & thread
+//                 , const iType & count )
+//{
+//  return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >(thread,count);
+//}
+//
+//template<typename iType>
+//KOKKOS_INLINE_FUNCTION
+//Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >
+//ThreadVectorRange( const Impl::TaskExec< Kokkos::Cuda > & thread
+//                 , const iType & arg_begin
+//                 , const iType & arg_end )
+//{
+//  return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >(thread,arg_begin,arg_end);
+//}
+
+// KOKKOS_INLINE_FUNCTION
+// Impl::ThreadSingleStruct<Impl::TaskExec< Kokkos::Cuda > >
+// PerTeam(const Impl::TaskExec< Kokkos::Cuda >& thread)
+// {
+//   return Impl::ThreadSingleStruct<Impl::TaskExec< Kokkos::Cuda > >(thread);
+// }
+
+// KOKKOS_INLINE_FUNCTION
+// Impl::VectorSingleStruct<Impl::TaskExec< Kokkos::Cuda > >
+// PerThread(const Impl::TaskExec< Kokkos::Cuda >& thread)
+// {
+//   return Impl::VectorSingleStruct<Impl::TaskExec< Kokkos::Cuda > >(thread);
+// }
 
 /** \brief  Inter-thread parallel_for. Executes lambda(iType i) for each i=0..N-1.
  *
  * The range i=0..N-1 is mapped to all threads of the the calling thread team.
  * This functionality requires C++11 support.
 */
-template<typename iType, class Lambda>
+template<typename iType, class Lambda, class Scheduler>
 KOKKOS_INLINE_FUNCTION
 void parallel_for
-  ( const Impl::TeamThreadRangeBoundariesStruct<iType,Impl:: TaskExec< Kokkos::Cuda > >& loop_boundaries
+  ( const Impl::TeamThreadRangeBoundariesStruct<iType,Impl:: TaskExec< Kokkos::Cuda, Scheduler > >& loop_boundaries
   , const Lambda& lambda
   )
 {
@@ -370,10 +846,10 @@ void parallel_for
   }
 }
 
-template< typename iType, class Lambda >
+template< typename iType, class Lambda, class Scheduler >
 KOKKOS_INLINE_FUNCTION
 void parallel_for
-  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >& loop_boundaries,
+  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda, Scheduler > >& loop_boundaries,
    const Lambda & lambda) {
   for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
     lambda(i);
@@ -459,14 +935,14 @@ void parallel_reduce
 // blockDim.y == team_size
 // threadIdx.x == position in vec
 // threadIdx.y == member number
-template< typename iType, class Lambda, typename ValueType >
+template< typename iType, class Lambda, typename ValueType, class Scheduler >
 KOKKOS_INLINE_FUNCTION
 void parallel_reduce
-  (const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >& loop_boundaries,
+  (const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda, Scheduler > >& loop_boundaries,
    const Lambda & lambda,
    ValueType& initialized_result) {
 
-  //TODO what is the point of creating this temporary?
+  //TODO @internal_documentation what is the point of creating this temporary?
   ValueType result = initialized_result;
   for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
     lambda(i,result);
@@ -487,15 +963,15 @@ void parallel_reduce
   }
 }
 
-template< typename iType, class Lambda, typename ReducerType >
+template< typename iType, class Lambda, typename ReducerType, class Scheduler >
 KOKKOS_INLINE_FUNCTION
 void parallel_reduce
-  (const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >& loop_boundaries,
+  (const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda, Scheduler > >& loop_boundaries,
    const Lambda & lambda,
    const ReducerType& reducer) {
 
   typedef typename ReducerType::value_type ValueType;
-  //TODO what is the point of creating this temporary?
+  //TODO @internal_documentation what is the point of creating this temporary?
   ValueType result = ValueType();
   reducer.init(result);
 
@@ -549,10 +1025,10 @@ void parallel_reduce
 // blockDim.y == team_size
 // threadIdx.x == position in vec
 // threadIdx.y == member number
-template< typename iType, class Lambda, typename ValueType >
+template< typename iType, class Lambda, typename ValueType, class Scheduler >
 KOKKOS_INLINE_FUNCTION
 void parallel_reduce
-  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >& loop_boundaries,
+  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda, Scheduler > >& loop_boundaries,
    const Lambda & lambda,
    ValueType& initialized_result) {
 
@@ -576,10 +1052,10 @@ void parallel_reduce
   }
 }
 
-template< typename iType, class Lambda, typename ReducerType >
+template< typename iType, class Lambda, typename ReducerType, class Scheduler >
 KOKKOS_INLINE_FUNCTION
 void parallel_reduce
-  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >& loop_boundaries,
+  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda, Scheduler > >& loop_boundaries,
    const Lambda & lambda,
    const ReducerType& reducer) {
 
@@ -611,10 +1087,10 @@ void parallel_reduce
 // blockDim.y == team_size
 // threadIdx.x == position in vec
 // threadIdx.y == member number
-template< typename iType, class Closure >
+template< typename iType, class Closure, class Scheduler >
 KOKKOS_INLINE_FUNCTION
 void parallel_scan
-  (const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >& loop_boundaries,
+  (const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda, Scheduler > >& loop_boundaries,
    const Closure & closure )
 {
   // Extract value_type from closure
@@ -676,10 +1152,10 @@ void parallel_scan
 // blockDim.y == team_size
 // threadIdx.x == position in vec
 // threadIdx.y == member number
-template< typename iType, class Closure >
+template< typename iType, class Closure, class Scheduler >
 KOKKOS_INLINE_FUNCTION
 void parallel_scan
-  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda > >& loop_boundaries,
+  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::TaskExec< Kokkos::Cuda, Scheduler > >& loop_boundaries,
    const Closure & closure )
 {
   // Extract value_type from closure
@@ -735,25 +1211,25 @@ void parallel_scan
 
 namespace Kokkos {
 
-  template<class FunctorType>
+  template<class FunctorType, class Scheduler>
   KOKKOS_INLINE_FUNCTION
-  void single(const Impl::VectorSingleStruct<Impl::TaskExec< Kokkos::Cuda > >& , const FunctorType& lambda) {
+  void single(const Impl::VectorSingleStruct<Impl::TaskExec< Kokkos::Cuda, Scheduler > >& , const FunctorType& lambda) {
 #ifdef __CUDA_ARCH__
     if(threadIdx.x == 0) lambda();
 #endif
   }
   
-  template<class FunctorType>
+  template<class FunctorType, class Scheduler>
   KOKKOS_INLINE_FUNCTION
-  void single(const Impl::ThreadSingleStruct<Impl::TaskExec< Kokkos::Cuda > >& , const FunctorType& lambda) {
+  void single(const Impl::ThreadSingleStruct<Impl::TaskExec< Kokkos::Cuda, Scheduler > >& , const FunctorType& lambda) {
 #ifdef __CUDA_ARCH__
     if(threadIdx.x == 0 && threadIdx.y == 0) lambda();
 #endif
   }
   
-  template<class FunctorType, class ValueType>
+  template<class FunctorType, class ValueType, class Scheduler>
   KOKKOS_INLINE_FUNCTION
-  void single(const Impl::VectorSingleStruct<Impl::TaskExec< Kokkos::Cuda > >& s , const FunctorType& lambda, ValueType& val) {
+  void single(const Impl::VectorSingleStruct<Impl::TaskExec< Kokkos::Cuda, Scheduler > >& s , const FunctorType& lambda, ValueType& val) {
 #ifdef __CUDA_ARCH__
     if(threadIdx.x == 0) lambda(val);
     if ( 1 < s.team_member.team_size() ) {
@@ -762,9 +1238,9 @@ namespace Kokkos {
 #endif
   }
   
-  template<class FunctorType, class ValueType>
+  template<class FunctorType, class ValueType, class Scheduler>
   KOKKOS_INLINE_FUNCTION
-  void single(const Impl::ThreadSingleStruct<Impl::TaskExec< Kokkos::Cuda > >& single_struct, const FunctorType& lambda, ValueType& val) {
+  void single(const Impl::ThreadSingleStruct<Impl::TaskExec< Kokkos::Cuda, Scheduler > >& single_struct, const FunctorType& lambda, ValueType& val) {
 #ifdef __CUDA_ARCH__
     if(threadIdx.x == 0 && threadIdx.y == 0) {
       lambda(val);
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp
index 18271a51469ace822f0e4f483a3ee8c576a151b9..587ad6001dfa78d57fe0c0e22246f2b7cfa811e5 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_Team.hpp
@@ -56,9 +56,9 @@
 #include <utility>
 #include <Kokkos_Parallel.hpp>
 
-#include <Cuda/Kokkos_CudaExec.hpp>
+#include <Cuda/Kokkos_Cuda_KernelLaunch.hpp>
 #include <Cuda/Kokkos_Cuda_ReduceScan.hpp>
-#include <Cuda/Kokkos_Cuda_Internal.hpp>
+#include <Cuda/Kokkos_Cuda_BlockSize_Deduction.hpp>
 #include <Kokkos_Vectorization.hpp>
 
 #if defined(KOKKOS_ENABLE_PROFILING)
@@ -101,11 +101,13 @@ struct CudaJoinFunctor {
  *  total available shared memory must be partitioned among teams.
  */
 class CudaTeamMember {
-private:
 
+public:
   typedef Kokkos::Cuda                           execution_space ;
   typedef execution_space::scratch_memory_space  scratch_memory_space ;
 
+private:
+
   mutable void        * m_team_reduce ;
   scratch_memory_space  m_team_shared ;
   int                   m_team_reduce_size ;
@@ -221,12 +223,21 @@ public:
   KOKKOS_INLINE_FUNCTION
   typename std::enable_if< is_reducer< ReducerType >::value >::type
   team_reduce( ReducerType const & reducer ) const noexcept
+    {
+      team_reduce(reducer,reducer.reference());
+    }
+  
+  template< typename ReducerType >
+  KOKKOS_INLINE_FUNCTION
+  typename std::enable_if< is_reducer< ReducerType >::value >::type
+  team_reduce( ReducerType const & reducer, typename ReducerType::value_type& value ) const noexcept
     {
       #ifdef __CUDA_ARCH__
-      cuda_intra_block_reduction(reducer,blockDim.y);
+      cuda_intra_block_reduction(reducer,value,blockDim.y);
       #endif /* #ifdef __CUDA_ARCH__ */
     }
 
+
   //--------------------------------------------------------------------------
   /** \brief  Intra-team exclusive prefix sum with team_rank() ordering
    *          with intra-team non-deterministic ordering accumulation.
@@ -281,20 +292,28 @@ public:
   template< typename ReducerType >
   KOKKOS_INLINE_FUNCTION static
   typename std::enable_if< is_reducer< ReducerType >::value >::type
-  vector_reduce( ReducerType const & reducer )
+  vector_reduce( ReducerType const & reducer ) {
+    vector_reduce(reducer,reducer.reference());
+  }
+
+  template< typename ReducerType >
+  KOKKOS_INLINE_FUNCTION static
+  typename std::enable_if< is_reducer< ReducerType >::value >::type
+  vector_reduce( ReducerType const & reducer, typename ReducerType::value_type& value )
     {
 
       #ifdef __CUDA_ARCH__
       if(blockDim.x == 1) return;
 
       // Intra vector lane shuffle reduction:
-      typename ReducerType::value_type tmp ( reducer.reference() );
+      typename ReducerType::value_type tmp ( value );
+      typename ReducerType::value_type tmp2 = tmp;
 
       unsigned mask = blockDim.x==32?0xffffffff:((1<<blockDim.x)-1)<<((threadIdx.y%(32/blockDim.x))*blockDim.x);
 
       for ( int i = blockDim.x ; ( i >>= 1 ) ; ) {
-        cuda_shfl_down( reducer.reference() , tmp , i , blockDim.x , mask );
-        if ( (int)threadIdx.x < i ) { reducer.join( tmp , reducer.reference() ); }
+        cuda_shfl_down( tmp2 , tmp , i , blockDim.x , mask );
+        if ( (int)threadIdx.x < i ) { reducer.join( tmp , tmp2 ); }
       }
 
       // Broadcast from root lane to all other lanes.
@@ -302,7 +321,9 @@ public:
       // because floating point summation is not associative
       // and thus different threads could have different results.
 
-      cuda_shfl( reducer.reference() , tmp , 0 , blockDim.x , mask );
+      cuda_shfl( tmp2 , tmp , 0 , blockDim.x , mask );
+      value = tmp2;
+      reducer.reference() = tmp2;
       #endif
     }
 
@@ -543,19 +564,37 @@ struct TeamThreadRangeBoundariesStruct<iType,CudaTeamMember> {
   const iType end;
 
   KOKKOS_INLINE_FUNCTION
-  TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& count)
+  TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, iType count)
     : member(thread_)
     , start( 0 )
     , end( count ) {}
 
   KOKKOS_INLINE_FUNCTION
-  TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_,  const iType& begin_, const iType& end_)
+  TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, iType begin_, iType end_)
     : member(thread_)
     , start( begin_ )
     , end( end_ ) {}
 };
 
+template<typename iType>
+struct TeamVectorRangeBoundariesStruct<iType,CudaTeamMember> {
+  typedef iType index_type;
+  const CudaTeamMember& member;
+  const iType start;
+  const iType end;
+
+  KOKKOS_INLINE_FUNCTION
+  TeamVectorRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& count)
+    : member(thread_)
+    , start( 0 )
+    , end( count ) {}
 
+  KOKKOS_INLINE_FUNCTION
+  TeamVectorRangeBoundariesStruct (const CudaTeamMember& thread_,  const iType& begin_, const iType& end_)
+    : member(thread_)
+    , start( begin_ )
+    , end( end_ ) {}
+};
 
 template<typename iType>
 struct ThreadVectorRangeBoundariesStruct<iType,CudaTeamMember> {
@@ -564,19 +603,19 @@ struct ThreadVectorRangeBoundariesStruct<iType,CudaTeamMember> {
   const index_type end;
 
   KOKKOS_INLINE_FUNCTION
-  ThreadVectorRangeBoundariesStruct (const CudaTeamMember, const index_type& count)
+  ThreadVectorRangeBoundariesStruct (const CudaTeamMember, index_type count)
     : start( static_cast<index_type>(0) ), end( count ) {}
 
   KOKKOS_INLINE_FUNCTION
-  ThreadVectorRangeBoundariesStruct (const index_type& count)
+  ThreadVectorRangeBoundariesStruct (index_type count)
     : start( static_cast<index_type>(0) ), end( count ) {}
 
   KOKKOS_INLINE_FUNCTION
-  ThreadVectorRangeBoundariesStruct (const CudaTeamMember, const index_type& arg_begin, const index_type& arg_end)
+  ThreadVectorRangeBoundariesStruct (const CudaTeamMember, index_type arg_begin, index_type arg_end)
     : start( arg_begin ), end( arg_end ) {}
 
   KOKKOS_INLINE_FUNCTION
-  ThreadVectorRangeBoundariesStruct (const index_type& arg_begin, const index_type& arg_end)
+  ThreadVectorRangeBoundariesStruct (index_type arg_begin, index_type arg_end)
     : start( arg_begin ), end( arg_end ) {}
 };
 
@@ -585,7 +624,7 @@ struct ThreadVectorRangeBoundariesStruct<iType,CudaTeamMember> {
 template<typename iType>
 KOKKOS_INLINE_FUNCTION
 Impl::TeamThreadRangeBoundariesStruct< iType, Impl::CudaTeamMember >
-TeamThreadRange( const Impl::CudaTeamMember & thread, const iType & count ) {
+TeamThreadRange( const Impl::CudaTeamMember & thread, iType count ) {
   return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::CudaTeamMember >( thread, count );
 }
 
@@ -593,22 +632,38 @@ template< typename iType1, typename iType2 >
 KOKKOS_INLINE_FUNCTION
 Impl::TeamThreadRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type,
                                        Impl::CudaTeamMember >
-TeamThreadRange( const Impl::CudaTeamMember & thread, const iType1 & begin, const iType2 & end ) {
+TeamThreadRange( const Impl::CudaTeamMember & thread, iType1 begin, iType2 end ) {
   typedef typename std::common_type< iType1, iType2 >::type iType;
   return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::CudaTeamMember >( thread, iType(begin), iType(end) );
 }
 
+template<typename iType>
+KOKKOS_INLINE_FUNCTION
+Impl::TeamVectorRangeBoundariesStruct< iType, Impl::CudaTeamMember >
+TeamVectorRange( const Impl::CudaTeamMember & thread, const iType & count ) {
+  return Impl::TeamVectorRangeBoundariesStruct< iType, Impl::CudaTeamMember >( thread, count );
+}
+
+template< typename iType1, typename iType2 >
+KOKKOS_INLINE_FUNCTION
+Impl::TeamVectorRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type,
+                                       Impl::CudaTeamMember >
+TeamVectorRange( const Impl::CudaTeamMember & thread, const iType1 & begin, const iType2 & end ) {
+  typedef typename std::common_type< iType1, iType2 >::type iType;
+  return Impl::TeamVectorRangeBoundariesStruct< iType, Impl::CudaTeamMember >( thread, iType(begin), iType(end) );
+}
+
 template<typename iType>
 KOKKOS_INLINE_FUNCTION
 Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >
-ThreadVectorRange(const Impl::CudaTeamMember& thread, const iType& count) {
+ThreadVectorRange(const Impl::CudaTeamMember& thread, iType count) {
   return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >(thread,count);
 }
 
 template<typename iType>
 KOKKOS_INLINE_FUNCTION
 Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >
-ThreadVectorRange(const Impl::CudaTeamMember& thread, const iType& arg_begin, const iType& arg_end) {
+ThreadVectorRange(const Impl::CudaTeamMember& thread, iType arg_begin, iType arg_end) {
   return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >(thread,arg_begin,arg_end);
 }
 
@@ -667,16 +722,16 @@ parallel_reduce
   )
 {
 #ifdef __CUDA_ARCH__
-
-  reducer.init( reducer.reference() );
+  typename ReducerType::value_type value;
+  reducer.init( value );
 
   for( iType i = loop_boundaries.start + threadIdx.y
      ; i < loop_boundaries.end
      ; i += blockDim.y ) {
-    closure(i,reducer.reference());
+    closure(i,value);
   }
 
-  loop_boundaries.member.team_reduce( reducer );
+  loop_boundaries.member.team_reduce( reducer, value );
 
 #endif
 }
@@ -701,19 +756,88 @@ parallel_reduce
   )
 {
 #ifdef __CUDA_ARCH__
-
-  Kokkos::Sum<ValueType> reducer(result);
+  ValueType val;
+  Kokkos::Sum<ValueType> reducer(val);
 
   reducer.init( reducer.reference() );
 
   for( iType i = loop_boundaries.start + threadIdx.y
      ; i < loop_boundaries.end
      ; i += blockDim.y ) {
-    closure(i,result);
+    closure(i,val);
   }
 
-  loop_boundaries.member.team_reduce( reducer );
+  loop_boundaries.member.team_reduce( reducer , val);
+  result = reducer.reference();
+#endif
+}
+
+template<typename iType, class Closure >
+KOKKOS_INLINE_FUNCTION
+void parallel_for
+  ( const Impl::TeamVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember>&
+      loop_boundaries
+  , const Closure & closure
+  )
+{
+  #ifdef __CUDA_ARCH__
+  for( iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x
+     ; i < loop_boundaries.end
+     ; i += blockDim.y*blockDim.x )
+    closure(i);
+  #endif
+}
+
+template< typename iType, class Closure, class ReducerType >
+KOKKOS_INLINE_FUNCTION
+typename std::enable_if< Kokkos::is_reducer< ReducerType >::value >::type
+parallel_reduce
+  ( const Impl::TeamVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember> &
+      loop_boundaries
+  , const Closure & closure
+  , const ReducerType & reducer
+  )
+{
+#ifdef __CUDA_ARCH__
+  typename ReducerType::value_type value;
+  reducer.init( value );
+
+  for( iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x
+     ; i < loop_boundaries.end
+     ; i += blockDim.y * blockDim.x ) {
+    closure(i,value);
+  }
+
+  loop_boundaries.member.vector_reduce( reducer, value );
+  loop_boundaries.member.team_reduce( reducer, value );
+#endif
+}
+
+template< typename iType, class Closure, typename ValueType >
+KOKKOS_INLINE_FUNCTION
+typename std::enable_if< ! Kokkos::is_reducer< ValueType >::value >::type
+parallel_reduce
+  ( const Impl::TeamVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember> &
+      loop_boundaries
+  , const Closure & closure
+  , ValueType & result
+  )
+{
+#ifdef __CUDA_ARCH__
+  ValueType val;
+  Kokkos::Sum<ValueType> reducer(val);
 
+  reducer.init( reducer.reference() );
+
+  for( iType i = loop_boundaries.start + threadIdx.y * blockDim.x + threadIdx.x
+     ; i < loop_boundaries.end
+     ; i += blockDim.y * blockDim.x ) {
+    closure(i,val);
+  }
+
+  loop_boundaries.member.vector_reduce( reducer );
+  loop_boundaries.member.team_reduce( reducer );
+  result = reducer.reference();
 #endif
 }
 
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp
index af2aff8b35cc46834bb08100162ec6f3938a0e43..2fe9d8ccf7543f160f935bb6797b7dceb4944de4 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp
@@ -241,7 +241,7 @@ class ViewDataHandle< Traits ,
       sizeof(typename Traits::const_value_type) == 16 )
     &&
     // Random access trait
-    ( Traits::memory_traits::RandomAccess != 0 )
+    ( Traits::memory_traits::is_random_access != 0 )
   )>::type >
 {
 public:
diff --git a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp
index 94e293d7c7b1658bf13358edab19ec536243acf8..9c0ac470c84887c831009432bf9818629787e64c 100644
--- a/packages/kokkos/core/src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp
+++ b/packages/kokkos/core/src/Cuda/Kokkos_Cuda_WorkGraphPolicy.hpp
@@ -102,9 +102,8 @@ public:
     const dim3 grid( Kokkos::Impl::cuda_internal_multiprocessor_count() , 1 , 1 );
     const dim3 block( 1 , Kokkos::Impl::CudaTraits::WarpSize , warps_per_block );
     const int shared = 0 ;
-    const cudaStream_t stream = 0 ;
 
-    Kokkos::Impl::CudaParallelLaunch<Self>(*this, grid, block, shared, stream);
+    Kokkos::Impl::CudaParallelLaunch<Self>(*this, grid, block, shared, Cuda().impl_internal_space_instance() , false );
   }
 
   inline
diff --git a/packages/kokkos/core/src/HPX/Kokkos_HPX.cpp b/packages/kokkos/core/src/HPX/Kokkos_HPX.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..da9783467ce34899cc6e7ec2dd0be036ef216f30
--- /dev/null
+++ b/packages/kokkos/core/src/HPX/Kokkos_HPX.cpp
@@ -0,0 +1,152 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+
+#include <Kokkos_Macros.hpp>
+
+#ifdef KOKKOS_ENABLE_HPX
+#include <Kokkos_HPX.hpp>
+
+#include <hpx/util/yield_while.hpp>
+
+namespace Kokkos {
+namespace Experimental {
+
+bool HPX::m_hpx_initialized = false;
+Kokkos::Impl::thread_buffer HPX::m_buffer;
+#if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH)
+hpx::future<void> HPX::m_future = hpx::make_ready_future<void>();
+#endif
+
+int HPX::concurrency() {
+  hpx::runtime *rt = hpx::get_runtime_ptr();
+  if (rt == nullptr) {
+    return hpx::threads::hardware_concurrency();
+  } else {
+    if (hpx::threads::get_self_ptr() == nullptr) {
+      return hpx::resource::get_thread_pool(0).get_os_thread_count();
+    } else {
+      return hpx::this_thread::get_pool()->get_os_thread_count();
+    }
+  }
+}
+
+void HPX::impl_initialize(int thread_count) {
+  hpx::runtime *rt = hpx::get_runtime_ptr();
+  if (rt == nullptr) {
+    std::vector<std::string> config = {
+        "hpx.os_threads=" + std::to_string(thread_count),
+#ifdef KOKKOS_DEBUG
+        "--hpx:attach-debugger=exception",
+#endif
+    };
+    int argc_hpx = 1;
+    char name[] = "kokkos_hpx";
+    char *argv_hpx[] = {name, nullptr};
+    hpx::start(nullptr, argc_hpx, argv_hpx, config);
+
+    // NOTE: Wait for runtime to start. hpx::start returns as soon as
+    // possible, meaning some operations are not allowed immediately
+    // after hpx::start. Notably, hpx::stop needs state_running. This
+    // needs to be fixed in HPX itself.
+
+    // Get runtime pointer again after it has been started.
+    rt = hpx::get_runtime_ptr();
+    hpx::util::yield_while(
+        [rt]() { return rt->get_state() < hpx::state_running; });
+
+    m_hpx_initialized = true;
+  }
+}
+
+void HPX::impl_initialize() {
+  hpx::runtime *rt = hpx::get_runtime_ptr();
+  if (rt == nullptr) {
+    std::vector<std::string> config = {
+#ifdef KOKKOS_DEBUG
+        "--hpx:attach-debugger=exception",
+#endif
+    };
+    int argc_hpx = 1;
+    char name[] = "kokkos_hpx";
+    char *argv_hpx[] = {name, nullptr};
+    hpx::start(nullptr, argc_hpx, argv_hpx, config);
+
+    // NOTE: Wait for runtime to start. hpx::start returns as soon as
+    // possible, meaning some operations are not allowed immediately
+    // after hpx::start. Notably, hpx::stop needs state_running. This
+    // needs to be fixed in HPX itself.
+
+    // Get runtime pointer again after it has been started.
+    rt = hpx::get_runtime_ptr();
+    hpx::util::yield_while(
+        [rt]() { return rt->get_state() < hpx::state_running; });
+
+    m_hpx_initialized = true;
+  }
+}
+
+bool HPX::impl_is_initialized() noexcept {
+  hpx::runtime *rt = hpx::get_runtime_ptr();
+  return rt != nullptr;
+}
+
+void HPX::impl_finalize() {
+  if (m_hpx_initialized) {
+    hpx::runtime *rt = hpx::get_runtime_ptr();
+    if (rt != nullptr) {
+      hpx::apply([]() { hpx::finalize(); });
+      hpx::stop();
+    } else {
+      Kokkos::abort("Kokkos::Experimental::HPX::impl_finalize: Kokkos started "
+                    "HPX but something else already stopped HPX\n");
+    }
+  }
+}
+
+} // namespace Experimental
+} // namespace Kokkos
+
+#else
+void KOKKOS_CORE_SRC_IMPL_HPX_PREVENT_LINK_ERROR() {}
+#endif //#ifdef KOKKOS_ENABLE_HPX
diff --git a/packages/kokkos/core/src/impl/Kokkos_StaticAssert.hpp b/packages/kokkos/core/src/HPX/Kokkos_HPX_Task.cpp
similarity index 76%
rename from packages/kokkos/core/src/impl/Kokkos_StaticAssert.hpp
rename to packages/kokkos/core/src/HPX/Kokkos_HPX_Task.cpp
index d001e0a88c56c8de3e970c096d3ee0604d897b75..df7c40368538194d5acfa77c0ca8dc42c9058735 100644
--- a/packages/kokkos/core/src/impl/Kokkos_StaticAssert.hpp
+++ b/packages/kokkos/core/src/HPX/Kokkos_HPX_Task.cpp
@@ -41,38 +41,25 @@
 //@HEADER
 */
 
-#ifndef KOKKOS_STATICASSERT_HPP
-#define KOKKOS_STATICASSERT_HPP
+#include <Kokkos_Macros.hpp>
+#if defined(KOKKOS_ENABLE_HPX) && defined(KOKKOS_ENABLE_TASKDAG)
 
-namespace Kokkos {
-namespace Impl {
-
-template < bool , class T = void >
-struct StaticAssert ;
-
-template< class T >
-struct StaticAssert< true , T > {
-  typedef T type ;
-  static const bool value = true ;
-};
+#include <Kokkos_Core.hpp>
 
-template < class A , class B >
-struct StaticAssertSame ;
+#include <impl/Kokkos_TaskQueue_impl.hpp>
 
-template < class A >
-struct StaticAssertSame<A,A> { typedef A type ; };
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
 
-template < class A , class B >
-struct StaticAssertAssignable ;
-
-template < class A >
-struct StaticAssertAssignable<A,A> { typedef A type ; };
+namespace Kokkos {
+namespace Impl {
 
-template < class A >
-struct StaticAssertAssignable< const A , A > { typedef const A type ; };
+template class TaskQueue<Kokkos::Experimental::HPX,
+                         Kokkos::Experimental::HPX::memory_space>;
 
 } // namespace Impl
 } // namespace Kokkos
 
-#endif /* KOKKOS_STATICASSERT_HPP */
-
+#else
+void KOKKOS_CORE_SRC_IMPL_HPX_TASK_PREVENT_LINK_ERROR() {}
+#endif // #if defined( KOKKOS_ENABLE_HPX ) && defined( KOKKOS_ENABLE_TASKDAG )
diff --git a/packages/kokkos/core/src/HPX/Kokkos_HPX_Task.hpp b/packages/kokkos/core/src/HPX/Kokkos_HPX_Task.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..c3a14efee6554ccbe0a8f13c53340f496b30468d
--- /dev/null
+++ b/packages/kokkos/core/src/HPX/Kokkos_HPX_Task.hpp
@@ -0,0 +1,298 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_HPX_TASK_HPP
+#define KOKKOS_HPX_TASK_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined(KOKKOS_ENABLE_HPX) && defined(KOKKOS_ENABLE_TASKDAG)
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+
+#include <Kokkos_HPX.hpp>
+
+#include <hpx/apply.hpp>
+#include <hpx/lcos/local/counting_semaphore.hpp>
+
+#include <type_traits>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template <class QueueType>
+class TaskQueueSpecialization<
+    SimpleTaskScheduler<Kokkos::Experimental::HPX, QueueType>> {
+public:
+  using execution_space = Kokkos::Experimental::HPX;
+  using scheduler_type =
+      SimpleTaskScheduler<Kokkos::Experimental::HPX, QueueType>;
+  using member_type =
+      TaskTeamMemberAdapter<Kokkos::Impl::HPXTeamMember, scheduler_type>;
+  using memory_space = Kokkos::HostSpace;
+
+  static void execute(scheduler_type const &scheduler) {
+    // NOTE: We create an instance so that we can use dispatch_execute_task.
+    // This is not necessarily the most efficient, but can be improved later.
+    TaskQueueSpecialization<scheduler_type> task_queue;
+    task_queue.scheduler = &scheduler;
+    Kokkos::Impl::dispatch_execute_task(&task_queue);
+    Kokkos::Experimental::HPX().fence();
+  }
+
+  // Must provide task queue execution function
+  void execute_task() const {
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+    using task_base_type = typename scheduler_type::task_base_type;
+
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+
+    thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer();
+    buffer.resize(num_worker_threads, 512);
+
+    auto &queue = scheduler->queue();
+
+    counting_semaphore sem(0);
+
+    for (int thread = 0; thread < num_worker_threads; ++thread) {
+      apply([this, &sem, &queue, &buffer, num_worker_threads, thread]() {
+        // NOTE: This implementation has been simplified based on the
+        // assumption that team_size = 1. The HPX backend currently only
+        // supports a team size of 1.
+        std::size_t t = Kokkos::Experimental::HPX::impl_hardware_thread_id();
+
+        buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id());
+        HPXTeamMember member(TeamPolicyInternal<Kokkos::Experimental::HPX>(
+                                 Kokkos::Experimental::HPX(), num_worker_threads, 1),
+                             0, t, buffer.get(t), 512);
+
+        member_type single_exec(*scheduler, member);
+        member_type &team_exec = single_exec;
+
+        auto &team_scheduler = team_exec.scheduler();
+        auto current_task = OptionalRef<task_base_type>(nullptr);
+
+        while (!queue.is_done()) {
+          current_task =
+              queue.pop_ready_task(team_scheduler.team_scheduler_info());
+
+          if (current_task) {
+            KOKKOS_ASSERT(current_task->is_single_runnable() ||
+                          current_task->is_team_runnable());
+            current_task->as_runnable_task().run(single_exec);
+            queue.complete((*std::move(current_task)).as_runnable_task(),
+                           team_scheduler.team_scheduler_info());
+          }
+        }
+
+        sem.signal(1);
+      });
+    }
+
+    sem.wait(num_worker_threads);
+  }
+
+  static uint32_t get_max_team_count(execution_space const &espace) {
+    return static_cast<uint32_t>(espace.concurrency());
+  }
+
+  template <typename TaskType>
+  static void get_function_pointer(typename TaskType::function_type &ptr,
+                                   typename TaskType::destroy_type &dtor) {
+    ptr = TaskType::apply;
+    dtor = TaskType::destroy;
+  }
+
+private:
+  const scheduler_type *scheduler;
+};
+
+template <class Scheduler>
+class TaskQueueSpecializationConstrained<
+    Scheduler, typename std::enable_if<
+                   std::is_same<typename Scheduler::execution_space,
+                                Kokkos::Experimental::HPX>::value>::type> {
+public:
+  using execution_space = Kokkos::Experimental::HPX;
+  using scheduler_type = Scheduler;
+  using member_type =
+      TaskTeamMemberAdapter<Kokkos::Impl::HPXTeamMember, scheduler_type>;
+  using memory_space = Kokkos::HostSpace;
+
+  static void
+  iff_single_thread_recursive_execute(scheduler_type const &scheduler) {
+    using task_base_type = typename scheduler_type::task_base;
+    using queue_type = typename scheduler_type::queue_type;
+
+    if (1 == Kokkos::Experimental::HPX::concurrency()) {
+      task_base_type *const end = (task_base_type *)task_base_type::EndTag;
+      task_base_type *task = end;
+
+      HPXTeamMember member(TeamPolicyInternal<Kokkos::Experimental::HPX>(
+                               Kokkos::Experimental::HPX(), 1, 1),
+                           0, 0, nullptr, 0);
+      member_type single_exec(scheduler, member);
+
+      do {
+        task = end;
+
+        // Loop by priority and then type
+        for (int i = 0; i < queue_type::NumQueue && end == task; ++i) {
+          for (int j = 0; j < 2 && end == task; ++j) {
+            task =
+                queue_type::pop_ready_task(&scheduler.m_queue->m_ready[i][j]);
+          }
+        }
+
+        if (end == task)
+          break;
+
+        (*task->m_apply)(task, &single_exec);
+
+        scheduler.m_queue->complete(task);
+
+      } while (true);
+    }
+  }
+
+  static void execute(scheduler_type const &scheduler) {
+    // NOTE: We create an instance so that we can use dispatch_execute_task.
+    // This is not necessarily the most efficient, but can be improved later.
+    TaskQueueSpecializationConstrained<scheduler_type> task_queue;
+    task_queue.scheduler = &scheduler;
+    Kokkos::Impl::dispatch_execute_task(&task_queue);
+    Kokkos::Experimental::HPX().fence();
+  }
+
+  // Must provide task queue execution function
+  void execute_task() const {
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+    using task_base_type = typename scheduler_type::task_base;
+    using queue_type = typename scheduler_type::queue_type;
+
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+    static task_base_type *const end = (task_base_type *)task_base_type::EndTag;
+    constexpr task_base_type *no_more_tasks_sentinel = nullptr;
+
+    thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer();
+    buffer.resize(num_worker_threads, 512);
+
+    auto &queue = scheduler->queue();
+    queue.initialize_team_queues(num_worker_threads);
+
+    counting_semaphore sem(0);
+
+    for (int thread = 0; thread < num_worker_threads; ++thread) {
+      apply([this, &sem, &buffer, num_worker_threads, thread]() {
+        // NOTE: This implementation has been simplified based on the assumption
+        // that team_size = 1. The HPX backend currently only supports a team
+        // size of 1.
+        std::size_t t = Kokkos::Experimental::HPX::impl_hardware_thread_id();
+
+        buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id());
+        HPXTeamMember member(
+            TeamPolicyInternal<Kokkos::Experimental::HPX>(
+                Kokkos::Experimental::HPX(), num_worker_threads, 1),
+            0, t, buffer.get(t), 512);
+
+        member_type single_exec(*scheduler, member);
+        member_type &team_exec = single_exec;
+
+        auto &team_queue = team_exec.scheduler().queue();
+        task_base_type *task = no_more_tasks_sentinel;
+
+        do {
+          if (task != no_more_tasks_sentinel && task != end) {
+            team_queue.complete(task);
+          }
+
+          if (*((volatile int *)&team_queue.m_ready_count) > 0) {
+            task = end;
+            for (int i = 0; i < queue_type::NumQueue && end == task; ++i) {
+              for (int j = 0; j < 2 && end == task; ++j) {
+                task = queue_type::pop_ready_task(&team_queue.m_ready[i][j]);
+              }
+            }
+          } else {
+            task = team_queue.attempt_to_steal_task();
+          }
+
+          if (task != no_more_tasks_sentinel && task != end) {
+            (*task->m_apply)(task, &single_exec);
+          }
+        } while (task != no_more_tasks_sentinel);
+
+        sem.signal(1);
+      });
+    }
+
+    sem.wait(num_worker_threads);
+  }
+
+  template <typename TaskType>
+  static void get_function_pointer(typename TaskType::function_type &ptr,
+                                   typename TaskType::destroy_type &dtor) {
+    ptr = TaskType::apply;
+    dtor = TaskType::destroy;
+  }
+
+private:
+  const scheduler_type *scheduler;
+};
+
+extern template class TaskQueue<
+    Kokkos::Experimental::HPX,
+    typename Kokkos::Experimental::HPX::memory_space>;
+
+} // namespace Impl
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_HPX_TASK_HPP */
diff --git a/packages/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIAvail.hpp b/packages/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIAvail.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bbc1b33bf97cd153a13537c558460c12cd9eed45
--- /dev/null
+++ b/packages/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIAvail.hpp
@@ -0,0 +1,57 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_HPX_VIEWETIAVAIL_HPP
+#define KOKKOS_HPX_VIEWETIAVAIL_HPP
+
+namespace Kokkos {
+namespace Impl {
+#define KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE Kokkos::Experimental::HPX
+
+#include<eti/common/Kokkos_ViewFillCopyETIAvail_Macros.hpp>
+
+#undef KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE
+}
+}
+#endif
+
diff --git a/packages/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIDecl.hpp b/packages/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIDecl.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..aa1c2f15185ab653a39b14e994f57a903227e809
--- /dev/null
+++ b/packages/kokkos/core/src/HPX/Kokkos_HPX_ViewCopyETIDecl.hpp
@@ -0,0 +1,57 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_HPX_VIEWETIDECL_HPP
+#define KOKKOS_HPX_VIEWETIDECL_HPP
+
+namespace Kokkos {
+namespace Impl {
+#define KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE Kokkos::Experimental::HPX
+
+#include<eti/common/Kokkos_ViewFillCopyETIDecl_Macros.hpp>
+
+#undef KOKKOS_IMPL_VIEWCOPY_ETI_AVAIL_EXECSPACE
+}
+}
+#endif
+
diff --git a/packages/kokkos/core/src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp b/packages/kokkos/core/src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..4dd28dd994ca6884515b8af7a16cee622a489b89
--- /dev/null
+++ b/packages/kokkos/core/src/HPX/Kokkos_HPX_WorkGraphPolicy.hpp
@@ -0,0 +1,116 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_HPX_WORKGRAPHPOLICY_HPP
+#define KOKKOS_HPX_WORKGRAPHPOLICY_HPP
+
+#include <hpx/apply.hpp>
+#include <hpx/lcos/local/counting_semaphore.hpp>
+
+namespace Kokkos {
+namespace Impl {
+
+template <class FunctorType, class... Traits>
+class ParallelFor<FunctorType, Kokkos::WorkGraphPolicy<Traits...>,
+                  Kokkos::Experimental::HPX> {
+private:
+  using Policy = Kokkos::WorkGraphPolicy<Traits...>;
+  using WorkTag = typename Policy::work_tag;
+
+  Policy m_policy;
+  FunctorType m_functor;
+
+  template <class TagType>
+  typename std::enable_if<std::is_same<TagType, void>::value>::type
+  execute_functor(const std::int32_t w) const noexcept {
+    m_functor(w);
+  }
+
+  template <class TagType>
+  typename std::enable_if<!std::is_same<TagType, void>::value>::type
+  execute_functor(const std::int32_t w) const noexcept {
+    const TagType t{};
+    m_functor(t, w);
+  }
+
+public:
+  void execute() const {
+    dispatch_execute_task(this);
+    Kokkos::Experimental::HPX().fence();
+  }
+
+  void execute_task() const {
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+
+    counting_semaphore sem(0);
+
+    for (int thread = 0; thread < num_worker_threads; ++thread) {
+      apply([this, &sem]() {
+        std::int32_t w = m_policy.pop_work();
+        while (w != Policy::COMPLETED_TOKEN) {
+          if (w != Policy::END_TOKEN) {
+            execute_functor<WorkTag>(w);
+            m_policy.completed_work(w);
+          }
+
+          w = m_policy.pop_work();
+        }
+
+        sem.signal(1);
+      });
+    }
+
+    sem.wait(num_worker_threads);
+  }
+
+  inline ParallelFor(const FunctorType &arg_functor, const Policy &arg_policy)
+      : m_policy(arg_policy), m_functor(arg_functor) {}
+};
+
+} // namespace Impl
+} // namespace Kokkos
+
+#endif /* #define KOKKOS_HPX_WORKGRAPHPOLICY_HPP */
diff --git a/packages/kokkos/core/src/KokkosExp_MDRangePolicy.hpp b/packages/kokkos/core/src/KokkosExp_MDRangePolicy.hpp
index fb0d6cde8424979efe871c1e35bb457eec5b04fa..1972aa485bd3242857486fd2bc8fc2ab4fbd1d1a 100644
--- a/packages/kokkos/core/src/KokkosExp_MDRangePolicy.hpp
+++ b/packages/kokkos/core/src/KokkosExp_MDRangePolicy.hpp
@@ -125,6 +125,8 @@ struct MDRangePolicy
   using traits = Kokkos::Impl::PolicyTraits<Properties ...>;
   using range_policy = RangePolicy<Properties...>;
 
+  typename traits::execution_space m_space;
+
   using impl_range_policy = RangePolicy< typename traits::execution_space
                                        , typename traits::schedule_type
                                        , typename traits::index_type
@@ -132,6 +134,9 @@ struct MDRangePolicy
 
   typedef MDRangePolicy execution_policy; // needed for is_execution_space interrogation
 
+  template<class ... OtherProperties>
+  friend struct MDRangePolicy;
+
   static_assert( !std::is_same<typename traits::iteration_pattern,void>::value
                , "Kokkos Error: MD iteration pattern not defined" );
 
@@ -192,13 +197,54 @@ struct MDRangePolicy
   static constexpr int Right = static_cast<int>( Iterate::Right );
   static constexpr int Left  = static_cast<int>( Iterate::Left );
 
+  KOKKOS_INLINE_FUNCTION const typename traits::execution_space & space() const { return m_space ; }
+  template < typename LT , typename UT , typename TT = array_index_type >
+  MDRangePolicy(std::initializer_list<LT> const& lower, std::initializer_list<UT> const& upper, std::initializer_list<TT> const& tile = {} )
+    : m_space() {
+    init(lower, upper, tile);
+  }
+
+  template < typename LT , typename UT , typename TT = array_index_type >
+  MDRangePolicy(const typename traits::execution_space & work_space,
+    std::initializer_list<LT> const& lower, std::initializer_list<UT> const& upper, std::initializer_list<TT> const& tile = {} )
+    : m_space( work_space ) {
+    init(lower, upper, tile);
+  }
+
   MDRangePolicy( point_type const& lower, point_type const& upper, tile_type const& tile = tile_type{} )
-    : m_lower(lower)
+    : m_space()
+    , m_lower(lower)
     , m_upper(upper)
     , m_tile(tile)
     , m_num_tiles(1)
-    , m_prod_tile_dims(1)
-  {
+    , m_prod_tile_dims(1) {
+    init();
+  }
+
+  MDRangePolicy( const typename traits::execution_space & work_space,
+    point_type const& lower, point_type const& upper, tile_type const& tile = tile_type{} )
+    : m_space( work_space )
+    , m_lower(lower)
+    , m_upper(upper)
+    , m_tile(tile)
+    , m_num_tiles(1)
+    , m_prod_tile_dims(1) {
+    init();
+  }
+
+  template<class ... OtherProperties>
+  MDRangePolicy( const MDRangePolicy<OtherProperties...> p ):
+     m_space(p.m_space),
+     m_lower(p.m_lower),
+     m_upper(p.m_upper),
+     m_tile(p.m_tile),
+     m_tile_end(p.m_tile_end),
+     m_num_tiles(p.m_num_tiles),
+     m_prod_tile_dims(p.m_prod_tile_dims) {}
+
+private:
+
+  void init() {
     // Host
     if ( true
        #if defined(KOKKOS_ENABLE_CUDA)
@@ -211,7 +257,7 @@ struct MDRangePolicy
     {
       index_type span;
       for (int i=0; i<rank; ++i) {
-        span = upper[i] - lower[i];
+        span = m_upper[i] - m_lower[i];
         if ( m_tile[i] <= 0 ) {
           if (  ((int)inner_direction == (int)Right && (i < rank-1))
               || ((int)inner_direction == (int)Left && (i > 0)) )
@@ -311,11 +357,9 @@ struct MDRangePolicy
     #endif
   }
 
-
   template < typename LT , typename UT , typename TT = array_index_type >
-  MDRangePolicy( std::initializer_list<LT> const& lower, std::initializer_list<UT> const& upper, std::initializer_list<TT> const& tile = {} )
+  void init( std::initializer_list<LT> const& lower, std::initializer_list<UT> const& upper, std::initializer_list<TT> const& tile = {} )
   {
-
     if(static_cast<int>(m_lower.size()) != rank || static_cast<int>(m_upper.size()) != rank)
       Kokkos::abort("MDRangePolicy: Constructor initializer lists have wrong size");
 
@@ -589,5 +633,26 @@ void md_parallel_reduce( const std::string& str
 } } // namespace Kokkos::Experimental
 #endif
 
+namespace Kokkos {
+namespace Experimental {
+namespace Impl {
+
+template<unsigned long P, class ... Properties>
+struct PolicyPropertyAdaptor<WorkItemProperty::ImplWorkItemProperty<P>,MDRangePolicy<Properties...>> {
+  typedef MDRangePolicy<Properties...> policy_in_t;
+  typedef MDRangePolicy<typename policy_in_t::traits::execution_space,
+                      typename policy_in_t::traits::schedule_type,
+                      typename policy_in_t::traits::work_tag,
+                      typename policy_in_t::traits::index_type,
+                      typename policy_in_t::traits::iteration_pattern,
+                      typename policy_in_t::traits::launch_bounds,
+                      WorkItemProperty::ImplWorkItemProperty<P>> policy_out_t;
+};
+
+}
+}
+}
+
+
 #endif //KOKKOS_CORE_EXP_MD_RANGE_POLICY_HPP
 
diff --git a/packages/kokkos/core/src/Kokkos_Atomic.hpp b/packages/kokkos/core/src/Kokkos_Atomic.hpp
index cf0f25969dc4778f4909aab35f66557d4721e692..c2268bd35f71b48131492e118f34910a323bd9b3 100644
--- a/packages/kokkos/core/src/Kokkos_Atomic.hpp
+++ b/packages/kokkos/core/src/Kokkos_Atomic.hpp
@@ -90,6 +90,7 @@
 #if ! defined( KOKKOS_ENABLE_GNU_ATOMICS ) && \
     ! defined( KOKKOS_ENABLE_INTEL_ATOMICS ) && \
     ! defined( KOKKOS_ENABLE_OPENMP_ATOMICS ) && \
+    ! defined( KOKKOS_ENABLE_STD_ATOMICS ) && \
     ! defined( KOKKOS_ENABLE_SERIAL_ATOMICS )
 
 // Compiling for non-Cuda atomic implementation has not been pre-selected.
@@ -168,6 +169,12 @@ const char * atomic_query_version()
 
 } // namespace Kokkos
 
+//----------------------------------------------------------------------------
+// Atomic Memory Orders
+//
+// Implements Strongly-typed analogs of C++ standard memory orders
+#include "impl/Kokkos_Atomic_Memory_Order.hpp"
+
 #if defined( KOKKOS_ENABLE_ROCM )
 namespace Kokkos {
 namespace Impl {
@@ -287,6 +294,14 @@ void unlock_address_rocm_space(void* ptr);
 #ifndef _WIN32
 #include "impl/Kokkos_Atomic_Generic.hpp"
 #endif
+
+//----------------------------------------------------------------------------
+// Provide atomic loads and stores with memory order semantics
+
+#include "impl/Kokkos_Atomic_Load.hpp"
+#include "impl/Kokkos_Atomic_Store.hpp"
+
+
 //----------------------------------------------------------------------------
 // This atomic-style macro should be an inlined function, not a macro
 
diff --git a/packages/kokkos/core/src/Kokkos_Complex.hpp b/packages/kokkos/core/src/Kokkos_Complex.hpp
index 08cbba3b31f4a3b1214b9b84418df5d21cb4828f..a3ada5d55ea1a04a0d0512873379767ef567f408 100644
--- a/packages/kokkos/core/src/Kokkos_Complex.hpp
+++ b/packages/kokkos/core/src/Kokkos_Complex.hpp
@@ -631,8 +631,10 @@ RealType real (const complex<RealType>& x) {
 template<class RealType>
 KOKKOS_INLINE_FUNCTION
 RealType abs (const complex<RealType>& x) {
-  // FIXME (mfh 31 Oct 2014) Scale to avoid unwarranted overflow.
-  return std::sqrt (real (x) * real (x) + imag (x) * imag (x));
+#ifndef __CUDA_ARCH__
+  using std::hypot;
+#endif
+  return hypot(x.real(),x.imag());
 }
 
 //! Power of a complex number
diff --git a/packages/kokkos/core/src/Kokkos_Concepts.hpp b/packages/kokkos/core/src/Kokkos_Concepts.hpp
index 117469b0a25cd35b38761791a42b5650530f8217..98ae141de414833e07bdc1128c721f446877f2b5 100644
--- a/packages/kokkos/core/src/Kokkos_Concepts.hpp
+++ b/packages/kokkos/core/src/Kokkos_Concepts.hpp
@@ -79,6 +79,45 @@ struct IndexType
   using type = T;
 };
 
+namespace Experimental {
+  struct WorkItemProperty {
+    template<unsigned long Property>
+    struct ImplWorkItemProperty {
+      static const unsigned value = Property;
+      using work_item_property = ImplWorkItemProperty<Property>;
+    };
+
+    constexpr static const ImplWorkItemProperty<0> None = ImplWorkItemProperty<0>();
+    constexpr static const ImplWorkItemProperty<1> HintLightWeight = ImplWorkItemProperty<1>();
+    constexpr static const ImplWorkItemProperty<2> HintHeavyWeight = ImplWorkItemProperty<2>();
+    constexpr static const ImplWorkItemProperty<4> HintRegular = ImplWorkItemProperty<4>();
+    constexpr static const ImplWorkItemProperty<8> HintIrregular = ImplWorkItemProperty<8>();
+    typedef ImplWorkItemProperty<0> None_t;
+    typedef ImplWorkItemProperty<1> HintLightWeight_t;
+    typedef ImplWorkItemProperty<2> HintHeavyWeight_t;
+    typedef ImplWorkItemProperty<4> HintRegular_t;
+    typedef ImplWorkItemProperty<8> HintIrregular_t;
+  };
+
+template<unsigned long pv1, unsigned long pv2>
+inline constexpr WorkItemProperty::ImplWorkItemProperty<pv1|pv2> operator |
+  (WorkItemProperty::ImplWorkItemProperty<pv1>, WorkItemProperty::ImplWorkItemProperty<pv2>) {
+  return WorkItemProperty::ImplWorkItemProperty<pv1|pv2>();
+}
+
+template<unsigned long pv1, unsigned long pv2>
+inline constexpr WorkItemProperty::ImplWorkItemProperty<pv1&pv2> operator &
+  (WorkItemProperty::ImplWorkItemProperty<pv1>, WorkItemProperty::ImplWorkItemProperty<pv2>) {
+  return WorkItemProperty::ImplWorkItemProperty<pv1&pv2>();
+}
+
+template<unsigned long pv1, unsigned long pv2>
+inline constexpr bool operator == (WorkItemProperty::ImplWorkItemProperty<pv1>, WorkItemProperty::ImplWorkItemProperty<pv2>) {
+  return pv1 ==  pv2;
+}
+
+}
+
 /**\brief Specify Launch Bounds for CUDA execution.
  *
  *  If no launch bounds specified then do not set launch bounds.
@@ -105,9 +144,13 @@ namespace Kokkos {
   template< typename T > struct is_ ## CONCEPT { \
   private: \
     template< typename , typename = std::true_type > struct have : std::false_type {}; \
-    template< typename U > struct have<U,typename std::is_same< \
-     typename std::remove_cv<U>::type, \
-     typename std::remove_cv<typename U:: CONCEPT>::type \
+    template< typename U > struct have<U,typename std::is_base_of< \
+     typename std::remove_cv<typename U:: CONCEPT>::type, \
+     typename std::remove_cv<U>::type \
+   >::type> : std::true_type {}; \
+    template< typename U > struct have<U,typename std::is_base_of< \
+     typename std::remove_cv<typename U:: CONCEPT ## _type>::type, \
+     typename std::remove_cv<U>::type \
    >::type> : std::true_type {}; \
   public: \
     enum { value = is_ ## CONCEPT::template have<T>::value }; \
@@ -121,6 +164,9 @@ KOKKOS_IMPL_IS_CONCEPT( execution_space )
 KOKKOS_IMPL_IS_CONCEPT( execution_policy )
 KOKKOS_IMPL_IS_CONCEPT( array_layout )
 KOKKOS_IMPL_IS_CONCEPT( reducer )
+namespace Experimental {
+KOKKOS_IMPL_IS_CONCEPT( work_item_property )
+}
 
 namespace Impl {
 
@@ -138,6 +184,8 @@ KOKKOS_IMPL_IS_CONCEPT( iteration_pattern )
 KOKKOS_IMPL_IS_CONCEPT( schedule_type )
 KOKKOS_IMPL_IS_CONCEPT( index_type )
 KOKKOS_IMPL_IS_CONCEPT( launch_bounds )
+KOKKOS_IMPL_IS_CONCEPT( thread_team_member )
+KOKKOS_IMPL_IS_CONCEPT( host_thread_team_member )
 
 }
 
diff --git a/packages/kokkos/core/src/Kokkos_CopyViews.hpp b/packages/kokkos/core/src/Kokkos_CopyViews.hpp
index 31605c9d39c4304b0a0ae8287be85f03e1164de7..f919fdb75518f8dc7cd57ab28b34a0a7926a2b46 100644
--- a/packages/kokkos/core/src/Kokkos_CopyViews.hpp
+++ b/packages/kokkos/core/src/Kokkos_CopyViews.hpp
@@ -186,9 +186,9 @@ struct ViewFill<ViewType,Layout,ExecSpace,1,iType,KOKKOS_IMPL_COMPILING_LIBRARY>
   typedef Kokkos::RangePolicy<ExecSpace,Kokkos::IndexType<iType>> policy_type;
 
   ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewFill-1D",policy_type(0,a.extent(0)),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -206,10 +206,10 @@ struct ViewFill<ViewType,Layout,ExecSpace,2,iType,KOKKOS_IMPL_COMPILING_LIBRARY>
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewFill-2D",
        policy_type({0,0},{a.extent(0),a.extent(1)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -227,10 +227,10 @@ struct ViewFill<ViewType,Layout,ExecSpace,3,iType,KOKKOS_IMPL_COMPILING_LIBRARY>
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewFill-3D",
        policy_type({0,0,0},{a.extent(0),a.extent(1),a.extent(2)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -248,10 +248,10 @@ struct ViewFill<ViewType,Layout,ExecSpace,4,iType,KOKKOS_IMPL_COMPILING_LIBRARY>
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewFill-4D",
        policy_type({0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),a.extent(3)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -269,10 +269,10 @@ struct ViewFill<ViewType,Layout,ExecSpace,5,iType,KOKKOS_IMPL_COMPILING_LIBRARY>
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewFill-5D",
        policy_type({0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),a.extent(3),a.extent(4)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -290,10 +290,10 @@ struct ViewFill<ViewType,Layout,ExecSpace,6,iType,KOKKOS_IMPL_COMPILING_LIBRARY>
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewFill-6D",
        policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),a.extent(3),a.extent(4),a.extent(5)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -311,11 +311,11 @@ struct ViewFill<ViewType,Layout,ExecSpace,7,iType,KOKKOS_IMPL_COMPILING_LIBRARY>
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewFill-7D",
        policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),a.extent(3),
                                   a.extent(5),a.extent(6)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -335,11 +335,11 @@ struct ViewFill<ViewType,Layout,ExecSpace,8,iType,KOKKOS_IMPL_COMPILING_LIBRARY>
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewFill(const ViewType& a_, typename ViewType::const_value_type& val_):a(a_),val(val_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewFill-8D",
        policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(3),
                                   a.extent(5),a.extent(6),a.extent(7)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -437,10 +437,10 @@ struct ViewCopy<ViewTypeA,ViewTypeB,Layout,ExecSpace,1,iType,KOKKOS_IMPL_COMPILI
   typedef Kokkos::RangePolicy<ExecSpace,Kokkos::IndexType<iType>> policy_type;
 
   ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewCopy-1D",
        policy_type(0,a.extent(0)),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -459,10 +459,10 @@ struct ViewCopy<ViewTypeA,ViewTypeB,Layout,ExecSpace,2,iType,KOKKOS_IMPL_COMPILI
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewCopy-2D",
        policy_type({0,0},{a.extent(0),a.extent(1)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -482,10 +482,10 @@ struct ViewCopy<ViewTypeA,ViewTypeB,Layout,ExecSpace,3,iType,KOKKOS_IMPL_COMPILI
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewCopy-3D",
        policy_type({0,0,0},{a.extent(0),a.extent(1),a.extent(2)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -505,11 +505,11 @@ struct ViewCopy<ViewTypeA,ViewTypeB,Layout,ExecSpace,4,iType,KOKKOS_IMPL_COMPILI
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewCopy-4D",
        policy_type({0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),
                               a.extent(3)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -530,11 +530,11 @@ struct ViewCopy<ViewTypeA,ViewTypeB,Layout,ExecSpace,5,iType,KOKKOS_IMPL_COMPILI
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewCopy-5D",
        policy_type({0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),
                                 a.extent(3),a.extent(4)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -555,11 +555,11 @@ struct ViewCopy<ViewTypeA,ViewTypeB,Layout,ExecSpace,6,iType,KOKKOS_IMPL_COMPILI
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewCopy-6D",
        policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(2),
                                   a.extent(3),a.extent(4),a.extent(5)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -581,11 +581,11 @@ struct ViewCopy<ViewTypeA,ViewTypeB,Layout,ExecSpace,7,iType,KOKKOS_IMPL_COMPILI
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewCopy-7D",
        policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(3),
                                   a.extent(4),a.extent(5),a.extent(6)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -607,11 +607,11 @@ struct ViewCopy<ViewTypeA,ViewTypeB,Layout,ExecSpace,8,iType,KOKKOS_IMPL_COMPILI
   typedef Kokkos::MDRangePolicy<ExecSpace,iterate_type,Kokkos::IndexType<iType>> policy_type;
 
   ViewCopy(const ViewTypeA& a_, const ViewTypeB& b_):a(a_),b(b_) {
-    ExecSpace::fence();
+    ExecSpace().fence();
     Kokkos::parallel_for("Kokkos::ViewCopy-8D",
        policy_type({0,0,0,0,0,0},{a.extent(0),a.extent(1),a.extent(3),
                                   a.extent(5),a.extent(6),a.extent(7)}),*this);
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -1538,6 +1538,779 @@ void deep_copy
   }
 }
 
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+namespace Experimental {
+/** \brief  A local deep copy between views of the default specialization, compatible type,
+ *          same non-zero rank.
+ */
+template< class TeamType, class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous(const TeamType& team, const View<DT,DP...> & dst, const View<ST,SP...> & src) {
+    Kokkos::parallel_for(Kokkos::TeamThreadRange(team, src.span()), [&] (const int& i) {
+        dst.data()[i] = src.data()[i];
+    });
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous(const View<DT,DP...> & dst, const View<ST,SP...> & src) {
+    
+    for(size_t i=0;i<src.span();++i) {
+        dst.data()[i] = src.data()[i];
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   const View<ST,SP...> & src,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 1 && 
+                                                                                             unsigned(ViewTraits<ST,SP...>::rank) == 1
+                                                                                           )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0);
+
+    team.team_barrier();
+    Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+        dst(i) = src(i);
+    });
+    team.team_barrier();
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   const View<ST,SP...> & src,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 2 && 
+                                                                                             unsigned(ViewTraits<ST,SP...>::rank) == 2
+                                                                                           )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1);
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,src);
+        team.team_barrier();
+    } else {
+        team.team_barrier();
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0 = i%dst.extent(0);
+            int i1 = i/dst.extent(0);
+            dst(i0,i1) = src(i0,i1);
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   const View<ST,SP...> & src,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 3 && 
+                                                                                             unsigned(ViewTraits<ST,SP...>::rank) == 3
+                                                                                           )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2);
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,src);
+        team.team_barrier();
+    } else {
+        team.team_barrier();
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+            int i2   = itmp/dst.extent(1);
+            dst(i0,i1,i2) = src(i0,i1,i2);
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   const View<ST,SP...> & src,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 4 && 
+                                                                                             unsigned(ViewTraits<ST,SP...>::rank) == 4
+                                                                                           )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3);
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,src);
+        team.team_barrier();
+    } else {
+        team.team_barrier();
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+                itmp = itmp/dst.extent(1);
+            int i2   = itmp%dst.extent(2);
+            int i3   = itmp/dst.extent(2);
+            dst(i0,i1,i2,i3) = src(i0,i1,i2,i3);
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   const View<ST,SP...> & src,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 5 && 
+                                                                                             unsigned(ViewTraits<ST,SP...>::rank) == 5
+                                                                                           )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4);
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,src);
+        team.team_barrier();
+    } else {
+        team.team_barrier();
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+                itmp = itmp/dst.extent(1);
+            int i2   = itmp%dst.extent(2);
+                itmp = itmp/dst.extent(2);
+            int i3   = itmp%dst.extent(3);
+            int i4   = itmp/dst.extent(3);
+            dst(i0,i1,i2,i3,i4) = src(i0,i1,i2,i3,i4);
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   const View<ST,SP...> & src,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 6 && 
+                                                                                             unsigned(ViewTraits<ST,SP...>::rank) == 6
+                                                                                           )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4)*dst.extent(5);
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,src);
+        team.team_barrier();
+    } else {
+        team.team_barrier();
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+                itmp = itmp/dst.extent(1);
+            int i2   = itmp%dst.extent(2);
+                itmp = itmp/dst.extent(2);
+            int i3   = itmp%dst.extent(3);
+                itmp = itmp/dst.extent(3);
+            int i4   = itmp%dst.extent(4);
+            int i5   = itmp/dst.extent(4);
+            dst(i0,i1,i2,i3,i4,i5) = src(i0,i1,i2,i3,i4,i5);
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   const View<ST,SP...> & src,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 7 && 
+                                                                                             unsigned(ViewTraits<ST,SP...>::rank) == 7
+                                                                                           )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4)*dst.extent(5)*dst.extent(6);
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,src);
+        team.team_barrier();
+    } else {
+        team.team_barrier();
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+                itmp = itmp/dst.extent(1);
+            int i2   = itmp%dst.extent(2);
+                itmp = itmp/dst.extent(2);
+            int i3   = itmp%dst.extent(3);
+                itmp = itmp/dst.extent(3);
+            int i4   = itmp%dst.extent(4);
+                itmp = itmp/dst.extent(4);
+            int i5   = itmp%dst.extent(5);
+            int i6   = itmp/dst.extent(5);
+            dst(i0,i1,i2,i3,i4,i5,i6) = src(i0,i1,i2,i3,i4,i5,i6);
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             const View<ST,SP...> & src,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 1 && 
+                                                                       unsigned(ViewTraits<ST,SP...>::rank) == 1
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0);
+
+    
+    for(size_t i=0;i<N;++i){
+        dst(i) = src(i);
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             const View<ST,SP...> & src,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 2 && 
+                                                                       unsigned(ViewTraits<ST,SP...>::rank) == 2
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,src);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                dst(i0,i1) = src(i0,i1);
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             const View<ST,SP...> & src,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 3 && 
+                                                                       unsigned(ViewTraits<ST,SP...>::rank) == 3
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,src);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    dst(i0,i1,i2) = src(i0,i1,i2);
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             const View<ST,SP...> & src,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 4 && 
+                                                                       unsigned(ViewTraits<ST,SP...>::rank) == 4
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,src);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    for(size_t i3=0;i3<dst.extent(3);++i3)
+                        dst(i0,i1,i2,i3) = src(i0,i1,i2,i3);
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             const View<ST,SP...> & src,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 5 && 
+                                                                       unsigned(ViewTraits<ST,SP...>::rank) == 5
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,src);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    for(size_t i3=0;i3<dst.extent(3);++i3)
+                        for(size_t i4=0;i4<dst.extent(4);++i4)
+                            dst(i0,i1,i2,i3,i4) = src(i0,i1,i2,i3,i4);
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             const View<ST,SP...> & src,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 6 && 
+                                                                        unsigned(ViewTraits<ST,SP...>::rank) == 6
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,src);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    for(size_t i3=0;i3<dst.extent(3);++i3)
+                        for(size_t i4=0;i4<dst.extent(4);++i4)
+                            for(size_t i5=0;i5<dst.extent(5);++i5)
+                                dst(i0,i1,i2,i3,i4,i5) = src(i0,i1,i2,i3,i4,i5);
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP , class ST , class ... SP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             const View<ST,SP...> & src,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 7 && 
+                                                                       unsigned(ViewTraits<ST,SP...>::rank) == 7
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() && src.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,src);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    for(size_t i3=0;i3<dst.extent(3);++i3)
+                        for(size_t i4=0;i4<dst.extent(4);++i4)
+                            for(size_t i5=0;i5<dst.extent(5);++i5)
+                                for(size_t i6=0;i6<dst.extent(6);++i6)
+                                    dst(i0,i1,i2,i3,i4,i5,i6) = src(i0,i1,i2,i3,i4,i5,i6);
+    }
+}
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+/** \brief  Deep copy a value into a view.  */
+template< class TeamType, class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous(const TeamType& team, const View<DT,DP...> & dst, typename ViewTraits<DT,DP...>::const_value_type & value) {
+    Kokkos::parallel_for(Kokkos::TeamThreadRange(team, dst.span()), [&] (const int& i) {
+        dst.data()[i] = value;
+    });
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy_contiguous(const View<DT,DP...> & dst, typename ViewTraits<DT,DP...>::const_value_type & value) {
+    
+    for(size_t i=0;i<dst.span();++i) {
+        dst.data()[i] = value;
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   typename ViewTraits<DT,DP...>::const_value_type & value,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 1 )>::type * = 0 )
+{
+     if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0);
+
+    team.team_barrier();
+    Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+        dst(i) =  value;
+    });
+    team.team_barrier();
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   typename ViewTraits<DT,DP...>::const_value_type & value,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 2 )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1);
+
+    if ( dst.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,value);
+        team.team_barrier();
+    } else {
+        team.team_barrier();    
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0 = i%dst.extent(0);
+            int i1 = i/dst.extent(0);
+            dst(i0,i1) =  value;
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   typename ViewTraits<DT,DP...>::const_value_type & value,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 3 )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2);
+
+    if ( dst.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,value);
+        team.team_barrier();
+    } else {
+        team.team_barrier();    
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+            int i2   = itmp/dst.extent(1);
+            dst(i0,i1,i2) =  value;
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   typename ViewTraits<DT,DP...>::const_value_type & value,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 4 )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3);
+
+    if ( dst.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,value);
+        team.team_barrier();
+    } else {
+        team.team_barrier();    
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+                itmp = itmp/dst.extent(1);
+            int i2   = itmp%dst.extent(2);
+            int i3   = itmp/dst.extent(2);
+            dst(i0,i1,i2,i3) =  value;
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   typename ViewTraits<DT,DP...>::const_value_type & value,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 5 )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4);
+
+    if ( dst.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,value);
+        team.team_barrier();
+    } else {
+        team.team_barrier();    
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+                itmp = itmp/dst.extent(1);
+            int i2   = itmp%dst.extent(2);
+                itmp = itmp/dst.extent(2);
+            int i3   = itmp%dst.extent(3);
+            int i4   = itmp/dst.extent(3);
+            dst(i0,i1,i2,i3,i4) =  value;
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   typename ViewTraits<DT,DP...>::const_value_type & value,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 6 )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4)*dst.extent(5);
+
+    if ( dst.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,value);
+        team.team_barrier();
+    } else {
+        team.team_barrier();    
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+                itmp = itmp/dst.extent(1);
+            int i2   = itmp%dst.extent(2);
+                itmp = itmp/dst.extent(2);
+            int i3   = itmp%dst.extent(3);
+                itmp = itmp/dst.extent(3);
+            int i4   = itmp%dst.extent(4);
+            int i5   = itmp/dst.extent(4);
+            dst(i0,i1,i2,i3,i4,i5) =  value;
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class TeamType, class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const TeamType& team, const View<DT,DP...> & dst, 
+                                                                   typename ViewTraits<DT,DP...>::const_value_type & value,
+                                                                   typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 7 )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0)*dst.extent(1)*dst.extent(2)*dst.extent(3)*dst.extent(4)*dst.extent(5)*dst.extent(6);
+
+    if ( dst.span_is_contiguous() ) {
+        team.team_barrier();
+        local_deep_copy_contiguous(team,dst,value);
+        team.team_barrier();
+    } else {
+        team.team_barrier();    
+        Kokkos::parallel_for(Kokkos::TeamThreadRange(team, N), [&] (const int& i) {
+            int i0   = i%dst.extent(0);
+            int itmp = i/dst.extent(0);
+            int i1   = itmp%dst.extent(1);
+                itmp = itmp/dst.extent(1);
+            int i2   = itmp%dst.extent(2);
+                itmp = itmp/dst.extent(2);
+            int i3   = itmp%dst.extent(3);
+                itmp = itmp/dst.extent(3);
+            int i4   = itmp%dst.extent(4);
+                itmp = itmp/dst.extent(4);
+            int i5   = itmp%dst.extent(5);
+            int i6   = itmp/dst.extent(5);
+            dst(i0,i1,i2,i3,i4,i5,i6) =  value;
+        });
+        team.team_barrier();
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             typename ViewTraits<DT,DP...>::const_value_type & value,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 1
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    const size_t N = dst.extent(0);
+
+    
+    for(size_t i=0;i<N;++i){
+        dst(i) = value;
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             typename ViewTraits<DT,DP...>::const_value_type & value,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 2
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,value);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                dst(i0,i1) = value;
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,  
+                                             typename ViewTraits<DT,DP...>::const_value_type & value,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 3
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,value);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    dst(i0,i1,i2) = value;
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,
+                                             typename ViewTraits<DT,DP...>::const_value_type & value,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 4
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,value);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    for(size_t i3=0;i3<dst.extent(3);++i3)
+                        dst(i0,i1,i2,i3) = value;
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,
+                                             typename ViewTraits<DT,DP...>::const_value_type & value,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 5
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,value);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    for(size_t i3=0;i3<dst.extent(3);++i3)
+                        for(size_t i4=0;i4<dst.extent(4);++i4)
+                            dst(i0,i1,i2,i3,i4) = value;
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,
+                                             typename ViewTraits<DT,DP...>::const_value_type & value,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 6
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,value);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    for(size_t i3=0;i3<dst.extent(3);++i3)
+                        for(size_t i4=0;i4<dst.extent(4);++i4)
+                            for(size_t i5=0;i5<dst.extent(5);++i5)
+                                dst(i0,i1,i2,i3,i4,i5) = value;
+    }
+}
+//----------------------------------------------------------------------------
+template< class DT , class ... DP >
+void KOKKOS_INLINE_FUNCTION local_deep_copy (const View<DT,DP...> & dst,
+                                             typename ViewTraits<DT,DP...>::const_value_type & value,
+                                             typename std::enable_if<( unsigned(ViewTraits<DT,DP...>::rank) == 7
+                                                                     )>::type * = 0 )
+{
+    if( dst.data() == nullptr ) {
+        return;
+    }
+
+    if ( dst.span_is_contiguous() ) {
+        local_deep_copy_contiguous(dst,value);
+    } else {
+        
+        for(size_t i0=0;i0<dst.extent(0);++i0)
+            for(size_t i1=0;i1<dst.extent(1);++i1)
+                for(size_t i2=0;i2<dst.extent(2);++i2)
+                    for(size_t i3=0;i3<dst.extent(3);++i3)
+                        for(size_t i4=0;i4<dst.extent(4);++i4)
+                            for(size_t i5=0;i5<dst.extent(5);++i5)
+                                for(size_t i6=0;i6<dst.extent(6);++i6)
+                                    dst(i0,i1,i2,i3,i4,i5,i6) = value;
+    }
+}
+} /* namespace Experimental */
 } /* namespace Kokkos */
 
 //----------------------------------------------------------------------------
@@ -1562,10 +2335,10 @@ void deep_copy
                   typename ViewTraits<DT,DP...>::value_type >::value
     , "deep_copy requires non-const type" );
 
-  ExecSpace::fence();
+  ExecSpace().fence();
   typedef typename View<DT,DP...>::uniform_runtime_nomemspace_type ViewTypeUniform;
   Kokkos::Impl::ViewFill< ViewTypeUniform >( dst , value );
-  ExecSpace::fence();
+  ExecSpace().fence();
 }
 
 /** \brief  Deep copy into a value in Host memory from a view.  */
@@ -2184,6 +2957,25 @@ create_mirror_view_and_copy(const Space& , const Kokkos::View<T,P...> & src
   deep_copy(mirror, src);
   return mirror;
 }
+    
+// Create a mirror view in a new space without initializing (specialization for same space)
+template<class Space, class T, class ... P>
+typename Impl::MirrorViewType<Space,T,P ...>::view_type
+create_mirror_view(const Space& , const Kokkos::View<T,P...> & src
+  , Kokkos::Impl::WithoutInitializing_t
+  , typename std::enable_if<Impl::MirrorViewType<Space,T,P ...>::is_same_memspace>::type* = 0 ) {
+  return src;
+}
+    
+// Create a mirror view in a new space without initializing (specialization for different space)
+template<class Space, class T, class ... P>
+typename Impl::MirrorViewType<Space,T,P ...>::view_type
+create_mirror_view(const Space& , const Kokkos::View<T,P...> & src
+  , Kokkos::Impl::WithoutInitializing_t
+  , typename std::enable_if<!Impl::MirrorViewType<Space,T,P ...>::is_same_memspace>::type* = 0 ) {
+  using Mirror = typename Impl::MirrorViewType<Space,T,P ...>::view_type;
+  return Mirror(Kokkos::ViewAllocateWithoutInitializing(src.label()), src.layout());
+}
 
 } /* namespace Kokkos */
 
diff --git a/packages/kokkos/core/src/Kokkos_Core.hpp b/packages/kokkos/core/src/Kokkos_Core.hpp
index 4d0625ee1b35c38bc92c3e1301ce0f7376d2c695..9fbba0abfa3afb6ea3ed31d51249ad2c8170396d 100644
--- a/packages/kokkos/core/src/Kokkos_Core.hpp
+++ b/packages/kokkos/core/src/Kokkos_Core.hpp
@@ -66,6 +66,10 @@
 #include <Kokkos_Qthreads.hpp>
 #endif
 
+#if defined( KOKKOS_ENABLE_HPX )
+#include <Kokkos_HPX.hpp>
+#endif
+
 #if defined( KOKKOS_ENABLE_THREADS )
 #include <Kokkos_Threads.hpp>
 #endif
@@ -87,6 +91,7 @@
 #include <Kokkos_Atomic.hpp>
 #include <Kokkos_hwloc.hpp>
 #include <Kokkos_Timer.hpp>
+#include <Kokkos_TaskScheduler.hpp>
 
 #include <Kokkos_Complex.hpp>
 
diff --git a/packages/kokkos/core/src/Kokkos_Core_fwd.hpp b/packages/kokkos/core/src/Kokkos_Core_fwd.hpp
index 150865d0f535a430c41dd177885f72983ad3b9ca..55c6a5494ab992bba028d0afc4c67516026cac15 100644
--- a/packages/kokkos/core/src/Kokkos_Core_fwd.hpp
+++ b/packages/kokkos/core/src/Kokkos_Core_fwd.hpp
@@ -100,6 +100,12 @@ class Serial;    ///< Execution space main process on CPU.
 class Qthreads;  ///< Execution space with Qthreads back-end.
 #endif
 
+#if defined( KOKKOS_ENABLE_HPX )
+namespace Experimental {
+class HPX;  ///< Execution space with HPX back-end.
+}
+#endif
+
 #if defined( KOKKOS_ENABLE_THREADS )
 class Threads;   ///< Execution space with pthreads back-end.
 #endif
@@ -156,6 +162,8 @@ namespace Kokkos {
   typedef Threads DefaultExecutionSpace;
 //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS )
 //  typedef Qthreads DefaultExecutionSpace;
+#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX )
+  typedef Kokkos::Experimental::HPX DefaultExecutionSpace;
 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL )
   typedef Serial DefaultExecutionSpace;
 #else
@@ -176,6 +184,8 @@ namespace Kokkos {
   typedef Threads DefaultHostExecutionSpace;
 //#elif defined( KOKKOS_ENABLE_QTHREADS )
 //  typedef Qthreads DefaultHostExecutionSpace;
+#elif defined( KOKKOS_ENABLE_HPX )
+  typedef Kokkos::Experimental::HPX DefaultHostExecutionSpace;
 #elif defined( KOKKOS_ENABLE_SERIAL )
   typedef Serial DefaultHostExecutionSpace;
 #else
diff --git a/packages/kokkos/core/src/Kokkos_Crs.hpp b/packages/kokkos/core/src/Kokkos_Crs.hpp
index ccc3944d86fb5f3ab3d59d15aea47682b6269ff0..8412ced9213d6c01dc2b6045446de5c8b8b6ec66 100644
--- a/packages/kokkos/core/src/Kokkos_Crs.hpp
+++ b/packages/kokkos/core/src/Kokkos_Crs.hpp
@@ -187,7 +187,7 @@ class GetCrsTransposeCounts {
     using closure_type = Kokkos::Impl::ParallelFor<self_type, policy_type>;
     const closure_type closure(*this, policy_type(0, index_type(in.entries.size())));
     closure.execute();
-    execution_space::fence();
+    execution_space().fence();
   }
 };
 
@@ -266,7 +266,7 @@ class FillCrsTransposeEntries {
     using closure_type = Kokkos::Impl::ParallelFor<self_type, policy_type>;
     const closure_type closure(*this, policy_type(0, index_type(in.numRows())));
     closure.execute();
-    execution_space::fence();
+    execution_space().fence();
   }
 };
 
diff --git a/packages/kokkos/core/src/Kokkos_Cuda.hpp b/packages/kokkos/core/src/Kokkos_Cuda.hpp
index 726a5749616f8e20a94f8d74daf3358415355aee..4eb8ab4d4bae25e43c217d97812727592da8373f 100644
--- a/packages/kokkos/core/src/Kokkos_Cuda.hpp
+++ b/packages/kokkos/core/src/Kokkos_Cuda.hpp
@@ -52,6 +52,7 @@
 #include <iosfwd>
 #include <vector>
 
+#include <impl/Kokkos_AnalyzePolicy.hpp>
 #include <Kokkos_CudaSpace.hpp>
 
 #include <Kokkos_Parallel.hpp>
@@ -67,6 +68,7 @@
 namespace Kokkos {
 namespace Impl {
 class CudaExec ;
+class CudaInternal ;
 } // namespace Impl
 } // namespace Kokkos
 
@@ -74,6 +76,23 @@ class CudaExec ;
 
 namespace Kokkos {
 
+namespace Impl {
+  namespace Experimental {
+    enum class CudaLaunchMechanism:unsigned{Default=0,ConstantMemory=1,GlobalMemory=2,LocalMemory=4};
+
+    constexpr inline CudaLaunchMechanism operator | (CudaLaunchMechanism p1, CudaLaunchMechanism p2) {
+      return static_cast<CudaLaunchMechanism>(static_cast<unsigned>(p1) |  static_cast<unsigned>(p2));
+    }
+    constexpr inline CudaLaunchMechanism operator & (CudaLaunchMechanism p1, CudaLaunchMechanism p2) {
+      return static_cast<CudaLaunchMechanism>(static_cast<unsigned>(p1) &  static_cast<unsigned>(p2));
+    }
+
+    template<CudaLaunchMechanism l>
+    struct CudaDispatchProperties {
+      CudaLaunchMechanism launch_mechanism = l;
+    };
+  }
+}
 /// \class Cuda
 /// \brief Kokkos Execution Space that uses CUDA to run on GPUs.
 ///
@@ -153,7 +172,13 @@ public:
   /// return asynchronously, before the functor completes.  This
   /// method does not return until all dispatched functors on this
   /// device have completed.
+  static void impl_static_fence();
+
+  #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
   static void fence();
+  #else
+  void fence() const;
+  #endif
 
   /** \brief  Return the maximum amount of concurrency.  */
   static int concurrency();
@@ -165,15 +190,18 @@ public:
   //--------------------------------------------------
   //! \name  Cuda space instances
 
+  KOKKOS_INLINE_FUNCTION
   ~Cuda() {}
+
   Cuda();
-  explicit Cuda( const int instance_id );
 
   Cuda( Cuda && ) = default ;
   Cuda( const Cuda & ) = default ;
   Cuda & operator = ( Cuda && ) = default ;
   Cuda & operator = ( const Cuda & ) = default ;
 
+  Cuda(cudaStream_t stream);
+
   //--------------------------------------------------------------------------
   //! \name Device-specific functions
   //@{
@@ -219,18 +247,18 @@ public:
    */
   static std::vector<unsigned> detect_device_arch();
 
-  cudaStream_t cuda_stream() const { return m_stream ; }
-  int          cuda_device() const { return m_device ; }
+  cudaStream_t cuda_stream() const;
+  int          cuda_device() const;
 
   //@}
   //--------------------------------------------------------------------------
 
   static const char* name();
 
+  inline Impl::CudaInternal* impl_internal_space_instance() const { return m_space_instance; }
 private:
 
-  int          m_device ;
-  cudaStream_t m_stream ;
+  Impl::CudaInternal* m_space_instance;
 };
 
 } // namespace Kokkos
@@ -302,7 +330,8 @@ struct VerifyExecutionCanAccessMemorySpace
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
-#include <Cuda/Kokkos_CudaExec.hpp>
+#include <Cuda/Kokkos_Cuda_KernelLaunch.hpp>
+#include <Cuda/Kokkos_Cuda_Instance.hpp>
 #include <Cuda/Kokkos_Cuda_View.hpp>
 #include <Cuda/Kokkos_Cuda_Team.hpp>
 #include <Cuda/Kokkos_Cuda_Parallel.hpp>
diff --git a/packages/kokkos/core/src/Kokkos_ExecPolicy.hpp b/packages/kokkos/core/src/Kokkos_ExecPolicy.hpp
index d4693b43c153952b5e7530c3d90f97fde3455d0b..5c85850fda545160e33ed01ed46c7d96baca954f 100644
--- a/packages/kokkos/core/src/Kokkos_ExecPolicy.hpp
+++ b/packages/kokkos/core/src/Kokkos_ExecPolicy.hpp
@@ -46,12 +46,14 @@
 
 #include <Kokkos_Core_fwd.hpp>
 #include <impl/Kokkos_Traits.hpp>
-#include <impl/Kokkos_StaticAssert.hpp>
 #include <impl/Kokkos_Error.hpp>
 #include <impl/Kokkos_Tags.hpp>
 #include <impl/Kokkos_AnalyzePolicy.hpp>
 #include <Kokkos_Concepts.hpp>
 #include <iostream>
+#if defined(KOKKOS_ENABLE_PROFILING)
+#include <typeinfo>
+#endif // KOKKOS_ENABLE_PROFILING
 
 //----------------------------------------------------------------------------
 
@@ -91,8 +93,9 @@ template<class ... Properties>
 class RangePolicy
   : public Impl::PolicyTraits<Properties ... >
 {
-private:
+public:
   typedef Impl::PolicyTraits<Properties ... > traits;
+private:
 
   typename traits::execution_space m_space ;
   typename traits::index_type  m_begin ;
@@ -100,6 +103,9 @@ private:
   typename traits::index_type  m_granularity ;
   typename traits::index_type  m_granularity_mask ;
 
+  template<class ... OtherProperties>
+  friend class RangePolicy;
+
 public:
   //! Tag this class as an execution policy
   typedef RangePolicy execution_policy;
@@ -118,6 +124,15 @@ public:
   RangePolicy(const RangePolicy&) = default;
   RangePolicy(RangePolicy&&) = default;
 
+  template<class ... OtherProperties>
+  RangePolicy(const RangePolicy<OtherProperties...> p) {
+    m_space = p.m_space;
+    m_begin = p.m_begin;
+    m_end = p.m_end;
+    m_granularity = p.m_granularity;
+    m_granularity_mask = p.m_granularity_mask;
+  }
+
   inline RangePolicy() : m_space(), m_begin(0), m_end(0) {}
 
   /** \brief  Total range */
@@ -523,19 +538,22 @@ class TeamPolicy: public
        typename Impl::PolicyTraits<Properties ... >::execution_space,
        Properties ...> internal_policy;
 
-  typedef Impl::PolicyTraits<Properties ... > traits;
+  template<class ... OtherProperties>
+  friend class TeamPolicy;
 
 public:
+  typedef Impl::PolicyTraits<Properties ... > traits;
+
   typedef TeamPolicy execution_policy;
 
   TeamPolicy& operator = (const TeamPolicy&) = default;
 
   /** \brief  Construct policy with the given instance of the execution space */
-  TeamPolicy( const typename traits::execution_space & , int league_size_request , int team_size_request , int vector_length_request = 1 )
-    : internal_policy(typename traits::execution_space(),league_size_request,team_size_request, vector_length_request) {first_arg = false;}
+  TeamPolicy( const typename traits::execution_space & space_ , int league_size_request , int team_size_request , int vector_length_request = 1 )
+    : internal_policy(space_,league_size_request,team_size_request, vector_length_request) {first_arg = false;}
 
-  TeamPolicy( const typename traits::execution_space & , int league_size_request , const Kokkos::AUTO_t & , int vector_length_request = 1 )
-    : internal_policy(typename traits::execution_space(),league_size_request,Kokkos::AUTO(), vector_length_request) {first_arg = false;}
+  TeamPolicy( const typename traits::execution_space & space_, int league_size_request , const Kokkos::AUTO_t & , int vector_length_request = 1 )
+    : internal_policy(space_,league_size_request,Kokkos::AUTO(), vector_length_request) {first_arg = false;}
 
   /** \brief  Construct policy with the default instance of the execution space */
   TeamPolicy( int league_size_request , int team_size_request , int vector_length_request = 1 )
@@ -618,6 +636,11 @@ public:
   }
 #endif
 
+  template<class ... OtherProperties>
+  TeamPolicy(const TeamPolicy<OtherProperties...> p):internal_policy(p) {
+    first_arg = p.first_arg;
+  }
+
 private:
   bool first_arg;
   TeamPolicy(const internal_policy& p):internal_policy(p) {first_arg = false;}
@@ -754,6 +777,59 @@ public:
     {}
 };
 
+template<typename iType, class TeamMemberType>
+struct TeamVectorRangeBoundariesStruct {
+private:
+
+  KOKKOS_INLINE_FUNCTION static
+  iType ibegin( const iType & arg_begin
+              , const iType & arg_end
+              , const iType & arg_rank
+              , const iType & arg_size
+              )
+    {
+      return arg_begin + ( ( arg_end - arg_begin + arg_size - 1 ) / arg_size ) * arg_rank ;
+    }
+
+  KOKKOS_INLINE_FUNCTION static
+  iType iend( const iType & arg_begin
+            , const iType & arg_end
+            , const iType & arg_rank
+            , const iType & arg_size
+            )
+    {
+      const iType end_ = arg_begin + ( ( arg_end - arg_begin + arg_size - 1 ) / arg_size ) * ( arg_rank + 1 );
+      return end_ < arg_end ? end_ : arg_end ;
+    }
+
+public:
+
+  typedef iType index_type;
+  const iType start;
+  const iType end;
+  enum {increment = 1};
+  const TeamMemberType& thread;
+
+  KOKKOS_INLINE_FUNCTION
+  TeamVectorRangeBoundariesStruct( const TeamMemberType& arg_thread
+                                 , const iType& arg_end
+                                 )
+    : start( ibegin( 0 , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) )
+    , end(   iend(   0 , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) )
+    , thread( arg_thread )
+    {}
+
+  KOKKOS_INLINE_FUNCTION
+  TeamVectorRangeBoundariesStruct( const TeamMemberType& arg_thread
+                                , const iType& arg_begin
+                                , const iType& arg_end
+                                )
+    : start( ibegin( arg_begin , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) )
+    , end(   iend(   arg_begin , arg_end , arg_thread.team_rank() , arg_thread.team_size() ) )
+    , thread( arg_thread )
+    {}
+};
+
 template<typename iType, class TeamMemberType>
 struct ThreadVectorRangeBoundariesStruct {
   typedef iType index_type;
@@ -804,10 +880,10 @@ struct VectorSingleStruct {
  *  This policy is used together with a parallel pattern as a nested layer within a kernel launched
  *  with the TeamPolicy. This variant expects a single count. So the range is (0,count].
  */
-template<typename iType, class TeamMemberType>
-KOKKOS_INLINE_FUNCTION
+template<typename iType, class TeamMemberType, class _never_use_this_overload>
+KOKKOS_INLINE_FUNCTION_DELETED
 Impl::TeamThreadRangeBoundariesStruct<iType,TeamMemberType>
-TeamThreadRange( const TeamMemberType&, const iType& count );
+TeamThreadRange( const TeamMemberType&, const iType& count ) = delete;
 
 /** \brief  Execution policy for parallel work over a threads within a team.
  *
@@ -815,10 +891,32 @@ TeamThreadRange( const TeamMemberType&, const iType& count );
  *  This policy is used together with a parallel pattern as a nested layer within a kernel launched
  *  with the TeamPolicy. This variant expects a begin and end. So the range is (begin,end].
  */
-template<typename iType1, typename iType2, class TeamMemberType>
-KOKKOS_INLINE_FUNCTION
+template<typename iType1, typename iType2, class TeamMemberType, class _never_use_this_overload>
+KOKKOS_INLINE_FUNCTION_DELETED
 Impl::TeamThreadRangeBoundariesStruct<typename std::common_type<iType1, iType2>::type, TeamMemberType>
-TeamThreadRange( const TeamMemberType&, const iType1& begin, const iType2& end );
+TeamThreadRange( const TeamMemberType&, const iType1& begin, const iType2& end ) = delete;
+
+/** \brief  Execution policy for parallel work over a threads within a team.
+ *
+ *  The range is split over all threads in a team. The Mapping scheme depends on the architecture.
+ *  This policy is used together with a parallel pattern as a nested layer within a kernel launched
+ *  with the TeamPolicy. This variant expects a single count. So the range is (0,count].
+ */
+template<typename iType, class TeamMemberType, class _never_use_this_overload>
+KOKKOS_INLINE_FUNCTION_DELETED
+Impl::TeamThreadRangeBoundariesStruct<iType,TeamMemberType>
+TeamVectorRange( const TeamMemberType&, const iType& count ) = delete;
+
+/** \brief  Execution policy for parallel work over a threads within a team.
+ *
+ *  The range is split over all threads in a team. The Mapping scheme depends on the architecture.
+ *  This policy is used together with a parallel pattern as a nested layer within a kernel launched
+ *  with the TeamPolicy. This variant expects a begin and end. So the range is (begin,end].
+ */
+template<typename iType1, typename iType2, class TeamMemberType, class _never_use_this_overload>
+KOKKOS_INLINE_FUNCTION_DELETED
+Impl::TeamThreadRangeBoundariesStruct<typename std::common_type<iType1, iType2>::type, TeamMemberType>
+TeamVectorRange( const TeamMemberType&, const iType1& begin, const iType2& end ) = delete;
 
 /** \brief  Execution policy for a vector parallel loop.
  *
@@ -826,15 +924,15 @@ TeamThreadRange( const TeamMemberType&, const iType1& begin, const iType2& end )
  *  This policy is used together with a parallel pattern as a nested layer within a kernel launched
  *  with the TeamPolicy. This variant expects a single count. So the range is (0,count].
  */
-template<typename iType, class TeamMemberType>
-KOKKOS_INLINE_FUNCTION
+template<typename iType, class TeamMemberType, class _never_use_this_overload>
+KOKKOS_INLINE_FUNCTION_DELETED
 Impl::ThreadVectorRangeBoundariesStruct<iType,TeamMemberType>
-ThreadVectorRange( const TeamMemberType&, const iType& count );
+ThreadVectorRange( const TeamMemberType&, const iType& count ) = delete;
 
-template<typename iType, class TeamMemberType>
-KOKKOS_INLINE_FUNCTION
+template<typename iType, class TeamMemberType, class _never_use_this_overload>
+KOKKOS_INLINE_FUNCTION_DELETED
 Impl::ThreadVectorRangeBoundariesStruct<iType,TeamMemberType>
-ThreadVectorRange( const TeamMemberType&, const iType& arg_begin, const iType& arg_end );
+ThreadVectorRange( const TeamMemberType&, const iType& arg_begin, const iType& arg_end ) = delete;
 
 #if defined(KOKKOS_ENABLE_PROFILING)
 namespace Impl {
@@ -877,5 +975,44 @@ struct ParallelConstructName<FunctorType, TagType, false> {
 
 } // namespace Kokkos
 
+namespace Kokkos {
+namespace Experimental {
+
+namespace Impl {
+  template<class Property,class Policy>
+  struct PolicyPropertyAdaptor;
+
+  template<unsigned long P, class ... Properties>
+  struct PolicyPropertyAdaptor<WorkItemProperty::ImplWorkItemProperty<P>,RangePolicy<Properties...>> {
+    typedef RangePolicy<Properties...> policy_in_t;
+    typedef RangePolicy<typename policy_in_t::traits::execution_space,
+                        typename policy_in_t::traits::schedule_type,
+                        typename policy_in_t::traits::work_tag,
+                        typename policy_in_t::traits::index_type,
+                        typename policy_in_t::traits::iteration_pattern,
+                        typename policy_in_t::traits::launch_bounds,
+                        WorkItemProperty::ImplWorkItemProperty<P>> policy_out_t;
+  };
+
+  template<unsigned long P, class ... Properties>
+  struct PolicyPropertyAdaptor<WorkItemProperty::ImplWorkItemProperty<P>,TeamPolicy<Properties...>> {
+    typedef TeamPolicy<Properties...> policy_in_t;
+    typedef TeamPolicy<typename policy_in_t::traits::execution_space,
+                        typename policy_in_t::traits::schedule_type,
+                        typename policy_in_t::traits::work_tag,
+                        typename policy_in_t::traits::index_type,
+                        typename policy_in_t::traits::iteration_pattern,
+                        typename policy_in_t::traits::launch_bounds,
+                        WorkItemProperty::ImplWorkItemProperty<P>> policy_out_t;
+  };
+}
+
+template<class PolicyType,unsigned long P>
+constexpr typename Impl::PolicyPropertyAdaptor<WorkItemProperty::ImplWorkItemProperty<P>,PolicyType>::policy_out_t
+  require(const PolicyType p, WorkItemProperty::ImplWorkItemProperty<P>){
+    return typename Impl::PolicyPropertyAdaptor<WorkItemProperty::ImplWorkItemProperty<P>,PolicyType>::policy_out_t(p);
+}
+} //Experimental
+} //Kokkos
 #endif /* #define KOKKOS_EXECPOLICY_HPP */
 
diff --git a/packages/kokkos/core/src/Kokkos_Extents.hpp b/packages/kokkos/core/src/Kokkos_Extents.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..c8b9110485f6336ca38731b3233e9ccbc000b244
--- /dev/null
+++ b/packages/kokkos/core/src/Kokkos_Extents.hpp
@@ -0,0 +1,186 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2019) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_KOKKOS_EXTENTS_HPP
+#define KOKKOS_KOKKOS_EXTENTS_HPP
+
+#include <cstddef>
+
+namespace Kokkos {
+namespace Experimental {
+
+constexpr ptrdiff_t dynamic_extent = -1;
+
+template <ptrdiff_t... ExtentSpecs>
+struct Extents {
+  /* TODO @enhancement flesh this out more */
+};
+
+template <class Exts, ptrdiff_t NewExtent>
+struct PrependExtent;
+
+template <ptrdiff_t... Exts, ptrdiff_t NewExtent>
+struct PrependExtent<
+  Extents<Exts...>, NewExtent
+> {
+  using type = Extents<NewExtent, Exts...>;
+};
+
+template <class Exts, ptrdiff_t NewExtent>
+struct AppendExtent;
+
+template <ptrdiff_t... Exts, ptrdiff_t NewExtent>
+struct AppendExtent<
+  Extents<Exts...>, NewExtent
+> {
+  using type = Extents<Exts..., NewExtent>;
+};
+
+} // end namespace Experimental
+
+namespace Impl {
+
+namespace _parse_view_extents_impl {
+
+template <class T>
+struct _all_remaining_extents_dynamic : std::true_type { };
+
+template <class T>
+struct _all_remaining_extents_dynamic<T*>
+  : _all_remaining_extents_dynamic<T>
+{ };
+
+template <class T, unsigned N>
+struct _all_remaining_extents_dynamic<T[N]>
+  : std::false_type
+{ };
+
+template <class T, class Result, class=void>
+struct _parse_impl {
+  using type = Result;
+};
+
+// We have to treat the case of int**[x] specially, since it *doesn't* go backwards
+template <class T, ptrdiff_t... ExtentSpec>
+struct _parse_impl<
+  T*, Experimental::Extents<ExtentSpec...>,
+  typename std::enable_if<_all_remaining_extents_dynamic<T>::value>::type
+>
+  : _parse_impl<
+      T, Experimental::Extents<Experimental::dynamic_extent, ExtentSpec...>
+    >
+{ };
+
+// int*(*[x])[y] should still work also (meaning int[][x][][y])
+template <class T, ptrdiff_t... ExtentSpec>
+struct _parse_impl<
+  T*, Experimental::Extents<ExtentSpec...>,
+  typename std::enable_if<not _all_remaining_extents_dynamic<T>::value>::type
+>
+{
+  using _next = Kokkos::Experimental::AppendExtent<
+    typename _parse_impl<T, Experimental::Extents<ExtentSpec...>, void>::type,
+    Experimental::dynamic_extent
+  >;
+  using type = typename _next::type;
+};
+
+template <class T, ptrdiff_t... ExtentSpec, unsigned N>
+struct _parse_impl<
+  T[N], Experimental::Extents<ExtentSpec...>, void
+>
+  : _parse_impl<
+      T, Experimental::Extents<ExtentSpec..., ptrdiff_t(N)> // TODO @pedantic this could be a narrowing cast
+    >
+{ };
+
+} // end namespace _parse_view_extents_impl
+
+template <class DataType>
+struct ParseViewExtents {
+  using type =
+    typename _parse_view_extents_impl
+      ::_parse_impl<DataType, Experimental::Extents<>>::type;
+};
+
+template <class ValueType, ptrdiff_t Ext>
+struct ApplyExtent
+{
+  using type = ValueType[Ext];
+};
+
+template <class ValueType>
+struct ApplyExtent<ValueType, Experimental::dynamic_extent>
+{
+  using type = ValueType*;
+};
+
+template <class ValueType, unsigned N, ptrdiff_t Ext>
+struct ApplyExtent<ValueType[N], Ext>
+{
+  using type = typename ApplyExtent<ValueType, Ext>::type[N];
+};
+
+template <class ValueType, ptrdiff_t Ext>
+struct ApplyExtent<ValueType*, Ext>
+{
+  using type = ValueType*[Ext];
+};
+
+template <class ValueType>
+struct ApplyExtent<ValueType*, Experimental::dynamic_extent>
+{
+  using type = typename ApplyExtent<ValueType, Experimental::dynamic_extent>::type*;
+};
+
+template <class ValueType, unsigned N>
+struct ApplyExtent<ValueType[N], Experimental::dynamic_extent>
+{
+  using type = typename ApplyExtent<ValueType, Experimental::dynamic_extent>::type[N];
+};
+
+} // end namespace Impl
+
+} // end namespace Kokkos
+
+#endif //KOKKOS_KOKKOS_EXTENTS_HPP
diff --git a/packages/kokkos/core/src/Kokkos_Future.hpp b/packages/kokkos/core/src/Kokkos_Future.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..665ce71cf513c02be8fca72d84a3fade1c6a15bf
--- /dev/null
+++ b/packages/kokkos/core/src/Kokkos_Future.hpp
@@ -0,0 +1,567 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_FUTURE_HPP
+#define KOKKOS_FUTURE_HPP
+
+//----------------------------------------------------------------------------
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_Core_fwd.hpp>
+#include <Kokkos_TaskScheduler_fwd.hpp>
+//----------------------------------------------------------------------------
+
+#include <impl/Kokkos_TaskQueue.hpp>
+#include <impl/Kokkos_TaskResult.hpp>
+#include <impl/Kokkos_TaskBase.hpp>
+#include <Kokkos_Atomic.hpp>
+
+#include <Kokkos_Concepts.hpp> // is_space
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
+// For now, hack this in as a partial specialization
+// TODO @tasking @cleanup Make this the "normal" class template and make the old code the specialization
+template <typename ValueType, typename ExecutionSpace, typename QueueType>
+class BasicFuture<ValueType, SimpleTaskScheduler<ExecutionSpace, QueueType>>
+{
+public:
+
+  using value_type = ValueType;
+  using execution_space = ExecutionSpace;
+  using scheduler_type = SimpleTaskScheduler<ExecutionSpace, QueueType>;
+  using queue_type = typename scheduler_type::task_queue_type;
+
+
+private:
+
+  template <class, class>
+  friend class SimpleTaskScheduler;
+  template <class, class>
+  friend class BasicFuture;
+
+  using task_base_type = typename scheduler_type::task_base_type;
+  using task_queue_type = typename scheduler_type::task_queue_type;
+
+  using task_queue_traits = typename scheduler_type::task_queue_traits;
+  using task_scheduling_info_type = typename scheduler_type::task_scheduling_info_type;
+
+  using result_storage_type =
+    Impl::TaskResultStorage<
+      ValueType,
+      Impl::SchedulingInfoStorage<
+        Impl::RunnableTaskBase<task_queue_traits>,
+        task_scheduling_info_type
+      >
+    >;
+
+
+
+  OwningRawPtr<task_base_type> m_task = nullptr;
+
+  KOKKOS_INLINE_FUNCTION
+  explicit
+  BasicFuture(task_base_type* task)
+    : m_task(task)
+  {
+    // Note: reference count starts at 2 to account for initial increment
+    // TODO @tasking @minor DSH verify reference count here and/or encapsulate starting reference count closer to here
+  }
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture() noexcept : m_task(nullptr) { }
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture(BasicFuture&& rhs) noexcept
+    : m_task(std::move(rhs.m_task))
+  {
+    rhs.m_task = nullptr;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture(BasicFuture const& rhs)
+  //  : m_task(rhs.m_task)
+    : m_task(nullptr)
+  {
+    *static_cast<task_base_type* volatile*>(&m_task) = rhs.m_task;
+    if(m_task) m_task->increment_reference_count();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture& operator=(BasicFuture&& rhs) noexcept
+  {
+    if(m_task != rhs.m_task) {
+      clear();
+      //m_task = std::move(rhs.m_task);
+      *static_cast<task_base_type* volatile*>(&m_task) = rhs.m_task;
+      // rhs.m_task reference count is unchanged, since this is a move
+    }
+    else {
+      // They're the same, but this is a move, so 1 fewer references now
+      rhs.clear();
+    }
+    rhs.m_task = nullptr;
+    return *this ;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture& operator=(BasicFuture const& rhs)
+  {
+    if(m_task != rhs.m_task) {
+      clear();
+      //m_task = rhs.m_task;
+      *static_cast<task_base_type* volatile*>(&m_task) = rhs.m_task;
+    }
+    if(m_task != nullptr) { m_task->increment_reference_count(); }
+    return *this;
+  }
+
+  //----------------------------------------
+
+  template <class T, class S>
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture(BasicFuture<T, S>&& rhs) noexcept // NOLINT(google-explicit-constructor)
+    : m_task(std::move(rhs.m_task))
+  {
+    static_assert(
+      std::is_same<scheduler_type, void>::value ||
+        std::is_same<scheduler_type, S>::value,
+      "Moved Futures must have the same scheduler"
+    );
+
+    static_assert(
+      std::is_same<value_type, void>::value ||
+        std::is_same<value_type, T>::value,
+      "Moved Futures must have the same value_type"
+    );
+
+    // reference counts are unchanged, since this is a move
+    rhs.m_task = nullptr;
+  }
+
+  template <class T, class S>
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture(BasicFuture<T, S> const& rhs) // NOLINT(google-explicit-constructor)
+    //: m_task(rhs.m_task)
+    : m_task(nullptr)
+  {
+    static_assert(
+      std::is_same<scheduler_type, void>::value ||
+        std::is_same<scheduler_type, S>::value,
+      "Copied Futures must have the same scheduler"
+    );
+
+    static_assert(
+      std::is_same<value_type, void>::value ||
+        std::is_same<value_type, T>::value,
+      "Copied Futures must have the same value_type"
+    );
+
+    *static_cast<task_base_type* volatile*>(&m_task) = rhs.m_task;
+    if(m_task) m_task->increment_reference_count();
+  }
+
+  template <class T, class S>
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture&
+  operator=(BasicFuture<T, S> const& rhs)
+  {
+    static_assert(
+      std::is_same<scheduler_type, void>::value ||
+        std::is_same<scheduler_type, S>::value,
+      "Assigned Futures must have the same scheduler"
+    );
+
+    static_assert(
+      std::is_same<value_type, void>::value ||
+        std::is_same<value_type, T>::value,
+      "Assigned Futures must have the same value_type"
+    );
+
+    if(m_task != rhs.m_task) {
+      clear();
+      //m_task = rhs.m_task;
+      *static_cast<task_base_type* volatile*>(&m_task) = rhs.m_task;
+      if(m_task != nullptr) { m_task->increment_reference_count(); }
+    }
+    return *this;
+  }
+
+  template<class T, class S>
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture& operator=(BasicFuture<T, S>&& rhs)
+  {
+    static_assert(
+      std::is_same<scheduler_type, void>::value ||
+        std::is_same<scheduler_type, S>::value,
+      "Assigned Futures must have the same scheduler"
+    );
+
+    static_assert(
+      std::is_same<value_type, void>::value ||
+        std::is_same<value_type, T>::value,
+      "Assigned Futures must have the same value_type"
+    );
+
+    if(m_task != rhs.m_task) {
+      clear();
+      //m_task = std::move(rhs.m_task);
+      *static_cast<task_base_type* volatile*>(&m_task) = rhs.m_task;
+      // rhs.m_task reference count is unchanged, since this is a move
+    }
+    else {
+      // They're the same, but this is a move, so 1 fewer references now
+      rhs.clear();
+    }
+    rhs.m_task = nullptr;
+    return *this ;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  ~BasicFuture() noexcept { clear(); }
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  void clear() noexcept {
+    if(m_task) {
+      bool should_delete = m_task->decrement_and_check_reference_count();
+      if(should_delete) {
+        static_cast<task_queue_type*>(m_task->ready_queue_base_ptr())
+          ->deallocate(std::move(*m_task));
+      }
+    }
+    //m_task = nullptr;
+    *static_cast<task_base_type* volatile*>(&m_task) = nullptr;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_null() const noexcept {
+    return m_task == nullptr;
+  }
+
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_ready() const noexcept {
+    return (m_task == nullptr) || m_task->wait_queue_is_consumed();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  const typename Impl::TaskResult< ValueType >::reference_type
+  get() const
+  {
+    KOKKOS_EXPECTS(is_ready());
+    return static_cast<result_storage_type*>(m_task)->value_reference();
+    //return Impl::TaskResult<ValueType>::get(m_task);
+  }
+
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// OLD CODE
+////////////////////////////////////////////////////////////////////////////////
+
+template <typename ValueType, typename Scheduler>
+class BasicFuture {
+private:
+
+  template< typename , typename > friend class BasicTaskScheduler ;
+  template< typename , typename > friend class BasicFuture ;
+  friend class Impl::TaskBase ;
+  template< typename , typename , typename > friend class Impl::Task ;
+
+
+  //----------------------------------------
+
+public:
+
+  //----------------------------------------
+
+  using scheduler_type = Scheduler;
+  using queue_type = typename scheduler_type::queue_type;
+  using execution_space = typename scheduler_type::execution_space;
+  using value_type = ValueType;
+
+  //----------------------------------------
+
+private:
+
+  //----------------------------------------
+
+  using task_base  = Impl::TaskBase;
+
+  task_base * m_task ;
+
+  KOKKOS_INLINE_FUNCTION explicit
+  BasicFuture( task_base * task ) : m_task(0)
+  { if ( task ) queue_type::assign( & m_task , task ); }
+
+  //----------------------------------------
+
+public:
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_null() const { return 0 == m_task ; }
+
+  KOKKOS_INLINE_FUNCTION
+  int reference_count() const
+  { return 0 != m_task ? m_task->reference_count() : 0 ; }
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  void clear()
+  { if ( m_task ) queue_type::assign( & m_task , (task_base*)0 ); }
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  ~BasicFuture() { clear(); }
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture() noexcept : m_task(nullptr) { }
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture( BasicFuture && rhs ) noexcept
+    : m_task( rhs.m_task )
+  {
+    rhs.m_task = 0;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture( const BasicFuture & rhs )
+    : m_task(0)
+  { if ( rhs.m_task ) queue_type::assign( & m_task , rhs.m_task ); }
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture& operator=(BasicFuture&& rhs) noexcept
+  {
+    clear();
+    m_task = rhs.m_task ;
+    rhs.m_task = 0 ;
+    return *this ;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture& operator=(BasicFuture const& rhs)
+  {
+    if ( m_task || rhs.m_task ) queue_type::assign( & m_task , rhs.m_task );
+    return *this ;
+  }
+
+  //----------------------------------------
+
+  template <class T, class S>
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture(BasicFuture<T, S>&& rhs) noexcept // NOLINT(google-explicit-constructor)
+    : m_task( rhs.m_task )
+  {
+    static_assert
+      ( std::is_same<scheduler_type, void>::value ||
+          std::is_same<scheduler_type, S>::value
+        , "Assigned Futures must have the same scheduler" );
+
+    static_assert
+      ( std::is_same< value_type , void >::value ||
+          std::is_same<value_type, T>::value
+        , "Assigned Futures must have the same value_type" );
+
+    rhs.m_task = 0 ;
+  }
+
+  template <class T, class S>
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture(BasicFuture<T, S> const& rhs) // NOLINT(google-explicit-constructor)
+    : m_task(nullptr)
+  {
+    static_assert
+      ( std::is_same<scheduler_type, void>::value ||
+          std::is_same<scheduler_type, S>::value
+        , "Assigned Futures must have the same scheduler" );
+
+    static_assert
+      ( std::is_same< value_type , void >::value ||
+          std::is_same<value_type, T>::value
+        , "Assigned Futures must have the same value_type" );
+
+    if ( rhs.m_task ) queue_type::assign( & m_task , rhs.m_task );
+  }
+
+  template <class T, class S>
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture&
+  operator=(BasicFuture<T, S> const& rhs)
+  {
+    static_assert
+      ( std::is_same<scheduler_type, void>::value ||
+          std::is_same<scheduler_type, S>::value
+        , "Assigned Futures must have the same scheduler" );
+
+    static_assert
+      ( std::is_same< value_type , void >::value ||
+          std::is_same<value_type, T>::value
+        , "Assigned Futures must have the same value_type" );
+
+    if ( m_task || rhs.m_task ) queue_type::assign( & m_task , rhs.m_task );
+    return *this ;
+  }
+
+  template<class T, class S>
+  KOKKOS_INLINE_FUNCTION
+  BasicFuture& operator=(BasicFuture<T, S>&& rhs)
+  {
+    static_assert
+      ( std::is_same<scheduler_type, void>::value ||
+          std::is_same<scheduler_type, S>::value
+        , "Assigned Futures must have the same scheduler" );
+
+    static_assert
+      ( std::is_same< value_type , void >::value ||
+          std::is_same<value_type, T>::value
+        , "Assigned Futures must have the same value_type" );
+
+    clear();
+    m_task = rhs.m_task ;
+    rhs.m_task = 0 ;
+    return *this ;
+  }
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  int is_ready() const noexcept
+  { return ( 0 == m_task ) || ( ((task_base*) task_base::LockTag) == m_task->m_wait ); }
+
+  KOKKOS_INLINE_FUNCTION
+  const typename Impl::TaskResult< ValueType >::reference_type
+  get() const
+  {
+    if ( 0 == m_task ) {
+      Kokkos::abort( "Kokkos:::Future::get ERROR: is_null()");
+    }
+    return Impl::TaskResult< ValueType >::get( m_task );
+  }
+};
+
+// Is a Future with the given execution space
+template< typename , typename ExecSpace = void >
+struct is_future : public std::false_type {};
+
+template<typename ValueType, typename Scheduler, typename ExecSpace>
+struct is_future<BasicFuture<ValueType, Scheduler>, ExecSpace>
+  : std::integral_constant<bool,
+      std::is_same<ExecSpace, typename Scheduler::execution_space>::value
+      || std::is_void<ExecSpace>::value
+    >
+{};
+
+////////////////////////////////////////////////////////////////////////////////
+// END OLD CODE
+////////////////////////////////////////////////////////////////////////////////
+
+namespace Impl {
+
+template <class Arg1, class Arg2>
+class ResolveFutureArgOrder {
+private:
+  enum { Arg1_is_space = Kokkos::is_space<Arg1>::value };
+  enum { Arg2_is_space = Kokkos::is_space<Arg2>::value };
+  enum { Arg1_is_value = !Arg1_is_space && !std::is_same<Arg1, void>::value };
+  enum { Arg2_is_value = !Arg2_is_space && !std::is_same<Arg2, void>::value };
+
+  static_assert(
+    ! ( Arg1_is_space && Arg2_is_space ),
+    "Future cannot be given two spaces"
+  );
+
+  static_assert(
+    ! ( Arg1_is_value && Arg2_is_value ),
+    "Future cannot be given two value types"
+  );
+
+  using value_type =
+    typename std::conditional<Arg1_is_value, Arg1,
+      typename std::conditional<Arg2_is_value, Arg2, void>::type
+    >::type;
+
+  using execution_space =
+    typename std::conditional<Arg1_is_space, Arg1,
+      typename std::conditional<Arg2_is_space, Arg2, void>::type
+    >::type::execution_space;
+
+public:
+
+  using type = BasicFuture<value_type, TaskScheduler<execution_space>>;
+
+};
+
+} // end namespace Impl
+
+/**
+ *
+ *  Future< space >  // value_type == void
+ *  Future< value >  // space == Default
+ *  Future< value , space >
+ *
+ */
+template <class Arg1 = void, class Arg2 = void>
+using Future = typename Impl::ResolveFutureArgOrder<Arg1, Arg2>::type;
+
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_FUTURE */
diff --git a/packages/kokkos/core/src/Kokkos_HPX.hpp b/packages/kokkos/core/src/Kokkos_HPX.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..79a2b74da493e8b3cc01f4877091cd363d55c3ae
--- /dev/null
+++ b/packages/kokkos/core/src/Kokkos_HPX.hpp
@@ -0,0 +1,1999 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_HPX_HPP
+#define KOKKOS_HPX_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined(KOKKOS_ENABLE_HPX)
+
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_HostSpace.hpp>
+#include <cstddef>
+#include <iosfwd>
+
+#ifdef KOKKOS_ENABLE_HBWSPACE
+#include <Kokkos_HBWSpace.hpp>
+#endif
+
+#include <Kokkos_HostSpace.hpp>
+#include <Kokkos_Layout.hpp>
+#include <Kokkos_MemoryTraits.hpp>
+#include <Kokkos_Parallel.hpp>
+#include <Kokkos_ScratchSpace.hpp>
+#include <Kokkos_TaskScheduler.hpp>
+#include <impl/Kokkos_FunctorAdapter.hpp>
+#include <impl/Kokkos_FunctorAnalysis.hpp>
+#include <impl/Kokkos_Profiling_Interface.hpp>
+#include <impl/Kokkos_Tags.hpp>
+#include <impl/Kokkos_TaskQueue.hpp>
+
+#include <KokkosExp_MDRangePolicy.hpp>
+
+#include <hpx/apply.hpp>
+#include <hpx/hpx_start.hpp>
+#include <hpx/lcos/local/barrier.hpp>
+#include <hpx/lcos/local/counting_semaphore.hpp>
+#include <hpx/parallel/algorithms/for_loop.hpp>
+#include <hpx/parallel/algorithms/reduce.hpp>
+#include <hpx/parallel/executors/static_chunk_size.hpp>
+#include <hpx/runtime.hpp>
+#include <hpx/runtime/threads/run_as_hpx_thread.hpp>
+#include <hpx/runtime/threads/threadmanager.hpp>
+
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <stdexcept>
+#include <type_traits>
+#include <vector>
+
+// There are currently two different implementations for the parallel dispatch
+// functions:
+//
+// - 0: The HPX way. Unfortunately, this comes with unnecessary
+//      overheads at the moment, so there is
+// - 1: The manual way. This way is more verbose and does not take advantage of
+//      e.g. parallel::for_loop in HPX but it is significantly faster in many
+//      benchmarks.
+//
+// In the long run 0 should be the preferred implementation, but until HPX is
+// improved 1 will be the default.
+#ifndef KOKKOS_HPX_IMPLEMENTATION
+#define KOKKOS_HPX_IMPLEMENTATION 1
+#endif
+
+#if (KOKKOS_HPX_IMPLEMENTATION < 0) || (KOKKOS_HPX_IMPLEMENTATION > 1)
+#error "You have chosen an invalid value for KOKKOS_HPX_IMPLEMENTATION"
+#endif
+
+namespace Kokkos {
+namespace Impl {
+class thread_buffer {
+  static constexpr std::size_t m_cache_line_size = 64;
+
+  std::size_t m_num_threads;
+  std::size_t m_size_per_thread;
+  std::size_t m_size_total;
+  char *m_data;
+
+  void pad_to_cache_line(std::size_t &size) {
+    size = ((size + m_cache_line_size - 1) / m_cache_line_size) *
+           m_cache_line_size;
+  }
+
+public:
+  thread_buffer()
+      : m_num_threads(0), m_size_per_thread(0), m_size_total(0),
+        m_data(nullptr) {}
+  thread_buffer(const std::size_t num_threads,
+                const std::size_t size_per_thread) {
+    resize(num_threads, size_per_thread);
+  }
+  ~thread_buffer() { delete[] m_data; }
+
+  thread_buffer(const thread_buffer &) = delete;
+  thread_buffer(thread_buffer &&) = delete;
+  thread_buffer &operator=(const thread_buffer &) = delete;
+  thread_buffer &operator=(thread_buffer) = delete;
+
+  void resize(const std::size_t num_threads,
+              const std::size_t size_per_thread) {
+    m_num_threads = num_threads;
+    m_size_per_thread = size_per_thread;
+
+    pad_to_cache_line(m_size_per_thread);
+
+    std::size_t size_total_new = m_num_threads * m_size_per_thread;
+
+    if (m_size_total < size_total_new) {
+      delete[] m_data;
+      m_data = new char[size_total_new];
+      m_size_total = size_total_new;
+    }
+  }
+
+  char *get(std::size_t thread_num) {
+    assert(thread_num < m_num_threads);
+    if (m_data == nullptr) {
+      return nullptr;
+    }
+    return &m_data[thread_num * m_size_per_thread];
+  }
+
+  std::size_t size_per_thread() const noexcept { return m_size_per_thread; }
+  std::size_t size_total() const noexcept { return m_size_total; }
+};
+} // namespace Impl
+
+namespace Experimental {
+class HPX {
+private:
+  static bool m_hpx_initialized;
+  static Kokkos::Impl::thread_buffer m_buffer;
+#if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH)
+  static hpx::future<void> m_future;
+#endif
+
+public:
+  using execution_space = HPX;
+  using memory_space = HostSpace;
+  using device_type = Kokkos::Device<execution_space, memory_space>;
+  using array_layout = LayoutRight;
+  using size_type = memory_space::size_type;
+  using scratch_memory_space = ScratchMemorySpace<HPX>;
+
+  HPX() noexcept {}
+  static void print_configuration(std::ostream &,
+                                  const bool /* verbose */ = false) {
+    std::cout << "HPX backend" << std::endl;
+  }
+
+  static bool in_parallel(HPX const & = HPX()) noexcept { return false; }
+  static void impl_static_fence(HPX const & = HPX())
+  #if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH)
+    {
+      if (hpx::threads::get_self_ptr() == nullptr) {
+        hpx::threads::run_as_hpx_thread([]() { impl_get_future().wait(); });
+      } else {
+        impl_get_future().wait();
+      }
+    }
+  #else
+        noexcept {
+    }
+  #endif
+
+  #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+  static void fence(HPX const & = HPX()) {
+  #else
+  void fence() const {
+  #endif
+    impl_static_fence();
+  }
+
+  static bool is_asynchronous(HPX const & = HPX()) noexcept {
+#if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH)
+    return true;
+#else
+    return false;
+#endif
+  }
+
+  static std::vector<HPX> partition(...) {
+    Kokkos::abort("Kokkos::Experimental::HPX::partition_master: can't partition an HPX "
+                  "instance\n");
+    return std::vector<HPX>();
+  }
+
+  template <typename F>
+  static void partition_master(F const &f, int requested_num_partitions = 0,
+                               int requested_partition_size = 0) {
+    if (requested_num_partitions > 1) {
+      Kokkos::abort("Kokkos::Experimental::HPX::partition_master: can't partition an "
+                    "HPX instance\n");
+    }
+  }
+
+  static int concurrency();
+  static void impl_initialize(int thread_count);
+  static void impl_initialize();
+  static bool impl_is_initialized() noexcept;
+  static void impl_finalize();
+
+  static int impl_thread_pool_size() noexcept {
+    hpx::runtime *rt = hpx::get_runtime_ptr();
+    if (rt == nullptr) {
+      return 0;
+    } else {
+      if (hpx::threads::get_self_ptr() == nullptr) {
+        return hpx::resource::get_thread_pool(0).get_os_thread_count();
+      } else {
+        return hpx::this_thread::get_pool()->get_os_thread_count();
+      }
+    }
+  }
+
+  static int impl_thread_pool_rank() noexcept {
+    hpx::runtime *rt = hpx::get_runtime_ptr();
+    if (rt == nullptr) {
+      return 0;
+    } else {
+      if (hpx::threads::get_self_ptr() == nullptr) {
+        return 0;
+      } else {
+        return hpx::this_thread::get_pool()->get_pool_index();
+      }
+    }
+  }
+
+  static int impl_thread_pool_size(int depth) {
+    if (depth == 0) {
+      return impl_thread_pool_size();
+    } else {
+      return 1;
+    }
+  }
+
+  static int impl_max_hardware_threads() noexcept {
+    return hpx::threads::hardware_concurrency();
+  }
+
+  static int impl_hardware_thread_id() noexcept {
+    return hpx::get_worker_thread_num();
+  }
+
+  static Kokkos::Impl::thread_buffer &impl_get_buffer() noexcept {
+    return m_buffer;
+  }
+#if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH)
+  static hpx::future<void> &impl_get_future() noexcept { return m_future; }
+#endif
+
+  static constexpr const char *name() noexcept { return "HPX"; }
+};
+} // namespace Experimental
+
+namespace Impl {
+template <typename Closure>
+inline void dispatch_execute_task(Closure *closure) {
+#if defined(KOKKOS_ENABLE_HPX_ASYNC_DISPATCH)
+  if (hpx::threads::get_self_ptr() == nullptr) {
+    hpx::threads::run_as_hpx_thread([closure]() {
+      hpx::future<void> &fut = Kokkos::Experimental::HPX::impl_get_future();
+      Closure closure_copy = *closure;
+      fut = fut.then([closure_copy](hpx::future<void> &&) {
+        closure_copy.execute_task();
+      });
+    });
+  } else {
+    hpx::future<void> &fut = Kokkos::Experimental::HPX::impl_get_future();
+    Closure closure_copy = *closure;
+    fut = fut.then(
+        [closure_copy](hpx::future<void> &&) { closure_copy.execute_task(); });
+  }
+#else
+  if (hpx::threads::get_self_ptr() == nullptr) {
+    hpx::threads::run_as_hpx_thread([closure]() { closure->execute_task(); });
+  } else {
+    closure->execute_task();
+  }
+#endif
+}
+} // namespace Impl
+} // namespace Kokkos
+
+namespace Kokkos {
+namespace Impl {
+template <>
+struct MemorySpaceAccess<Kokkos::Experimental::HPX::memory_space,
+                         Kokkos::Experimental::HPX::scratch_memory_space> {
+  enum { assignable = false };
+  enum { accessible = true };
+  enum { deepcopy = false };
+};
+
+template <>
+struct VerifyExecutionCanAccessMemorySpace<
+    Kokkos::Experimental::HPX::memory_space,
+    Kokkos::Experimental::HPX::scratch_memory_space> {
+  enum { value = true };
+  inline static void verify(void) {}
+  inline static void verify(const void *) {}
+};
+} // namespace Impl
+} // namespace Kokkos
+
+namespace Kokkos {
+namespace Experimental {
+template <> class UniqueToken<HPX, UniqueTokenScope::Instance> {
+public:
+  using execution_space = HPX;
+  using size_type = int;
+  UniqueToken(execution_space const & = execution_space()) noexcept {}
+
+  // NOTE: Currently this assumes that there is no oversubscription.
+  // hpx::get_num_worker_threads can't be used directly because it may yield
+  // it's task (problematic if called after hpx::get_worker_thread_num).
+  int size() const noexcept { return HPX::impl_max_hardware_threads(); }
+  int acquire() const noexcept { return HPX::impl_hardware_thread_id(); }
+  void release(int) const noexcept {}
+};
+
+template <> class UniqueToken<HPX, UniqueTokenScope::Global> {
+public:
+  using execution_space = HPX;
+  using size_type = int;
+  UniqueToken(execution_space const & = execution_space()) noexcept {}
+
+  // NOTE: Currently this assumes that there is no oversubscription.
+  // hpx::get_num_worker_threads can't be used directly because it may yield
+  // it's task (problematic if called after hpx::get_worker_thread_num).
+  int size() const noexcept { return HPX::impl_max_hardware_threads(); }
+  int acquire() const noexcept { return HPX::impl_hardware_thread_id(); }
+  void release(int) const noexcept {}
+};
+} // namespace Experimental
+} // namespace Kokkos
+
+namespace Kokkos {
+namespace Impl {
+
+struct HPXTeamMember {
+public:
+  using execution_space = Kokkos::Experimental::HPX;
+  using scratch_memory_space =
+      Kokkos::ScratchMemorySpace<Kokkos::Experimental::HPX>;
+
+private:
+  scratch_memory_space m_team_shared;
+  std::size_t m_team_shared_size;
+
+  int m_league_size;
+  int m_league_rank;
+  int m_team_size;
+  int m_team_rank;
+
+public:
+  KOKKOS_INLINE_FUNCTION
+  const scratch_memory_space &team_shmem() const {
+    return m_team_shared.set_team_thread_mode(0, 1, 0);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  const execution_space::scratch_memory_space &team_scratch(const int) const {
+    return m_team_shared.set_team_thread_mode(0, 1, 0);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  const execution_space::scratch_memory_space &thread_scratch(const int) const {
+    return m_team_shared.set_team_thread_mode(0, team_size(), team_rank());
+  }
+
+  KOKKOS_INLINE_FUNCTION int league_rank() const noexcept {
+    return m_league_rank;
+  }
+
+  KOKKOS_INLINE_FUNCTION int league_size() const noexcept {
+    return m_league_size;
+  }
+
+  KOKKOS_INLINE_FUNCTION int team_rank() const noexcept { return m_team_rank; }
+  KOKKOS_INLINE_FUNCTION int team_size() const noexcept { return m_team_size; }
+
+  template <class... Properties>
+  constexpr KOKKOS_INLINE_FUNCTION
+  HPXTeamMember(const TeamPolicyInternal<Kokkos::Experimental::HPX,
+                                         Properties...> &policy,
+                const int team_rank, const int league_rank, void *scratch,
+                int scratch_size) noexcept
+      : m_team_shared(scratch, scratch_size, scratch, scratch_size),
+        m_team_shared_size(scratch_size), m_league_size(policy.league_size()),
+        m_league_rank(league_rank), m_team_size(policy.team_size()),
+        m_team_rank(team_rank) {}
+
+  KOKKOS_INLINE_FUNCTION
+  void team_barrier() const {}
+
+  template <class ValueType>
+  KOKKOS_INLINE_FUNCTION void team_broadcast(ValueType &, const int &) const {
+    static_assert(std::is_trivially_default_constructible<ValueType>(),
+                  "Only trivial constructible types can be broadcasted");
+  }
+
+  template <class Closure, class ValueType>
+  KOKKOS_INLINE_FUNCTION void team_broadcast(const Closure &, ValueType &,
+                                             const int &) const {
+    static_assert(std::is_trivially_default_constructible<ValueType>(),
+                  "Only trivial constructible types can be broadcasted");
+  }
+
+  template <class ValueType, class JoinOp>
+  KOKKOS_INLINE_FUNCTION ValueType team_reduce(const ValueType &value,
+                                               const JoinOp &) const {
+    return value;
+  }
+
+  template <class ReducerType>
+  KOKKOS_INLINE_FUNCTION
+      typename std::enable_if<is_reducer<ReducerType>::value>::type
+      team_reduce(const ReducerType &reducer) const {}
+
+  template <typename Type>
+  KOKKOS_INLINE_FUNCTION Type
+  team_scan(const Type &value, Type *const global_accum = nullptr) const {
+    if (global_accum) {
+      Kokkos::atomic_fetch_add(global_accum, value);
+    }
+
+    return 0;
+  }
+};
+
+template <class... Properties>
+class TeamPolicyInternal<Kokkos::Experimental::HPX, Properties...>
+    : public PolicyTraits<Properties...> {
+  using traits = PolicyTraits<Properties...>;
+
+  int m_league_size;
+  int m_team_size;
+  std::size_t m_team_scratch_size[2];
+  std::size_t m_thread_scratch_size[2];
+  int m_chunk_size;
+
+public:
+  using member_type = HPXTeamMember;
+
+  // NOTE: Max size is 1 for simplicity. In most cases more than 1 is not
+  // necessary on CPU. Implement later if there is a need.
+  template <class FunctorType>
+  inline static int team_size_max(const FunctorType &) {
+    return 1;
+  }
+
+  template <class FunctorType>
+  inline static int team_size_recommended(const FunctorType &) {
+    return 1;
+  }
+
+  template <class FunctorType>
+  inline static int team_size_recommended(const FunctorType &, const int &) {
+    return 1;
+  }
+
+  template <class FunctorType>
+  int team_size_max(const FunctorType &, const ParallelForTag &) const {
+    return 1;
+  }
+
+  template <class FunctorType>
+  int team_size_max(const FunctorType &, const ParallelReduceTag &) const {
+    return 1;
+  }
+  template <class FunctorType>
+  int team_size_recommended(const FunctorType &, const ParallelForTag &) const {
+    return 1;
+  }
+  template <class FunctorType>
+  int team_size_recommended(const FunctorType &,
+                            const ParallelReduceTag &) const {
+    return 1;
+  }
+
+private:
+  inline void init(const int league_size_request, const int team_size_request) {
+    m_league_size = league_size_request;
+    const int max_team_size = 1; // TODO: Can't use team_size_max(...) because
+                                 // it requires a functor as argument.
+    m_team_size =
+        team_size_request > max_team_size ? max_team_size : team_size_request;
+
+    if (m_chunk_size > 0) {
+      if (!Impl::is_integral_power_of_two(m_chunk_size))
+        Kokkos::abort("TeamPolicy blocking granularity must be power of two");
+    } else {
+      int new_chunk_size = 1;
+      while (new_chunk_size * 4 * Kokkos::Experimental::HPX::concurrency() <
+             m_league_size) {
+        new_chunk_size *= 2;
+      }
+
+      if (new_chunk_size < 128) {
+        new_chunk_size = 1;
+        while ((new_chunk_size * Kokkos::Experimental::HPX::concurrency() <
+                m_league_size) &&
+               (new_chunk_size < 128))
+          new_chunk_size *= 2;
+      }
+
+      m_chunk_size = new_chunk_size;
+    }
+  }
+
+public:
+  inline int team_size() const { return m_team_size; }
+  inline int league_size() const { return m_league_size; }
+
+  inline size_t scratch_size(const int &level, int team_size_ = -1) const {
+    if (team_size_ < 0) {
+      team_size_ = m_team_size;
+    }
+    return m_team_scratch_size[level] +
+           team_size_ * m_thread_scratch_size[level];
+  }
+
+public:
+  template <class ExecSpace, class... OtherProperties>
+  friend class TeamPolicyInternal;
+
+  template <class... OtherProperties>
+  TeamPolicyInternal(
+      const TeamPolicyInternal<Kokkos::Experimental::HPX, OtherProperties...> &p) {
+    m_league_size = p.m_league_size;
+    m_team_size = p.m_team_size;
+    m_team_scratch_size[0] = p.m_team_scratch_size[0];
+    m_thread_scratch_size[0] = p.m_thread_scratch_size[0];
+    m_team_scratch_size[1] = p.m_team_scratch_size[1];
+    m_thread_scratch_size[1] = p.m_thread_scratch_size[1];
+    m_chunk_size = p.m_chunk_size;
+  }
+
+  TeamPolicyInternal(const typename traits::execution_space &,
+                     int league_size_request, int team_size_request,
+                     int /* vector_length_request */ = 1)
+      : m_team_scratch_size{0, 0}, m_thread_scratch_size{0, 0},
+        m_chunk_size(0) {
+    init(league_size_request, team_size_request);
+  }
+
+  TeamPolicyInternal(const typename traits::execution_space &,
+                     int league_size_request,
+                     const Kokkos::AUTO_t &team_size_request,
+                     int /* vector_length_request */ = 1)
+      : m_team_scratch_size{0, 0}, m_thread_scratch_size{0, 0},
+        m_chunk_size(0) {
+    init(league_size_request, 1);
+  }
+
+  TeamPolicyInternal(int league_size_request, int team_size_request,
+                     int /* vector_length_request */ = 1)
+      : m_team_scratch_size{0, 0}, m_thread_scratch_size{0, 0},
+        m_chunk_size(0) {
+    init(league_size_request, team_size_request);
+  }
+
+  TeamPolicyInternal(int league_size_request,
+                     const Kokkos::AUTO_t &team_size_request,
+                     int /* vector_length_request */ = 1)
+      : m_team_scratch_size{0, 0}, m_thread_scratch_size{0, 0},
+        m_chunk_size(0) {
+    init(league_size_request, 1);
+  }
+
+  inline int chunk_size() const { return m_chunk_size; }
+
+  inline TeamPolicyInternal &
+  set_chunk_size(typename traits::index_type chunk_size_) {
+    m_chunk_size = chunk_size_;
+    return *this;
+  }
+
+  inline TeamPolicyInternal &set_scratch_size(const int &level,
+                                              const PerTeamValue &per_team) {
+    m_team_scratch_size[level] = per_team.value;
+    return *this;
+  }
+
+  inline TeamPolicyInternal &
+  set_scratch_size(const int &level, const PerThreadValue &per_thread) {
+    m_thread_scratch_size[level] = per_thread.value;
+    return *this;
+  }
+
+  inline TeamPolicyInternal &
+  set_scratch_size(const int &level, const PerTeamValue &per_team,
+                   const PerThreadValue &per_thread) {
+    m_team_scratch_size[level] = per_team.value;
+    m_thread_scratch_size[level] = per_thread.value;
+    return *this;
+  }
+};
+} // namespace Impl
+} // namespace Kokkos
+
+namespace Kokkos {
+namespace Impl {
+
+template <class FunctorType, class... Traits>
+class ParallelFor<FunctorType, Kokkos::RangePolicy<Traits...>,
+                  Kokkos::Experimental::HPX> {
+private:
+  using Policy = Kokkos::RangePolicy<Traits...>;
+  using WorkTag = typename Policy::work_tag;
+  using WorkRange = typename Policy::WorkRange;
+  using Member = typename Policy::member_type;
+
+  const FunctorType m_functor;
+  const Policy m_policy;
+
+  template <class TagType>
+  static typename std::enable_if<std::is_same<TagType, void>::value>::type
+  execute_functor(const FunctorType &functor, const Member i) {
+    functor(i);
+  }
+
+  template <class TagType>
+  static typename std::enable_if<!std::is_same<TagType, void>::value>::type
+  execute_functor(const FunctorType &functor, const Member i) {
+    const TagType t{};
+    functor(t, i);
+  }
+
+  template <class TagType>
+  static typename std::enable_if<std::is_same<TagType, void>::value>::type
+  execute_functor_range(const FunctorType &functor, const Member i_begin,
+                        const Member i_end) {
+    for (Member i = i_begin; i < i_end; ++i) {
+      functor(i);
+    }
+  }
+
+  template <class TagType>
+  static typename std::enable_if<!std::is_same<TagType, void>::value>::type
+  execute_functor_range(const FunctorType &functor, const Member i_begin,
+                        const Member i_end) {
+    const TagType t{};
+    for (Member i = i_begin; i < i_end; ++i) {
+      functor(t, i);
+    }
+  }
+
+public:
+  void execute() const { Kokkos::Impl::dispatch_execute_task(this); }
+
+  void execute_task() const {
+#if KOKKOS_HPX_IMPLEMENTATION == 0
+    using hpx::parallel::for_loop;
+    using hpx::parallel::execution::par;
+    using hpx::parallel::execution::static_chunk_size;
+
+    for_loop(par.with(static_chunk_size(m_policy.chunk_size())),
+             m_policy.begin(), m_policy.end(), [this](const Member i) {
+               execute_functor<WorkTag>(m_functor, i);
+             });
+
+#elif KOKKOS_HPX_IMPLEMENTATION == 1
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+
+    counting_semaphore sem(0);
+    std::size_t num_tasks = 0;
+
+    for (Member i_begin = m_policy.begin(); i_begin < m_policy.end();
+         i_begin += m_policy.chunk_size()) {
+      apply([this, &sem, i_begin]() {
+        const Member i_end =
+            (std::min)(i_begin + m_policy.chunk_size(), m_policy.end());
+        execute_functor_range<WorkTag>(m_functor, i_begin, i_end);
+
+        sem.signal(1);
+      });
+
+      ++num_tasks;
+    }
+
+    sem.wait(num_tasks);
+#endif
+  }
+
+  inline ParallelFor(const FunctorType &arg_functor, Policy arg_policy)
+      : m_functor(arg_functor), m_policy(arg_policy) {}
+};
+
+template <class FunctorType, class... Traits>
+class ParallelFor<FunctorType, Kokkos::MDRangePolicy<Traits...>,
+                  Kokkos::Experimental::HPX> {
+private:
+  using MDRangePolicy = Kokkos::MDRangePolicy<Traits...>;
+  using Policy = typename MDRangePolicy::impl_range_policy;
+  using WorkTag = typename MDRangePolicy::work_tag;
+  using WorkRange = typename Policy::WorkRange;
+  using Member = typename Policy::member_type;
+  using iterate_type =
+      typename Kokkos::Impl::HostIterateTile<MDRangePolicy, FunctorType,
+                                             WorkTag, void>;
+
+  const FunctorType m_functor;
+  const MDRangePolicy m_mdr_policy;
+  const Policy m_policy;
+
+public:
+  void execute() const { dispatch_execute_task(this); }
+
+  inline void execute_task() const {
+#if KOKKOS_HPX_IMPLEMENTATION == 0
+    using hpx::parallel::for_loop;
+    using hpx::parallel::execution::par;
+    using hpx::parallel::execution::static_chunk_size;
+
+    for_loop(par.with(static_chunk_size(m_policy.chunk_size())),
+             m_policy.begin(), m_policy.end(), [this](const Member i) {
+               iterate_type(m_mdr_policy, m_functor)(i);
+             });
+
+#elif KOKKOS_HPX_IMPLEMENTATION == 1
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+
+    counting_semaphore sem(0);
+    std::size_t num_tasks = 0;
+
+    for (Member i_begin = m_policy.begin(); i_begin < m_policy.end();
+         i_begin += m_policy.chunk_size()) {
+      apply([this, &sem, i_begin]() {
+        const Member i_end =
+            (std::min)(i_begin + m_policy.chunk_size(), m_policy.end());
+        for (Member i = i_begin; i < i_end; ++i) {
+          iterate_type(m_mdr_policy, m_functor)(i);
+        }
+
+        sem.signal(1);
+      });
+
+      ++num_tasks;
+    }
+
+    sem.wait(num_tasks);
+#endif
+  }
+
+  inline ParallelFor(const FunctorType &arg_functor, MDRangePolicy arg_policy)
+      : m_functor(arg_functor), m_mdr_policy(arg_policy),
+        m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)) {}
+};
+} // namespace Impl
+} // namespace Kokkos
+
+namespace Kokkos {
+namespace Impl {
+template <class FunctorType, class ReducerType, class... Traits>
+class ParallelReduce<FunctorType, Kokkos::RangePolicy<Traits...>, ReducerType,
+                     Kokkos::Experimental::HPX> {
+private:
+  using Policy = Kokkos::RangePolicy<Traits...>;
+  using WorkTag = typename Policy::work_tag;
+  using WorkRange = typename Policy::WorkRange;
+  using Member = typename Policy::member_type;
+  using Analysis =
+      FunctorAnalysis<FunctorPatternInterface::REDUCE, Policy, FunctorType>;
+  using ReducerConditional =
+      Kokkos::Impl::if_c<std::is_same<InvalidType, ReducerType>::value,
+                         FunctorType, ReducerType>;
+  using ReducerTypeFwd = typename ReducerConditional::type;
+  using WorkTagFwd =
+      typename Kokkos::Impl::if_c<std::is_same<InvalidType, ReducerType>::value,
+                                  WorkTag, void>::type;
+  using ValueInit = Kokkos::Impl::FunctorValueInit<ReducerTypeFwd, WorkTagFwd>;
+  using ValueJoin = Kokkos::Impl::FunctorValueJoin<ReducerTypeFwd, WorkTagFwd>;
+  using ValueOps = Kokkos::Impl::FunctorValueOps<ReducerTypeFwd, WorkTagFwd>;
+  using value_type = typename Analysis::value_type;
+  using pointer_type = typename Analysis::pointer_type;
+  using reference_type = typename Analysis::reference_type;
+
+  const FunctorType m_functor;
+  const Policy m_policy;
+  const ReducerType m_reducer;
+  const pointer_type m_result_ptr;
+
+  bool m_force_synchronous;
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<std::is_same<TagType, void>::value>::type
+      execute_functor(const FunctorType &functor, const Member i,
+                      reference_type update) {
+    functor(i, update);
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<!std::is_same<TagType, void>::value>::type
+      execute_functor(const FunctorType &functor, const Member i,
+                      reference_type update) {
+    const TagType t{};
+    functor(t, i, update);
+  }
+
+  template <class TagType>
+  inline typename std::enable_if<std::is_same<TagType, void>::value>::type
+  execute_functor_range(reference_type update, const Member i_begin,
+                        const Member i_end) const {
+    for (Member i = i_begin; i < i_end; ++i) {
+      m_functor(i, update);
+    }
+  }
+
+  template <class TagType>
+  inline typename std::enable_if<!std::is_same<TagType, void>::value>::type
+  execute_functor_range(reference_type update, const Member i_begin,
+                        const Member i_end) const {
+    const TagType t{};
+
+    for (Member i = i_begin; i < i_end; ++i) {
+      m_functor(t, i, update);
+    }
+  }
+
+  class value_type_wrapper {
+  private:
+    std::size_t m_value_size;
+    char *m_value_buffer;
+
+  public:
+    value_type_wrapper() : m_value_size(0), m_value_buffer(nullptr) {}
+
+    value_type_wrapper(const std::size_t value_size)
+        : m_value_size(value_size), m_value_buffer(new char[m_value_size]) {}
+
+    value_type_wrapper(const value_type_wrapper &other)
+        : m_value_size(0), m_value_buffer(nullptr) {
+      if (this != &other) {
+        m_value_buffer = new char[other.m_value_size];
+        m_value_size = other.m_value_size;
+
+        std::copy(other.m_value_buffer, other.m_value_buffer + m_value_size,
+                  m_value_buffer);
+      }
+    }
+
+    ~value_type_wrapper() { delete[] m_value_buffer; }
+
+    value_type_wrapper(value_type_wrapper &&other)
+        : m_value_size(0), m_value_buffer(nullptr) {
+      if (this != &other) {
+        m_value_buffer = other.m_value_buffer;
+        m_value_size = other.m_value_size;
+
+        other.m_value_buffer = nullptr;
+        other.m_value_size = 0;
+      }
+    }
+
+    value_type_wrapper &operator=(const value_type_wrapper &other) {
+      if (this != &other) {
+        delete[] m_value_buffer;
+        m_value_buffer = new char[other.m_value_size];
+        m_value_size = other.m_value_size;
+
+        std::copy(other.m_value_buffer, other.m_value_buffer + m_value_size,
+                  m_value_buffer);
+      }
+
+      return *this;
+    }
+
+    value_type_wrapper &operator=(value_type_wrapper &&other) {
+      if (this != &other) {
+        delete[] m_value_buffer;
+        m_value_buffer = other.m_value_buffer;
+        m_value_size = other.m_value_size;
+
+        other.m_value_buffer = nullptr;
+        other.m_value_size = 0;
+      }
+
+      return *this;
+    }
+
+    pointer_type pointer() const {
+      return reinterpret_cast<pointer_type>(m_value_buffer);
+    }
+
+    reference_type reference() const {
+      return ValueOps::reference(
+          reinterpret_cast<pointer_type>(m_value_buffer));
+    }
+  };
+
+public:
+  void execute() const {
+    dispatch_execute_task(this);
+  }
+
+  inline void execute_task() const {
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+
+    std::size_t value_size =
+        Analysis::value_size(ReducerConditional::select(m_functor, m_reducer));
+
+    using hpx::parallel::for_loop;
+    using hpx::parallel::execution::par;
+
+#if KOKKOS_HPX_IMPLEMENTATION == 0
+    // NOTE: This version makes the most use of HPX functionality, but
+    // requires the struct value_type_wrapper to handle different
+    // reference_types. It is also significantly slower than the version
+    // below due to not reusing the buffer used by other functions.
+    using hpx::parallel::reduction;
+    using hpx::parallel::execution::static_chunk_size;
+
+    value_type_wrapper final_value(value_size);
+    value_type_wrapper identity(value_size);
+
+    ValueInit::init(ReducerConditional::select(m_functor, m_reducer),
+                    final_value.pointer());
+    ValueInit::init(ReducerConditional::select(m_functor, m_reducer),
+                    identity.pointer());
+
+    for_loop(par.with(static_chunk_size(m_policy.chunk_size())),
+             m_policy.begin(), m_policy.end(),
+             reduction(final_value, identity,
+                       [this](value_type_wrapper &a,
+                              value_type_wrapper &b) -> value_type_wrapper & {
+                         ValueJoin::join(
+                             ReducerConditional::select(m_functor, m_reducer),
+                             a.pointer(), b.pointer());
+                         return a;
+                       }),
+             [this](Member i, value_type_wrapper &update) {
+               execute_functor<WorkTag>(m_functor, i, update.reference());
+             });
+
+    pointer_type final_value_ptr = final_value.pointer();
+
+#elif KOKKOS_HPX_IMPLEMENTATION == 1
+    thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer();
+    buffer.resize(num_worker_threads, value_size);
+
+    for_loop(par, 0, num_worker_threads, [this, &buffer](std::size_t t) {
+      ValueInit::init(ReducerConditional::select(m_functor, m_reducer),
+                      reinterpret_cast<pointer_type>(buffer.get(t)));
+    });
+
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+
+    counting_semaphore sem(0);
+    std::size_t num_tasks = 0;
+
+    for (Member i_begin = m_policy.begin(); i_begin < m_policy.end();
+         i_begin += m_policy.chunk_size()) {
+      apply([this, &buffer, &sem, i_begin]() {
+        reference_type update =
+            ValueOps::reference(reinterpret_cast<pointer_type>(
+                buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id())));
+        const Member i_end =
+            (std::min)(i_begin + m_policy.chunk_size(), m_policy.end());
+        execute_functor_range<WorkTag>(update, i_begin, i_end);
+
+        sem.signal(1);
+      });
+
+      ++num_tasks;
+    }
+
+    sem.wait(num_tasks);
+
+    for (int i = 1; i < num_worker_threads; ++i) {
+      ValueJoin::join(ReducerConditional::select(m_functor, m_reducer),
+                      reinterpret_cast<pointer_type>(buffer.get(0)),
+                      reinterpret_cast<pointer_type>(buffer.get(i)));
+    }
+
+    pointer_type final_value_ptr =
+        reinterpret_cast<pointer_type>(buffer.get(0));
+#endif
+
+    Kokkos::Impl::FunctorFinal<ReducerTypeFwd, WorkTagFwd>::final(
+        ReducerConditional::select(m_functor, m_reducer), final_value_ptr);
+
+    if (m_result_ptr != nullptr) {
+      const int n = Analysis::value_count(
+          ReducerConditional::select(m_functor, m_reducer));
+
+      for (int j = 0; j < n; ++j) {
+        m_result_ptr[j] = final_value_ptr[j];
+      }
+    }
+  }
+
+  template <class ViewType>
+  inline ParallelReduce(
+      const FunctorType &arg_functor, Policy arg_policy,
+      const ViewType &arg_view,
+      typename std::enable_if<Kokkos::is_view<ViewType>::value &&
+                                  !Kokkos::is_reducer_type<ReducerType>::value,
+                              void *>::type = NULL)
+      : m_functor(arg_functor), m_policy(arg_policy), m_reducer(InvalidType()),
+        m_result_ptr(arg_view.data()),
+        m_force_synchronous(!arg_view.impl_track().has_record()) {}
+
+  inline ParallelReduce(const FunctorType &arg_functor, Policy arg_policy,
+                        const ReducerType &reducer)
+      : m_functor(arg_functor), m_policy(arg_policy), m_reducer(reducer),
+        m_result_ptr(reducer.view().data()),
+        m_force_synchronous(!reducer.view().impl_track().has_record()) {}
+};
+
+template <class FunctorType, class ReducerType, class... Traits>
+class ParallelReduce<FunctorType, Kokkos::MDRangePolicy<Traits...>, ReducerType,
+                     Kokkos::Experimental::HPX> {
+private:
+  using MDRangePolicy = Kokkos::MDRangePolicy<Traits...>;
+  using Policy = typename MDRangePolicy::impl_range_policy;
+  using WorkTag = typename MDRangePolicy::work_tag;
+  using WorkRange = typename Policy::WorkRange;
+  using Member = typename Policy::member_type;
+  using Analysis = FunctorAnalysis<FunctorPatternInterface::REDUCE,
+                                   MDRangePolicy, FunctorType>;
+  using ReducerConditional =
+      Kokkos::Impl::if_c<std::is_same<InvalidType, ReducerType>::value,
+                         FunctorType, ReducerType>;
+  using ReducerTypeFwd = typename ReducerConditional::type;
+  using WorkTagFwd =
+      typename Kokkos::Impl::if_c<std::is_same<InvalidType, ReducerType>::value,
+                                  WorkTag, void>::type;
+  using ValueInit = Kokkos::Impl::FunctorValueInit<ReducerTypeFwd, WorkTagFwd>;
+  using ValueJoin = Kokkos::Impl::FunctorValueJoin<ReducerTypeFwd, WorkTagFwd>;
+  using ValueOps = Kokkos::Impl::FunctorValueOps<ReducerTypeFwd, WorkTagFwd>;
+  using pointer_type = typename Analysis::pointer_type;
+  using value_type = typename Analysis::value_type;
+  using reference_type = typename Analysis::reference_type;
+  using iterate_type =
+      typename Kokkos::Impl::HostIterateTile<MDRangePolicy, FunctorType,
+                                             WorkTag, reference_type>;
+
+  const FunctorType m_functor;
+  const MDRangePolicy m_mdr_policy;
+  const Policy m_policy;
+  const ReducerType m_reducer;
+  const pointer_type m_result_ptr;
+
+  bool m_force_synchronous;
+
+public:
+  void execute() const {
+    dispatch_execute_task(this);
+  }
+
+  inline void execute_task() const {
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+    const std::size_t value_size =
+        Analysis::value_size(ReducerConditional::select(m_functor, m_reducer));
+
+    thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer();
+    buffer.resize(num_worker_threads, value_size);
+
+    using hpx::parallel::for_loop;
+    using hpx::parallel::execution::par;
+
+    for_loop(par, 0, num_worker_threads, [this, &buffer](std::size_t t) {
+      ValueInit::init(ReducerConditional::select(m_functor, m_reducer),
+                      reinterpret_cast<pointer_type>(buffer.get(t)));
+    });
+
+#if KOKKOS_HPX_IMPLEMENTATION == 0
+    using hpx::parallel::execution::static_chunk_size;
+
+    for_loop(par.with(static_chunk_size(m_policy.chunk_size())),
+             m_policy.begin(), m_policy.end(), [this, &buffer](const Member i) {
+               reference_type update = ValueOps::reference(
+                   reinterpret_cast<pointer_type>(buffer.get(
+                       Kokkos::Experimental::HPX::impl_hardware_thread_id())));
+               iterate_type(m_mdr_policy, m_functor, update)(i);
+             });
+
+#elif KOKKOS_HPX_IMPLEMENTATION == 1
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+
+    counting_semaphore sem(0);
+    std::size_t num_tasks = 0;
+
+    for (Member i_begin = m_policy.begin(); i_begin < m_policy.end();
+         i_begin += m_policy.chunk_size()) {
+      apply([this, &buffer, &sem, i_begin]() {
+        reference_type update =
+            ValueOps::reference(reinterpret_cast<pointer_type>(
+                buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id())));
+        const Member i_end =
+            (std::min)(i_begin + m_policy.chunk_size(), m_policy.end());
+
+        for (Member i = i_begin; i < i_end; ++i) {
+          iterate_type(m_mdr_policy, m_functor, update)(i);
+        }
+
+        sem.signal(1);
+      });
+
+      ++num_tasks;
+    }
+
+    sem.wait(num_tasks);
+#endif
+
+    for (int i = 1; i < num_worker_threads; ++i) {
+      ValueJoin::join(ReducerConditional::select(m_functor, m_reducer),
+                      reinterpret_cast<pointer_type>(buffer.get(0)),
+                      reinterpret_cast<pointer_type>(buffer.get(i)));
+    }
+
+    Kokkos::Impl::FunctorFinal<ReducerTypeFwd, WorkTagFwd>::final(
+        ReducerConditional::select(m_functor, m_reducer),
+        reinterpret_cast<pointer_type>(buffer.get(0)));
+
+    if (m_result_ptr != nullptr) {
+      const int n = Analysis::value_count(
+          ReducerConditional::select(m_functor, m_reducer));
+
+      for (int j = 0; j < n; ++j) {
+        m_result_ptr[j] = reinterpret_cast<pointer_type>(buffer.get(0))[j];
+      }
+    }
+  }
+
+  template <class ViewType>
+  inline ParallelReduce(
+      const FunctorType &arg_functor, MDRangePolicy arg_policy,
+      const ViewType &arg_view,
+      typename std::enable_if<Kokkos::is_view<ViewType>::value &&
+                                  !Kokkos::is_reducer_type<ReducerType>::value,
+                              void *>::type = NULL)
+      : m_functor(arg_functor), m_mdr_policy(arg_policy),
+        m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)),
+        m_reducer(InvalidType()), m_result_ptr(arg_view.data()),
+        m_force_synchronous(!arg_view.impl_track().has_record()) {}
+
+  inline ParallelReduce(const FunctorType &arg_functor,
+                        MDRangePolicy arg_policy, const ReducerType &reducer)
+      : m_functor(arg_functor), m_mdr_policy(arg_policy),
+        m_policy(Policy(0, m_mdr_policy.m_num_tiles).set_chunk_size(1)),
+        m_reducer(reducer), m_result_ptr(reducer.view().data()),
+        m_force_synchronous(!reducer.view().impl_track().has_record()) {}
+};
+} // namespace Impl
+} // namespace Kokkos
+
+namespace Kokkos {
+namespace Impl {
+
+template <class FunctorType, class... Traits>
+class ParallelScan<FunctorType, Kokkos::RangePolicy<Traits...>,
+                   Kokkos::Experimental::HPX> {
+private:
+  using Policy = Kokkos::RangePolicy<Traits...>;
+  using WorkTag = typename Policy::work_tag;
+  using WorkRange = typename Policy::WorkRange;
+  using Member = typename Policy::member_type;
+  using Analysis =
+      FunctorAnalysis<FunctorPatternInterface::SCAN, Policy, FunctorType>;
+  using ValueInit = Kokkos::Impl::FunctorValueInit<FunctorType, WorkTag>;
+  using ValueJoin = Kokkos::Impl::FunctorValueJoin<FunctorType, WorkTag>;
+  using ValueOps = Kokkos::Impl::FunctorValueOps<FunctorType, WorkTag>;
+  using pointer_type = typename Analysis::pointer_type;
+  using reference_type = typename Analysis::reference_type;
+  using value_type = typename Analysis::value_type;
+
+  const FunctorType m_functor;
+  const Policy m_policy;
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<std::is_same<TagType, void>::value>::type
+      execute_functor_range(const FunctorType &functor, const Member i_begin,
+                            const Member i_end, reference_type update,
+                            const bool final) {
+    for (Member i = i_begin; i < i_end; ++i) {
+      functor(i, update, final);
+    }
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<!std::is_same<TagType, void>::value>::type
+      execute_functor_range(const FunctorType &functor, const Member i_begin,
+                            const Member i_end, reference_type update,
+                            const bool final) {
+    const TagType t{};
+    for (Member i = i_begin; i < i_end; ++i) {
+      functor(t, i, update, final);
+    }
+  }
+
+public:
+  void execute() const { dispatch_execute_task(this); }
+
+  inline void execute_task() const {
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+    const int value_count = Analysis::value_count(m_functor);
+    const std::size_t value_size = Analysis::value_size(m_functor);
+
+    thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer();
+    buffer.resize(num_worker_threads, 2 * value_size);
+
+    using hpx::lcos::local::barrier;
+    using hpx::parallel::for_loop;
+    using hpx::parallel::execution::par;
+    using hpx::parallel::execution::static_chunk_size;
+
+    barrier bar(num_worker_threads);
+
+    for_loop(par.with(static_chunk_size(1)), 0, num_worker_threads,
+             [this, &buffer, &bar, num_worker_threads, value_count,
+              value_size](std::size_t const t) {
+               reference_type update_sum = ValueInit::init(
+                   m_functor, reinterpret_cast<pointer_type>(buffer.get(t)));
+
+               const WorkRange range(m_policy, t, num_worker_threads);
+               execute_functor_range<WorkTag>(m_functor, range.begin(),
+                                              range.end(), update_sum, false);
+
+               bar.wait();
+
+               if (t == 0) {
+                 ValueInit::init(m_functor, reinterpret_cast<pointer_type>(
+                                                buffer.get(0) + value_size));
+
+                 for (int i = 1; i < num_worker_threads; ++i) {
+                   pointer_type ptr_1_prev =
+                       reinterpret_cast<pointer_type>(buffer.get(i - 1));
+                   pointer_type ptr_2_prev = reinterpret_cast<pointer_type>(
+                       buffer.get(i - 1) + value_size);
+                   pointer_type ptr_2 = reinterpret_cast<pointer_type>(
+                       buffer.get(i) + value_size);
+
+                   for (int j = 0; j < value_count; ++j) {
+                     ptr_2[j] = ptr_2_prev[j];
+                   }
+
+                   ValueJoin::join(m_functor, ptr_2, ptr_1_prev);
+                 }
+               }
+
+               bar.wait();
+
+               reference_type update_base = ValueOps::reference(
+                   reinterpret_cast<pointer_type>(buffer.get(t) + value_size));
+
+               execute_functor_range<WorkTag>(m_functor, range.begin(),
+                                              range.end(), update_base, true);
+             });
+  }
+
+  inline ParallelScan(const FunctorType &arg_functor, const Policy &arg_policy)
+      : m_functor(arg_functor), m_policy(arg_policy) {}
+};
+
+template <class FunctorType, class ReturnType, class... Traits>
+class ParallelScanWithTotal<FunctorType, Kokkos::RangePolicy<Traits...>,
+                            ReturnType, Kokkos::Experimental::HPX> {
+private:
+  using Policy = Kokkos::RangePolicy<Traits...>;
+  using WorkTag = typename Policy::work_tag;
+  using WorkRange = typename Policy::WorkRange;
+  using Member = typename Policy::member_type;
+  using Analysis =
+      FunctorAnalysis<FunctorPatternInterface::SCAN, Policy, FunctorType>;
+  using ValueInit = Kokkos::Impl::FunctorValueInit<FunctorType, WorkTag>;
+  using ValueJoin = Kokkos::Impl::FunctorValueJoin<FunctorType, WorkTag>;
+  using ValueOps = Kokkos::Impl::FunctorValueOps<FunctorType, WorkTag>;
+  using pointer_type = typename Analysis::pointer_type;
+  using reference_type = typename Analysis::reference_type;
+  using value_type = typename Analysis::value_type;
+
+  const FunctorType m_functor;
+  const Policy m_policy;
+  ReturnType &m_returnvalue;
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<std::is_same<TagType, void>::value>::type
+      execute_functor_range(const FunctorType &functor, const Member i_begin,
+                            const Member i_end, reference_type update,
+                            const bool final) {
+    for (Member i = i_begin; i < i_end; ++i) {
+      functor(i, update, final);
+    }
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<!std::is_same<TagType, void>::value>::type
+      execute_functor_range(const FunctorType &functor, const Member i_begin,
+                            const Member i_end, reference_type update,
+                            const bool final) {
+    const TagType t{};
+    for (Member i = i_begin; i < i_end; ++i) {
+      functor(t, i, update, final);
+    }
+  }
+
+public:
+  void execute() const { dispatch_execute_task(this); }
+
+  inline void execute_task() const {
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+    const int value_count = Analysis::value_count(m_functor);
+    const std::size_t value_size = Analysis::value_size(m_functor);
+
+    thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer();
+    buffer.resize(num_worker_threads, 2 * value_size);
+
+    using hpx::lcos::local::barrier;
+    using hpx::parallel::for_loop;
+    using hpx::parallel::execution::par;
+    using hpx::parallel::execution::static_chunk_size;
+
+    barrier bar(num_worker_threads);
+
+    for_loop(par.with(static_chunk_size(1)), 0, num_worker_threads,
+             [this, &buffer, &bar, num_worker_threads, value_count,
+              value_size](std::size_t const t) {
+               reference_type update_sum = ValueInit::init(
+                   m_functor, reinterpret_cast<pointer_type>(buffer.get(t)));
+
+               const WorkRange range(m_policy, t, num_worker_threads);
+               execute_functor_range<WorkTag>(m_functor, range.begin(),
+                                              range.end(), update_sum, false);
+
+               bar.wait();
+
+               if (t == 0) {
+                 ValueInit::init(m_functor, reinterpret_cast<pointer_type>(
+                                                buffer.get(0) + value_size));
+
+                 for (int i = 1; i < num_worker_threads; ++i) {
+                   pointer_type ptr_1_prev =
+                       reinterpret_cast<pointer_type>(buffer.get(i - 1));
+                   pointer_type ptr_2_prev = reinterpret_cast<pointer_type>(
+                       buffer.get(i - 1) + value_size);
+                   pointer_type ptr_2 = reinterpret_cast<pointer_type>(
+                       buffer.get(i) + value_size);
+
+                   for (int j = 0; j < value_count; ++j) {
+                     ptr_2[j] = ptr_2_prev[j];
+                   }
+
+                   ValueJoin::join(m_functor, ptr_2, ptr_1_prev);
+                 }
+               }
+
+               bar.wait();
+
+               reference_type update_base = ValueOps::reference(
+                   reinterpret_cast<pointer_type>(buffer.get(t) + value_size));
+
+               execute_functor_range<WorkTag>(m_functor, range.begin(),
+                                              range.end(), update_base, true);
+
+               if (t == std::size_t(num_worker_threads - 1)) {
+                 m_returnvalue = update_base;
+               }
+             });
+  }
+
+  inline ParallelScanWithTotal(const FunctorType &arg_functor,
+                               const Policy &arg_policy,
+                               ReturnType &arg_returnvalue)
+      : m_functor(arg_functor), m_policy(arg_policy),
+        m_returnvalue(arg_returnvalue) {}
+};
+} // namespace Impl
+} // namespace Kokkos
+
+namespace Kokkos {
+namespace Impl {
+template <class FunctorType, class... Properties>
+class ParallelFor<FunctorType, Kokkos::TeamPolicy<Properties...>,
+                  Kokkos::Experimental::HPX> {
+private:
+  using Policy = TeamPolicyInternal<Kokkos::Experimental::HPX, Properties...>;
+  using WorkTag = typename Policy::work_tag;
+  using Member = typename Policy::member_type;
+  using memory_space = Kokkos::HostSpace;
+
+  const FunctorType m_functor;
+  const Policy m_policy;
+  const int m_league;
+  const std::size_t m_shared;
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<std::is_same<TagType, void>::value>::type
+      execute_functor(const FunctorType &functor, const Policy &policy,
+                      const int league_rank, char *local_buffer,
+                      const std::size_t local_buffer_size) {
+    functor(Member(policy, 0, league_rank, local_buffer, local_buffer_size));
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<!std::is_same<TagType, void>::value>::type
+      execute_functor(const FunctorType &functor, const Policy &policy,
+                      const int league_rank, char *local_buffer,
+                      const std::size_t local_buffer_size) {
+    const TagType t{};
+    functor(t, Member(policy, 0, league_rank, local_buffer, local_buffer_size));
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<std::is_same<TagType, void>::value>::type
+      execute_functor_range(const FunctorType &functor, const Policy &policy,
+                            const int league_rank_begin,
+                            const int league_rank_end, char *local_buffer,
+                            const std::size_t local_buffer_size) {
+    for (int league_rank = league_rank_begin; league_rank < league_rank_end;
+         ++league_rank) {
+      functor(Member(policy, 0, league_rank, local_buffer, local_buffer_size));
+    }
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<!std::is_same<TagType, void>::value>::type
+      execute_functor_range(const FunctorType &functor, const Policy &policy,
+                            const int league_rank_begin,
+                            const int league_rank_end, char *local_buffer,
+                            const std::size_t local_buffer_size) {
+    const TagType t{};
+    for (int league_rank = league_rank_begin; league_rank < league_rank_end;
+         ++league_rank) {
+      functor(t,
+              Member(policy, 0, league_rank, local_buffer, local_buffer_size));
+    }
+  }
+
+public:
+  void execute() const { dispatch_execute_task(this); }
+
+  inline void execute_task() const {
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+
+    thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer();
+    buffer.resize(num_worker_threads, m_shared);
+
+#if KOKKOS_HPX_IMPLEMENTATION == 0
+    using hpx::parallel::for_loop;
+    using hpx::parallel::execution::par;
+    using hpx::parallel::execution::static_chunk_size;
+
+    for_loop(par.with(static_chunk_size(m_policy.chunk_size())), 0,
+             m_policy.league_size(), [this, &buffer](const int league_rank) {
+               execute_functor<WorkTag>(
+                   m_functor, m_policy, league_rank,
+                   buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()),
+                   m_shared);
+             });
+
+#elif KOKKOS_HPX_IMPLEMENTATION == 1
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+
+    counting_semaphore sem(0);
+    std::size_t num_tasks = 0;
+
+    for (int league_rank_begin = 0; league_rank_begin < m_policy.league_size();
+         league_rank_begin += m_policy.chunk_size()) {
+      apply([this, &buffer, &sem, league_rank_begin]() {
+        const int league_rank_end = (std::min)(
+            league_rank_begin + m_policy.chunk_size(), m_policy.league_size());
+        execute_functor_range<WorkTag>(
+            m_functor, m_policy, league_rank_begin, league_rank_end,
+            buffer.get(Kokkos::Experimental::HPX::impl_hardware_thread_id()), m_shared);
+
+        sem.signal(1);
+      });
+
+      ++num_tasks;
+    }
+
+    sem.wait(num_tasks);
+#endif
+  }
+
+  ParallelFor(const FunctorType &arg_functor, const Policy &arg_policy)
+      : m_functor(arg_functor), m_policy(arg_policy),
+        m_league(arg_policy.league_size()),
+        m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) +
+                 FunctorTeamShmemSize<FunctorType>::value(
+                     arg_functor, arg_policy.team_size())) {}
+};
+
+template <class FunctorType, class ReducerType, class... Properties>
+class ParallelReduce<FunctorType, Kokkos::TeamPolicy<Properties...>,
+                     ReducerType, Kokkos::Experimental::HPX> {
+private:
+  using Policy = TeamPolicyInternal<Kokkos::Experimental::HPX, Properties...>;
+  using Analysis =
+      FunctorAnalysis<FunctorPatternInterface::REDUCE, Policy, FunctorType>;
+  using Member = typename Policy::member_type;
+  using WorkTag = typename Policy::work_tag;
+  using ReducerConditional =
+      Kokkos::Impl::if_c<std::is_same<InvalidType, ReducerType>::value,
+                         FunctorType, ReducerType>;
+  using ReducerTypeFwd = typename ReducerConditional::type;
+  using WorkTagFwd =
+      typename Kokkos::Impl::if_c<std::is_same<InvalidType, ReducerType>::value,
+                                  WorkTag, void>::type;
+  using ValueInit = Kokkos::Impl::FunctorValueInit<ReducerTypeFwd, WorkTagFwd>;
+  using ValueJoin = Kokkos::Impl::FunctorValueJoin<ReducerTypeFwd, WorkTagFwd>;
+  using ValueOps = Kokkos::Impl::FunctorValueOps<ReducerTypeFwd, WorkTagFwd>;
+  using pointer_type = typename Analysis::pointer_type;
+  using reference_type = typename Analysis::reference_type;
+  using value_type = typename Analysis::value_type;
+
+  const FunctorType m_functor;
+  const int m_league;
+  const Policy m_policy;
+  const ReducerType m_reducer;
+  pointer_type m_result_ptr;
+  const std::size_t m_shared;
+
+  bool m_force_synchronous;
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<std::is_same<TagType, void>::value>::type
+      execute_functor(const FunctorType &functor, const Policy &policy,
+                      const int league_rank, char *local_buffer,
+                      const std::size_t local_buffer_size,
+                      reference_type update) {
+    functor(Member(policy, 0, league_rank, local_buffer, local_buffer_size),
+            update);
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<!std::is_same<TagType, void>::value>::type
+      execute_functor(const FunctorType &functor, const Policy &policy,
+                      const int league_rank, char *local_buffer,
+                      const std::size_t local_buffer_size,
+                      reference_type update) {
+    const TagType t{};
+    functor(t, Member(policy, 0, league_rank, local_buffer, local_buffer_size),
+            update);
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<std::is_same<TagType, void>::value>::type
+      execute_functor_range(const FunctorType &functor, const Policy &policy,
+                            const int league_rank_begin,
+                            const int league_rank_end, char *local_buffer,
+                            const std::size_t local_buffer_size,
+                            reference_type update) {
+    for (int league_rank = league_rank_begin; league_rank < league_rank_end;
+         ++league_rank) {
+      functor(Member(policy, 0, league_rank, local_buffer, local_buffer_size),
+              update);
+    }
+  }
+
+  template <class TagType>
+  inline static
+      typename std::enable_if<!std::is_same<TagType, void>::value>::type
+      execute_functor_range(const FunctorType &functor, const Policy &policy,
+                            const int league_rank_begin,
+                            const int league_rank_end, char *local_buffer,
+                            const std::size_t local_buffer_size,
+                            reference_type update) {
+    const TagType t{};
+    for (int league_rank = league_rank_begin; league_rank < league_rank_end;
+         ++league_rank) {
+      functor(t,
+              Member(policy, 0, league_rank, local_buffer, local_buffer_size),
+              update);
+    }
+  }
+
+public:
+  void execute() const {
+    dispatch_execute_task(this);
+  }
+
+  inline void execute_task() const {
+    const int num_worker_threads = Kokkos::Experimental::HPX::concurrency();
+    const std::size_t value_size =
+        Analysis::value_size(ReducerConditional::select(m_functor, m_reducer));
+
+    thread_buffer &buffer = Kokkos::Experimental::HPX::impl_get_buffer();
+    buffer.resize(num_worker_threads, value_size + m_shared);
+
+    using hpx::parallel::for_loop;
+    using hpx::parallel::execution::par;
+
+    for_loop(par, 0, num_worker_threads, [this, &buffer](std::size_t t) {
+      ValueInit::init(ReducerConditional::select(m_functor, m_reducer),
+                      reinterpret_cast<pointer_type>(buffer.get(t)));
+    });
+
+#if KOKKOS_HPX_IMPLEMENTATION == 0
+    using hpx::parallel::execution::static_chunk_size;
+
+    hpx::parallel::for_loop(
+        par.with(static_chunk_size(m_policy.chunk_size())), 0,
+        m_policy.league_size(),
+        [this, &buffer, value_size](const int league_rank) {
+          std::size_t t = Kokkos::Experimental::HPX::impl_hardware_thread_id();
+          reference_type update = ValueOps::reference(
+              reinterpret_cast<pointer_type>(buffer.get(t)));
+
+          execute_functor<WorkTag>(m_functor, m_policy, league_rank,
+                                   buffer.get(t) + value_size, m_shared,
+                                   update);
+        });
+
+#elif KOKKOS_HPX_IMPLEMENTATION == 1
+    using hpx::apply;
+    using hpx::lcos::local::counting_semaphore;
+
+    counting_semaphore sem(0);
+    std::size_t num_tasks = 0;
+
+    for (int league_rank_begin = 0; league_rank_begin < m_policy.league_size();
+         league_rank_begin += m_policy.chunk_size()) {
+      apply([this, &buffer, &sem, league_rank_begin, value_size]() {
+        std::size_t t = Kokkos::Experimental::HPX::impl_hardware_thread_id();
+        reference_type update =
+            ValueOps::reference(reinterpret_cast<pointer_type>(buffer.get(t)));
+        const int league_rank_end = (std::min)(
+            league_rank_begin + m_policy.chunk_size(), m_policy.league_size());
+        execute_functor_range<WorkTag>(
+            m_functor, m_policy, league_rank_begin, league_rank_end,
+            buffer.get(t) + value_size, m_shared, update);
+
+        sem.signal(1);
+      });
+
+      ++num_tasks;
+    }
+
+    sem.wait(num_tasks);
+#endif
+
+    const pointer_type ptr = reinterpret_cast<pointer_type>(buffer.get(0));
+    for (int t = 1; t < num_worker_threads; ++t) {
+      ValueJoin::join(ReducerConditional::select(m_functor, m_reducer), ptr,
+                      reinterpret_cast<pointer_type>(buffer.get(t)));
+    }
+
+    Kokkos::Impl::FunctorFinal<ReducerTypeFwd, WorkTagFwd>::final(
+        ReducerConditional::select(m_functor, m_reducer), ptr);
+
+    if (m_result_ptr) {
+      const int n = Analysis::value_count(
+          ReducerConditional::select(m_functor, m_reducer));
+
+      for (int j = 0; j < n; ++j) {
+        m_result_ptr[j] = ptr[j];
+      }
+    }
+  }
+
+  template <class ViewType>
+  ParallelReduce(
+      const FunctorType &arg_functor, const Policy &arg_policy,
+      const ViewType &arg_result,
+      typename std::enable_if<Kokkos::is_view<ViewType>::value &&
+                                  !Kokkos::is_reducer_type<ReducerType>::value,
+                              void *>::type = NULL)
+      : m_functor(arg_functor), m_league(arg_policy.league_size()),
+        m_policy(arg_policy), m_reducer(InvalidType()),
+        m_result_ptr(arg_result.data()),
+        m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) +
+                 FunctorTeamShmemSize<FunctorType>::value(
+                     m_functor, arg_policy.team_size())),
+        m_force_synchronous(!arg_result.impl_track().has_record()) {}
+
+  inline ParallelReduce(const FunctorType &arg_functor, Policy arg_policy,
+                        const ReducerType &reducer)
+      : m_functor(arg_functor), m_league(arg_policy.league_size()),
+        m_policy(arg_policy), m_reducer(reducer),
+        m_result_ptr(reducer.view().data()),
+        m_shared(arg_policy.scratch_size(0) + arg_policy.scratch_size(1) +
+                 FunctorTeamShmemSize<FunctorType>::value(
+                     arg_functor, arg_policy.team_size())),
+        m_force_synchronous(!reducer.view().impl_track().has_record()) {}
+};
+} // namespace Impl
+} // namespace Kokkos
+
+namespace Kokkos {
+
+template <typename iType>
+KOKKOS_INLINE_FUNCTION
+    Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+    TeamThreadRange(const Impl::HPXTeamMember &thread, const iType &count) {
+  return Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>(
+      thread, count);
+}
+
+template <typename iType1, typename iType2>
+KOKKOS_INLINE_FUNCTION Impl::TeamThreadRangeBoundariesStruct<
+    typename std::common_type<iType1, iType2>::type, Impl::HPXTeamMember>
+TeamThreadRange(const Impl::HPXTeamMember &thread, const iType1 &i_begin,
+                const iType2 &i_end) {
+  using iType = typename std::common_type<iType1, iType2>::type;
+  return Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>(
+      thread, iType(i_begin), iType(i_end));
+}
+
+template <typename iType>
+KOKKOS_INLINE_FUNCTION
+    Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+    TeamVectorRange(const Impl::HPXTeamMember &thread, const iType &count) {
+  return Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>(
+      thread, count);
+}
+
+template <typename iType1, typename iType2>
+KOKKOS_INLINE_FUNCTION Impl::TeamThreadRangeBoundariesStruct<
+    typename std::common_type<iType1, iType2>::type, Impl::HPXTeamMember>
+TeamVectorRange(const Impl::HPXTeamMember &thread, const iType1 &i_begin,
+                const iType2 &i_end) {
+  using iType = typename std::common_type<iType1, iType2>::type;
+  return Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>(
+      thread, iType(i_begin), iType(i_end));
+}
+
+template <typename iType>
+KOKKOS_INLINE_FUNCTION
+    Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+    ThreadVectorRange(const Impl::HPXTeamMember &thread, const iType &count) {
+  return Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>(
+      thread, count);
+}
+
+template <typename iType>
+KOKKOS_INLINE_FUNCTION
+    Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+    ThreadVectorRange(const Impl::HPXTeamMember &thread, const iType &i_begin,
+                      const iType &i_end) {
+  return Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>(
+      thread, i_begin, i_end);
+}
+
+KOKKOS_INLINE_FUNCTION
+Impl::ThreadSingleStruct<Impl::HPXTeamMember>
+PerTeam(const Impl::HPXTeamMember &thread) {
+  return Impl::ThreadSingleStruct<Impl::HPXTeamMember>(thread);
+}
+
+KOKKOS_INLINE_FUNCTION
+Impl::VectorSingleStruct<Impl::HPXTeamMember>
+PerThread(const Impl::HPXTeamMember &thread) {
+  return Impl::VectorSingleStruct<Impl::HPXTeamMember>(thread);
+}
+
+/** \brief  Inter-thread parallel_for. Executes lambda(iType i) for each
+ * i=0..N-1.
+ *
+ * The range i=0..N-1 is mapped to all threads of the the calling thread team.
+ * This functionality requires C++11 support.*/
+template <typename iType, class Lambda>
+KOKKOS_INLINE_FUNCTION void parallel_for(
+    const Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+        &loop_boundaries,
+    const Lambda &lambda) {
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment)
+    lambda(i);
+}
+
+/** \brief  Inter-thread vector parallel_reduce. Executes lambda(iType i,
+ * ValueType & val) for each i=0..N-1.
+ *
+ * The range i=0..N-1 is mapped to all threads of the the calling thread team
+ * and a summation of val is performed and put into result. This functionality
+ * requires C++11 support.*/
+template <typename iType, class Lambda, typename ValueType>
+KOKKOS_INLINE_FUNCTION void parallel_reduce(
+    const Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+        &loop_boundaries,
+    const Lambda &lambda, ValueType &result) {
+  result = ValueType();
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment) {
+    lambda(i, result);
+  }
+}
+
+/** \brief  Intra-thread vector parallel_for. Executes lambda(iType i) for each
+ * i=0..N-1.
+ *
+ * The range i=0..N-1 is mapped to all vector lanes of the the calling thread.
+ * This functionality requires C++11 support.*/
+template <typename iType, class Lambda>
+KOKKOS_INLINE_FUNCTION void parallel_for(
+    const Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+        &loop_boundaries,
+    const Lambda &lambda) {
+#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
+#pragma ivdep
+#endif
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment) {
+    lambda(i);
+  }
+}
+
+/** \brief  Intra-thread vector parallel_reduce. Executes lambda(iType i,
+ * ValueType & val) for each i=0..N-1.
+ *
+ * The range i=0..N-1 is mapped to all vector lanes of the the calling thread
+ * and a summation of val is performed and put into result. This functionality
+ * requires C++11 support.*/
+template <typename iType, class Lambda, typename ValueType>
+KOKKOS_INLINE_FUNCTION void parallel_reduce(
+    const Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+        &loop_boundaries,
+    const Lambda &lambda, ValueType &result) {
+  result = ValueType();
+#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
+#pragma ivdep
+#endif
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment) {
+    lambda(i, result);
+  }
+}
+
+template <typename iType, class Lambda, typename ReducerType>
+KOKKOS_INLINE_FUNCTION void parallel_reduce(
+    const Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+        &loop_boundaries,
+    const Lambda &lambda, const ReducerType &reducer) {
+  reducer.init(reducer.reference());
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment) {
+    lambda(i, reducer.reference());
+  }
+}
+
+template <typename iType, class Lambda, typename ReducerType>
+KOKKOS_INLINE_FUNCTION void parallel_reduce(
+    const Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+        &loop_boundaries,
+    const Lambda &lambda, const ReducerType &reducer) {
+  reducer.init(reducer.reference());
+#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
+#pragma ivdep
+#endif
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment) {
+    lambda(i, reducer.reference());
+  }
+}
+
+template <typename iType, class FunctorType>
+KOKKOS_INLINE_FUNCTION void parallel_scan(
+    Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember> const
+        &loop_boundaries,
+    const FunctorType &lambda) {
+  using value_type = typename Kokkos::Impl::FunctorAnalysis<
+      Kokkos::Impl::FunctorPatternInterface::SCAN, void,
+      FunctorType>::value_type;
+
+  value_type scan_val = value_type();
+
+  // Intra-member scan
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment) {
+    lambda(i, scan_val, false);
+  }
+
+  // 'scan_val' output is the exclusive prefix sum
+  scan_val = loop_boundaries.thread.team_scan(scan_val);
+
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment) {
+    lambda(i, scan_val, true);
+  }
+}
+
+/** \brief  Intra-thread vector parallel exclusive prefix sum. Executes
+ * lambda(iType i, ValueType & val, bool final) for each i=0..N-1.
+ *
+ * The range i=0..N-1 is mapped to all vector lanes in the thread and a scan
+ * operation is performed. Depending on the target execution space the operator
+ * might be called twice: once with final=false and once with final=true. When
+ * final==true val contains the prefix sum value. The contribution of this "i"
+ * needs to be added to val no matter whether final==true or not. In a serial
+ * execution (i.e. team_size==1) the operator is only called once with
+ * final==true. Scan_val will be set to the final sum value over all vector
+ * lanes. This functionality requires C++11 support.*/
+template <typename iType, class FunctorType>
+KOKKOS_INLINE_FUNCTION void parallel_scan(
+    const Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>
+        &loop_boundaries,
+    const FunctorType &lambda) {
+  using ValueTraits = Kokkos::Impl::FunctorValueTraits<FunctorType, void>;
+  using value_type = typename ValueTraits::value_type;
+
+  value_type scan_val = value_type();
+
+#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
+#pragma ivdep
+#endif
+  for (iType i = loop_boundaries.start; i < loop_boundaries.end;
+       i += loop_boundaries.increment) {
+    lambda(i, scan_val, true);
+  }
+}
+
+template <class FunctorType>
+KOKKOS_INLINE_FUNCTION void
+single(const Impl::VectorSingleStruct<Impl::HPXTeamMember> &single_struct,
+       const FunctorType &lambda) {
+  lambda();
+}
+
+template <class FunctorType>
+KOKKOS_INLINE_FUNCTION void
+single(const Impl::ThreadSingleStruct<Impl::HPXTeamMember> &single_struct,
+       const FunctorType &lambda) {
+  lambda();
+}
+
+template <class FunctorType, class ValueType>
+KOKKOS_INLINE_FUNCTION void
+single(const Impl::VectorSingleStruct<Impl::HPXTeamMember> &single_struct,
+       const FunctorType &lambda, ValueType &val) {
+  lambda(val);
+}
+
+template <class FunctorType, class ValueType>
+KOKKOS_INLINE_FUNCTION void
+single(const Impl::ThreadSingleStruct<Impl::HPXTeamMember> &single_struct,
+       const FunctorType &lambda, ValueType &val) {
+  lambda(val);
+}
+
+} // namespace Kokkos
+
+#include <HPX/Kokkos_HPX_Task.hpp>
+
+#endif /* #if defined( KOKKOS_ENABLE_HPX ) */
+#endif /* #ifndef KOKKOS_HPX_HPP */
diff --git a/packages/kokkos/core/src/Kokkos_HostSpace.hpp b/packages/kokkos/core/src/Kokkos_HostSpace.hpp
index 3fd55d91481309a1f35f97d6ef29c326b9bdcb2c..921ba0df34233adff55da6074efc05ad3f97ab83 100644
--- a/packages/kokkos/core/src/Kokkos_HostSpace.hpp
+++ b/packages/kokkos/core/src/Kokkos_HostSpace.hpp
@@ -57,6 +57,8 @@
 #include <impl/Kokkos_Error.hpp>
 #include <impl/Kokkos_SharedAlloc.hpp>
 
+#include "impl/Kokkos_HostSpace_deepcopy.hpp"
+
 /*--------------------------------------------------------------------------*/
 
 namespace Kokkos {
@@ -113,6 +115,8 @@ public:
   typedef Kokkos::OpenMP    execution_space;
 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS )
   typedef Kokkos::Threads   execution_space;
+#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX )
+  typedef Kokkos::Experimental::HPX execution_space;
 //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS )
 //  typedef Kokkos::Qthreads  execution_space;
 #elif defined( KOKKOS_ENABLE_OPENMP )
@@ -121,6 +125,8 @@ public:
   typedef Kokkos::Threads   execution_space;
 //#elif defined( KOKKOS_ENABLE_QTHREADS )
 //  typedef Kokkos::Qthreads  execution_space;
+#elif defined( KOKKOS_ENABLE_HPX )
+  typedef Kokkos::Experimental::HPX execution_space;
 #elif defined( KOKKOS_ENABLE_SERIAL )
   typedef Kokkos::Serial    execution_space;
 #else
@@ -291,15 +297,18 @@ namespace Kokkos {
 
 namespace Impl {
 
+#define PAR_DEEP_COPY_USE_MEMCPY
+
 template< class ExecutionSpace >
 struct DeepCopy< HostSpace, HostSpace, ExecutionSpace > {
   DeepCopy( void * dst, const void * src, size_t n ) {
-    memcpy( dst, src, n );
+    hostspace_parallel_deepcopy(dst,src,n);
   }
 
   DeepCopy( const ExecutionSpace& exec, void * dst, const void * src, size_t n ) {
     exec.fence();
-    memcpy( dst, src, n );
+    hostspace_parallel_deepcopy(dst,src,n);
+    exec.fence();
   }
 };
 
diff --git a/packages/kokkos/core/src/Kokkos_Layout.hpp b/packages/kokkos/core/src/Kokkos_Layout.hpp
index 43e117783bfc0d7966179324792cb195a09f58a0..6f423d545f074ff8e35c6c352df1f60e35cea78e 100644
--- a/packages/kokkos/core/src/Kokkos_Layout.hpp
+++ b/packages/kokkos/core/src/Kokkos_Layout.hpp
@@ -193,6 +193,9 @@ struct LayoutStride {
     {}
 };
 
+// ==========================================================================
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+
 //----------------------------------------------------------------------------
 /// \struct LayoutTileLeft
 /// \brief Memory layout tag indicating left-to-right (Fortran scheme)
@@ -243,6 +246,8 @@ struct LayoutTileLeft {
     : dimension { argN0 , argN1 , argN2 , argN3 , argN4 , argN5 , argN6 , argN7 } {}
 };
 
+#endif   // KOKKOS_ENABLE_DEPRECATED_CODE
+// ===================================================================================
 
 //////////////////////////////////////////////////////////////////////////////////////
 
@@ -269,14 +274,14 @@ namespace Experimental {
 template < Kokkos::Iterate OuterP, Kokkos::Iterate InnerP,
            unsigned ArgN0 , unsigned ArgN1 , unsigned ArgN2 = 0,  unsigned ArgN3 = 0,  unsigned ArgN4 = 0,  unsigned ArgN5 = 0,  unsigned ArgN6 = 0,  unsigned ArgN7 = 0, 
            bool IsPowerOfTwo = 
-           ( Impl::is_integral_power_of_two(ArgN0) &&
-             Impl::is_integral_power_of_two(ArgN1) &&
-             (Impl::is_integral_power_of_two(ArgN2) || (ArgN2 == 0) ) &&
-             (Impl::is_integral_power_of_two(ArgN3) || (ArgN3 == 0) ) &&
-             (Impl::is_integral_power_of_two(ArgN4) || (ArgN4 == 0) ) &&
-             (Impl::is_integral_power_of_two(ArgN5) || (ArgN5 == 0) ) &&
-             (Impl::is_integral_power_of_two(ArgN6) || (ArgN6 == 0) ) &&
-             (Impl::is_integral_power_of_two(ArgN7) || (ArgN7 == 0) )
+           ( Kokkos::Impl::is_integral_power_of_two(ArgN0) &&
+               Kokkos::Impl::is_integral_power_of_two(ArgN1) &&
+             (Kokkos::Impl::is_integral_power_of_two(ArgN2) || (ArgN2 == 0) ) &&
+             (Kokkos::Impl::is_integral_power_of_two(ArgN3) || (ArgN3 == 0) ) &&
+             (Kokkos::Impl::is_integral_power_of_two(ArgN4) || (ArgN4 == 0) ) &&
+             (Kokkos::Impl::is_integral_power_of_two(ArgN5) || (ArgN5 == 0) ) &&
+             (Kokkos::Impl::is_integral_power_of_two(ArgN6) || (ArgN6 == 0) ) &&
+             (Kokkos::Impl::is_integral_power_of_two(ArgN7) || (ArgN7 == 0) )
            )
          >
 struct LayoutTiled {
diff --git a/packages/kokkos/core/src/Kokkos_Macros.hpp b/packages/kokkos/core/src/Kokkos_Macros.hpp
index 10fc09423e729d0fa1315e7e6c30f726bf6a8981..6b8ae02f824cfa8816bc52b9b3f3aacf6d385985 100644
--- a/packages/kokkos/core/src/Kokkos_Macros.hpp
+++ b/packages/kokkos/core/src/Kokkos_Macros.hpp
@@ -50,6 +50,7 @@
  *  KOKKOS_ENABLE_CUDA                Kokkos::Cuda execution and memory spaces
  *  KOKKOS_ENABLE_THREADS             Kokkos::Threads execution space
  *  KOKKOS_ENABLE_QTHREADS            Kokkos::Qthreads execution space
+ *  KOKKOS_ENABLE_HPX                 Kokkos::Experimental::HPX execution space
  *  KOKKOS_ENABLE_OPENMP              Kokkos::OpenMP execution space
  *  KOKKOS_ENABLE_OPENMPTARGET        Kokkos::Experimental::OpenMPTarget execution space
  *  KOKKOS_ENABLE_HWLOC               HWLOC library is available.
@@ -98,12 +99,14 @@
 
 #if defined(KOKKOS_ENABLE_SERIAL) || defined(KOKKOS_ENABLE_THREADS) || \
     defined(KOKKOS_ENABLE_OPENMP) || defined(KOKKOS_ENABLE_QTHREADS) || \
+    defined(KOKKOS_ENABLE_HPX) || \
     defined(KOKKOS_ENABLE_ROCM) || defined(KOKKOS_ENABLE_OPENMPTARGET)
   #define KOKKOS_INTERNAL_ENABLE_NON_CUDA_BACKEND
 #endif
 
 #if !defined(KOKKOS_ENABLE_THREADS) && !defined(KOKKOS_ENABLE_CUDA) && \
     !defined(KOKKOS_ENABLE_OPENMP) && !defined(KOKKOS_ENABLE_QTHREADS) && \
+    !defined(KOKKOS_ENABLE_HPX) && \
     !defined(KOKKOS_ENABLE_ROCM) && !defined(KOKKOS_ENABLE_OPENMPTARGET)
   #define KOKKOS_INTERNAL_NOT_PARALLEL
 #endif
@@ -174,33 +177,22 @@
   #if ( 10000 > CUDA_VERSION )
     #define KOKKOS_ENABLE_PRE_CUDA_10_DEPRECATION_API
   #endif
-#endif // #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ )
-
-//----------------------------------------------------------------------------
-// Language info: C++, CUDA, OPENMP
 
-#if defined( KOKKOS_ENABLE_CUDA )
-  // Compiling Cuda code to 'ptx'
-
-  #define KOKKOS_FORCEINLINE_FUNCTION  __device__  __host__  __forceinline__
-  #define KOKKOS_INLINE_FUNCTION       __device__  __host__  inline
-  #define KOKKOS_FUNCTION              __device__  __host__
-#endif // #if defined( __CUDA_ARCH__ )
+  #if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ >= 700)
+    // PTX atomics with memory order semantics are only available on volta and later
+    #if !defined(KOKKOS_DISABLE_CUDA_ASM)
+      #if !defined(KOKKOS_ENABLE_CUDA_ASM)
+        #define KOKKOS_ENABLE_CUDA_ASM
+        #if !defined(KOKKOS_DISABLE_CUDA_ASM_ATOMICS)
+          #define KOKKOS_ENABLE_CUDA_ASM_ATOMICS
+        #endif
+      #endif
+    #endif
+  #endif
 
-#if defined( KOKKOS_ENABLE_ROCM ) && defined( __HCC__ )
 
-  #define KOKKOS_FORCEINLINE_FUNCTION  __attribute__((amp,cpu)) inline
-  #define KOKKOS_INLINE_FUNCTION       __attribute__((amp,cpu)) inline
-  #define KOKKOS_FUNCTION              __attribute__((amp,cpu))
-  #define KOKKOS_LAMBDA                [=] __attribute__((amp,cpu))
-#endif
+#endif // #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ )
 
-#if defined( _OPENMP )
-  //  Compiling with OpenMP.
-  //  The value of _OPENMP is an integer value YYYYMM
-  //  where YYYY and MM are the year and month designation
-  //  of the supported OpenMP API version.
-#endif // #if defined( _OPENMP )
 
 //----------------------------------------------------------------------------
 // Mapping compiler built-ins to KOKKOS_COMPILER_*** macros
@@ -263,7 +255,7 @@
   #endif
 #endif
 
-#if defined( __PGIC__ ) 
+#if defined( __PGIC__ )
   #define KOKKOS_COMPILER_PGI __PGIC__*100+__PGIC_MINOR__*10+__PGIC_PATCHLEVEL__
 
   #if ( 1540 > KOKKOS_COMPILER_PGI )
@@ -272,6 +264,36 @@
 #endif
 
 //#endif // #if !defined( __CUDA_ARCH__ )
+//----------------------------------------------------------------------------
+// Language info: C++, CUDA, OPENMP
+
+#if defined( KOKKOS_ENABLE_CUDA )
+  // Compiling Cuda code to 'ptx'
+
+  #define KOKKOS_FORCEINLINE_FUNCTION  __device__  __host__  __forceinline__
+  #define KOKKOS_INLINE_FUNCTION       __device__  __host__  inline
+  #define KOKKOS_FUNCTION              __device__  __host__
+  #if defined( KOKKOS_COMPILER_NVCC )
+    #define KOKKOS_INLINE_FUNCTION_DELETED inline
+  #else
+    #define KOKKOS_INLINE_FUNCTION_DELETED __device__  __host__  inline
+  #endif
+#endif // #if defined( __CUDA_ARCH__ )
+
+#if defined( KOKKOS_ENABLE_ROCM ) && defined( __HCC__ )
+
+  #define KOKKOS_FORCEINLINE_FUNCTION  __attribute__((amp,cpu)) inline
+  #define KOKKOS_INLINE_FUNCTION       __attribute__((amp,cpu)) inline
+  #define KOKKOS_FUNCTION              __attribute__((amp,cpu))
+  #define KOKKOS_LAMBDA                [=] __attribute__((amp,cpu))
+#endif
+
+#if defined( _OPENMP )
+  //  Compiling with OpenMP.
+  //  The value of _OPENMP is an integer value YYYYMM
+  //  where YYYY and MM are the year and month designation
+  //  of the supported OpenMP API version.
+#endif // #if defined( _OPENMP )
 
 //----------------------------------------------------------------------------
 // Intel compiler macros
@@ -320,7 +342,10 @@
 
   #if defined( KOKKOS_ARCH_AVX512MIC )
       #define KOKKOS_ENABLE_RFO_PREFETCH 1
-  #endif 
+      #if (KOKKOS_COMPILER_INTEL < 1800) && !defined(KOKKOS_KNL_USE_ASM_WORKAROUND)
+        #define KOKKOS_KNL_USE_ASM_WORKAROUND 1
+      #endif
+  #endif
 
   #if defined( __MIC__ )
     // Compiling for Xeon Phi
@@ -386,6 +411,8 @@
     #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline))
   #endif
 
+  #define KOKKOS_RESTRICT __restrict__
+
   #if !defined( KOKKOS_ENABLE_ASM ) && !defined( __PGIC__ ) && \
       ( defined( __amd64 ) || defined( __amd64__ ) || \
         defined( __x86_64 ) || defined( __x86_64__ ) || \
@@ -416,7 +443,7 @@
 // Define function marking macros if compiler specific macros are undefined:
 
 #if !defined( KOKKOS_FORCEINLINE_FUNCTION )
-  #define KOKKOS_FORCEINLINE_FUNCTION  inline
+  define KOKKOS_FORCEINLINE_FUNCTION  inline
 #endif
 
 #if !defined( KOKKOS_INLINE_FUNCTION )
@@ -427,6 +454,9 @@
   #define KOKKOS_FUNCTION /**/
 #endif
 
+#if !defined( KOKKOS_INLINE_FUNCTION_DELETED )
+  #define KOKKOS_INLINE_FUNCTION_DELETED inline
+#endif
 //----------------------------------------------------------------------------
 // Define empty macro for restrict if necessary:
 
@@ -459,18 +489,20 @@
           ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) ? 1 : 0 ) + \
           ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) ? 1 : 0 ) + \
           ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) ? 1 : 0 ) + \
+          ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX ) ? 1 : 0 ) + \
           ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) ? 1 : 0 ) )
   #error "More than one KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_* specified."
 #endif
 
 // If default is not specified then chose from enabled execution spaces.
-// Priority: CUDA, OPENMP, THREADS, QTHREADS, SERIAL
+// Priority: CUDA, OPENMP, THREADS, QTHREADS, HPX, SERIAL
 #if   defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA )
 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM )
 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET )
 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP )
 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS )
 //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS )
+#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX )
 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL )
 #elif defined( KOKKOS_ENABLE_CUDA )
   #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA
@@ -484,6 +516,8 @@
   #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS
 //#elif defined( KOKKOS_ENABLE_QTHREADS )
 //  #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS
+#elif defined( KOKKOS_ENABLE_HPX )
+  #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_HPX
 #else
   #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL
 #endif
@@ -539,7 +573,27 @@
   #define KOKKOS_IMPL_CTOR_DEFAULT_ARG KOKKOS_INVALID_INDEX
 #endif
 
+#if (defined(KOKKOS_ENABLE_CXX14) || defined(KOKKOS_ENABLE_CXX17) || defined(KOKKOS_ENABLE_CXX20))
+  #define KOKKOS_CONSTEXPR_14 constexpr
+  #define KOKKOS_DEPRECATED [[deprecated]]
+  #define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE
+#else
+  #define KOKKOS_CONSTEXPR_14
+  #if defined(KOKKOS_COMPILER_GNU) || defined(KOKKOS_COMPILER_CLANG)
+    #define KOKKOS_DEPRECATED
+    #define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE __attribute__ ((deprecated))
+  #else
+    #define KOKKOS_DEPRECATED
+    #define KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE
+  #endif
+#endif
+
 
+// DJS 05/28/2019: Bugfix: Issue 2155
+// Use KOKKOS_ENABLE_CUDA_LDG_INTRINSIC to avoid memory leak in RandomAccess View
+#if defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC)
+ #define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC
+#endif
 
 #endif // #ifndef KOKKOS_MACROS_HPP
 
diff --git a/packages/kokkos/core/src/Kokkos_MemoryPool.hpp b/packages/kokkos/core/src/Kokkos_MemoryPool.hpp
index 157345c55200234250c2260f6132e4ea3985db91..365db2baecf139637173badc515ca30432200e22 100644
--- a/packages/kokkos/core/src/Kokkos_MemoryPool.hpp
+++ b/packages/kokkos/core/src/Kokkos_MemoryPool.hpp
@@ -132,12 +132,18 @@ private:
 
 public:
 
+  using memory_space = typename DeviceType::memory_space;
+
   /**\brief  The maximum size of a superblock and block */
   enum : uint32_t { max_superblock_size      = 1LU << 31 /* 2 gigabytes */ };
   enum : uint32_t { max_block_per_superblock = max_bit_count };
 
   //--------------------------------------------------------------------------
 
+  KOKKOS_INLINE_FUNCTION
+  bool operator==(MemoryPool const& other) const
+    { return m_sb_state_array == other.m_sb_state_array; }
+
   KOKKOS_INLINE_FUNCTION
   size_t capacity() const noexcept
     { return size_t(m_sb_count) << m_sb_size_lg2 ; }
diff --git a/packages/kokkos/core/src/Kokkos_MemoryTraits.hpp b/packages/kokkos/core/src/Kokkos_MemoryTraits.hpp
index eebc83cf3ddc12a745f7aa273321add249716d2a..509ac6499e2563a3a8334d299fa09f2f345753bb 100644
--- a/packages/kokkos/core/src/Kokkos_MemoryTraits.hpp
+++ b/packages/kokkos/core/src/Kokkos_MemoryTraits.hpp
@@ -71,13 +71,18 @@ template < unsigned T >
 struct MemoryTraits {
   //! Tag this class as a kokkos memory traits:
   typedef MemoryTraits memory_traits ;
-
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
   enum : bool { Unmanaged    = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged))) };
   enum : bool { RandomAccess = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess))) };
   enum : bool { Atomic       = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) };
   enum : bool { Restrict     = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) };
   enum : bool { Aligned      = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) };
-
+#endif
+  enum : bool { is_unmanaged    = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged))) };
+  enum : bool { is_random_access = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess))) };
+  enum : bool { is_atomic       = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) };
+  enum : bool { is_restrict     = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) };
+  enum : bool { is_aligned      = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) };
 };
 
 } // namespace Kokkos
diff --git a/packages/kokkos/core/src/Kokkos_OpenMP.hpp b/packages/kokkos/core/src/Kokkos_OpenMP.hpp
index ed4071a6daa2b074221c5c722c23cc25c8ac1531..6ee8f08dc89541187b9d31258997ef1e2a7d654f 100644
--- a/packages/kokkos/core/src/Kokkos_OpenMP.hpp
+++ b/packages/kokkos/core/src/Kokkos_OpenMP.hpp
@@ -107,8 +107,14 @@ public:
   /// \brief Wait until all dispatched functors complete on the given instance
   ///
   ///  This is a no-op on OpenMP
-  inline
+  static void impl_static_fence( OpenMP const& = OpenMP() ) noexcept;
+
+  #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
   static void fence( OpenMP const& = OpenMP() ) noexcept;
+  #else
+  void fence() const;
+  #endif
+
 
   /// \brief Does the given instance return immediately after launching
   /// a parallel algorithm
diff --git a/packages/kokkos/core/src/Kokkos_Pair.hpp b/packages/kokkos/core/src/Kokkos_Pair.hpp
index 1be763be858a13ccef609dba1daea10d8632b0fd..ab0ab8152a46f49422a785ea77c06bfd1bd83a79 100644
--- a/packages/kokkos/core/src/Kokkos_Pair.hpp
+++ b/packages/kokkos/core/src/Kokkos_Pair.hpp
@@ -528,6 +528,15 @@ KOKKOS_FORCEINLINE_FUNCTION constexpr
 bool operator>= (const pair<T1,void>& lhs, const pair<T1,void>& rhs)
 { return !(lhs<rhs); }
 
+
+namespace Impl {
+
+template <class T> struct is_pair_like : std::false_type { };
+template <class T, class U> struct is_pair_like<Kokkos::pair<T, U>> : std::true_type { };
+template <class T, class U> struct is_pair_like<std::pair<T, U>> : std::true_type { };
+
+} // end namespace Impl
+
 } // namespace Kokkos
 
 
diff --git a/packages/kokkos/core/src/Kokkos_Parallel.hpp b/packages/kokkos/core/src/Kokkos_Parallel.hpp
index b095f5728e63df49fc96ee6c4d0d86b9906545a0..09dcf60b111aaa6a907f801437adc43d4072f576 100644
--- a/packages/kokkos/core/src/Kokkos_Parallel.hpp
+++ b/packages/kokkos/core/src/Kokkos_Parallel.hpp
@@ -525,7 +525,7 @@ void parallel_scan( const ExecutionPolicy & policy
     Kokkos::Profiling::endParallelScan(kpID);
   }
 #endif
-
+  Kokkos::fence();
 }
 
 template< class FunctorType, class ReturnType >
@@ -560,7 +560,7 @@ void parallel_scan( const size_t        work_count
     Kokkos::Profiling::endParallelScan(kpID);
   }
 #endif
-
+  Kokkos::fence();
 }
 
 template< class ExecutionPolicy, class FunctorType, class ReturnType >
diff --git a/packages/kokkos/core/src/Kokkos_Parallel_Reduce.hpp b/packages/kokkos/core/src/Kokkos_Parallel_Reduce.hpp
index 06aaa6546e8bee697894b91fee6decff4302b14b..36bc6e41535f75d548928f63fbb8cc72f01c03aa 100644
--- a/packages/kokkos/core/src/Kokkos_Parallel_Reduce.hpp
+++ b/packages/kokkos/core/src/Kokkos_Parallel_Reduce.hpp
@@ -69,18 +69,19 @@ public:
   typedef Sum reducer;
   typedef typename std::remove_cv<Scalar>::type value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  Sum(value_type& value_): value(&value_) {}
+  Sum(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  Sum(const result_view_type& value_): value(value_.data()) {}
+  Sum(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -100,12 +101,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -116,18 +122,19 @@ public:
   typedef Prod reducer;
   typedef typename std::remove_cv<Scalar>::type value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  Prod(value_type& value_): value(&value_) {}
+  Prod(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  Prod(const result_view_type& value_): value(value_.data()) {}
+  Prod(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -147,12 +154,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -163,18 +175,19 @@ public:
   typedef Min reducer;
   typedef typename std::remove_cv<Scalar>::type value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  Min(value_type& value_): value(&value_) {}
+  Min(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  Min(const result_view_type& value_): value(value_.data()) {}
+  Min(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -196,12 +209,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -212,18 +230,19 @@ public:
   typedef Max reducer;
   typedef typename std::remove_cv<Scalar>::type value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  Max(value_type& value_): value(&value_) {}
+  Max(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  Max(const result_view_type& value_): value(value_.data()) {}
+  Max(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -246,12 +265,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -262,18 +286,19 @@ public:
   typedef LAnd reducer;
   typedef typename std::remove_cv<Scalar>::type value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  LAnd(value_type& value_): value(&value_) {}
+  LAnd(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  LAnd(const result_view_type& value_): value(value_.data()) {}
+  LAnd(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   KOKKOS_INLINE_FUNCTION
   void join(value_type& dest, const value_type& src)  const {
@@ -292,12 +317,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -308,18 +338,19 @@ public:
   typedef LOr reducer;
   typedef typename std::remove_cv<Scalar>::type value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  LOr(value_type& value_): value(&value_) {}
+  LOr(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  LOr(const result_view_type& value_): value(value_.data()) {}
+  LOr(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -339,12 +370,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -355,18 +391,19 @@ public:
   typedef BAnd reducer;
   typedef typename std::remove_cv<Scalar>::type value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  BAnd(value_type& value_): value(&value_) {}
+  BAnd(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  BAnd(const result_view_type& value_): value(value_.data()) {}
+  BAnd(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -386,12 +423,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -402,18 +444,19 @@ public:
   typedef BOr reducer;
   typedef typename std::remove_cv<Scalar>::type value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  BOr(value_type& value_): value(&value_) {}
+  BOr(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  BOr(const result_view_type& value_): value(value_.data()) {}
+  BOr(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -433,12 +476,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -471,18 +519,19 @@ public:
   typedef MinLoc reducer;
   typedef ValLocScalar<scalar_type,index_type> value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  MinLoc(value_type& value_): value(&value_) {}
+  MinLoc(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  MinLoc(const result_view_type& value_): value(value_.data()) {}
+  MinLoc(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
 
   //Required
@@ -506,12 +555,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -526,18 +580,19 @@ public:
   typedef MaxLoc reducer;
   typedef ValLocScalar<scalar_type,index_type> value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  MaxLoc(value_type& value_): value(&value_) {}
+  MaxLoc(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  MaxLoc(const result_view_type& value_): value(value_.data()) {}
+  MaxLoc(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -560,12 +615,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -596,18 +656,19 @@ public:
   typedef MinMax reducer;
   typedef MinMaxScalar<scalar_type> value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  MinMax(value_type& value_): value(&value_) {}
+  MinMax(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  MinMax(const result_view_type& value_): value(value_.data()) {}
+  MinMax(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -638,12 +699,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 
@@ -680,18 +746,19 @@ public:
   typedef MinMaxLoc reducer;
   typedef MinMaxLocScalar<scalar_type,index_type> value_type;
 
-  typedef Kokkos::View<value_type, Space, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_type;
+  typedef Kokkos::View<value_type, Space> result_view_type;
 
 private:
-  value_type* value;
+  result_view_type value;
+  bool references_scalar_v;
 
 public:
 
   KOKKOS_INLINE_FUNCTION
-  MinMaxLoc(value_type& value_): value(&value_) {}
+  MinMaxLoc(value_type& value_): value(&value_),references_scalar_v(true) {}
 
   KOKKOS_INLINE_FUNCTION
-  MinMaxLoc(const result_view_type& value_): value(value_.data()) {}
+  MinMaxLoc(const result_view_type& value_): value(value_),references_scalar_v(false) {}
 
   //Required
   KOKKOS_INLINE_FUNCTION
@@ -728,12 +795,17 @@ public:
 
   KOKKOS_INLINE_FUNCTION
   value_type& reference() const {
-    return *value;
+    return *value.data();
   }
 
   KOKKOS_INLINE_FUNCTION
   result_view_type view() const {
-    return result_view_type(value);
+    return value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool references_scalar() const {
+    return references_scalar_v;
   }
 };
 }
@@ -813,7 +885,7 @@ struct ParallelReduceReturnValue<typename std::enable_if<
   typedef typename return_type::value_type value_type;
 
   static return_type return_value(ReturnType& return_val,
-                                  const FunctorType& functor) {
+                                  const FunctorType&) {
     return return_val;
   }
 };
@@ -908,6 +980,37 @@ struct ParallelReducePolicyType<typename std::enable_if<std::is_integral<PolicyT
     \param return_argument A return argument which can be a scalar, a View, or a ReducerStruct. This argument can be left out if the functor has a final function.
 */
 
+// Parallel Reduce Blocking behavior
+
+namespace Impl {
+template <typename T>
+  struct ReducerHasTestReferenceFunction
+  {
+    template <typename E> static std::true_type test_func( decltype(&E::references_scalar) ) ;
+    template <typename E> static std::false_type test_func(...);
+
+    enum { value = std::is_same<std::true_type,decltype(test_func<T>(0))>::value };
+  };
+
+  template<class T, bool is_reducer =  ReducerHasTestReferenceFunction<T>::value>
+  struct ParallelReduceFence {
+    static void fence(const T&) {
+      Kokkos::fence();
+    }
+  };
+  template<class ... Args>
+  struct ParallelReduceFence<View<Args...>, false> {
+    static void fence(const View<Args...>) {};
+  };
+  template<class T>
+  struct ParallelReduceFence<T,true> {
+    static void fence(const T& reducer) {
+      if(reducer.references_scalar())
+        Kokkos::fence();
+    }
+  };
+}
+
 /** \brief  Parallel reduction
  *
  * parallel_reduce performs parallel reductions with arbitrary functions - i.e.
@@ -959,6 +1062,7 @@ void parallel_reduce(const std::string& label,
                        Kokkos::Impl::is_execution_policy<PolicyType>::value
                      >::type * = 0) {
   Impl::ParallelReduceAdaptor<PolicyType,FunctorType,ReturnType>::execute(label,policy,functor,return_value);
+  Impl::ParallelReduceFence<ReturnType>::fence(return_value);
 }
 
 template< class PolicyType, class FunctorType, class ReturnType >
@@ -970,6 +1074,7 @@ void parallel_reduce(const PolicyType& policy,
                        Kokkos::Impl::is_execution_policy<PolicyType>::value
                      >::type * = 0) {
   Impl::ParallelReduceAdaptor<PolicyType,FunctorType,ReturnType>::execute("",policy,functor,return_value);
+  Impl::ParallelReduceFence<ReturnType>::fence(return_value);
 }
 
 template< class FunctorType, class ReturnType >
@@ -979,6 +1084,7 @@ void parallel_reduce(const size_t& policy,
                      ReturnType& return_value) {
   typedef typename Impl::ParallelReducePolicyType<void,size_t,FunctorType>::policy_type policy_type;
   Impl::ParallelReduceAdaptor<policy_type,FunctorType,ReturnType>::execute("",policy_type(0,policy),functor,return_value);
+  Impl::ParallelReduceFence<ReturnType>::fence(return_value);
 }
 
 template< class FunctorType, class ReturnType >
@@ -989,6 +1095,7 @@ void parallel_reduce(const std::string& label,
                      ReturnType& return_value) {
   typedef typename Impl::ParallelReducePolicyType<void,size_t,FunctorType>::policy_type policy_type;
   Impl::ParallelReduceAdaptor<policy_type,FunctorType,ReturnType>::execute(label,policy_type(0,policy),functor,return_value);
+  Impl::ParallelReduceFence<ReturnType>::fence(return_value);
 }
 
 // ReturnValue as View or Reducer: take by copy to allow for inline construction
@@ -1004,6 +1111,7 @@ void parallel_reduce(const std::string& label,
                      >::type * = 0) {
   ReturnType return_value_impl = return_value;
   Impl::ParallelReduceAdaptor<PolicyType,FunctorType,ReturnType>::execute(label,policy,functor,return_value_impl);
+  Impl::ParallelReduceFence<ReturnType>::fence(return_value);
 }
 
 template< class PolicyType, class FunctorType, class ReturnType >
@@ -1016,6 +1124,7 @@ void parallel_reduce(const PolicyType& policy,
                      >::type * = 0) {
   ReturnType return_value_impl = return_value;
   Impl::ParallelReduceAdaptor<PolicyType,FunctorType,ReturnType>::execute("",policy,functor,return_value_impl);
+  Impl::ParallelReduceFence<ReturnType>::fence(return_value);
 }
 
 template< class FunctorType, class ReturnType >
@@ -1026,6 +1135,7 @@ void parallel_reduce(const size_t& policy,
   typedef typename Impl::ParallelReducePolicyType<void,size_t,FunctorType>::policy_type policy_type;
   ReturnType return_value_impl = return_value;
   Impl::ParallelReduceAdaptor<policy_type,FunctorType,ReturnType>::execute("",policy_type(0,policy),functor,return_value_impl);
+  Impl::ParallelReduceFence<ReturnType>::fence(return_value);
 }
 
 template< class FunctorType, class ReturnType >
@@ -1037,6 +1147,7 @@ void parallel_reduce(const std::string& label,
   typedef typename Impl::ParallelReducePolicyType<void,size_t,FunctorType>::policy_type policy_type;
   ReturnType return_value_impl = return_value;
   Impl::ParallelReduceAdaptor<policy_type,FunctorType,ReturnType>::execute(label,policy_type(0,policy),functor,return_value_impl);
+  Impl::ParallelReduceFence<ReturnType>::fence(return_value);
 }
 
 // No Return Argument
diff --git a/packages/kokkos/core/src/Kokkos_PointerOwnership.hpp b/packages/kokkos/core/src/Kokkos_PointerOwnership.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..be76ec3defa855290db04cfc4c22b26c8f1cc56b
--- /dev/null
+++ b/packages/kokkos/core/src/Kokkos_PointerOwnership.hpp
@@ -0,0 +1,74 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_POINTEROWNERSHIP_HPP
+#define KOKKOS_IMPL_POINTEROWNERSHIP_HPP
+
+#include <Kokkos_Macros.hpp>
+
+#include <Kokkos_Core_fwd.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
+/// Trivial wrapper for raw pointers that express ownership.
+template <class T>
+using OwningRawPtr = T*;
+
+/// Trivial wrapper for raw pointers that do not express ownership.
+template <class T>
+using ObservingRawPtr = T*;
+
+} // end namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+
+
+#endif /* #ifndef KOKKOS_IMPL_POINTEROWNERSHIP_HPP */
+
diff --git a/packages/kokkos/core/src/Kokkos_ROCm.hpp b/packages/kokkos/core/src/Kokkos_ROCm.hpp
index 469d6b27878cc5603313f11c835f765dfcda0b3b..96207e73c65e0822c320c501fec642530ad8839e 100644
--- a/packages/kokkos/core/src/Kokkos_ROCm.hpp
+++ b/packages/kokkos/core/src/Kokkos_ROCm.hpp
@@ -140,7 +140,14 @@ public:
   static bool wake() ;
 
   /** \brief Wait until all dispatched functors complete. A noop for OpenMP. */
-  static void fence() ;
+  static void impl_static_fence();
+
+  #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+  static void fence();
+  #else
+  void fence() const;
+  #endif
+
 
   /// \brief Print configuration information to the given output stream.
   static void print_configuration( std::ostream & , const bool detail = false );
diff --git a/packages/kokkos/core/src/Kokkos_Serial.hpp b/packages/kokkos/core/src/Kokkos_Serial.hpp
index 01701e53a2783e93b6e272ef7f2e0d577ade9ecd..5821b0c0c5ecc57e393bbadf0917a2096bd9f875 100644
--- a/packages/kokkos/core/src/Kokkos_Serial.hpp
+++ b/packages/kokkos/core/src/Kokkos_Serial.hpp
@@ -118,10 +118,16 @@ public:
   /// return asynchronously, before the functor completes.  This
   /// method does not return until all dispatched functors on this
   /// device have completed.
+  static void impl_static_fence() {}
+
+  #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
   static void fence() {}
+  #else
+  void fence() const {}
+  #endif
 
   /** \brief  Return the maximum amount of concurrency.  */
-  static int concurrency() {return 1;};
+  static int concurrency() {return 1;}
 
   //! Print configuration information to the given output stream.
   static void print_configuration( std::ostream & , const bool /* detail */ = false ) {}
@@ -261,6 +267,20 @@ public:
     return *this;
   }
 
+  template<class ExecSpace, class ... OtherProperties >
+  friend class TeamPolicyInternal;
+
+  template< class ... OtherProperties >
+  TeamPolicyInternal(const TeamPolicyInternal<Kokkos::Serial,OtherProperties...>& p) {
+    m_league_size = p.m_league_size;
+    m_team_scratch_size[0] = p.m_team_scratch_size[0];
+    m_thread_scratch_size[0] = p.m_thread_scratch_size[0];
+    m_team_scratch_size[1] = p.m_team_scratch_size[1];
+    m_thread_scratch_size[1] = p.m_thread_scratch_size[1];
+    m_chunk_size = p.m_chunk_size;
+  }
+
+
   //----------------------------------------
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
   template< class FunctorType >
@@ -302,7 +322,7 @@ public:
         20*1024*1024);
   }
   /** \brief  Specify league size, request team size */
-  TeamPolicyInternal( execution_space &
+  TeamPolicyInternal( const execution_space &
             , int league_size_request
 #ifndef KOKKOS_ENABLE_DEPRECATED_CODE
             , int team_size_request
@@ -320,7 +340,7 @@ public:
       #endif
     }
 
-  TeamPolicyInternal( execution_space &
+  TeamPolicyInternal( const execution_space &
             , int league_size_request
             , const Kokkos::AUTO_t & /* team_size_request */
             , int /* vector_length_request */ = 1 )
diff --git a/packages/kokkos/core/src/Kokkos_TaskScheduler.hpp b/packages/kokkos/core/src/Kokkos_TaskScheduler.hpp
index 5045e9cbbcb67301d13fb872bd9deb4ffb16fc8a..1c3d58af08864e0c67de29eca1884b453fd7f142 100644
--- a/packages/kokkos/core/src/Kokkos_TaskScheduler.hpp
+++ b/packages/kokkos/core/src/Kokkos_TaskScheduler.hpp
@@ -50,393 +50,203 @@
 #if defined( KOKKOS_ENABLE_TASKDAG )
 
 #include <Kokkos_Core_fwd.hpp>
+#include <Kokkos_TaskScheduler_fwd.hpp>
 //----------------------------------------------------------------------------
 
 #include <Kokkos_MemoryPool.hpp>
 #include <impl/Kokkos_Tags.hpp>
 
-//----------------------------------------------------------------------------
-
-namespace Kokkos {
-
-// Forward declarations used in Impl::TaskQueue
-
-template< typename Arg1 = void , typename Arg2 = void >
-class Future ;
-
-template< typename Space >
-class TaskScheduler ;
-
-template< typename Space >
-void wait( TaskScheduler< Space > const & );
-
-template< typename Space >
-struct is_scheduler : public std::false_type {};
-
-template< typename Space >
-struct is_scheduler< TaskScheduler< Space > > : public std::true_type {};
-
-} // namespace Kokkos
-
+#include <Kokkos_Future.hpp>
 #include <impl/Kokkos_TaskQueue.hpp>
+#include <impl/Kokkos_SingleTaskQueue.hpp>
+#include <impl/Kokkos_TaskQueueMultiple.hpp>
+#include <impl/Kokkos_TaskPolicyData.hpp>
+#include <impl/Kokkos_TaskTeamMember.hpp>
+#include <impl/Kokkos_SimpleTaskScheduler.hpp>
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 
-namespace Kokkos {
-namespace Impl {
-
-/*\brief  Implementation data for task data management, access, and execution.
- *
- *  CRTP Inheritance structure to allow static_cast from the
- *  task root type and a task's FunctorType.
- *
- *    TaskBase< Space , ResultType , FunctorType >
- *      : TaskBase< Space , ResultType , void >
- *      , FunctorType
- *      { ... };
- *
- *    TaskBase< Space , ResultType , void >
- *      : TaskBase< Space , void , void >
- *      { ... };
- */
-template< typename Space , typename ResultType , typename FunctorType >
-class TaskBase ;
-
-} // namespace Impl
-} // namespace Kokkos
-
-//----------------------------------------------------------------------------
-
 namespace Kokkos {
 
-/**
- *
- *  Future< space >  // value_type == void
- *  Future< value >  // space == Default
- *  Future< value , space >
- *
- */
-template< typename Arg1 , typename Arg2 >
-class Future {
-private:
-
-  template< typename > friend class TaskScheduler ;
-  template< typename , typename > friend class Future ;
-  template< typename , typename , typename > friend class Impl::TaskBase ;
-
-  enum { Arg1_is_space  = Kokkos::is_space< Arg1 >::value };
-  enum { Arg2_is_space  = Kokkos::is_space< Arg2 >::value };
-  enum { Arg1_is_value  = ! Arg1_is_space &&
-                          ! std::is_same< Arg1 , void >::value };
-  enum { Arg2_is_value  = ! Arg2_is_space &&
-                          ! std::is_same< Arg2 , void >::value };
-
-  static_assert( ! ( Arg1_is_space && Arg2_is_space )
-               , "Future cannot be given two spaces" );
-
-  static_assert( ! ( Arg1_is_value && Arg2_is_value )
-               , "Future cannot be given two value types" );
-
-  using ValueType =
-    typename std::conditional< Arg1_is_value , Arg1 ,
-    typename std::conditional< Arg2_is_value , Arg2 , void
-    >::type >::type ;
-
-  using Space =
-    typename std::conditional< Arg1_is_space , Arg1 ,
-    typename std::conditional< Arg2_is_space , Arg2 , void
-    >::type >::type ;
-
-  using task_base  = Impl::TaskBase< void , void , void > ;
-  using queue_type = Impl::TaskQueue< Space > ;
+namespace Impl {
 
-  task_base * m_task ;
+template <class, class>
+class TaskExec;
 
-  KOKKOS_INLINE_FUNCTION explicit
-  Future( task_base * task ) : m_task(0)
-    { if ( task ) queue_type::assign( & m_task , task ); }
+} // end namespace Impl
 
-  //----------------------------------------
 
+template<class ExecSpace, class QueueType>
+class BasicTaskScheduler : public Impl::TaskSchedulerBase
+{
 public:
 
-  using execution_space = typename Space::execution_space ;
-  using value_type      = ValueType ;
+  using scheduler_type = BasicTaskScheduler;
+  using execution_space = ExecSpace;
+  using queue_type = QueueType;
+  using memory_space = typename queue_type::memory_space;
+  using memory_pool = typename queue_type::memory_pool;
+  using specialization = Impl::TaskQueueSpecialization<BasicTaskScheduler>;
+  using member_type = typename specialization::member_type;
+  using team_scheduler_type = BasicTaskScheduler;
+  template <class Functor>
+  using runnable_task_type = Impl::Task<scheduler_type, typename Functor::value_type, Functor>;
+  template <class ValueType>
+  using future_type = Kokkos::BasicFuture<ValueType, BasicTaskScheduler>;
+  template <class FunctorType>
+  using future_type_for_functor = future_type<typename FunctorType::value_type>;
 
-  //----------------------------------------
-
-  KOKKOS_INLINE_FUNCTION
-  bool is_null() const { return 0 == m_task ; }
-
-  KOKKOS_INLINE_FUNCTION
-  int reference_count() const
-    { return 0 != m_task ? m_task->reference_count() : 0 ; }
+private:
 
-  //----------------------------------------
+  using track_type = Kokkos::Impl::SharedAllocationTracker ;
+  using task_base  = Impl::TaskBase;
 
-  KOKKOS_INLINE_FUNCTION
-  void clear()
-    { if ( m_task ) queue_type::assign( & m_task , (task_base*)0 ); }
+  track_type m_track;
+  queue_type * m_queue;
 
   //----------------------------------------
 
-  KOKKOS_INLINE_FUNCTION
-  ~Future() { clear(); }
+  template <typename, typename>
+  friend class Impl::TaskQueue;
+  template <typename>
+  friend struct Impl::TaskQueueSpecialization;
+  template <typename, typename>
+  friend class Impl::TaskQueueSpecializationConstrained;
+  template <typename, typename>
+  friend class Impl::TaskTeamMemberAdapter;
+  template <typename, typename>
+  friend class Impl::TaskExec;
 
   //----------------------------------------
 
   KOKKOS_INLINE_FUNCTION
-  constexpr Future() noexcept : m_task(0) {}
+  BasicTaskScheduler(
+    track_type arg_track,
+    queue_type* arg_queue
+  )
+    : m_track(std::move(arg_track)),
+      m_queue(std::move(arg_queue))
+  { }
 
   KOKKOS_INLINE_FUNCTION
-  Future( Future && rhs )
-    : m_task( rhs.m_task ) { rhs.m_task = 0 ; }
-
-  KOKKOS_INLINE_FUNCTION
-  Future( const Future & rhs )
-    : m_task(0)
-    { if ( rhs.m_task ) queue_type::assign( & m_task , rhs.m_task ); }
-
-  KOKKOS_INLINE_FUNCTION
-  Future & operator = ( Future && rhs )
-    {
-      clear();
-      m_task = rhs.m_task ;
-      rhs.m_task = 0 ;
-      return *this ;
-    }
-
-  KOKKOS_INLINE_FUNCTION
-  Future & operator = ( const Future & rhs )
-    {
-      if ( m_task || rhs.m_task ) queue_type::assign( & m_task , rhs.m_task );
-      return *this ;
-    }
+  team_scheduler_type get_team_scheduler(int team_rank) const {
+    return { m_track, &m_queue->get_team_queue(team_rank) };
+  }
 
   //----------------------------------------
 
-  template< class A1 , class A2 >
-  KOKKOS_INLINE_FUNCTION
-  Future( Future<A1,A2> && rhs )
-    : m_task( rhs.m_task )
-    {
-      static_assert
-        ( std::is_same< Space , void >::value ||
-          std::is_same< Space , typename Future<A1,A2>::Space >::value
-        , "Assigned Futures must have the same space" );
-
-      static_assert
-        ( std::is_same< value_type , void >::value ||
-          std::is_same< value_type , typename Future<A1,A2>::value_type >::value
-        , "Assigned Futures must have the same value_type" );
-
-      rhs.m_task = 0 ;
-    }
-
-  template< class A1 , class A2 >
   KOKKOS_INLINE_FUNCTION
-  Future( const Future<A1,A2> & rhs )
-    : m_task(0)
-    {
-      static_assert
-        ( std::is_same< Space , void >::value ||
-          std::is_same< Space , typename Future<A1,A2>::Space >::value
-        , "Assigned Futures must have the same space" );
-
-      static_assert
-        ( std::is_same< value_type , void >::value ||
-          std::is_same< value_type , typename Future<A1,A2>::value_type >::value
-        , "Assigned Futures must have the same value_type" );
-
-      if ( rhs.m_task ) queue_type::assign( & m_task , rhs.m_task );
-    }
-
-  template< class A1 , class A2 >
-  KOKKOS_INLINE_FUNCTION
-  Future & operator = ( const Future<A1,A2> & rhs )
-    {
-      static_assert
-        ( std::is_same< Space , void >::value ||
-          std::is_same< Space , typename Future<A1,A2>::Space >::value
-        , "Assigned Futures must have the same space" );
-
-      static_assert
-        ( std::is_same< value_type , void >::value ||
-          std::is_same< value_type , typename Future<A1,A2>::value_type >::value
-        , "Assigned Futures must have the same value_type" );
-
-      if ( m_task || rhs.m_task ) queue_type::assign( & m_task , rhs.m_task );
-      return *this ;
-    }
-
-  template< class A1 , class A2 >
-  KOKKOS_INLINE_FUNCTION
-  Future & operator = ( Future<A1,A2> && rhs )
-    {
-      static_assert
-        ( std::is_same< Space , void >::value ||
-          std::is_same< Space , typename Future<A1,A2>::Space >::value
-        , "Assigned Futures must have the same space" );
-
-      static_assert
-        ( std::is_same< value_type , void >::value ||
-          std::is_same< value_type , typename Future<A1,A2>::value_type >::value
-        , "Assigned Futures must have the same value_type" );
-
-      clear();
-      m_task = rhs.m_task ;
-      rhs.m_task = 0 ;
-      return *this ;
-    }
-
-  //----------------------------------------
+  static constexpr task_base* _get_task_ptr(std::nullptr_t) { return nullptr; }
 
+  template <class ValueType>
   KOKKOS_INLINE_FUNCTION
-  int is_ready() const noexcept
-    { return ( 0 == m_task ) || ( ((task_base*) task_base::LockTag) == m_task->m_wait ); }
+  static constexpr task_base* _get_task_ptr(future_type<ValueType>&& f)
+  {
+    return f.m_task;
+  }
 
-  KOKKOS_INLINE_FUNCTION
-  const typename Impl::TaskResult< ValueType >::reference_type
-  get() const
-    {
-      if ( 0 == m_task ) {
-        Kokkos::abort( "Kokkos:::Future::get ERROR: is_null()");
-      }
-      return Impl::TaskResult< ValueType >::get( m_task );
+  template< int TaskEnum , typename DepTaskType , typename FunctorType >
+  KOKKOS_FUNCTION
+  Kokkos::BasicFuture<typename FunctorType::value_type, scheduler_type>
+  _spawn_impl(
+    DepTaskType* arg_predecessor_task,
+    TaskPriority arg_priority,
+    typename task_base::function_type arg_function,
+    typename task_base::destroy_type arg_destroy,
+    FunctorType&& arg_functor
+  )
+  {
+    using functor_future_type = future_type_for_functor<typename std::decay<FunctorType>::type>;
+    using task_type = Impl::Task<BasicTaskScheduler, typename functor_future_type::value_type, FunctorType>;
+
+    //----------------------------------------
+    // Give single-thread back-ends an opportunity to clear
+    // queue of ready tasks before allocating a new task
+
+    // TODO @tasking @optimization DSH re-enable this, maybe?
+    // specialization::iff_single_thread_recursive_execute(scheduler);
+
+    //----------------------------------------
+
+    functor_future_type f ;
+
+    // Allocate task from memory pool
+
+    const size_t alloc_size =
+      m_queue->template spawn_allocation_size< FunctorType >();
+
+    void* task_storage = m_queue->allocate(alloc_size);
+
+    if (task_storage) {
+
+      // Placement new construction
+      // Reference count starts at two:
+      //   +1 for the matching decrement when task is complete
+      //   +1 for the future
+      f.m_task = new (task_storage) task_type( std::forward<FunctorType>(arg_functor) );
+
+      f.m_task->m_apply      = arg_function;
+      //f.m_task->m_destroy    = arg_destroy;
+      f.m_task->m_queue      = m_queue;
+      f.m_task->m_next       = arg_predecessor_task;
+      f.m_task->m_ref_count  = 2;
+      f.m_task->m_alloc_size = alloc_size;
+      f.m_task->m_task_type  = TaskEnum;
+      f.m_task->m_priority   = (int16_t)arg_priority;
+
+      Kokkos::memory_fence();
+
+      // The dependence (if any) is processed immediately
+      // within the schedule function, as such the dependence's
+      // reference count does not need to be incremented for
+      // the assignment.
+
+      m_queue->schedule_runnable( f.m_task );
+      // This task may be updated or executed at any moment,
+      // even during the call to 'schedule'.
     }
-};
 
-// Is a Future with the given execution space
-template< typename , typename ExecSpace = void >
-struct is_future : public std::false_type {};
-
-template< typename Arg1 , typename Arg2 , typename ExecSpace >
-struct is_future< Future<Arg1,Arg2> , ExecSpace >
-  : public std::integral_constant
-      < bool ,
-      ( std::is_same< ExecSpace , void >::value ||
-        std::is_same< ExecSpace
-                    , typename Future<Arg1,Arg2>::execution_space >::value )
-      > {};
-
-} // namespace Kokkos
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+    return f;
 
-namespace Kokkos {
-
-enum class TaskPriority : int { High    = 0
-                              , Regular = 1
-                              , Low     = 2 };
-
-} // namespace Kokkos
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-namespace Kokkos {
-namespace Impl {
-
-//----------------------------------------------------------------------------
-
-template< int TaskEnum , typename DepFutureType >
-struct TaskPolicyData
-{
-  using execution_space = typename DepFutureType::execution_space ;
-  using scheduler_type  = TaskScheduler< execution_space > ;
-
-  enum : int { m_task_type = TaskEnum };
-
-  scheduler_type const * m_scheduler ;
-  DepFutureType  const   m_dependence ;
-  int                    m_priority ;
-
-  TaskPolicyData() = delete ;
-  TaskPolicyData( TaskPolicyData && ) = default ;
-  TaskPolicyData( TaskPolicyData const & ) = default ;
-  TaskPolicyData & operator = ( TaskPolicyData && ) = default ;
-  TaskPolicyData & operator = ( TaskPolicyData const & ) = default ;
-
-  KOKKOS_INLINE_FUNCTION
-  TaskPolicyData( DepFutureType        const & arg_future
-                , Kokkos::TaskPriority const & arg_priority )
-    : m_scheduler( 0 )
-    , m_dependence( arg_future )
-    , m_priority( static_cast<int>( arg_priority ) )
-    {}
-
-  KOKKOS_INLINE_FUNCTION
-  TaskPolicyData( scheduler_type       const & arg_scheduler
-                , Kokkos::TaskPriority const & arg_priority )
-    : m_scheduler( & arg_scheduler )
-    , m_dependence()
-    , m_priority( static_cast<int>( arg_priority ) )
-    {}
-
-  KOKKOS_INLINE_FUNCTION
-  TaskPolicyData( scheduler_type       const & arg_scheduler
-                , DepFutureType        const & arg_future
-                , Kokkos::TaskPriority const & arg_priority )
-    : m_scheduler( & arg_scheduler )
-    , m_dependence( arg_future )
-    , m_priority( static_cast<int>( arg_priority ) )
-    {}
-};
-
-} // namespace Impl
-} // namespace Kokkos
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-namespace Kokkos {
-
-template< typename ExecSpace >
-class TaskScheduler
-{
-private:
-
-  using track_type = Kokkos::Impl::SharedAllocationTracker ;
-  using queue_type = Kokkos::Impl::TaskQueue< ExecSpace > ;
-  using task_base  = Impl::TaskBase< void , void , void > ;
-
-  track_type   m_track ;
-  queue_type * m_queue ;
-
-  //----------------------------------------
+  }
 
 public:
 
-  using execution_space  = ExecSpace ;
-  using memory_space     = typename queue_type::memory_space ;
-  using memory_pool      = typename queue_type::memory_pool ;
-  using member_type      =
-    typename Kokkos::Impl::TaskQueueSpecialization< ExecSpace >::member_type ;
 
   KOKKOS_INLINE_FUNCTION
-  TaskScheduler() : m_track(), m_queue(0) {}
+  BasicTaskScheduler() : m_track(), m_queue(0) {}
 
   KOKKOS_INLINE_FUNCTION
-  TaskScheduler( TaskScheduler && rhs )
-    : m_track( rhs.m_track ), m_queue( rhs.m_queue ) {}
+  BasicTaskScheduler( BasicTaskScheduler && rhs ) noexcept
+    : m_track(rhs.m_track),  // probably should be a move, but this is deprecated code anyway
+      m_queue(std::move(rhs.m_queue))
+  { }
 
   KOKKOS_INLINE_FUNCTION
-  TaskScheduler( TaskScheduler const & rhs )
-    : m_track( rhs.m_track ), m_queue( rhs.m_queue ) {}
+  BasicTaskScheduler( BasicTaskScheduler const & rhs )
+    : m_track(rhs.m_track),
+      m_queue(rhs.m_queue)
+  { }
 
   KOKKOS_INLINE_FUNCTION
-  TaskScheduler & operator = ( TaskScheduler && rhs )
-    { m_track = rhs.m_track ; m_queue =  rhs.m_queue ; return *this ; }
+  BasicTaskScheduler& operator=(BasicTaskScheduler&& rhs) noexcept
+  {
+    m_track = rhs.m_track;  // probably should be a move, but this is deprecated code anyway
+    m_queue = std::move(rhs.m_queue);
+    return *this;
+  }
 
   KOKKOS_INLINE_FUNCTION
-  TaskScheduler & operator = ( TaskScheduler const & rhs )
-    { m_track = rhs.m_track ; m_queue =  rhs.m_queue ; return *this ; }
-
-  TaskScheduler( memory_pool const & arg_memory_pool )
-    : m_track()
-    , m_queue(0)
+  BasicTaskScheduler& operator=(BasicTaskScheduler const& rhs)
+  {
+    m_track = rhs.m_track;
+    m_queue = rhs.m_queue;
+    return *this;
+  }
+
+  explicit BasicTaskScheduler(memory_pool const & arg_memory_pool) noexcept
+    : m_track(), m_queue(0)
     {
       typedef Kokkos::Impl::SharedAllocationRecord
         < memory_space , typename queue_type::Destroy >
@@ -455,13 +265,13 @@ public:
       m_track.assign_allocated_record_to_uninitialized( record );
     }
 
-  TaskScheduler( memory_space const & arg_memory_space
+  BasicTaskScheduler( memory_space const & arg_memory_space
                , size_t const mempool_capacity
                , unsigned const mempool_min_block_size  // = 1u << 6
                , unsigned const mempool_max_block_size  // = 1u << 10
                , unsigned const mempool_superblock_size // = 1u << 12
                )
-    : TaskScheduler( memory_pool( arg_memory_space
+    : BasicTaskScheduler( memory_pool( arg_memory_space
                                 , mempool_capacity
                                 , mempool_min_block_size
                                 , mempool_max_block_size
@@ -470,6 +280,12 @@ public:
 
   //----------------------------------------
 
+  KOKKOS_INLINE_FUNCTION
+  queue_type& queue() const noexcept {
+    KOKKOS_EXPECTS(m_queue != nullptr);
+    return *m_queue;
+  }
+
   KOKKOS_INLINE_FUNCTION
   memory_pool * memory() const noexcept
     { return m_queue ? &( m_queue->m_memory ) : (memory_pool*) 0 ; }
@@ -486,216 +302,173 @@ public:
   size_t when_all_allocation_size( int narg ) const
     { return m_queue->when_all_allocation_size( narg ); }
 
+
   //----------------------------------------
 
-  template< int TaskEnum , typename DepFutureType , typename FunctorType >
+  template <int TaskEnum, typename DepFutureType, typename FunctorType>
   KOKKOS_FUNCTION static
-  Kokkos::Future< typename FunctorType::value_type , execution_space >
-  spawn( Impl::TaskPolicyData<TaskEnum,DepFutureType> const & arg_policy
-       , typename task_base::function_type                    arg_function
-       , FunctorType                                       && arg_functor
-       )
-    {
-      using value_type  = typename FunctorType::value_type ;
-      using future_type = Future< value_type , execution_space > ;
-      using task_type   = Impl::TaskBase< execution_space
-                                        , value_type
-                                        , FunctorType > ;
-
-      queue_type * const queue =
-        arg_policy.m_scheduler ? arg_policy.m_scheduler->m_queue : (
-        arg_policy.m_dependence.m_task
-          ? static_cast<queue_type*>(arg_policy.m_dependence.m_task->m_queue)
-          : (queue_type*) 0 );
-
-      if ( 0 == queue ) {
-        Kokkos::abort("Kokkos spawn requires scheduler or non-null Future");
-      }
-
-      if ( arg_policy.m_dependence.m_task != 0 &&
-           arg_policy.m_dependence.m_task->m_queue != queue ) {
-        Kokkos::abort("Kokkos spawn given incompatible scheduler and Future");
-      }
-
-      //----------------------------------------
-      // Give single-thread back-ends an opportunity to clear
-      // queue of ready tasks before allocating a new task
-
-      queue->iff_single_thread_recursive_execute();
-
-      //----------------------------------------
-
-      future_type f ;
-
-      // Allocate task from memory pool
-
-      const size_t alloc_size =
-        queue->template spawn_allocation_size< FunctorType >();
-
-      f.m_task =
-        reinterpret_cast< task_type * >(queue->allocate(alloc_size) );
-
-      if ( f.m_task ) {
-
-        // Placement new construction
-        // Reference count starts at two:
-        //   +1 for the matching decrement when task is complete
-        //   +1 for the future
-        new ( f.m_task ) task_type( std::move(arg_functor) );
-
-        f.m_task->m_apply      = arg_function ;
-        f.m_task->m_queue      = queue ;
-        f.m_task->m_next       = arg_policy.m_dependence.m_task ;
-        f.m_task->m_ref_count  = 2 ;
-        f.m_task->m_alloc_size = alloc_size ;
-        f.m_task->m_task_type  = arg_policy.m_task_type ;
-        f.m_task->m_priority   = arg_policy.m_priority ;
-
-        Kokkos::memory_fence();
-
-        // The dependence (if any) is processed immediately
-        // within the schedule function, as such the dependence's
-        // reference count does not need to be incremented for
-        // the assignment.
-
-        queue->schedule_runnable( f.m_task );
-        // This task may be updated or executed at any moment,
-        // even during the call to 'schedule'.
-      }
-
-      return f ;
-    }
-
-  template< typename FunctorType , typename A1 , typename A2 >
+  Kokkos::BasicFuture<typename FunctorType::value_type, scheduler_type>
+  spawn(
+    Impl::TaskPolicyWithScheduler<TaskEnum, scheduler_type, DepFutureType>&& arg_policy,
+    typename task_base::function_type arg_function,
+    typename task_base::destroy_type arg_destroy,
+    FunctorType&& arg_functor
+  )
+  {
+    return std::move(arg_policy.scheduler()).template _spawn_impl<TaskEnum>(
+      _get_task_ptr(std::move(arg_policy.predecessor())),
+      arg_policy.priority(),
+      arg_function,
+      arg_destroy,
+      std::forward<FunctorType>(arg_functor)
+    );
+  }
+
+  template <int TaskEnum, typename DepFutureType, typename FunctorType>
+  KOKKOS_FUNCTION
+  future_type_for_functor<typename std::decay<FunctorType>::type>
+  spawn(
+    Impl::TaskPolicyWithPredecessor<TaskEnum, DepFutureType>&& arg_policy,
+    FunctorType&& arg_functor
+  )
+  {
+    using task_type = runnable_task_type<FunctorType>;
+    typename task_type::function_type const ptr = task_type::apply;
+    typename task_type::destroy_type const dtor = task_type::destroy;
+
+    return _spawn_impl<TaskEnum>(
+      _get_task_ptr(std::move(arg_policy).predecessor()),
+      arg_policy.priority(),
+      ptr, dtor,
+      std::forward<FunctorType>(arg_functor)
+    );
+  }
+
+  template<typename FunctorType, typename ValueType, typename Scheduler>
   KOKKOS_FUNCTION static
   void
-  respawn( FunctorType         * arg_self
-         , Future<A1,A2> const & arg_dependence
-         , TaskPriority  const & arg_priority
-         )
-    {
-      // Precondition: task is in Executing state
+  respawn(
+    FunctorType* arg_self,
+    BasicFuture<ValueType,Scheduler> const & arg_dependence,
+    TaskPriority  const & arg_priority
+  ) {
+    // Precondition: task is in Executing state
 
-      using value_type  = typename FunctorType::value_type ;
-      using task_type   = Impl::TaskBase< execution_space
-                                        , value_type
-                                        , FunctorType > ;
+    using value_type  = typename FunctorType::value_type ;
+    using task_type = Impl::Task<BasicTaskScheduler, value_type, FunctorType>;
 
-      task_type * const task = static_cast< task_type * >( arg_self );
+    task_type * const task = static_cast< task_type * >( arg_self );
 
-      task->m_priority = static_cast<int>(arg_priority);
+    task->m_priority = static_cast<int>(arg_priority);
 
-      task->add_dependence( arg_dependence.m_task );
+    task->add_dependence( arg_dependence.m_task );
 
-      // Postcondition: task is in Executing-Respawn state
-    }
+    // Postcondition: task is in Executing-Respawn state
+  }
 
   template< typename FunctorType >
   KOKKOS_FUNCTION static
   void
-  respawn( FunctorType         * arg_self
-         , TaskScheduler const &
-         , TaskPriority  const & arg_priority
-         )
-    {
-      // Precondition: task is in Executing state
+  respawn(
+    FunctorType* arg_self,
+    BasicTaskScheduler const &,
+    TaskPriority  const & arg_priority
+  )
+  {
+    // Precondition: task is in Executing state
 
-      using value_type  = typename FunctorType::value_type ;
-      using task_type   = Impl::TaskBase< execution_space
-                                        , value_type
-                                        , FunctorType > ;
+    using value_type = typename FunctorType::value_type;
+    using task_type = Impl::Task<BasicTaskScheduler, value_type, FunctorType>;
 
-      task_type * const task = static_cast< task_type * >( arg_self );
+    task_type * const task = static_cast< task_type * >( arg_self );
 
-      task->m_priority = static_cast<int>(arg_priority);
+    task->m_priority = static_cast<int>(arg_priority);
 
-      task->add_dependence( (task_base*) 0 );
+    task->add_dependence( (task_base*) 0 );
 
-      // Postcondition: task is in Executing-Respawn state
-    }
+    // Postcondition: task is in Executing-Respawn state
+  }
 
   //----------------------------------------
   /**\brief  Return a future that is complete
    *         when all input futures are complete.
    */
-  template< typename A1 , typename A2 >
-  KOKKOS_FUNCTION static
-  Future< execution_space >
-  when_all( Future< A1 , A2 > const arg[] , int narg )
-    {
-      using future_type = Future< execution_space > ;
+  template<typename ValueType>
+  KOKKOS_FUNCTION
+  BasicFuture< void, scheduler_type >
+  when_all(BasicFuture<ValueType, BasicTaskScheduler> const arg[], int narg)
+  {
 
-      future_type f ;
+    future_type<void> f ;
 
-      if ( narg ) {
+    if ( narg ) {
 
-        queue_type * queue = 0 ;
+      queue_type* q = m_queue;
 
-        for ( int i = 0 ; i < narg ; ++i ) {
-          task_base * const t = arg[i].m_task ;
-          if ( 0 != t ) {
-            // Increment reference count to track subsequent assignment.
-            Kokkos::atomic_increment( &(t->m_ref_count) );
-            if ( queue == 0 ) {
-              queue = static_cast< queue_type * >( t->m_queue );
-            }
-            else if ( queue != static_cast< queue_type * >( t->m_queue ) ) {
-              Kokkos::abort("Kokkos when_all Futures must be in the same scheduler" );
-            }
+      //BasicTaskScheduler const* scheduler_ptr = nullptr;
+
+      for ( int i = 0 ; i < narg ; ++i ) {
+        task_base * const t = arg[i].m_task ;
+        if ( nullptr != t ) {
+          // Increment reference count to track subsequent assignment.
+          Kokkos::atomic_increment( &(t->m_ref_count) );
+          if(q != static_cast< queue_type const* >(t->m_queue)) {
+            Kokkos::abort("Kokkos when_all Futures must be in the same scheduler" );
           }
         }
+      }
 
-        if ( queue != 0 ) {
+      if ( q != 0 ) { // this should probably handle the queue == 0 case, but this is deprecated code anyway
 
-          size_t const alloc_size = queue->when_all_allocation_size( narg );
+        size_t const alloc_size = q->when_all_allocation_size( narg );
 
-          f.m_task =
-            reinterpret_cast< task_base * >( queue->allocate( alloc_size ) );
+        f.m_task =
+          reinterpret_cast< task_base * >( q->allocate( alloc_size ) );
+        //f.m_scheduler = *scheduler_ptr;
 
-          if ( f.m_task ) {
+        if ( f.m_task ) {
 
-            // Reference count starts at two:
-            // +1 to match decrement when task completes
-            // +1 for the future
+          // Reference count starts at two:
+          // +1 to match decrement when task completes
+          // +1 for the future
 
-            new( f.m_task ) task_base();
+          new( f.m_task ) task_base();
 
-            f.m_task->m_queue      = queue ;
-            f.m_task->m_ref_count  = 2 ;
-            f.m_task->m_alloc_size = alloc_size ;
-            f.m_task->m_dep_count  = narg ;
-            f.m_task->m_task_type  = task_base::Aggregate ;
+          f.m_task->m_queue = q;
+          f.m_task->m_ref_count = 2 ;
+          f.m_task->m_alloc_size = static_cast<int32_t>(alloc_size);
+          f.m_task->m_dep_count = narg ;
+          f.m_task->m_task_type = task_base::Aggregate ;
 
-            // Assign dependences, reference counts were already incremented
+          // Assign dependences, reference counts were already incremented
 
-            task_base * volatile * const dep =
-              f.m_task->aggregate_dependences();
+          task_base * volatile * const dep =
+            f.m_task->aggregate_dependences();
 
-            for ( int i = 0 ; i < narg ; ++i ) { dep[i] = arg[i].m_task ; }
+          for ( int i = 0 ; i < narg ; ++i ) { dep[i] = arg[i].m_task ; }
 
-            Kokkos::memory_fence();
+          Kokkos::memory_fence();
 
-            queue->schedule_aggregate( f.m_task );
-            // this when_all may be processed at any moment
-          }
+          q->schedule_aggregate( f.m_task );
+          // this when_all may be processed at any moment
         }
       }
-
-      return f ;
     }
 
+    return f ;
+  }
+
   template < class F >
   KOKKOS_FUNCTION
-  Future< execution_space >
+  BasicFuture< void, scheduler_type >
   when_all( int narg , F const func )
     {
       using input_type  = decltype( func(0) );
-      using future_type = Future< execution_space > ;
 
       static_assert( is_future< input_type >::value
                    , "Functor must return a Kokkos::Future" );
 
-      future_type f ;
+      future_type<void> f ;
 
       if ( 0 == narg ) return f ;
 
@@ -711,12 +484,16 @@ public:
         // +1 for the future
 
         new( f.m_task ) task_base();
+        //f.m_scheduler = *this;
 
-        f.m_task->m_queue      = m_queue ;
-        f.m_task->m_ref_count  = 2 ;
-        f.m_task->m_alloc_size = alloc_size ;
-        f.m_task->m_dep_count  = narg ;
-        f.m_task->m_task_type  = task_base::Aggregate ;
+        //f.m_task->m_scheduler = &f.m_scheduler;
+        f.m_task->m_queue = m_queue;
+        f.m_task->m_ref_count = 2 ;
+        f.m_task->m_alloc_size = static_cast<int32_t>(alloc_size);
+        f.m_task->m_dep_count = narg ;
+        f.m_task->m_task_type = task_base::Aggregate ;
+        //f.m_task->m_apply = nullptr;
+        //f.m_task->m_destroy = nullptr;
 
         // Assign dependences, reference counts were already incremented
 
@@ -727,9 +504,10 @@ public:
           const input_type arg_f = func(i);
           if ( 0 != arg_f.m_task ) {
 
-            if ( m_queue != static_cast< queue_type * >( arg_f.m_task->m_queue ) ) {
-              Kokkos::abort("Kokkos when_all Futures must be in the same scheduler" );
-            }
+            // Not scheduled, so task scheduler is not yet set
+            //if ( m_queue != static_cast< BasicTaskScheduler const * >( arg_f.m_task->m_scheduler )->m_queue ) {
+            //  Kokkos::abort("Kokkos when_all Futures must be in the same scheduler" );
+            //}
             // Increment reference count to track subsequent assignment.
             Kokkos::atomic_increment( &(arg_f.m_task->m_ref_count) );
             dep[i] = arg_f.m_task ;
@@ -764,9 +542,9 @@ public:
 
   //----------------------------------------
 
-  template< typename S >
+  template<class S, class Q>
   friend
-  void Kokkos::wait( Kokkos::TaskScheduler< S > const & );
+  void wait(Kokkos::BasicTaskScheduler<S, Q> const&);
 
 };
 
@@ -780,84 +558,122 @@ namespace Kokkos {
 //----------------------------------------------------------------------------
 // Construct a TaskTeam execution policy
 
-template< typename T >
-Kokkos::Impl::TaskPolicyData
-  < Kokkos::Impl::TaskBase<void,void,void>::TaskTeam
-  , typename std::conditional< Kokkos::is_future< T >::value , T ,
-    typename Kokkos::Future< typename T::execution_space > >::type
-  >
+template <class T, class Scheduler>
+Impl::TaskPolicyWithPredecessor<
+  Impl::TaskType::TaskTeam,
+  Kokkos::BasicFuture<T, Scheduler>
+>
 KOKKOS_INLINE_FUNCTION
-TaskTeam( T            const & arg
-        , TaskPriority const & arg_priority = TaskPriority::Regular
-        )
+TaskTeam(
+  Kokkos::BasicFuture<T, Scheduler> arg_future,
+  TaskPriority arg_priority = TaskPriority::Regular
+)
 {
-  static_assert( Kokkos::is_future<T>::value ||
-                 Kokkos::is_scheduler<T>::value
-               , "Kokkos TaskTeam argument must be Future or TaskScheduler" );
-
-  return
-    Kokkos::Impl::TaskPolicyData
-      < Kokkos::Impl::TaskBase<void,void,void>::TaskTeam
-      , typename std::conditional< Kokkos::is_future< T >::value , T ,
-        typename Kokkos::Future< typename T::execution_space > >::type
-      >( arg , arg_priority );
+  return { std::move(arg_future), arg_priority };
 }
 
-template< typename E , typename F >
-Kokkos::Impl::
-  TaskPolicyData< Kokkos::Impl::TaskBase<void,void,void>::TaskTeam , F >
+template <class Scheduler>
+Impl::TaskPolicyWithScheduler<
+  Impl::TaskType::TaskTeam, Scheduler
+>
 KOKKOS_INLINE_FUNCTION
-TaskTeam( TaskScheduler<E> const & arg_scheduler
-        , F                const & arg_future
-        , typename std::enable_if< Kokkos::is_future<F>::value ,
-            TaskPriority >::type const & arg_priority = TaskPriority::Regular
-        )
+TaskTeam(
+  Scheduler arg_scheduler,
+  typename std::enable_if<
+    Kokkos::is_scheduler<Scheduler>::value,
+    TaskPriority
+  >::type arg_priority = TaskPriority::Regular
+)
 {
-  return
-    Kokkos::Impl::TaskPolicyData
-      < Kokkos::Impl::TaskBase<void,void,void>::TaskTeam , F >
-        ( arg_scheduler , arg_future , arg_priority );
+  return { std::move(arg_scheduler), arg_priority };
+}
+
+template<
+  class Scheduler,
+  class PredecessorFuture
+>
+Impl::TaskPolicyWithScheduler<
+  Kokkos::Impl::TaskType::TaskTeam,
+  Scheduler,
+  PredecessorFuture
+>
+KOKKOS_INLINE_FUNCTION
+TaskTeam(
+  Scheduler arg_scheduler,
+  PredecessorFuture arg_future,
+  typename std::enable_if<
+    Kokkos::is_scheduler<Scheduler>::value
+      && Kokkos::is_future<PredecessorFuture>::value,
+    TaskPriority
+  >::type arg_priority = TaskPriority::Regular
+)
+{
+  static_assert(
+    std::is_same<typename PredecessorFuture::scheduler_type, Scheduler>::value,
+    "Can't create a task policy from a scheduler and a future from a different scheduler"
+  );
+
+  return { std::move(arg_scheduler), std::move(arg_future), arg_priority };
 }
 
 // Construct a TaskSingle execution policy
 
-template< typename T >
-Kokkos::Impl::TaskPolicyData
-  < Kokkos::Impl::TaskBase<void,void,void>::TaskSingle
-  , typename std::conditional< Kokkos::is_future< T >::value , T ,
-    typename Kokkos::Future< typename T::execution_space > >::type
-  >
+template <class T, class Scheduler>
+Impl::TaskPolicyWithPredecessor<
+  Impl::TaskType::TaskSingle,
+  Kokkos::BasicFuture<T, Scheduler>
+>
 KOKKOS_INLINE_FUNCTION
-TaskSingle( T            const & arg
-          , TaskPriority const & arg_priority = TaskPriority::Regular
-          )
+TaskSingle(
+  Kokkos::BasicFuture<T, Scheduler> arg_future,
+  TaskPriority arg_priority = TaskPriority::Regular
+)
 {
-  static_assert( Kokkos::is_future<T>::value ||
-                 Kokkos::is_scheduler<T>::value
-               , "Kokkos TaskSingle argument must be Future or TaskScheduler" );
-
-  return
-    Kokkos::Impl::TaskPolicyData
-      < Kokkos::Impl::TaskBase<void,void,void>::TaskSingle
-      , typename std::conditional< Kokkos::is_future< T >::value , T ,
-        typename Kokkos::Future< typename T::execution_space > >::type
-      >( arg , arg_priority );
+  return { std::move(arg_future), arg_priority };
 }
 
-template< typename E , typename F >
-Kokkos::Impl::
-  TaskPolicyData< Kokkos::Impl::TaskBase<void,void,void>::TaskSingle , F >
+template <class Scheduler>
+Impl::TaskPolicyWithScheduler<
+  Impl::TaskType::TaskSingle, Scheduler
+>
 KOKKOS_INLINE_FUNCTION
-TaskSingle( TaskScheduler<E> const & arg_scheduler
-          , F                const & arg_future
-          , typename std::enable_if< Kokkos::is_future<F>::value ,
-              TaskPriority >::type const & arg_priority = TaskPriority::Regular
-          )
+TaskSingle(
+  Scheduler arg_scheduler,
+  typename std::enable_if<
+    Kokkos::is_scheduler<Scheduler>::value,
+    TaskPriority
+  >::type arg_priority = TaskPriority::Regular
+)
 {
-  return
-    Kokkos::Impl::TaskPolicyData
-      < Kokkos::Impl::TaskBase<void,void,void>::TaskSingle , F >
-        ( arg_scheduler , arg_future , arg_priority );
+  return { std::move(arg_scheduler), arg_priority };
+}
+
+template<
+  class Scheduler,
+  class PredecessorFuture
+>
+Impl::TaskPolicyWithScheduler<
+  Kokkos::Impl::TaskType::TaskSingle,
+  Scheduler,
+  PredecessorFuture
+>
+KOKKOS_INLINE_FUNCTION
+TaskSingle(
+  Scheduler arg_scheduler,
+  PredecessorFuture arg_future,
+  typename std::enable_if<
+    Kokkos::is_scheduler<Scheduler>::value
+      && Kokkos::is_future<PredecessorFuture>::value,
+    TaskPriority
+  >::type arg_priority = TaskPriority::Regular
+)
+{
+  static_assert(
+    std::is_same<typename PredecessorFuture::scheduler_type, Scheduler>::value,
+    "Can't create a task policy from a scheduler and a future from a different scheduler"
+  );
+
+  return { std::move(arg_scheduler), std::move(arg_future), arg_priority };
 }
 
 //----------------------------------------------------------------------------
@@ -868,34 +684,31 @@ TaskSingle( TaskScheduler<E> const & arg_scheduler
  *  2) With scheduler or dependence
  *  3) High, Normal, or Low priority
  */
-template< int TaskEnum
-        , typename DepFutureType
-        , typename FunctorType >
-Future< typename FunctorType::value_type
-      , typename DepFutureType::execution_space >
-host_spawn( Impl::TaskPolicyData<TaskEnum,DepFutureType> const & arg_policy
-          , FunctorType                                       && arg_functor
-          )
-{
-  using exec_space = typename DepFutureType::execution_space ;
-  using scheduler  = TaskScheduler< exec_space > ;
-
-  typedef Impl::TaskBase< exec_space
-                        , typename FunctorType::value_type
-                        , FunctorType
-                        > task_type ;
-
-  static_assert( TaskEnum == task_type::TaskTeam ||
-                 TaskEnum == task_type::TaskSingle
-               , "Kokkos host_spawn requires TaskTeam or TaskSingle" );
+template<int TaskEnum, typename Scheduler, typename DepFutureType, typename FunctorType>
+typename Scheduler::template future_type_for_functor<typename std::decay<FunctorType>::type>
+host_spawn(
+  Impl::TaskPolicyWithScheduler<TaskEnum, Scheduler, DepFutureType> arg_policy,
+  FunctorType&& arg_functor
+) {
+  using scheduler_type = Scheduler;
+  using task_type =
+    typename scheduler_type::template runnable_task_type<FunctorType>;
+
+  static_assert(
+    TaskEnum == Impl::TaskType::TaskTeam || TaskEnum == Impl::TaskType::TaskSingle,
+    "Kokkos host_spawn requires TaskTeam or TaskSingle"
+  );
 
   // May be spawning a Cuda task, must use the specialization
   // to query on-device function pointer.
-  typename task_type::function_type const ptr =
-    Kokkos::Impl::TaskQueueSpecialization< exec_space >::
-      template get_function_pointer< task_type >();
-
-  return scheduler::spawn( arg_policy , ptr , std::move(arg_functor) );
+  typename task_type::function_type ptr;
+  typename task_type::destroy_type dtor;
+  Kokkos::Impl::TaskQueueSpecialization< scheduler_type >::
+    template get_function_pointer< task_type >(ptr, dtor);
+
+  return scheduler_type::spawn(
+    std::move(arg_policy), ptr, dtor, std::forward<FunctorType>(arg_functor)
+  );
 }
 
 /**\brief  A task spawns a task with options
@@ -904,39 +717,38 @@ host_spawn( Impl::TaskPolicyData<TaskEnum,DepFutureType> const & arg_policy
  *  2) With scheduler or dependence
  *  3) High, Normal, or Low priority
  */
-template< int TaskEnum
-        , typename DepFutureType
-        , typename FunctorType >
-Future< typename FunctorType::value_type
-      , typename DepFutureType::execution_space >
+template<int TaskEnum, typename Scheduler, typename DepFutureType, typename FunctorType>
+typename Scheduler::template future_type_for_functor<typename std::decay<FunctorType>::type>
 KOKKOS_INLINE_FUNCTION
-task_spawn( Impl::TaskPolicyData<TaskEnum,DepFutureType> const & arg_policy
-          , FunctorType                                       && arg_functor
-          )
+task_spawn(
+  Impl::TaskPolicyWithScheduler<TaskEnum, Scheduler, DepFutureType> arg_policy,
+  FunctorType&& arg_functor
+)
 {
-  using exec_space = typename DepFutureType::execution_space ;
-  using scheduler  = TaskScheduler< exec_space > ;
+  using scheduler_type = Scheduler;
 
-  typedef Impl::TaskBase< exec_space
-                        , typename FunctorType::value_type
-                        , FunctorType
-                        > task_type ;
+  using task_type =
+    typename scheduler_type::template runnable_task_type<FunctorType>;
 
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) && \
-    defined( KOKKOS_ENABLE_CUDA )
+ #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) && \
+     defined( KOKKOS_ENABLE_CUDA )
 
-  static_assert( ! std::is_same< Kokkos::Cuda , exec_space >::value
-               , "Error calling Kokkos::task_spawn for Cuda space within Host code" );
+   static_assert( ! std::is_same< Kokkos::Cuda , typename Scheduler::execution_space >::value
+                , "Error calling Kokkos::task_spawn for Cuda space within Host code" );
 
-#endif
+ #endif
 
-  static_assert( TaskEnum == task_type::TaskTeam ||
-                 TaskEnum == task_type::TaskSingle
-               , "Kokkos host_spawn requires TaskTeam or TaskSingle" );
+  static_assert(
+    TaskEnum == Impl::TaskType::TaskTeam || TaskEnum == Impl::TaskType::TaskSingle,
+    "Kokkos task_spawn requires TaskTeam or TaskSingle"
+  );
 
   typename task_type::function_type const ptr = task_type::apply ;
+  typename task_type::destroy_type const dtor = task_type::destroy ;
 
-  return scheduler::spawn( arg_policy , ptr , std::move(arg_functor) );
+  return scheduler_type::spawn(std::move(arg_policy), ptr, dtor,
+    std::forward<FunctorType>(arg_functor)
+  );
 }
 
 /**\brief  A task respawns itself with options
@@ -956,36 +768,42 @@ respawn( FunctorType         * arg_self
                  Kokkos::is_scheduler<T>::value
                , "Kokkos respawn argument must be Future or TaskScheduler" );
 
-  TaskScheduler< typename T::execution_space >::
-    respawn( arg_self , arg , arg_priority );
+  T::scheduler_type::respawn(
+    arg_self , arg , arg_priority
+  );
 }
 
 //----------------------------------------------------------------------------
 
-template< typename A1 , typename A2 >
-KOKKOS_INLINE_FUNCTION
-Future< typename Future< A1 , A2 >::execution_space >
-when_all( Future< A1 , A2 > const arg[]
-        , int                     narg
-        )
-{
-  return TaskScheduler< typename Future<A1,A2>::execution_space >::
-    when_all( arg , narg );
-}
+//template<typename ValueType, typename Scheduler>
+//KOKKOS_INLINE_FUNCTION
+//BasicFuture<void, Scheduler>
+//when_all(BasicFuture<ValueType, Scheduler> const arg[], int narg)
+//{
+//  return BasicFuture<void, Scheduler>::scheduler_type::when_all(arg, narg);
+//}
 
 //----------------------------------------------------------------------------
 // Wait for all runnable tasks to complete
 
-template< typename ExecSpace >
+template<class ExecSpace, class QueueType>
 inline
-void wait( TaskScheduler< ExecSpace > const & scheduler )
-{ scheduler.m_queue->execute(); }
+void wait(BasicTaskScheduler<ExecSpace, QueueType> const& scheduler)
+{
+  using scheduler_type = BasicTaskScheduler<ExecSpace, QueueType>;
+  scheduler_type::specialization::execute(scheduler);
+  //scheduler.m_queue->execute();
+}
 
 } // namespace Kokkos
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 
+////////////////////////////////////////////////////////////////////////////////
+// END OLD CODE
+////////////////////////////////////////////////////////////////////////////////
+
 #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
 #endif /* #ifndef KOKKOS_TASKSCHEDULER_HPP */
 
diff --git a/packages/kokkos/core/src/Kokkos_TaskScheduler_fwd.hpp b/packages/kokkos/core/src/Kokkos_TaskScheduler_fwd.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..79d502c729793569bc4261f03db1378217f10429
--- /dev/null
+++ b/packages/kokkos/core/src/Kokkos_TaskScheduler_fwd.hpp
@@ -0,0 +1,249 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_TASKSCHEDULER_FWD_HPP
+#define KOKKOS_TASKSCHEDULER_FWD_HPP
+
+//----------------------------------------------------------------------------
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_Core_fwd.hpp>
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
+// Forward declarations used in Impl::TaskQueue
+
+template <typename ValueType, typename Scheduler>
+class BasicFuture;
+
+template <class Space, class Queue>
+class SimpleTaskScheduler;
+
+template <class Space, class Queue>
+class BasicTaskScheduler;
+
+template< typename Space >
+struct is_scheduler : public std::false_type {};
+
+template<class Space, class Queue>
+struct is_scheduler<BasicTaskScheduler<Space, Queue>> : public std::true_type {};
+
+template<class Space, class Queue>
+struct is_scheduler<SimpleTaskScheduler<Space, Queue>> : public std::true_type {};
+
+enum class TaskPriority : int {
+  High = 0,
+  Regular = 1,
+  Low = 2
+};
+
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
+template <class Device>
+class MemoryPool;
+
+namespace Impl {
+
+template <class TaskQueueTraits>
+class TaskNode;
+
+class TaskBase;
+
+/*\brief  Implementation data for task data management, access, and execution.
+ *  (Deprecated)
+ *  CRTP Inheritance structure to allow static_cast from the
+ *  task root type and a task's FunctorType.
+ *
+ *    TaskBase< Space , ResultType , FunctorType >
+ *      : TaskBase< Space , ResultType , void >
+ *      , FunctorType
+ *      { ... };
+ *
+ *    TaskBase< Space , ResultType , void >
+ *      : TaskBase< Space , void , void >
+ *      { ... };
+ */
+template< typename Space , typename ResultType , typename FunctorType >
+class Task;
+
+class TaskQueueBase;
+
+template< typename Space, typename MemorySpace>
+class TaskQueue;
+
+template< typename ExecSpace, typename MemorySpace>
+class TaskQueueMultiple;
+
+template<
+  typename ExecSpace, typename MemSpace, typename TaskQueueTraits,
+  class MemoryPool = Kokkos::MemoryPool<Kokkos::Device<ExecSpace, MemSpace>>
+>
+class SingleTaskQueue;
+
+template< typename ExecSpace, typename MemSpace, typename TaskQueueTraits, class MemoryPool>
+class MultipleTaskQueue;
+
+struct TaskQueueTraitsLockBased;
+
+template <size_t CircularBufferSize=64>
+struct TaskQueueTraitsChaseLev;
+
+template< typename ResultType >
+struct TaskResult;
+
+struct TaskSchedulerBase;
+
+template <class ExecSpace>
+struct default_tasking_memory_space_for_execution_space
+{
+  using type = typename ExecSpace::memory_space;
+};
+
+#if defined( KOKKOS_ENABLE_CUDA )
+template <>
+struct default_tasking_memory_space_for_execution_space<Kokkos::Cuda>
+{
+  using type = Kokkos::CudaUVMSpace;
+};
+#endif
+
+template <class ExecSpace>
+using default_tasking_memory_space_for_execution_space_t =
+  typename default_tasking_memory_space_for_execution_space<ExecSpace>::type;
+
+} // namespace Impl
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
+template< typename Space >
+using DeprecatedTaskScheduler = BasicTaskScheduler<
+  Space,
+  Impl::TaskQueue<Space, Impl::default_tasking_memory_space_for_execution_space_t<Space>>
+>;
+
+template< typename Space >
+using DeprecatedTaskSchedulerMultiple = BasicTaskScheduler<
+  Space,
+  Impl::TaskQueueMultiple<Space, Impl::default_tasking_memory_space_for_execution_space_t<Space>>
+>;
+
+template< typename Space >
+using TaskScheduler = SimpleTaskScheduler<
+  Space,
+  Impl::SingleTaskQueue<
+    Space,
+    Impl::default_tasking_memory_space_for_execution_space_t<Space>,
+    Impl::TaskQueueTraitsLockBased
+  >
+>;
+
+template< typename Space >
+using TaskSchedulerMultiple = SimpleTaskScheduler<
+  Space,
+  Impl::MultipleTaskQueue<
+    Space,
+    Impl::default_tasking_memory_space_for_execution_space_t<Space>,
+    Impl::TaskQueueTraitsLockBased,
+    Kokkos::MemoryPool<
+      Kokkos::Device<
+        Space,
+        Impl::default_tasking_memory_space_for_execution_space_t<Space>
+      >
+    >
+  >
+>;
+
+template< typename Space >
+using ChaseLevTaskScheduler = SimpleTaskScheduler<
+  Space,
+  Impl::MultipleTaskQueue<
+    Space,
+    Impl::default_tasking_memory_space_for_execution_space_t<Space>,
+    Impl::TaskQueueTraitsChaseLev<>,
+    Kokkos::MemoryPool<
+      Kokkos::Device<
+        Space,
+        Impl::default_tasking_memory_space_for_execution_space_t<Space>
+      >
+    >
+  >
+>;
+
+template<class Space, class QueueType>
+void wait(BasicTaskScheduler<Space, QueueType> const&);
+
+namespace Impl {
+
+struct TaskSchedulerBase { };
+
+class TaskQueueBase { };
+
+template <typename Scheduler, typename EnableIfConstraint=void>
+class TaskQueueSpecializationConstrained { };
+
+template <typename Scheduler>
+struct TaskQueueSpecialization : TaskQueueSpecializationConstrained<Scheduler> { };
+
+template <int, typename>
+struct TaskPolicyData;
+
+
+} // end namespace Impl
+
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_TASKSCHEDULER_FWD_HPP */
+
diff --git a/packages/kokkos/core/src/Kokkos_Threads.hpp b/packages/kokkos/core/src/Kokkos_Threads.hpp
index d5e684e4ea26a91d05d2e73e7791596423a48ab9..03dab1acafe1215f0d3c963086d0d95f2e56e5e9 100644
--- a/packages/kokkos/core/src/Kokkos_Threads.hpp
+++ b/packages/kokkos/core/src/Kokkos_Threads.hpp
@@ -105,7 +105,13 @@ public:
   /// return asynchronously, before the functor completes.  This
   /// method does not return until all dispatched functors on this
   /// device have completed.
+  static void impl_static_fence();
+
+  #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
   static void fence();
+  #else
+  void fence() const;
+  #endif
 
   /** \brief  Return the maximum amount of concurrency.  */
   static int concurrency();
diff --git a/packages/kokkos/core/src/Kokkos_View.hpp b/packages/kokkos/core/src/Kokkos_View.hpp
index 754a0ab8c0b3e6985cf8617d5b287e6c16711bfa..3fe8e6f06731f51520dc6b0eb5bdd0d2c28afd70 100644
--- a/packages/kokkos/core/src/Kokkos_View.hpp
+++ b/packages/kokkos/core/src/Kokkos_View.hpp
@@ -74,7 +74,11 @@ template< class DataType , class ArrayLayout
 struct ViewDataAnalysis ;
 
 template< class , class ... >
-class ViewMapping { public: enum { is_assignable = false }; };
+class ViewMapping {
+  public:
+  enum { is_assignable_data_type = false };
+  enum { is_assignable = false };
+};
 
 
 
@@ -97,6 +101,7 @@ std::size_t count_valid_integers(const IntType i0,
 
 }
 
+#ifndef KOKKOS_ENABLE_DEPRECATED_CODE
 KOKKOS_INLINE_FUNCTION
 void runtime_check_rank_device(const size_t dyn_rank,
                         const bool is_void_spec,
@@ -109,8 +114,6 @@ void runtime_check_rank_device(const size_t dyn_rank,
                         const size_t i6,
                         const size_t i7 ){
 
-#ifndef KOKKOS_ENABLE_DEPRECATED_CODE
-
   if ( is_void_spec ) {
     const size_t num_passed_args = count_valid_integers(i0, i1, i2, i3,
         i4, i5, i6, i7);
@@ -121,10 +124,25 @@ void runtime_check_rank_device(const size_t dyn_rank,
 
     }
   }
-#endif
 }
+#else
+KOKKOS_INLINE_FUNCTION
+void runtime_check_rank_device(const size_t ,
+                        const bool ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t  ){
+
+}
+#endif
 
 #ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST
+#ifndef KOKKOS_ENABLE_DEPRECATED_CODE
 KOKKOS_INLINE_FUNCTION
 void runtime_check_rank_host(const size_t dyn_rank,
                         const bool is_void_spec,
@@ -137,7 +155,6 @@ void runtime_check_rank_host(const size_t dyn_rank,
                         const size_t i6,
                         const size_t i7, const std::string & label ){
 
-#ifndef KOKKOS_ENABLE_DEPRECATED_CODE
 
   if ( is_void_spec ) {
     const size_t num_passed_args = count_valid_integers(i0, i1, i2, i3,
@@ -150,8 +167,20 @@ void runtime_check_rank_host(const size_t dyn_rank,
       Kokkos::abort(message.c_str()) ;
     }
   }
-#endif
 }
+#else
+KOKKOS_INLINE_FUNCTION
+void runtime_check_rank_host(const size_t ,
+                        const bool ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t ,
+                        const size_t , const std::string &){}
+#endif
 #endif
 
 } /* namespace Impl */
@@ -362,8 +391,8 @@ public:
   typedef typename MemorySpace::size_type  size_type ;
 
   enum { is_hostspace      = std::is_same< MemorySpace , HostSpace >::value };
-  enum { is_managed        = MemoryTraits::Unmanaged    == 0 };
-  enum { is_random_access  = MemoryTraits::RandomAccess == 1 };
+  enum { is_managed        = MemoryTraits::is_unmanaged    == 0 };
+  enum { is_random_access  = MemoryTraits::is_random_access == 1 };
 
   //------------------------------------
 };
@@ -1965,7 +1994,10 @@ public:
 
   template< class RT , class ... RP >
   KOKKOS_INLINE_FUNCTION
-  View( const View<RT,RP...> & rhs )
+  View( const View<RT,RP...> & rhs,
+        typename std::enable_if<Kokkos::Impl::ViewMapping<
+        traits , typename View<RT,RP...>::traits , typename traits::specialize >::is_assignable_data_type>::type* = 0
+     )
     : m_track( rhs.m_track , traits::is_managed )
     , m_map()
     {
@@ -1977,7 +2009,9 @@ public:
 
   template< class RT , class ... RP >
   KOKKOS_INLINE_FUNCTION
-  View & operator = ( const View<RT,RP...> & rhs )
+  typename std::enable_if<Kokkos::Impl::ViewMapping<
+     traits , typename View<RT,RP...>::traits , typename traits::specialize >::is_assignable_data_type,
+     View>::type & operator = ( const View<RT,RP...> & rhs )
     {
       typedef typename View<RT,RP...>::traits  SrcTraits ;
       typedef Kokkos::Impl::ViewMapping< traits , SrcTraits , typename traits::specialize >  Mapping ;
@@ -1994,7 +2028,7 @@ public:
   template< class RT , class ... RP , class Arg0 , class ... Args >
   KOKKOS_INLINE_FUNCTION
   View( const View< RT , RP... > & src_view
-      , const Arg0 & arg0 , Args ... args )
+      , const Arg0 arg0 , Args ... args )
     : m_track( src_view.m_track , traits::is_managed )
     , m_map()
     {
@@ -2077,7 +2111,7 @@ public:
       }
 
       // Copy the input allocation properties with possibly defaulted properties
-      alloc_prop prop( arg_prop );
+      alloc_prop prop_copy( arg_prop );
 
 //------------------------------------------------------------
 #if defined( KOKKOS_ENABLE_CUDA )
@@ -2087,18 +2121,18 @@ public:
       // Fence using the trait's executon space (which will be Kokkos::Cuda)
       // to avoid incomplete type errors from usng Kokkos::Cuda directly.
       if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) {
-        traits::device_type::memory_space::execution_space::fence();
+        typename traits::device_type::memory_space::execution_space().fence();
       }
 #endif
 //------------------------------------------------------------
 
       Kokkos::Impl::SharedAllocationRecord<> *
-        record = m_map.allocate_shared( prop , arg_layout );
+        record = m_map.allocate_shared( prop_copy , arg_layout );
 
 //------------------------------------------------------------
 #if defined( KOKKOS_ENABLE_CUDA )
       if ( std::is_same< Kokkos::CudaUVMSpace , typename traits::device_type::memory_space >::value ) {
-        traits::device_type::memory_space::execution_space::fence();
+        typename traits::device_type::memory_space::execution_space().fence();
       }
 #endif
 //------------------------------------------------------------
diff --git a/packages/kokkos/core/src/Kokkos_WorkGraphPolicy.hpp b/packages/kokkos/core/src/Kokkos_WorkGraphPolicy.hpp
index 33a0579df55ac274190115fa518608eb8f47070a..dd5e29a400b52dbf432fefec3115f76ab1d67b11 100644
--- a/packages/kokkos/core/src/Kokkos_WorkGraphPolicy.hpp
+++ b/packages/kokkos/core/src/Kokkos_WorkGraphPolicy.hpp
@@ -55,7 +55,7 @@ class WorkGraphExec;
 namespace Kokkos {
 
 template< class ... Properties >
-class WorkGraphPolicy
+class WorkGraphPolicy: public Kokkos::Impl::PolicyTraits<Properties ... >
 {
 public:
 
@@ -64,7 +64,6 @@ public:
   using traits          = Kokkos::Impl::PolicyTraits<Properties ... >;
   using index_type      = typename traits::index_type;
   using member_type     = index_type;
-  using work_tag        = typename traits::work_tag;
   using execution_space = typename traits::execution_space;
   using memory_space    = typename execution_space::memory_space;
   using graph_type      = Kokkos::Crs<index_type,execution_space,void,index_type>;
@@ -217,7 +216,7 @@ public:
       using closure_type = Kokkos::Impl::ParallelFor<self_type, policy_type>;
       const closure_type closure(*this, policy_type(0, m_queue.size()));
       closure.execute();
-      execution_space::fence();
+      execution_space().fence();
     }
 
     { // execute-after counts
@@ -225,7 +224,7 @@ public:
       using closure_type = Kokkos::Impl::ParallelFor<self_type, policy_type>;
       const closure_type closure(*this,policy_type(0,m_graph.entries.size()));
       closure.execute();
-      execution_space::fence();
+      execution_space().fence();
     }
 
     { // Scheduling ready tasks
@@ -233,7 +232,7 @@ public:
       using closure_type = Kokkos::Impl::ParallelFor<self_type, policy_type>;
       const closure_type closure(*this,policy_type(0,m_graph.numRows()));
       closure.execute();
-      execution_space::fence();
+      execution_space().fence();
     }
   }
 };
@@ -256,4 +255,8 @@ public:
 #include "Threads/Kokkos_Threads_WorkGraphPolicy.hpp"
 #endif
 
+#ifdef KOKKOS_ENABLE_HPX
+#include "HPX/Kokkos_HPX_WorkGraphPolicy.hpp"
+#endif
+
 #endif /* #define KOKKOS_WORKGRAPHPOLICY_HPP */
diff --git a/packages/kokkos/core/src/Makefile b/packages/kokkos/core/src/Makefile
index c2dbddf45e98877756c0a86224d85d857ea06538..ae8dc17510d7c35154732221454c95dc399b92b5 100644
--- a/packages/kokkos/core/src/Makefile
+++ b/packages/kokkos/core/src/Makefile
@@ -40,6 +40,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
   CONDITIONAL_COPIES += copy-openmp
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+  CONDITIONAL_COPIES += copy-hpx
+endif
+
 ifeq ($(KOKKOS_INTERNAL_USE_ROCM), 1)
   CONDITIONAL_COPIES += copy-rocm
 endif
@@ -91,6 +95,10 @@ copy-openmp: mkdir
 	mkdir -p $(PREFIX)/include/OpenMP
 	$(CP) $(COPY_FLAG) $(KOKKOS_HEADERS_OPENMP) $(PREFIX)/include/OpenMP
 
+copy-hpx: mkdir
+	mkdir -p $(PREFIX)/include/HPX
+	$(CP) $(COPY_FLAG) $(KOKKOS_HEADERS_HPX) $(PREFIX)/include/HPX
+
 copy-rocm: mkdir
 	mkdir -p $(PREFIX)/include/ROCm
 	$(CP) $(COPY_FLAG) $(KOKKOS_HEADERS_ROCM) $(PREFIX)/include/ROCm
diff --git a/packages/kokkos/core/src/Makefile.generate_build_files b/packages/kokkos/core/src/Makefile.generate_build_files
index cc856ee9a328ae1318d225739ee6c5609e03cfe9..651b9d5fe9df2f3a5217f8864bd691b500ec9bdf 100644
--- a/packages/kokkos/core/src/Makefile.generate_build_files
+++ b/packages/kokkos/core/src/Makefile.generate_build_files
@@ -84,6 +84,7 @@ generate_build_settings: $(KOKKOS_CONFIG_HEADER) $(KOKKOS_PKGCONFIG)
 	@$(call kokkos_append_var,KOKKOS_HEADERS_IMPL,'STRING "Kokkos headers impl list"')
 	@$(call kokkos_append_var,KOKKOS_HEADERS_CUDA,'STRING "Kokkos headers Cuda list"')
 	@$(call kokkos_append_var,KOKKOS_HEADERS_OPENMP,'STRING "Kokkos headers OpenMP list"')
+	@$(call kokkos_append_var,KOKKOS_HEADERS_HPX,'STRING "Kokkos headers HPX list"')
 	@$(call kokkos_append_var,KOKKOS_HEADERS_ROCM,'STRING "Kokkos headers ROCm list"')
 	@$(call kokkos_append_var,KOKKOS_HEADERS_THREADS,'STRING "Kokkos headers Threads list"')
 	@$(call kokkos_append_var,KOKKOS_HEADERS_QTHREADS,'STRING "Kokkos headers QThreads list"')
@@ -103,11 +104,13 @@ generate_build_settings: $(KOKKOS_CONFIG_HEADER) $(KOKKOS_PKGCONFIG)
 	@$(call kokkos_append_string,"#Internal settings which need to propagated for Kokkos examples")
 	@$(call kokkos_append_var,KOKKOS_INTERNAL_USE_CUDA,'STRING ""')
 	@$(call kokkos_append_var,KOKKOS_INTERNAL_USE_OPENMP,'STRING ""')
+	@$(call kokkos_append_var,KOKKOS_INTERNAL_USE_HPX,'STRING ""')
 	@$(call kokkos_append_var,KOKKOS_INTERNAL_USE_PTHREADS,'STRING ""')
 	@$(call kokkos_append_var,KOKKOS_INTERNAL_USE_SERIAL,'STRING ""')
 	@$(call kokkos_append_var,KOKKOS_INTERNAL_USE_ROCM,'STRING ""')
+	@$(call kokkos_append_var,KOKKOS_INTERNAL_USE_HPX,'STRING ""')
 	@$(call kokkos_append_var,KOKKOS_INTERNAL_USE_QTHREADS,'STRING ""') # Not in original cmake gen
-	@$(call kokkos_append_cmakefile "mark_as_advanced(KOKKOS_HEADERS KOKKOS_SRC KOKKOS_INTERNAL_USE_CUDA KOKKOS_INTERNAL_USE_OPENMP KOKKOS_INTERNAL_USE_PTHREADS KOKKOS_INTERNAL_USE_SERIAL)")
+	@$(call kokkos_append_cmakefile "mark_as_advanced(KOKKOS_HEADERS KOKKOS_SRC KOKKOS_INTERNAL_USE_CUDA KOKKOS_INTERNAL_USE_OPENMP KOKKOS_INTERNAL_USE_HPX KOKKOS_INTERNAL_USE_PTHREADS KOKKOS_INTERNAL_USE_SERIAL)")
 	@$(call kokkos_append_makefile,"")
 	@$(call kokkos_append_makefile,"#Fake kokkos-clean target")
 	@$(call kokkos_append_makefile,"kokkos-clean:")
diff --git a/packages/kokkos/core/src/Makefile.generate_header_lists b/packages/kokkos/core/src/Makefile.generate_header_lists
index cd308bf8f4a88328601105d08cbc37afed54deb9..afbefb380620cb0ebd525c46392c1a67ecdb69be 100644
--- a/packages/kokkos/core/src/Makefile.generate_header_lists
+++ b/packages/kokkos/core/src/Makefile.generate_header_lists
@@ -22,6 +22,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
   KOKKOS_HEADERS_OPENMP += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp)
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+  KOKKOS_HEADERS_HPX += $(wildcard $(KOKKOS_PATH)/core/src/HPX/*.hpp)
+endif
+
 ifeq ($(KOKKOS_INTERNAL_USE_ROCM), 1)
   KOKKOS_HEADERS_ROCM += $(wildcard $(KOKKOS_PATH)/core/src/ROCm/*.hpp)
 endif
diff --git a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Exec.cpp b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Exec.cpp
index e57b61d7cbf0aacc7db7fe29367051939157bc07..1946c107417e92bb3855a0681041761be44e394d 100644
--- a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Exec.cpp
+++ b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Exec.cpp
@@ -472,6 +472,10 @@ int OpenMP::concurrency() {
   return Impl::g_openmp_hardware_max_threads;
 }
 
+#ifndef KOKKOS_ENABLE_DEPRECATED_CODE
+void OpenMP::fence() const {}
+#endif
+
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
 
 void OpenMP::initialize( int thread_count , int, int )
diff --git a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Exec.hpp b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Exec.hpp
index 43fa7888cf7bd67f348a8b3db20aeb7df24a4dbf..5178199ac2f7f4aa59c18fe06c79c814bd581c61 100644
--- a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Exec.hpp
+++ b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Exec.hpp
@@ -184,8 +184,13 @@ int OpenMP::impl_thread_pool_rank() noexcept
 #endif
 }
 
+inline
+void OpenMP::impl_static_fence( OpenMP const& instance ) noexcept {}
+
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
 inline
 void OpenMP::fence( OpenMP const& instance ) noexcept {}
+#endif
 
 inline
 bool OpenMP::is_asynchronous( OpenMP const& instance ) noexcept
diff --git a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp
index e0bb572a3b15bcdc45fb2b8773761f64685418ae..ae6b49f650159d3dd923822db552129d94e30a2b 100644
--- a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp
+++ b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp
@@ -128,11 +128,10 @@ public:
       OpenMPExec::verify_is_master("Kokkos::OpenMP parallel_for");
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
-      const int pool_size = OpenMP::thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::thread_pool_size())
 #else
-      const int pool_size = OpenMP::impl_thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::impl_thread_pool_size())
 #endif
-      #pragma omp parallel num_threads(pool_size)
       {
         HostThreadTeamData & data = *(m_instance->get_thread_data());
 
@@ -228,11 +227,10 @@ public:
       OpenMPExec::verify_is_master("Kokkos::OpenMP parallel_for");
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
-      const int pool_size = OpenMP::thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::thread_pool_size())
 #else
-      const int pool_size = OpenMP::impl_thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::impl_thread_pool_size())
 #endif
-      #pragma omp parallel num_threads(pool_size)
       {
         HostThreadTeamData & data = *(m_instance->get_thread_data());
 
@@ -703,11 +701,10 @@ public:
                                     );
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
-      const int pool_size = OpenMP::thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::thread_pool_size())
 #else
-      const int pool_size = OpenMP::impl_thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::impl_thread_pool_size())
 #endif
-      #pragma omp parallel num_threads(pool_size)
       {
         HostThreadTeamData & data = *(m_instance->get_thread_data());
 
@@ -840,11 +837,10 @@ public:
                                     );
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
-      const int pool_size = OpenMP::thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::thread_pool_size())
 #else
-      const int pool_size = OpenMP::impl_thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::impl_thread_pool_size())
 #endif
-      #pragma omp parallel num_threads(pool_size)
       {
         HostThreadTeamData & data = *(m_instance->get_thread_data());
 
@@ -1005,11 +1001,10 @@ public:
                                     , thread_local_size );
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
-      const int pool_size = OpenMP::thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::thread_pool_size())
 #else
-      const int pool_size = OpenMP::impl_thread_pool_size();
+      #pragma omp parallel num_threads(OpenMP::impl_thread_pool_size())
 #endif
-      #pragma omp parallel num_threads(pool_size)
       {
         HostThreadTeamData & data = *(m_instance->get_thread_data());
 
diff --git a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.cpp b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.cpp
index 2f2c7684602ab439144d3199566bbaadf3384117..3b1c187c6d2e299232030678e612faaa6b934f28 100644
--- a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.cpp
+++ b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.cpp
@@ -48,6 +48,8 @@
 
 #include <impl/Kokkos_TaskQueue_impl.hpp>
 #include <impl/Kokkos_HostThreadTeam.hpp>
+#include <OpenMP/Kokkos_OpenMP_Task.hpp>
+#include <cassert>
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
@@ -55,200 +57,44 @@
 namespace Kokkos {
 namespace Impl {
 
-template class TaskQueue< Kokkos::OpenMP > ;
+template class TaskQueue< Kokkos::OpenMP, typename Kokkos::OpenMP::memory_space > ;
 
-class HostThreadTeamDataSingleton : private HostThreadTeamData {
-private:
-
-  HostThreadTeamDataSingleton() : HostThreadTeamData()
-    {
-      Kokkos::OpenMP::memory_space space ;
-      const size_t num_pool_reduce_bytes  =   32 ;
-      const size_t num_team_reduce_bytes  =   32 ;
-      const size_t num_team_shared_bytes  = 1024 ;
-      const size_t num_thread_local_bytes = 1024 ;
-      const size_t alloc_bytes =
-        HostThreadTeamData::scratch_size( num_pool_reduce_bytes
-                                        , num_team_reduce_bytes
-                                        , num_team_shared_bytes
-                                        , num_thread_local_bytes );
-
-      HostThreadTeamData::scratch_assign
-        ( space.allocate( alloc_bytes )
-        , alloc_bytes
-        , num_pool_reduce_bytes
-        , num_team_reduce_bytes
-        , num_team_shared_bytes
-        , num_thread_local_bytes );
-    }
-
-  ~HostThreadTeamDataSingleton()
-    {
-      Kokkos::OpenMP::memory_space space ;
-      space.deallocate( HostThreadTeamData::scratch_buffer()
-                      , HostThreadTeamData::scratch_bytes() );
-    }
-
-public:
-
-  static HostThreadTeamData & singleton()
-    {
-      static HostThreadTeamDataSingleton s ;
-      return s ;
-    }
-};
-
-//----------------------------------------------------------------------------
-
-void TaskQueueSpecialization< Kokkos::OpenMP >::execute
-  ( TaskQueue< Kokkos::OpenMP > * const queue )
+HostThreadTeamData& HostThreadTeamDataSingleton::singleton()
 {
-  using task_root_type  = TaskBase< void , void , void > ;
-  using Member          = Impl::HostThreadTeamMember< execution_space > ;
-
-  static task_root_type * const end =
-    (task_root_type *) task_root_type::EndTag ;
-
-
-  HostThreadTeamData & team_data_single =
-    HostThreadTeamDataSingleton::singleton();
-
-  Impl::OpenMPExec * instance = t_openmp_instance;
-#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
-  const int pool_size = OpenMP::thread_pool_size();
-#else
-  const int pool_size = OpenMP::impl_thread_pool_size();
-#endif
-
-  const int team_size = 1;  // Threads per core
-  instance->resize_thread_data( 0 /* global reduce buffer */
-                              , 512 * team_size /* team reduce buffer */
-                              , 0 /* team shared buffer */
-                              , 0 /* thread local buffer */
-                              );
-
-  #pragma omp parallel num_threads(pool_size)
-  {
-    Impl::HostThreadTeamData & self = *(instance->get_thread_data());
-
-    // Organizing threads into a team performs a barrier across the
-    // entire pool to insure proper initialization of the team
-    // rendezvous mechanism before a team rendezvous can be performed.
-
-    if ( self.organize_team( team_size ) ) {
-
-      Member single_exec( team_data_single );
-      Member team_exec( self );
-
-      // Loop until all queues are empty and no tasks in flight
-
-      task_root_type * task = 0 ;
-
-      do {
-        // Each team lead attempts to acquire either a thread team task
-        // or a single thread task for the team.
-
-        if ( 0 == team_exec.team_rank() ) {
-
-          bool leader_loop = false ;
-
-          do {
-
-            if ( 0 != task && end != task ) {
-              // team member #0 completes the previously executed task,
-              // completion may delete the task
-              queue->complete( task );
-            }
-
-            // If 0 == m_ready_count then set task = 0
-
-            task = 0 < *((volatile int *) & queue->m_ready_count) ? end : 0 ;
-
-            // Attempt to acquire a task
-            // Loop by priority and then type
-            for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) {
-              for ( int j = 0 ; j < 2 && end == task ; ++j ) {
-                task = queue_type::pop_ready_task( & queue->m_ready[i][j] );
-              }
-            }
-
-            // If still tasks are still executing
-            // and no task could be acquired
-            // then continue this leader loop
-            leader_loop = end == task ;
-
-            if ( ( ! leader_loop ) &&
-                 ( 0 != task ) &&
-                 ( task_root_type::TaskSingle == task->m_task_type ) ) {
-
-              // if a single thread task then execute now
-
-              (*task->m_apply)( task , & single_exec );
-
-              leader_loop = true ;
-            }
-          } while ( leader_loop );
-        }
-
-        // Team lead either found 0 == m_ready_count or a team task
-        // Team lead broadcast acquired task:
-
-        team_exec.team_broadcast( task , 0);
-
-        if ( 0 != task ) { // Thread Team Task
-
-          (*task->m_apply)( task , & team_exec );
-
-          // The m_apply function performs a barrier
-        }
-      } while( 0 != task );
-    }
-    self.disband_team();
-  }
+  static HostThreadTeamDataSingleton s;
+  return s;
 }
 
-void TaskQueueSpecialization< Kokkos::OpenMP >::
-  iff_single_thread_recursive_execute
-    ( TaskQueue< Kokkos::OpenMP > * const queue )
+HostThreadTeamDataSingleton::HostThreadTeamDataSingleton()
+  : HostThreadTeamData()
 {
-  using task_root_type  = TaskBase< void , void , void > ;
-  using Member          = Impl::HostThreadTeamMember< execution_space > ;
-
-#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
-  if ( 1 == OpenMP::thread_pool_size() )
-#else
-  if ( 1 == OpenMP::impl_thread_pool_size() )
-#endif
-  {
-
-    task_root_type * const end = (task_root_type *) task_root_type::EndTag ;
-
-    HostThreadTeamData & team_data_single =
-      HostThreadTeamDataSingleton::singleton();
-
-    Member single_exec( team_data_single );
-
-    task_root_type * task = end ;
-
-    do {
-
-      task = end ;
-
-      // Loop by priority and then type
-      for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) {
-        for ( int j = 0 ; j < 2 && end == task ; ++j ) {
-          task = queue_type::pop_ready_task( & queue->m_ready[i][j] );
-        }
-      }
-
-      if ( end == task ) break ;
-
-      (*task->m_apply)( task , & single_exec );
-
-      queue->complete( task );
+  Kokkos::OpenMP::memory_space space ;
+  const size_t num_pool_reduce_bytes  =   32 ;
+  const size_t num_team_reduce_bytes  =   32 ;
+  const size_t num_team_shared_bytes  = 1024 ;
+  const size_t num_thread_local_bytes = 1024 ;
+  const size_t alloc_bytes =
+    HostThreadTeamData::scratch_size( num_pool_reduce_bytes
+      , num_team_reduce_bytes
+      , num_team_shared_bytes
+      , num_thread_local_bytes );
+
+  HostThreadTeamData::scratch_assign
+    ( space.allocate( alloc_bytes )
+      , alloc_bytes
+      , num_pool_reduce_bytes
+      , num_team_reduce_bytes
+      , num_team_shared_bytes
+      , num_thread_local_bytes );
+}
 
-    } while(1);
-  }
+HostThreadTeamDataSingleton::~HostThreadTeamDataSingleton()
+{
+  Kokkos::OpenMP::memory_space space ;
+  space.deallocate(
+    HostThreadTeamData::scratch_buffer(),
+    static_cast<size_t>(HostThreadTeamData::scratch_bytes())
+  );
 }
 
 }} /* namespace Kokkos::Impl */
diff --git a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.hpp b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.hpp
index b99c149b06d7acf9d37c3dbc42ad12aafd62e893..4029c015b3ebf6a0c34b3036fea0bd7a58351d31 100644
--- a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.hpp
+++ b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Task.hpp
@@ -47,38 +47,388 @@
 #include <Kokkos_Macros.hpp>
 #if defined( KOKKOS_ENABLE_OPENMP ) && defined( KOKKOS_ENABLE_TASKDAG )
 
+#include <Kokkos_TaskScheduler_fwd.hpp>
+
+#include <impl/Kokkos_HostThreadTeam.hpp>
+#include <Kokkos_OpenMP.hpp>
+
+#include <type_traits>
+#include <cassert>
+
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 
 namespace Kokkos {
 namespace Impl {
 
-template<>
-class TaskQueueSpecialization< Kokkos::OpenMP >
+class HostThreadTeamDataSingleton : private HostThreadTeamData {
+private:
+
+  HostThreadTeamDataSingleton();
+  ~HostThreadTeamDataSingleton();
+
+public:
+
+  static HostThreadTeamData & singleton();
+
+};
+
+// Hack this as a partial specialization for now
+// TODO @tasking @cleanup DSH Make this the general class template and make the old code the partial specialization
+template <class QueueType>
+class TaskQueueSpecialization<
+  SimpleTaskScheduler<Kokkos::OpenMP, QueueType>
+>
 {
 public:
 
-  using execution_space = Kokkos::OpenMP ;
-  using queue_type      = Kokkos::Impl::TaskQueue< execution_space > ;
-  using task_base_type  = Kokkos::Impl::TaskBase< void , void , void > ;
-  using member_type     = Kokkos::Impl::HostThreadTeamMember< execution_space > ;
+  using execution_space = Kokkos::OpenMP;
+  using scheduler_type = SimpleTaskScheduler<Kokkos::OpenMP, QueueType>;
+  using member_type = TaskTeamMemberAdapter<
+    Kokkos::Impl::HostThreadTeamMember<execution_space>,
+    scheduler_type
+  >;
+  using memory_space = Kokkos::HostSpace;
+
+  enum : int { max_league_size = HostThreadTeamData::max_pool_members };
+
+  // Must provide task queue execution function
+  static void execute(scheduler_type const& scheduler)
+  {
+    using task_base_type = typename scheduler_type::task_base_type;
+
+    // Unused; ChaseLev queue still needs worker ID even in single case (so we need to use
+    // the thread data from inside of the parallel region.  Team size is fixed at 1 for now
+    // anyway
+    //HostThreadTeamData& team_data_single = HostThreadTeamDataSingleton::singleton();
+
+    // TODO @tasking @generalization DSH use scheduler.get_execution_space().impl() (or something like that) instead of the thread-local variable
+    Impl::OpenMPExec* instance = t_openmp_instance;
+    const int pool_size = get_max_team_count(scheduler.get_execution_space());
+
+    // TODO @tasking @new_feature DSH allow team sizes other than 1
+    const int team_size = 1;  // Threads per core
+    instance->resize_thread_data(
+      0, /* global reduce buffer */
+      512 * team_size, /* team reduce buffer */
+      0, /* team shared buffer */
+      0 /* thread local buffer */
+    );
+    assert(pool_size % team_size == 0);
+
+    auto& queue = scheduler.queue();
+
+    //queue.initialize_team_queues(pool_size / team_size);
+
+    #pragma omp parallel num_threads(pool_size)
+    {
+      Impl::HostThreadTeamData & self = *(instance->get_thread_data());
+
+      // Organizing threads into a team performs a barrier across the
+      // entire pool to insure proper initialization of the team
+      // rendezvous mechanism before a team rendezvous can be performed.
+
+      // organize_team() returns true if this is an active team member
+      if(self.organize_team(team_size)) {
+
+        member_type single_exec(scheduler, self);
+        member_type team_exec(scheduler, self);
+
+        auto& team_scheduler = team_exec.scheduler();
+
+        auto current_task = OptionalRef<task_base_type>(nullptr);
+
+        while(not queue.is_done()) {
+
+          // Each team lead attempts to acquire either a thread team task
+          // or a single thread task for the team.
+          if(team_exec.team_rank() == 0) {
+
+            // loop while both:
+            //   - the queue is not done
+            //   - the most recently popped task is a single task or empty
+            while(not queue.is_done()) {
+
+              current_task = queue.pop_ready_task(team_scheduler.team_scheduler_info());
+
+              if(current_task) {
+
+                if(current_task->is_team_runnable()) {
+                  // break out of the team leader loop to run the team task
+                  break;
+                }
+                else {
+                  KOKKOS_ASSERT(current_task->is_single_runnable());
+                  current_task->as_runnable_task().run(single_exec);
+                  // Respawns are handled in the complete function
+                  queue.complete(
+                    (*std::move(current_task)).as_runnable_task(),
+                    team_scheduler.team_scheduler_info()
+                  );
+                }
+
+              } // end if current_task is not null
+
+              current_task = nullptr;
+
+            } // end team leader loop
+
+          }
+
+          // Otherwise, make sure everyone in the team has the same task
+          team_exec.team_broadcast(current_task, 0);
+
+          if(current_task) {
+            KOKKOS_ASSERT(current_task->is_team_runnable());
+            current_task->as_runnable_task().run(team_exec);
+
+            if(team_exec.team_rank() == 0) {
+              // Respawns are handled in the complete function
+              queue.complete(
+                (*std::move(current_task)).as_runnable_task(),
+                team_scheduler.team_scheduler_info()
+              );
+            }
+
+          }
+
+        }
+      }
+      self.disband_team();
+    } // end pragma omp parallel
+  }
+
+  static uint32_t
+  get_max_team_count(execution_space const& espace) {
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+    return static_cast<uint32_t>(espace.thread_pool_size());
+#else
+    return static_cast<uint32_t>(espace.impl_thread_pool_size());
+#endif
+  }
+
+  // TODO @tasking @optimization DSH specialize this for trivially destructible types
+  template <typename TaskType>
+  static void
+  get_function_pointer(
+    typename TaskType::function_type& ptr,
+    typename TaskType::destroy_type& dtor
+  ) {
+    ptr = TaskType::apply;
+    dtor = TaskType::destroy;
+  }
+};
+
+
+template<class Scheduler>
+class TaskQueueSpecializationConstrained<
+  Scheduler,
+  typename std::enable_if<
+    std::is_same<typename Scheduler::execution_space, Kokkos::OpenMP>::value
+  >::type
+>
+{
+public:
 
-  // Must specify memory space
+  using execution_space = Kokkos::OpenMP;
+  using scheduler_type = Scheduler;
+  using member_type = TaskTeamMemberAdapter<
+    Kokkos::Impl::HostThreadTeamMember<execution_space>,
+    scheduler_type
+  >;
   using memory_space = Kokkos::HostSpace ;
 
+  enum : int { max_league_size = HostThreadTeamData::max_pool_members };
+
   static
-  void iff_single_thread_recursive_execute( queue_type * const );
+  void iff_single_thread_recursive_execute( scheduler_type const& scheduler ) {
+    using task_base_type = typename scheduler_type::task_base;
+    using queue_type = typename scheduler_type::queue_type;
+
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+    if ( 1 == OpenMP::thread_pool_size() )
+#else
+    if ( 1 == OpenMP::impl_thread_pool_size() )
+#endif
+    {
+
+      task_base_type * const end = (task_base_type *) task_base_type::EndTag ;
+
+      HostThreadTeamData & team_data_single =
+        HostThreadTeamDataSingleton::singleton();
+
+      member_type single_exec( scheduler, team_data_single );
+
+      task_base_type * task = end ;
+
+      do {
+
+        task = end ;
+
+        // Loop by priority and then type
+        for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) {
+          for ( int j = 0 ; j < 2 && end == task ; ++j ) {
+            task = queue_type::pop_ready_task( & scheduler.m_queue->m_ready[i][j] );
+          }
+        }
+
+        if ( end == task ) break ;
+
+        (*task->m_apply)( task , & single_exec );
+
+        scheduler.m_queue->complete( task );
+
+      } while(1);
+    }
+
+  }
 
   // Must provide task queue execution function
-  static void execute( queue_type * const );
+  static void execute(scheduler_type const& scheduler)
+  {
+    using task_base_type = typename scheduler_type::task_base;
+    using queue_type = typename scheduler_type::queue_type;
+
+    static task_base_type * const end =
+      (task_base_type *) task_base_type::EndTag ;
+
+    constexpr task_base_type* no_more_tasks_sentinel = nullptr;
+
+
+    HostThreadTeamData & team_data_single =
+      HostThreadTeamDataSingleton::singleton();
+
+    Impl::OpenMPExec * instance = t_openmp_instance;
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+    const int pool_size = OpenMP::thread_pool_size();
+#else
+    const int pool_size = OpenMP::impl_thread_pool_size();
+#endif
+
+    const int team_size = 1;  // Threads per core
+    instance->resize_thread_data( 0 /* global reduce buffer */
+      , 512 * team_size /* team reduce buffer */
+      , 0 /* team shared buffer */
+      , 0 /* thread local buffer */
+    );
+    assert(pool_size % team_size == 0);
+    auto& queue = scheduler.queue();
+    queue.initialize_team_queues(pool_size / team_size);
+
+#pragma omp parallel num_threads(pool_size)
+    {
+      Impl::HostThreadTeamData & self = *(instance->get_thread_data());
+
+      // Organizing threads into a team performs a barrier across the
+      // entire pool to insure proper initialization of the team
+      // rendezvous mechanism before a team rendezvous can be performed.
+
+      // organize_team() returns true if this is an active team member
+      if ( self.organize_team( team_size ) ) {
+
+        member_type single_exec(scheduler, team_data_single);
+        member_type team_exec(scheduler, self);
+
+        auto& team_queue = team_exec.scheduler().queue();
+
+        // Loop until all queues are empty and no tasks in flight
+
+        task_base_type * task = no_more_tasks_sentinel;
+
+
+        do {
+          // Each team lead attempts to acquire either a thread team task
+          // or a single thread task for the team.
+
+          if ( 0 == team_exec.team_rank() ) {
+
+            bool leader_loop = false ;
+
+            do {
+
+              if ( task != no_more_tasks_sentinel && task != end ) {
+                // team member #0 completes the previously executed task,
+                // completion may delete the task
+                team_queue.complete( task );
+              }
+
+              // If 0 == m_ready_count then set task = 0
+
+              if( *((volatile int *) & team_queue.m_ready_count) > 0 ) {
+                task = end;
+                // Attempt to acquire a task
+                // Loop by priority and then type
+                for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) {
+                  for ( int j = 0 ; j < 2 && end == task ; ++j ) {
+                    task = queue_type::pop_ready_task( & team_queue.m_ready[i][j] );
+                  }
+                }
+              }
+              else {
+                // returns nullptr if and only if all other queues have a ready
+                // count of 0 also. Otherwise, returns a task from another queue
+                // or `end` if one couldn't be popped
+                task = team_queue.attempt_to_steal_task();
+                #if 0
+                if(task != no_more_tasks_sentinel && task != end) {
+                  std::printf("task stolen on rank %d\n", team_exec.league_rank());
+                }
+                #endif
+              }
+
+              // If still tasks are still executing
+              // and no task could be acquired
+              // then continue this leader loop
+              if(task == end) {
+                // this means that the ready task count was not zero, but we
+                // couldn't pop a task (because, for instance, someone else
+                // got there before us
+                leader_loop = true;
+              }
+              else if ( ( task != no_more_tasks_sentinel ) &&
+                ( task_base_type::TaskSingle == task->m_task_type ) ) {
+
+                // if a single thread task then execute now
+
+                (*task->m_apply)(task, &single_exec);
+
+                leader_loop = true;
+              }
+              else {
+                leader_loop = false;
+              }
+            } while ( leader_loop );
+          }
+
+          // Team lead either found 0 == m_ready_count or a team task
+          // Team lead broadcast acquired task:
+
+          team_exec.team_broadcast( task , 0);
+
+          if ( task != no_more_tasks_sentinel ) { // Thread Team Task
+
+            (*task->m_apply)( task , & team_exec );
+
+            // The m_apply function performs a barrier
+          }
+        } while( task != no_more_tasks_sentinel );
+      }
+      self.disband_team();
+    } // end pragma omp parallel
+  }
 
   template< typename TaskType >
-  static
-  typename TaskType::function_type
-  get_function_pointer() { return TaskType::apply ; }
+  static void
+  get_function_pointer(
+    typename TaskType::function_type& ptr,
+    typename TaskType::destroy_type& dtor
+  ) { 
+    ptr = TaskType::apply;
+    dtor = TaskType::destroy;
+  }
 };
 
-extern template class TaskQueue< Kokkos::OpenMP > ;
+extern template class TaskQueue< Kokkos::OpenMP, typename Kokkos::OpenMP::memory_space > ;
 
 }} /* namespace Kokkos::Impl */
 
diff --git a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Team.hpp b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Team.hpp
index e8fbc467e095785ff4f7b763eed45709e66786f3..38b062bdc02c24fb4701402f448061f0f1492c05 100644
--- a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Team.hpp
+++ b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_Team.hpp
@@ -74,6 +74,21 @@ public:
     return *this;
   }
 
+  template<class ExecSpace, class ... OtherProperties >
+  friend class TeamPolicyInternal;
+
+  template< class ... OtherProperties >
+  TeamPolicyInternal(const TeamPolicyInternal<Kokkos::OpenMP,OtherProperties...>& p) {
+    m_league_size = p.m_league_size;
+    m_team_size = p.m_team_size;
+    m_team_alloc = p.m_team_alloc;
+    m_team_iter = p.m_team_iter;
+    m_team_scratch_size[0] = p.m_team_scratch_size[0];
+    m_thread_scratch_size[0] = p.m_thread_scratch_size[0];
+    m_team_scratch_size[1] = p.m_team_scratch_size[1];
+    m_thread_scratch_size[1] = p.m_thread_scratch_size[1];
+    m_chunk_size = p.m_chunk_size;
+  }
   //----------------------------------------
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
@@ -208,7 +223,7 @@ public:
   }
 
   /** \brief  Specify league size, request team size */
-  TeamPolicyInternal( typename traits::execution_space &
+  TeamPolicyInternal( const typename traits::execution_space &
             , int league_size_request
             , int team_size_request
             , int /* vector_length_request */ = 1 )
@@ -217,14 +232,18 @@ public:
             , m_chunk_size(0)
     { init( league_size_request , team_size_request ); }
 
-  TeamPolicyInternal( typename traits::execution_space &
+  TeamPolicyInternal( const typename traits::execution_space &
             , int league_size_request
             , const Kokkos::AUTO_t & /* team_size_request */
             , int /* vector_length_request */ = 1)
             : m_team_scratch_size { 0 , 0 }
             , m_thread_scratch_size { 0 , 0 }
             , m_chunk_size(0)
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
     { init( league_size_request , traits::execution_space::thread_pool_size(2) ); }
+#else
+    { init( league_size_request , traits::execution_space::impl_thread_pool_size(2) ); }
+#endif
 
   TeamPolicyInternal( int league_size_request
             , int team_size_request
diff --git a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_WorkGraphPolicy.hpp b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_WorkGraphPolicy.hpp
index 879d5d2d24f51732a71a6c8e0abd9042475e012d..0742575cb8ce0346c662ae1e270da463d0349178 100644
--- a/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_WorkGraphPolicy.hpp
+++ b/packages/kokkos/core/src/OpenMP/Kokkos_OpenMP_WorkGraphPolicy.hpp
@@ -76,11 +76,10 @@ public:
   void execute()
   {
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
-    const int pool_size = OpenMP::thread_pool_size();
+    #pragma omp parallel num_threads(OpenMP::thread_pool_size())
 #else
-    const int pool_size = OpenMP::impl_thread_pool_size();
+    #pragma omp parallel num_threads(OpenMP::impl_thread_pool_size())
 #endif
-    #pragma omp parallel num_threads(pool_size)
     {
       // Spin until COMPLETED_TOKEN.
       // END_TOKEN indicates no work is currently available.
diff --git a/packages/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Parallel.hpp b/packages/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Parallel.hpp
index fc31a91b224d51176cdb0f39b45e9cbb6792aeca..c93a88606da4630cbca920064834e9eb4361f41d 100644
--- a/packages/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Parallel.hpp
+++ b/packages/kokkos/core/src/OpenMPTarget/Kokkos_OpenMPTarget_Parallel.hpp
@@ -697,13 +697,13 @@ namespace Impl {
     const iType increment;
 
     inline
-    TeamThreadRangeBoundariesStruct (const OpenMPTargetExecTeamMember& thread_, const iType& count):
+    TeamThreadRangeBoundariesStruct (const OpenMPTargetExecTeamMember& thread_, iType count):
       start( thread_.team_rank() ),
       end( count ),
       increment( thread_.team_size() )
     {}
     inline
-    TeamThreadRangeBoundariesStruct (const OpenMPTargetExecTeamMember& thread_, const iType& begin_, const iType& end_):
+    TeamThreadRangeBoundariesStruct (const OpenMPTargetExecTeamMember& thread_, iType begin_, iType end_):
       start( begin_+thread_.team_rank() ),
       end( end_ ),
       increment( thread_.team_size() )
@@ -718,13 +718,13 @@ namespace Impl {
     const index_type increment;
 
     inline
-    ThreadVectorRangeBoundariesStruct (const OpenMPTargetExecTeamMember& thread_, const index_type& count):
+    ThreadVectorRangeBoundariesStruct (const OpenMPTargetExecTeamMember& thread_, index_type count):
       start( thread_.m_vector_lane ),
       end( count ),
       increment( thread_.m_vector_length )
     {}
     inline
-    ThreadVectorRangeBoundariesStruct (const OpenMPTargetExecTeamMember& thread_, const index_type& begin_, const index_type& end_):
+    ThreadVectorRangeBoundariesStruct (const OpenMPTargetExecTeamMember& thread_, index_type begin_, index_type end_):
       start( begin_+thread_.m_vector_lane ),
       end( end_ ),
       increment( thread_.m_vector_length )
@@ -734,28 +734,28 @@ namespace Impl {
   template<typename iType>
   KOKKOS_INLINE_FUNCTION
   Impl::TeamThreadRangeBoundariesStruct<iType,Impl::OpenMPTargetExecTeamMember>
-    TeamThreadRange(const Impl::OpenMPTargetExecTeamMember& thread, const iType& count) {
+    TeamThreadRange(const Impl::OpenMPTargetExecTeamMember& thread, iType count) {
     return Impl::TeamThreadRangeBoundariesStruct<iType,Impl::OpenMPTargetExecTeamMember>(thread,count);
   }
   
   template<typename iType>
   KOKKOS_INLINE_FUNCTION
   Impl::TeamThreadRangeBoundariesStruct<iType,Impl::OpenMPTargetExecTeamMember>
-    TeamThreadRange(const Impl::OpenMPTargetExecTeamMember& thread, const iType& begin, const iType& end) {
+    TeamThreadRange(const Impl::OpenMPTargetExecTeamMember& thread, iType begin, iType end) {
     return Impl::TeamThreadRangeBoundariesStruct<iType,Impl::OpenMPTargetExecTeamMember>(thread,begin,end);
   }
 
   template<typename iType>
   KOKKOS_INLINE_FUNCTION
   Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::OpenMPTargetExecTeamMember >
-    ThreadVectorRange(const Impl::OpenMPTargetExecTeamMember& thread, const iType& count) {
+    ThreadVectorRange(const Impl::OpenMPTargetExecTeamMember& thread, iType count) {
     return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::OpenMPTargetExecTeamMember >(thread,count);
   }
 
   template<typename iType>
   KOKKOS_INLINE_FUNCTION
   Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::OpenMPTargetExecTeamMember>
-    ThreadVectorRange(const Impl::OpenMPTargetExecTeamMember& thread, const iType& begin, const iType& end) {
+    ThreadVectorRange(const Impl::OpenMPTargetExecTeamMember& thread, iType begin, iType end) {
     return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::OpenMPTargetExecTeamMember>(thread,begin,end);
   }
 
diff --git a/packages/kokkos/core/src/Qthreads/Kokkos_Qthreads_Parallel.hpp b/packages/kokkos/core/src/Qthreads/Kokkos_Qthreads_Parallel.hpp
index 5ad90436afd9ffb5e0cf671150d40a3a4504886b..7b1b63befeb9290b44ca82144507ae2e179b7080 100644
--- a/packages/kokkos/core/src/Qthreads/Kokkos_Qthreads_Parallel.hpp
+++ b/packages/kokkos/core/src/Qthreads/Kokkos_Qthreads_Parallel.hpp
@@ -51,7 +51,6 @@
 
 #include <Kokkos_Parallel.hpp>
 
-#include <impl/Kokkos_StaticAssert.hpp>
 #include <impl/Kokkos_FunctorAdapter.hpp>
 
 #include <Qthreads/Kokkos_QthreadsExec.hpp>
diff --git a/packages/kokkos/core/src/ROCm/Kokkos_ROCm_Exec.hpp b/packages/kokkos/core/src/ROCm/Kokkos_ROCm_Exec.hpp
index 205e6a29553942e117f1d9d125f3b16128f59734..3e81883278dd39958b9b39ab537f254830ce4327 100644
--- a/packages/kokkos/core/src/ROCm/Kokkos_ROCm_Exec.hpp
+++ b/packages/kokkos/core/src/ROCm/Kokkos_ROCm_Exec.hpp
@@ -227,7 +227,7 @@ struct ROCmParallelLaunch< DriverType
 
 //#if defined( KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK )
 //      ROCM_SAFE_CALL( rocmGetLastError() );
-//      Kokkos::ROCm::fence();
+//      Kokkos::ROCm().fence();
 //#endif
     }
   }
diff --git a/packages/kokkos/core/src/ROCm/Kokkos_ROCm_Parallel.hpp b/packages/kokkos/core/src/ROCm/Kokkos_ROCm_Parallel.hpp
index edd1c12e45072b30fbe25d6d0a89d0085f2877c2..48654555b23fb8bb78d907fe6bef7cea126c004f 100644
--- a/packages/kokkos/core/src/ROCm/Kokkos_ROCm_Parallel.hpp
+++ b/packages/kokkos/core/src/ROCm/Kokkos_ROCm_Parallel.hpp
@@ -86,6 +86,21 @@ public:
     return *this;
   }
 
+  template<class ExecSpace, class ... OtherProperties >
+  friend class TeamPolicyInternal;
+
+  template< class ... OtherProperties >
+  TeamPolicyInternal(const TeamPolicyInternal<Kokkos::Experimental::ROCm,OtherProperties...>& p) {
+    m_league_size = p.m_league_size;
+    m_team_size = p.m_team_size;
+    m_vector_length = p.m_vector_length;
+    m_team_scratch_size[0] = p.m_team_scratch_size[0];
+    m_team_scratch_size[1] = p.m_team_scratch_size[1];
+    m_thread_scratch_size[0] = p.m_thread_scratch_size[0];
+    m_thread_scratch_size[1] = p.m_thread_scratch_size[1];
+    m_chunk_size = p.m_chunk_size;
+  }
+
   TeamPolicyInternal()
     : m_league_size( 0 )
     , m_team_size( 0 )
@@ -1099,7 +1114,7 @@ public:
 
       ROCmParallelLaunch< ParallelReduce, LaunchBounds >( *this, grid, block, shmem ); // copy to device and execute
 
-      ROCM::fence();
+      ROCM().fence();
 
       if ( m_result_ptr ) {
           const int size = ValueTraits::value_size( ReducerConditional::select(m_functor , m_reducer)  );
@@ -1494,14 +1509,14 @@ namespace Kokkos {
 template<typename iType>
 KOKKOS_INLINE_FUNCTION
 Impl::TeamThreadRangeBoundariesStruct<iType,Impl::ROCmTeamMember>
-  TeamThreadRange(const Impl::ROCmTeamMember& thread, const iType& count) {
+  TeamThreadRange(const Impl::ROCmTeamMember& thread, iType count) {
   return Impl::TeamThreadRangeBoundariesStruct<iType,Impl::ROCmTeamMember>(thread,count);
 }
 
 template<typename iType1,typename iType2>
 KOKKOS_INLINE_FUNCTION
 Impl::TeamThreadRangeBoundariesStruct<typename std::common_type< iType1, iType2 >::type,Impl::ROCmTeamMember>
-  TeamThreadRange(const Impl::ROCmTeamMember& thread, const iType1& begin, const iType2& end) {
+  TeamThreadRange(const Impl::ROCmTeamMember& thread, iType1 begin, iType2 end) {
   typedef typename std::common_type< iType1, iType2 >::type iType;
   return Impl::TeamThreadRangeBoundariesStruct<iType,Impl::ROCmTeamMember>(thread,begin,end);
 }
@@ -1509,14 +1524,14 @@ Impl::TeamThreadRangeBoundariesStruct<typename std::common_type< iType1, iType2
 template<typename iType>
 KOKKOS_INLINE_FUNCTION
 Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::ROCmTeamMember >
-  ThreadVectorRange(const Impl::ROCmTeamMember& thread, const iType& count) {
+  ThreadVectorRange(const Impl::ROCmTeamMember& thread, iType count) {
   return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::ROCmTeamMember >(thread,count);
 }
 
 template<typename iType>
 KOKKOS_INLINE_FUNCTION
 Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::ROCmTeamMember >
-  ThreadVectorRange(const Impl::ROCmTeamMember& thread, const iType& arg_begin, const iType& arg_end) {
+  ThreadVectorRange(const Impl::ROCmTeamMember& thread, iType arg_begin, iType arg_end) {
   return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::ROCmTeamMember >(thread,arg_begin,arg_end);
 }
 
diff --git a/packages/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp b/packages/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp
index 559d6f2fcb1aae81d678114ae8687b5fa0d61967..347778f28967a1eead1e4e9f34a65f3e8171c15f 100644
--- a/packages/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp
+++ b/packages/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp
@@ -804,6 +804,10 @@ int Threads::concurrency() {
   return impl_thread_pool_size(0);
 #endif
 }
+#ifndef KOKKOS_ENABLE_DEPRECATED_CODE
+void Threads::fence() const
+{ Impl::ThreadsExec::fence() ; }
+#endif
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
 Threads & Threads::instance(int)
diff --git a/packages/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp b/packages/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp
index 61d7667d58352488c824bdd94e9d8655f3902714..7af9d9e065246c402fb205363e5438cf1198bcb0 100644
--- a/packages/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp
+++ b/packages/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp
@@ -649,8 +649,12 @@ inline bool Threads::wake()
 { return Impl::ThreadsExec::wake() ; }
 #endif
 
+inline void Threads::impl_static_fence()
+{ Impl::ThreadsExec::fence() ; }
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
 inline void Threads::fence()
 { Impl::ThreadsExec::fence() ; }
+#endif
 
 } /* namespace Kokkos */
 
diff --git a/packages/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp b/packages/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp
index e88abdba5083928cbc6b60438aef983de821454e..9d6c0fa8cf249cc6a7cce5902507047f32a439fc 100644
--- a/packages/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp
+++ b/packages/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp
@@ -72,9 +72,12 @@ private:
 
   enum { TEAM_REDUCE_SIZE = 512 };
 
+public:
   typedef Kokkos::Threads execution_space ;
-  typedef execution_space::scratch_memory_space space ;
+  typedef execution_space::scratch_memory_space scratch_memory_space ;
 
+private:
+  typedef execution_space::scratch_memory_space space ;
   ThreadsExec * const   m_exec ;
   ThreadsExec * const * m_team_base ; ///< Base for team fan-in
   space                 m_team_shared ;
@@ -228,14 +231,20 @@ public:
     }
 #endif
 
+    template< typename ReducerType >
+    KOKKOS_INLINE_FUNCTION
+    typename std::enable_if< is_reducer< ReducerType >::value >::type
+    team_reduce( ReducerType const & reducer ) const noexcept
+    { team_reduce(reducer,reducer.reference()); }
+
     template< typename ReducerType >
     KOKKOS_INLINE_FUNCTION
     typename std::enable_if< Kokkos::is_reducer< ReducerType >::value >::type
   #if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-    team_reduce( const ReducerType & ) const
+    team_reduce( const ReducerType &, const typename ReducerType::value_type ) const
       {}
   #else
-    team_reduce( const ReducerType & reducer ) const
+    team_reduce( const ReducerType & reducer, const typename ReducerType::value_type contribution  ) const
     {
       typedef typename ReducerType::value_type value_type;
       // Make sure there is enough scratch space:
@@ -247,7 +256,7 @@ public:
       type * const local_value = ((type*) m_exec->scratch_memory());
 
       // Set this thread's contribution
-      *local_value = reducer.reference() ;
+      *local_value = contribution ;
 
       // Fence to make sure the base team member has access:
       memory_fence();
@@ -277,58 +286,7 @@ public:
     }
   #endif
 
-  template< class ValueType, class JoinOp >
-  KOKKOS_INLINE_FUNCTION ValueType
-    team_reduce( const ValueType & value
-               , const JoinOp & op_in ) const
-  #if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-    { return ValueType(); }
-  #else
-    {
-      typedef ValueType value_type;
-      const JoinLambdaAdapter<value_type,JoinOp> op(op_in);
-  #endif
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-      // Make sure there is enough scratch space:
-      typedef typename if_c< sizeof(value_type) < TEAM_REDUCE_SIZE
-                           , value_type , void >::type type ;
-
-      if ( 0 == m_exec ) return value ;
-
-      type * const local_value = ((type*) m_exec->scratch_memory());
-
-      // Set this thread's contribution
-      *local_value = value ;
-
-      // Fence to make sure the base team member has access:
-      memory_fence();
-
-      if ( team_fan_in() ) {
-        // The last thread to synchronize returns true, all other threads wait for team_fan_out()
-        type * const team_value = ((type*) m_team_base[0]->scratch_memory());
-
-        // Join to the team value:
-        for ( int i = 1 ; i < m_team_size ; ++i ) {
-          op.join( *team_value , *((type*) m_team_base[i]->scratch_memory()) );
-        }
-
-        // Team base thread may "lap" member threads so copy out to their local value.
-        for ( int i = 1 ; i < m_team_size ; ++i ) {
-          *((type*) m_team_base[i]->scratch_memory()) = *team_value ;
-        }
-
-        // Fence to make sure all team members have access
-        memory_fence();
-      }
-
-      team_fan_out();
-
-      // Value was changed by the team base
-      return *((type volatile const *) local_value);
-    }
-#endif
-
-  /** \brief  Intra-team exclusive prefix sum with team_rank() ordering
+   /** \brief  Intra-team exclusive prefix sum with team_rank() ordering
    *          with intra-team non-deterministic ordering accumulation.
    *
    *  The global inter-team accumulation value will, at the end of the
@@ -645,6 +603,22 @@ public:
     return *this;
   }
 
+  template<class ExecSpace, class ... OtherProperties >
+  friend class TeamPolicyInternal;
+
+  template< class ... OtherProperties >
+  TeamPolicyInternal(const TeamPolicyInternal<Kokkos::Threads,OtherProperties...>& p) {
+    m_league_size = p.m_league_size;
+    m_team_size = p.m_team_size;
+    m_team_alloc = p.m_team_alloc;
+    m_team_iter = p.m_team_iter;
+    m_team_scratch_size[0] = p.m_team_scratch_size[0];
+    m_thread_scratch_size[0] = p.m_thread_scratch_size[0];
+    m_team_scratch_size[1] = p.m_team_scratch_size[1];
+    m_thread_scratch_size[1] = p.m_thread_scratch_size[1];
+    m_chunk_size = p.m_chunk_size;
+  }
+
   //----------------------------------------
 
 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
@@ -734,7 +708,7 @@ public:
   inline int team_iter() const { return m_team_iter ; }
 
   /** \brief  Specify league size, request team size */
-  TeamPolicyInternal( typename traits::execution_space &
+  TeamPolicyInternal( const typename traits::execution_space &
             , int league_size_request
             , int team_size_request
             , int vector_length_request = 1 )
@@ -747,7 +721,7 @@ public:
     { init(league_size_request,team_size_request); (void) vector_length_request; }
 
   /** \brief  Specify league size, request team size */
-  TeamPolicyInternal( typename traits::execution_space &
+  TeamPolicyInternal( const typename traits::execution_space &
             , int league_size_request
             , const Kokkos::AUTO_t & /* team_size_request */
             , int /* vector_length_request */ = 1 )
@@ -757,7 +731,11 @@ public:
     , m_team_scratch_size { 0 , 0 }
     , m_thread_scratch_size { 0 , 0 }
     , m_chunk_size(0)
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
     { init(league_size_request,traits::execution_space::thread_pool_size(2)); }
+#else
+    { init(league_size_request,traits::execution_space::impl_thread_pool_size(2)); }
+#endif
 
   TeamPolicyInternal( int league_size_request
             , int team_size_request
@@ -924,6 +902,23 @@ TeamThreadRange( const Impl::ThreadsExecTeamMember& thread, const iType1 & begin
   return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::ThreadsExecTeamMember >( thread, iType(begin), iType(end) );
 }
 
+template< typename iType >
+KOKKOS_INLINE_FUNCTION
+Impl::TeamThreadRangeBoundariesStruct< iType, Impl::ThreadsExecTeamMember >
+TeamVectorRange( const Impl::ThreadsExecTeamMember& thread, const iType& count )
+{
+  return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::ThreadsExecTeamMember >( thread, count );
+}
+
+template< typename iType1, typename iType2 >
+KOKKOS_INLINE_FUNCTION
+Impl::TeamThreadRangeBoundariesStruct< typename std::common_type< iType1, iType2 >::type,
+                                       Impl::ThreadsExecTeamMember>
+TeamVectorRange( const Impl::ThreadsExecTeamMember& thread, const iType1 & begin, const iType2 & end )
+{
+  typedef typename std::common_type< iType1, iType2 >::type iType;
+  return Impl::TeamThreadRangeBoundariesStruct< iType, Impl::ThreadsExecTeamMember >( thread, iType(begin), iType(end) );
+}
 
 template<typename iType>
 KOKKOS_INLINE_FUNCTION
@@ -974,15 +969,18 @@ typename std::enable_if< !Kokkos::is_reducer< ValueType >::value >::type
 parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::ThreadsExecTeamMember>& loop_boundaries,
                      const Lambda & lambda, ValueType& result) {
 
-  result = ValueType();
+  ValueType intermediate;
+  Sum<ValueType> sum(intermediate);
+  sum.init(intermediate);
 
   for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
     ValueType tmp = ValueType();
     lambda(i,tmp);
-    result+=tmp;
+    intermediate+=tmp;
   }
 
-  result = loop_boundaries.thread.team_reduce(result,Impl::JoinAdd<ValueType>());
+  loop_boundaries.thread.team_reduce(sum,intermediate);
+  result = sum.reference();
 }
 
 template< typename iType, class Lambda, typename ReducerType >
@@ -991,36 +989,14 @@ typename std::enable_if< Kokkos::is_reducer< ReducerType >::value >::type
 parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::ThreadsExecTeamMember>& loop_boundaries,
                      const Lambda & lambda, const ReducerType& reducer) {
 
-  reducer.init(reducer.reference());
-
-  for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
-    lambda(i,reducer.reference());
-  }
-
-  loop_boundaries.thread.team_reduce(reducer);
-}
-
-/** \brief  Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1.
- *
- * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of
- * val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result.
- * The input value of init_result is used as initializer for temporary variables of ValueType. Therefore
- * the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or
- * '1 for *'). This functionality requires C++11 support.*/
-template< typename iType, class Lambda, typename ValueType, class JoinType >
-KOKKOS_INLINE_FUNCTION
-void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::ThreadsExecTeamMember>& loop_boundaries,
-                     const Lambda & lambda, const JoinType& join, ValueType& init_result) {
-
-  ValueType result = init_result;
+  typename ReducerType::value_type value;
+  reducer.init(value);
 
   for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
-    ValueType tmp = ValueType();
-    lambda(i,tmp);
-    join(result,tmp);
+    lambda(i,value);
   }
 
-  init_result = loop_boundaries.thread.team_reduce(result,Impl::JoinLambdaAdapter<ValueType,JoinType>(join));
+  loop_boundaries.thread.team_reduce(reducer,value);
 }
 
 } //namespace Kokkos
@@ -1068,25 +1044,6 @@ parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::Thread
   }
 }
 
-/** \brief  Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1.
- *
- * The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of
- * val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result.
- * The input value of init_result is used as initializer for temporary variables of ValueType. Therefore
- * the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or
- * '1 for *'). This functionality requires C++11 support.*/
-template< typename iType, class Lambda, typename ValueType, class JoinType >
-KOKKOS_INLINE_FUNCTION
-void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::ThreadsExecTeamMember >&
-      loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& result ) {
-
-#ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
-#pragma ivdep
-#endif
-  for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
-    lambda(i,result);
-  }
-}
 
 /** \brief  Intra-thread vector parallel exclusive prefix sum. Executes lambda(iType i, ValueType & val, bool final)
  *          for each i=0..N-1.
diff --git a/packages/kokkos/core/src/Threads/Kokkos_Threads_Parallel.hpp b/packages/kokkos/core/src/Threads/Kokkos_Threads_Parallel.hpp
index 42269176ed0d1ef46c0775ae59ab3e8f23a50f4a..022a5fc1882b7774d0e0e91e347ace742dc8ef24 100644
--- a/packages/kokkos/core/src/Threads/Kokkos_Threads_Parallel.hpp
+++ b/packages/kokkos/core/src/Threads/Kokkos_Threads_Parallel.hpp
@@ -52,7 +52,6 @@
 
 #include <Kokkos_Parallel.hpp>
 
-#include <impl/Kokkos_StaticAssert.hpp>
 #include <impl/Kokkos_FunctorAdapter.hpp>
 
 #include <KokkosExp_MDRangePolicy.hpp>
diff --git a/packages/kokkos/core/src/eti/CMakeLists.txt b/packages/kokkos/core/src/eti/CMakeLists.txt
index a4db7a7eb6461d38c023b4e3b7893447dc94f8f2..a7e7717a6e60ff8f276b60e5fe9eac1cd46ce98d 100644
--- a/packages/kokkos/core/src/eti/CMakeLists.txt
+++ b/packages/kokkos/core/src/eti/CMakeLists.txt
@@ -4,6 +4,9 @@ endif()
 if (KOKKOS_ENABLE_OPENMP)
   add_subdirectory(OpenMP)
 endif()
+if (KOKKOS_ENABLE_HPX)
+  add_subdirectory(HPX)
+endif()
 if (KOKKOS_ENABLE_ROCM)
   add_subdirectory(ROCm)
 endif()
diff --git a/packages/kokkos/core/src/eti/HPX/CMakeLists.txt b/packages/kokkos/core/src/eti/HPX/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..131a2d2e6e1ef94b324793be71d075cad3950bc9
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/CMakeLists.txt
@@ -0,0 +1,148 @@
+set(D "${CMAKE_CURRENT_SOURCE_DIR}")
+set(ETI_SOURCES
+${ETI_SOURCES}
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank8.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank1.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank2.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank3.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank4.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank5.cpp
+${D}/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank8.cpp
+PARENT_SCOPE)
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..905c97c54e1759d94df14bec1d9f0202d5b8609c
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a7632852cec2bb3af415a3756bf2d9c1fcb9b35d
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double**,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cff22240cfcc7adaef7a1bd947678054b823b518
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double***,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2b667c674fc1c770399ec26cf798f7d83061f012
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double****,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cd1a445d81b3af6bdad240929d70531189e1f7dc
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*****,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3d805d5134ff7ffdb2ba7604dbb4ba36ab210d08
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double********,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3883d581b67ee7af447d91938c0357c74fb46835
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..55f3e200a5be7df68884ff1bdd950c5598a1038e
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double**,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ed6d57260bdbdeedf45ba383c219ba317a575e6b
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double***,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ed1954e683cef4a7ccacd537060fdaa0fb94899a
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double****,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fb8dadb8d04764c33c08b948c73deedc823d827d
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*****,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..16a0ed3e9c188fa4d76e5718402a7661b057bca6
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double********,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f846f94a9696800b7bed317eb65f3408c708c8fc
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f4b51a1d785dfcd9df5db937e778bc41341d95ea
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double**,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..622b3119bd09c5aba2bbbc863b484415c4fbcb7d
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double***,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..de871103dd37a3cf77770020c922c4342865404b
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double****,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..720e075aeaf1ba8d201c768c4755a9079e28ec78
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*****,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4c57c457c2ef76534c7abb17582403a2877def53
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double********,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5a37da22c4508f857f7995565bbda68209560a88
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..93a96ee5540b639170da77238c8440325ecd3923
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float**,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dcfcc8a0e32679e507656e8bb444b3b3a758f6e5
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float***,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7082701282d6b059c101f7790f20c7fef6ef9d8e
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float****,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cbbd7c9ef37328d681056fba9b35709ec019fa96
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*****,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..22d6fc53878af6b2fbe987cda5f7b0e556dd367e
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float********,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d44e95e67eb0fbf779ee481066088f81c158413b
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ae79919c42a53f14fe7c02c79cf9d050ce0a0b6b
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float**,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0c671ad593ba55d04870ea09268574f125c385d7
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float***,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..24dd1c8354cb5c3106b5e461ff7dcdf7e53175c4
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float****,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6e2de8a02eadfeb656ac51df77fda81952dda58c
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*****,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..38840ac9e666ac214477a4bfbbaf64add24572f7
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float********,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bcb105628ba9afd7c242573dea3537b4c703bc2f
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8730f92f205e0eb95e800662f20802b39aedcbc5
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float**,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..785996558ba88a3398c19c6f884040bdc799a950
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float***,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3ae193ca6538cfd34f2d577c0d93ee5b834d6d6a
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float****,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..81f91019d6b7c2bb9648bd95d4ca8463d18e31ee
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*****,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d34a4870b901ebef253d4d41e06c28aeefb09236
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float********,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0da5ed177064720ab4badd869410db35a49ee3ea
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..444dad079bc79e880e3428e0b0919430a5a1c9e5
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t**,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3f36a1d7142116aa060d05f1bf4f062b0f7d49f1
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t***,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..51c964b92db3a8e5cde1b99e9593465493f28aa1
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t****,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1a26522ff5dc6430fb713abfb7d039213e897861
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*****,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9bd9af3fe39081d2a66e77f6b6ba3e75ace98f03
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t********,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dd5a32553543426569d83326d8b6c6cfe8e9ec26
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..30a44c0a8016f9ee7c5ea75224f3505f7f26276f
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t**,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0b73280c6e4add7410f84d1d515fef6f646f100f
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t***,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3997d8ca583ec3f62af7b746ab998bf61bb11eb3
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t****,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6cbaa59223448b3df19d8647233a4aba88f26075
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*****,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..351001c8d17fa4821133a14847b079a56176aa67
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t********,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d37e34af30391dc55c00274d22730db6df35548f
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7609d9478f9010b7e5fffa1dd64cd3ea907431ba
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t**,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..30f0c1d882a77216fde13264c0f62b682b4efcbc
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t***,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4c4109e298f76aea84a237af60705d2601875d37
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t****,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..189245d352e3db7fd8253d160bce2ad957987dca
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*****,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..921a8e88c7b1718827993c4a2bc58b1a736b0a7d
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t********,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7e492aa25f15d162a382f4cf4cbd27e7bd7b6391
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..13b1a78d7c24fbef53dd937508eb6c744ea2bb15
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int**,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..03fa72c21cfd2a923b679cbec4cf80bf436fa34e
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int***,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..10a46bcd9d9787583f26c27d96f134953974800c
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int****,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4c23c7e796429f775373b73163b96ef5a8cb2ff7
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*****,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1bc7ab41f784e575e7f4eef67dd709d7844737d9
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutLeft,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutLeft,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutLeft,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int********,LayoutLeft,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0206838af6b1ec64f37ccbd9f1bb5c223ae329de
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..78b67a4a2a682dbc65d26c73e2721a88ec89e409
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int**,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..564f530d9badbe2ac387751d1d93d86533ea5323
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int***,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b5ae4ae52a39d2da5b70f5a14c5e965dbbb8aadc
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int****,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b2c91a1aa12af806ef7ac96f664b63e47c5a6368
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*****,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..18e3f2b9b9b9039b51a314a39bb38340ae1b8209
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutRight,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutRight,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutRight,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int********,LayoutRight,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e3d08c6e385e1d5de36d59842b7fd5df1cf12aaa
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5001fc278144cfc71b49095dc76fe4c75704638e
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int**,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fd45308d150c355f5e6a45be28730af89ca1ad90
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int***,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d2fca731512938b25a5b64a9a3cf17161dbc5170
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int****,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c7fafd4aec1e4ee14d7f8b267459475d717f0f5c
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*****,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..046aafa6ad2c73d9f4f9be1c692bfc59eb93dcab
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutStride,LayoutRight, Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutStride,LayoutLeft,  Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutStride,LayoutStride,Experimental::HPX,int64_t)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int********,LayoutStride,Experimental::HPX,int64_t)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..60f78b7a570cb4bd95dbcbbabc51f912a3c4d949
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..304a5afc0d616ef1afd673b99799455f2b4ffdd8
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double**,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8aeaf8a1f8258cb77843b95500e9892c360588e4
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double***,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..26ff7aefede90891d2474789c329fbba299bf5e6
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double****,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..518d000eeac14f57da8fa613226f5a120970ec20
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*****,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..36b3b4fab8ca31dce0ae50849cb20fc5d37a2af2
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double********,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..df5c890a49483237ed3e03216553498cc119d8db
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b120215692e5bc829bdf12e8b7498a6a5488842b
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double**,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9b5e4c2e5fa906a9ba8cd4f8c9903fabc771f13a
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double***,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..74ad489303e38c50298e7f8acb6fc02dd20dc730
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double****,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bc9dbc65c1d09c9e86924da12298dbee44eedeb7
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*****,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fbd98c8011cdc9e96a155d5c288e0de828eb7960
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double********,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d52c5306d0655716938c7156927e65a9ba8113e7
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5cc29daaca5d0b7d06cdd35532099320f5f631cc
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double**,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double**,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7e63d802365990194184476652d8684a1c84b11a
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double***,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double***,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..11447c11b5021ef43cac8518bae26da81ef806a0
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double****,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double****,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bafe266044030e224e4099f83593e23ff8f8e76a
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double*****,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double*****,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e4ef20c3707ffbe8f135ba75657395842c1a43d1
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(double********,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(double********,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fb00c3bfd33715fe4e18423057b58108fb44b9fe
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..12718353e8a67aade7e3ac394bf66c763591d9da
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float**,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c9ab75062d39cd51812f90c444592c9c17e5aaf0
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float***,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..71380c21a2d8db7edddd3d05446f3049a80dd57b
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float****,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9787086a807c3e6912d796ff3710b3e4983de0ba
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*****,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..81072d77cb4ceaa588ae989740bacc8901b7e4e0
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float********,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..363b05baceb7b4c7f4b11b073cac62c277e9a45c
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ce1bc89e01dab7cfabe328963c068a9f370c2296
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float**,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4af590818c0cbaacf501531824f2757d22565591
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float***,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ad399eff7692b671568125aacc50f2d5479287fc
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float****,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..661edef66846942afa164445a9b7c2f34b50eb6b
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*****,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..48cb4a34b10d626efea176fb015b37112bc264f6
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float********,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d2f88bb243acfc6b0a241c81164aa9b40e3dcc90
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..58ce6f19110e8d5ead4acb9d222bfb8877dd9bf8
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float**,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float**,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bc4efab1e444444b3416741c810e7835502af184
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float***,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float***,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6225cf97208034d75345996617c865d90dc4158c
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float****,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float****,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e50472d85090980481b1dfadb0f55371ed1aeb85
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float*****,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float*****,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5ad427acc59e0d31e9848578e72c64a5ef9726a4
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(float********,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(float********,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4ae2437fc8715ceab8e1a07db3d9f4fc14bf7ddd
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..02a2b8e1d93de4a7ded9791663ea484a9b0f9ab0
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t**,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ff693c9b4f66539843243095fee1441584e5fb3c
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t***,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d96960d4a79c5e09d9ebc9157e365f7cee50e4e6
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t****,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..05c3ef68ebfb29c5860a610cc06cb0c4819ee929
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*****,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d96f47ece0fd642453f4ef101b2951286994ce15
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t********,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..208933899e6d3506f784c8129eddbf850b048b82
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..aa7d9b8f15883ec27ec3148a219b9838302f9e8f
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t**,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e43a1783fd4b04228a9234551d9fd9d4bbce579c
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t***,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..67060748197f3a5d4664e9b699558dea9a28ecef
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t****,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cd7082dcb3a87c06e227339a50631aad11dd754e
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*****,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8735d5860501f08d47916ddf4092a24c589ef8d7
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t********,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ec371dcba7f93698618042cec625b2f42ab97b3d
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..354da997949538e319b6cc1ce8fd6f62ca104acd
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t**,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t**,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bbc32aba039b4a98c9900f30815ca71e0b0caa6d
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t***,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t***,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..addbbb291aad2e5b7dbe9de37e88830d3090aaf3
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t****,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t****,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dbebda1594b8b93efb279866e7a8955fd1523766
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t*****,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t*****,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f8a89b4226d10b85e1380d5c592876580c148ffd
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int64_t********,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int64_t********,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7f0b9fc346b085bb61571565f4f8ca82c8117204
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4a31e60a3a0e3034ae46674d250897eac8f4bc40
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int**,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e876da3a6c731264e3c6d54a2aeda51259cba484
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int***,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a7ee2c554d3bcfd0cebc03ab476b5feb38b41ae9
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int****,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4769c235bcfacf59e24433d52e2ef3e2ce2d03c7
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*****,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3ac618b5dda64937008193e7fff84c30ab851a37
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutLeft,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutLeft,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutLeft,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int********,LayoutLeft,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..825bee722ff20ae3d19de31b87ecdf85f4d6dc1a
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..44e24e57f37fe9e73be969df685464bb5420a914
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int**,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0b18c7e5c027f311b99b23da563b4e2b6eb10b93
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int***,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..951d770305cff8d2567a9cfd8bf8a561c2a78a59
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int****,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a0e80d764d23f2c0b9f19d9cf856d456b17f7dd5
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*****,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d8cd0155affe169534c46ebb6d24bbb49f182259
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutRight,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutRight,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutRight,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int********,LayoutRight,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank1.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c4bd8a043a08c8c140f82ace7ba3e9be9b5bcad2
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank1.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank2.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank2.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..566eb71e4d22ba85a36946fec6743d4078b2e5dd
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank2.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int**,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int**,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank3.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank3.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4b99a8fd0c74affa1cfc9cad6a24d7e80a138680
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank3.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int***,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int***,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank4.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank4.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6cf55bb5b42eb257390be9234325372c210aa183
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank4.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int****,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int****,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank5.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank5.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..932a322bac0c41121ee011632a23a464d0014a09
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank5.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int*****,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int*****,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank8.cpp b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank8.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f46a156a9332d0c33b51f0d35d6b58c0a1b10015
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank8.cpp
@@ -0,0 +1,54 @@
+//@HEADER
+// ************************************************************************
+// 
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+// 
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Kokkos is licensed under 3-clause BSD terms of use:
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+// 
+// ************************************************************************
+//@HEADER
+
+#define KOKKOS_IMPL_COMPILING_LIBRARY true
+#include<Kokkos_Core.hpp>
+namespace Kokkos {
+namespace Impl {
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutStride,LayoutRight, Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutStride,LayoutLeft,  Experimental::HPX,int)
+KOKKOS_IMPL_VIEWCOPY_ETI_INST(int********,LayoutStride,LayoutStride,Experimental::HPX,int)
+KOKKOS_IMPL_VIEWFILL_ETI_INST(int********,LayoutStride,Experimental::HPX,int)
+
+}
+}
diff --git a/packages/kokkos/core/src/eti/HPX/Makefile.eti_HPX b/packages/kokkos/core/src/eti/HPX/Makefile.eti_HPX
new file mode 100644
index 0000000000000000000000000000000000000000..904f32fb825c91d14589f4f273a6218c87a9fca6
--- /dev/null
+++ b/packages/kokkos/core/src/eti/HPX/Makefile.eti_HPX
@@ -0,0 +1,288 @@
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutLeft_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutRight_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int_LayoutStride_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutLeft_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutRight_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int_LayoutStride_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutLeft_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutRight_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_int64_t_LayoutStride_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutLeft_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutRight_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_int64_t_LayoutStride_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutLeft_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutRight_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_float_LayoutStride_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutLeft_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutRight_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_float_LayoutStride_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutLeft_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutRight_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int_double_LayoutStride_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutLeft_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutRight_Rank8.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank1.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank1.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank1.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank2.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank2.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank2.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank3.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank3.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank3.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank4.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank4.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank4.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank5.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank5.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank5.cpp
+Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank8.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank8.cpp
+	$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_ETI_PATH)/HPX/Kokkos_HPX_ViewCopyETIInst_int64_t_double_LayoutStride_Rank8.cpp
diff --git a/packages/kokkos/core/src/impl/Kokkos_AnalyzePolicy.hpp b/packages/kokkos/core/src/impl/Kokkos_AnalyzePolicy.hpp
index d27c2e13061fc33d3bec1f1b9d3955448db70a1a..50af5ec82e41104fb8129d42f4467dd16a14d282 100644
--- a/packages/kokkos/core/src/impl/Kokkos_AnalyzePolicy.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_AnalyzePolicy.hpp
@@ -56,11 +56,12 @@ template < typename ExecutionSpace   = void
          , typename IndexType        = void
          , typename IterationPattern = void
          , typename LaunchBounds     = void
+         , typename MyWorkItemProperty = Kokkos::Experimental::WorkItemProperty::None_t
          >
 struct PolicyTraitsBase
 {
   using type = PolicyTraitsBase< ExecutionSpace, Schedule, WorkTag, IndexType, 
-               IterationPattern, LaunchBounds>;
+               IterationPattern, LaunchBounds, MyWorkItemProperty>;
 
   using execution_space   = ExecutionSpace;
   using schedule_type     = Schedule;
@@ -68,8 +69,23 @@ struct PolicyTraitsBase
   using index_type        = IndexType;
   using iteration_pattern = IterationPattern;
   using launch_bounds     = LaunchBounds;
+  using work_item_property = MyWorkItemProperty;
 };
 
+template <typename PolicyBase, typename Property>
+struct SetWorkItemProperty
+{
+  static_assert( std::is_same<typename PolicyBase::work_item_property,Kokkos::Experimental::WorkItemProperty::None_t>::value
+               , "Kokkos Error: More than one work item property given" );
+  using type = PolicyTraitsBase< typename PolicyBase::execution_space
+                               , typename PolicyBase::schedule_type
+                               , typename PolicyBase::work_tag
+                               , typename PolicyBase::index_type
+                               , typename PolicyBase::iteration_pattern
+                               , typename PolicyBase::launch_bounds
+                               , Property
+                               >;
+};
 
 template <typename PolicyBase, typename ExecutionSpace>
 struct SetExecutionSpace
@@ -82,6 +98,7 @@ struct SetExecutionSpace
                                , typename PolicyBase::index_type
                                , typename PolicyBase::iteration_pattern
                                , typename PolicyBase::launch_bounds
+                               , typename PolicyBase::work_item_property
                                >;
 };
 
@@ -96,6 +113,7 @@ struct SetSchedule
                                , typename PolicyBase::index_type
                                , typename PolicyBase::iteration_pattern
                                , typename PolicyBase::launch_bounds
+                               , typename PolicyBase::work_item_property
                                >;
 };
 
@@ -110,6 +128,7 @@ struct SetWorkTag
                                , typename PolicyBase::index_type
                                , typename PolicyBase::iteration_pattern
                                , typename PolicyBase::launch_bounds
+                               , typename PolicyBase::work_item_property
                                >;
 };
 
@@ -124,6 +143,7 @@ struct SetIndexType
                                , IndexType
                                , typename PolicyBase::iteration_pattern
                                , typename PolicyBase::launch_bounds
+                               , typename PolicyBase::work_item_property
                                >;
 };
 
@@ -139,6 +159,7 @@ struct SetIterationPattern
                                , typename PolicyBase::index_type
                                , IterationPattern
                                , typename PolicyBase::launch_bounds
+                               , typename PolicyBase::work_item_property
                                >;
 };
 
@@ -154,6 +175,7 @@ struct SetLaunchBounds
                                , typename PolicyBase::index_type
                                , typename PolicyBase::iteration_pattern
                                , LaunchBounds
+                               , typename PolicyBase::work_item_property
                                >;
 };
 
@@ -170,8 +192,9 @@ struct AnalyzePolicy<Base, T, Traits...> : public
     , typename std::conditional< std::is_integral<T>::value    , SetIndexType<Base, IndexType<T> >
     , typename std::conditional< is_iteration_pattern<T>::value, SetIterationPattern<Base,T>
     , typename std::conditional< is_launch_bounds<T>::value    , SetLaunchBounds<Base,T>
+    , typename std::conditional< Experimental::is_work_item_property<T>::value, SetWorkItemProperty<Base,T>
     , SetWorkTag<Base,T>
-    >::type >::type >::type >::type >::type>::type::type
+    >::type >::type >::type >::type >::type>::type>::type::type
   , Traits...
   >
 {};
@@ -208,13 +231,15 @@ struct AnalyzePolicy<Base>
                                                      , typename Base::launch_bounds
                                                      >::type;
 
+  using work_item_property = typename Base::work_item_property;
+
   using type = PolicyTraitsBase< execution_space
                                , schedule_type
                                , work_tag
                                , index_type
                                , iteration_pattern
                                , launch_bounds
-                               >;
+                               , work_item_property>;
 };
 
 template <typename... Traits>
diff --git a/packages/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Strong.hpp b/packages/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Strong.hpp
index 3d99b075689bd2521575a4388b7e1f3aa07a7a4c..63067c137ace503e4e8360e89b5e4bb34eaa6f37 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Strong.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Strong.hpp
@@ -53,6 +53,13 @@
 #include<Cuda/Kokkos_Cuda_Version_9_8_Compatibility.hpp>
 #endif
 
+#include <impl/Kokkos_Atomic_Memory_Order.hpp>
+#include <impl/Kokkos_Memory_Fence.hpp>
+
+#if defined(KOKKOS_ENABLE_CUDA)
+#include <Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp>
+#endif
+
 namespace Kokkos {
 
 //----------------------------------------------------------------------------
@@ -326,7 +333,165 @@ bool atomic_compare_exchange_strong(volatile T* const dest, const T compare, con
 }
 //----------------------------------------------------------------------------
 
+namespace Impl {
+// memory-ordered versions are in the Impl namespace
+
+template <class T, class MemoryOrderFailure>
+KOKKOS_INLINE_FUNCTION
+bool _atomic_compare_exchange_strong_fallback(
+  T* dest, T compare, T val, memory_order_seq_cst_t, MemoryOrderFailure
+)
+{
+  Kokkos::memory_fence();
+  auto rv = Kokkos::atomic_compare_exchange_strong(
+    dest, compare, val
+  );
+  Kokkos::memory_fence();
+  return rv;
+}
+
+template <class T, class MemoryOrderFailure>
+KOKKOS_INLINE_FUNCTION
+bool _atomic_compare_exchange_strong_fallback(
+  T* dest, T compare, T val, memory_order_acquire_t, MemoryOrderFailure
+)
+{
+  auto rv = Kokkos::atomic_compare_exchange_strong(
+    dest, compare, val
+  );
+  Kokkos::memory_fence();
+  return rv;
+}
+
+template <class T, class MemoryOrderFailure>
+KOKKOS_INLINE_FUNCTION
+bool _atomic_compare_exchange_strong_fallback(
+  T* dest, T compare, T val, memory_order_release_t, MemoryOrderFailure
+)
+{
+  Kokkos::memory_fence();
+  return Kokkos::atomic_compare_exchange_strong(
+    dest, compare, val
+  );
+}
+
+template <class T, class MemoryOrderFailure>
+KOKKOS_INLINE_FUNCTION
+bool _atomic_compare_exchange_strong_fallback(
+  T* dest, T compare, T val, memory_order_relaxed_t, MemoryOrderFailure
+)
+{
+  return Kokkos::atomic_compare_exchange_strong(
+    dest, compare, val
+  );
+}
+
+#if (defined(KOKKOS_ENABLE_GNU_ATOMICS) && !defined(__CUDA_ARCH__)) \
+    || (defined(KOKKOS_ENABLE_INTEL_ATOMICS) && !defined(__CUDA_ARCH__)) \
+    || defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+
+#if defined(__CUDA_ARCH__)
+  #define KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH __inline__ __device__
+#else
+  #define KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH inline
+#endif
+
+template <class T, class MemoryOrderSuccess, class MemoryOrderFailure>
+KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH
+bool _atomic_compare_exchange_strong(
+  T* dest, T compare, T val,
+  MemoryOrderSuccess,
+  MemoryOrderFailure,
+  typename std::enable_if<
+    (
+      sizeof(T) == 1
+      || sizeof(T) == 2
+      || sizeof(T) == 4
+      || sizeof(T) == 8
+    )
+    && std::is_same<
+      typename MemoryOrderSuccess::memory_order,
+      typename std::remove_cv<MemoryOrderSuccess>::type
+    >::value
+    && std::is_same<
+      typename MemoryOrderFailure::memory_order,
+      typename std::remove_cv<MemoryOrderFailure>::type
+    >::value,
+    void const**
+  >::type = nullptr
+) {
+  return __atomic_compare_exchange_n(
+    dest, &compare, val, /* weak = */ false,
+    MemoryOrderSuccess::gnu_constant,
+    MemoryOrderFailure::gnu_constant
+  );
+}
+
+template <class T, class MemoryOrderSuccess, class MemoryOrderFailure>
+KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH
+bool _atomic_compare_exchange_strong(
+  T* dest, T compare, T val,
+  MemoryOrderSuccess order_success,
+  MemoryOrderFailure order_failure,
+  typename std::enable_if<
+    !(
+      sizeof(T) == 1
+      || sizeof(T) == 2
+      || sizeof(T) == 4
+      || sizeof(T) == 8
+    )
+    && std::is_same<
+      typename MemoryOrderSuccess::memory_order,
+      typename std::remove_cv<MemoryOrderSuccess>::type
+    >::value
+    && std::is_same<
+      typename MemoryOrderFailure::memory_order,
+      typename std::remove_cv<MemoryOrderFailure>::type
+    >::value,
+    void const**
+  >::type = nullptr
+) {
+  return _atomic_compare_exchange_fallback(
+    dest, compare, val,
+    order_success, order_failure
+  );
+}
+
+#else
+
+template <class T, class MemoryOrderSuccess, class MemoryOrderFailure>
+KOKKOS_INLINE_FUNCTION
+bool _atomic_compare_exchange_strong(
+  T* dest, T compare, T val,
+  MemoryOrderSuccess order_success,
+  MemoryOrderFailure order_failure
+) {
+  return _atomic_compare_exchange_strong_fallback(
+    dest, compare, val, order_success, order_failure
+  );
+}
+
+#endif
+
+// TODO static asserts in overloads that don't make sense (as listed in https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/_005f_005fatomic-Builtins.html)
+template <class T, class MemoryOrderSuccess, class MemoryOrderFailure>
+KOKKOS_FORCEINLINE_FUNCTION
+bool atomic_compare_exchange_strong(
+  T* dest, T compare, T val,
+  MemoryOrderSuccess order_success,
+  MemoryOrderFailure order_failure
+) {
+  return _atomic_compare_exchange_strong(dest, compare, val, order_success, order_failure);
+}
+
+
+} // end namespace Impl
+
 } // namespace Kokkos
 
+#if defined(KOKKOS_ENABLE_CUDA)
+#include <Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp>
+#endif
+
 #endif
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Weak.hpp b/packages/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Weak.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..3abc8ed4b7c77137069c0356045e3e0363fdc4e6
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Weak.hpp
@@ -0,0 +1,418 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#if defined( KOKKOS_ENABLE_RFO_PREFETCH )
+#include <xmmintrin.h>
+#endif
+
+#include <Kokkos_Macros.hpp>
+#include <Kokkos_Atomic.hpp>
+#ifndef KOKKOS_ATOMIC_COMPARE_EXCHANGE_WEAK_HPP
+#define KOKKOS_ATOMIC_COMPARE_EXCHANGE_WEAK_HPP
+
+#if defined(KOKKOS_ENABLE_CUDA)
+#include<Cuda/Kokkos_Cuda_Version_9_8_Compatibility.hpp>
+#endif
+
+namespace Kokkos {
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+// Cuda sm_70 or greater supports C++-like semantics directly
+
+#if defined( KOKKOS_ENABLE_CUDA )
+
+#if defined(__CUDA_ARCH__) || defined(KOKKOS_IMPL_CUDA_CLANG_WORKAROUND)
+
+
+#if __CUDA_ARCH__ >= 700
+// See: https://github.com/ogiroux/freestanding
+#  define kokkos_cuda_internal_cas_release_32(ptr, old, expected, desired) \
+  asm volatile("atom.cas.release.sys.b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory")
+#  define kokkos_cuda_internal_cas_acquire_32(ptr, old, expected, desired) \
+  asm volatile("atom.cas.acquire.sys.b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory")
+#  define kokkos_cuda_internal_cas_acq_rel_32(ptr, old, expected, desired) \
+  asm volatile("atom.cas.acq_rel.sys.b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory")
+#  define kokkos_cuda_internal_cas_relaxed_32(ptr, old, expected, desired) \
+  asm volatile("atom.cas.relaxed.sys.b32 %0, [%1], %2, %3;" : "=r"(old) : "l"(ptr), "r"(expected), "r"(desired) : "memory")
+#  define kokkos_cuda_internal_fence_seq_cst() asm volatile("fence.sc.sys;" : : : "memory")
+#  define kokkos_cuda_internal_fence_acq_rel() asm volatile("fence.acq_rel.sys;" : : : "memory")
+#else
+#  define kokkos_cuda_internal_fence_acq_rel() asm volatile("membar.sys;" : : : "memory")
+#  define kokkos_cuda_internal_fence_seq_cst() asm volatile("membar.sys;" : : : "memory")
+#endif
+
+
+// 32-bit version
+template <class T,
+  typename std::enable_if<sizeof(T) == 4, int>::type = 0
+>
+__inline__ __device__
+bool
+atomic_compare_exchange_weak(
+  T volatile* const dest,
+  T* const expected,
+  T const desired,
+  std::memory_order success_order = std::memory_order_seq_cst,
+  std::memory_order failure_order = std::memory_order_seq_cst
+) {
+  // TODO assert that success_order >= failure_order
+  // See: https://github.com/ogiroux/freestanding
+  int32_t tmp = 0;
+  int32_t old = 0;
+  memcpy(&tmp, &desired, sizeof(T));
+  memcpy(&old, expected, sizeof(T));
+  int32_t old_tmp = old;
+#if __CUDA_ARCH__ >= 700
+  switch(success_order) {
+    case std::memory_order_seq_cst:
+      // sequentially consistent is just an acquire with a seq_cst fence
+      kokkos_cuda_internal_fence_seq_cst();
+      kokkos_cuda_internal_cas_acquire_32((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_acquire:
+      kokkos_cuda_internal_cas_acquire_32((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_consume:
+      // same as acquire on PTX compatible platforms
+      kokkos_cuda_internal_cas_acquire_32((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_acq_rel:
+      kokkos_cuda_internal_cas_acq_rel_32((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_release:
+      kokkos_cuda_internal_cas_release_32((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_relaxed:
+      kokkos_cuda_internal_cas_relaxed_32((T*)dest, old, old_tmp, tmp);
+      break;
+  };
+#else
+  // All of the orders that require a fence before the relaxed atomic operation:
+  if(
+    success_order == std::memory_order_release
+    || success_order == std::memory_order_acq_rel
+  ) {
+    kokkos_cuda_internal_fence_acq_rel();
+  }
+  else if(success_order == std::memory_order_seq_cst) {
+    kokkos_cuda_internal_fence_seq_cst();
+  }
+  // This is relaxed: 
+  // Cuda API requires casting away volatile
+  atomicCAS((T*)dest, old_tmp, tmp);
+#endif
+  bool const rv = (old == old_tmp);
+#if __CUDA_ARCH__ < 700
+  if(rv) {
+    if(
+      success_order == std::memory_order_acquire
+      || success_order == std::memory_order_consume
+      || success_order == std::memory_order_acq_rel
+    ) {
+      kokkos_cuda_internal_fence_acq_rel();
+    }
+    else if(success_order == std::memory_order_seq_cst) {
+      kokkos_cuda_internal_fence_seq_cst();
+    }
+  }
+  else {
+    if(
+      failure_order == std::memory_order_acquire
+      || failure_order == std::memory_order_consume
+      || failure_order == std::memory_order_acq_rel
+    ) {
+      kokkos_cuda_internal_fence_acq_rel();
+    }
+    else if(failure_order == std::memory_order_seq_cst) {
+      kokkos_cuda_internal_fence_seq_cst();
+    }
+  }
+#endif
+  memcpy(expected, &old, sizeof(T));
+  return rv;
+}
+
+// 64-bit version
+template <class T,
+  typename std::enable_if<sizeof(T) == 8, int>::type = 0
+>
+bool
+atomic_compare_exchange_weak(
+  T volatile* const dest,
+  T* const expected,
+  T const desired,
+  std::memory_order success_order = std::memory_order_seq_cst,
+  std::memory_order failure_order = std::memory_order_seq_cst
+) {
+  // TODO assert that success_order >= failure_order
+  // See: https://github.com/ogiroux/freestanding
+  int64_t tmp = 0;
+  int64_t old = 0;
+  memcpy(&tmp, &desired, sizeof(T));
+  memcpy(&old, expected, sizeof(T));
+  int64_t old_tmp = old;
+#if __CUDA_ARCH__ >= 700
+  switch(success_order) {
+    case std::memory_order_seq_cst:
+      // sequentially consistent is just an acquire with a seq_cst fence
+      kokkos_cuda_internal_fence_seq_cst();
+      kokkos_cuda_internal_cas_acquire_64((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_acquire:
+      kokkos_cuda_internal_cas_acquire_64((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_consume:
+      // same as acquire on PTX compatible platforms
+      kokkos_cuda_internal_cas_acquire_64((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_acq_rel:
+      kokkos_cuda_internal_cas_acq_rel_64((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_release:
+      kokkos_cuda_internal_cas_release_64((T*)dest, old, old_tmp, tmp);
+      break;
+    case std::memory_order_relaxed:
+      kokkos_cuda_internal_cas_relaxed_64((T*)dest, old, old_tmp, tmp);
+      break;
+  };
+#else
+  // Cuda API requires casting away volatile
+  atomicCAS((T*)dest, old_tmp, tmp);
+#endif
+  bool const rv = (old == old_tmp);
+  memcpy(expected, &old, sizeof(T));
+  return rv;
+}
+
+#endif // defined(__CUDA_ARCH__) || defined(KOKKOS_IMPL_CUDA_CLANG_WORKAROUND)
+
+#endif // defined( KOKKOS_ENABLE_CUDA )
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+// GCC native CAS supports int, long, unsigned int, unsigned long.
+// Intel native CAS support int and long with the same interface as GCC.
+#if !defined(KOKKOS_ENABLE_ROCM_ATOMICS)
+#if !defined(__CUDA_ARCH__) || defined(KOKKOS_IMPL_CUDA_CLANG_WORKAROUND)
+#if defined(KOKKOS_ENABLE_GNU_ATOMICS) || defined(KOKKOS_ENABLE_INTEL_ATOMICS)
+
+inline
+int atomic_compare_exchange( volatile int * const dest, const int compare, const int val)
+{
+#if defined( KOKKOS_ENABLE_RFO_PREFETCH )
+  _mm_prefetch( (const char*) dest, _MM_HINT_ET0 );
+#endif
+  return __sync_val_compare_and_swap(dest,compare,val);
+}
+
+inline
+long atomic_compare_exchange( volatile long * const dest, const long compare, const long val )
+{ 
+#if defined( KOKKOS_ENABLE_RFO_PREFETCH )
+  _mm_prefetch( (const char*) dest, _MM_HINT_ET0 );
+#endif
+  return __sync_val_compare_and_swap(dest,compare,val);
+}
+
+#if defined( KOKKOS_ENABLE_GNU_ATOMICS )
+
+// GCC supports unsigned
+
+inline
+unsigned int atomic_compare_exchange( volatile unsigned int * const dest, const unsigned int compare, const unsigned int val )
+{ return __sync_val_compare_and_swap(dest,compare,val); }
+
+inline
+unsigned long atomic_compare_exchange( volatile unsigned long * const dest ,
+                                       const unsigned long compare ,
+                                       const unsigned long val )
+{ return __sync_val_compare_and_swap(dest,compare,val); }
+
+#endif
+
+template < typename T >
+inline
+T atomic_compare_exchange( volatile T * const dest, const T & compare,
+  typename Kokkos::Impl::enable_if< sizeof(T) == sizeof(int) , const T & >::type val )
+{
+  union U {
+    int i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {};
+  } tmp ;
+
+#if defined( KOKKOS_ENABLE_RFO_PREFETCH )
+  _mm_prefetch( (const char*) dest, _MM_HINT_ET0 );
+#endif
+
+  tmp.i = __sync_val_compare_and_swap( (int*) dest , *((int*)&compare) , *((int*)&val) );
+  return tmp.t ;
+}
+
+template < typename T >
+inline
+T atomic_compare_exchange( volatile T * const dest, const T & compare,
+  typename Kokkos::Impl::enable_if< sizeof(T) != sizeof(int) &&
+                                    sizeof(T) == sizeof(long) , const T & >::type val )
+{
+  union U {
+    long i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {};
+  } tmp ;
+
+#if defined( KOKKOS_ENABLE_RFO_PREFETCH )
+  _mm_prefetch( (const char*) dest, _MM_HINT_ET0 );
+#endif
+
+  tmp.i = __sync_val_compare_and_swap( (long*) dest , *((long*)&compare) , *((long*)&val) );
+  return tmp.t ;
+}
+
+#if defined( KOKKOS_ENABLE_ASM) && defined ( KOKKOS_ENABLE_ISA_X86_64 )
+template < typename T >
+inline
+T atomic_compare_exchange( volatile T * const dest, const T & compare,
+  typename Kokkos::Impl::enable_if< sizeof(T) != sizeof(int) &&
+                                    sizeof(T) != sizeof(long) &&
+                                    sizeof(T) == sizeof(Impl::cas128_t), const T & >::type val )
+{
+  union U {
+    Impl::cas128_t i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {};
+  } tmp ;
+
+#if defined( KOKKOS_ENABLE_RFO_PREFETCH )
+  _mm_prefetch( (const char*) dest, _MM_HINT_ET0 );
+#endif
+
+  tmp.i = Impl::cas128( (Impl::cas128_t*) dest , *((Impl::cas128_t*)&compare) , *((Impl::cas128_t*)&val) );
+  return tmp.t ;
+}
+#endif
+
+template < typename T >
+inline
+T atomic_compare_exchange( volatile T * const dest , const T compare ,
+    typename Kokkos::Impl::enable_if<
+                  ( sizeof(T) != 4 )
+               && ( sizeof(T) != 8 )
+            #if defined(KOKKOS_ENABLE_ASM) && defined ( KOKKOS_ENABLE_ISA_X86_64 )
+               && ( sizeof(T) != 16 )
+            #endif
+             , const T >::type& val )
+{
+#if defined( KOKKOS_ENABLE_RFO_PREFETCH )
+  _mm_prefetch( (const char*) dest, _MM_HINT_ET0 );
+#endif
+
+  while( !Impl::lock_address_host_space( (void*) dest ) );
+  T return_val = *dest;
+  if( return_val == compare ) {
+    // Don't use the following line of code here:
+    //
+    //const T tmp = *dest = val;
+    //
+    // Instead, put each assignment in its own statement.  This is
+    // because the overload of T::operator= for volatile *this should
+    // return void, not volatile T&.  See Kokkos #177:
+    //
+    // https://github.com/kokkos/kokkos/issues/177
+    *dest = val;
+    const T tmp = *dest;
+    #ifndef KOKKOS_COMPILER_CLANG
+    (void) tmp;
+    #endif
+  }
+  Impl::unlock_address_host_space( (void*) dest );
+  return return_val;
+}
+//----------------------------------------------------------------------------
+
+#elif defined( KOKKOS_ENABLE_OPENMP_ATOMICS )
+
+template< typename T >
+KOKKOS_INLINE_FUNCTION
+T atomic_compare_exchange( volatile T * const dest, const T compare, const T val )
+{
+  T retval;
+#pragma omp critical
+  {
+    retval = dest[0];
+    if ( retval == compare )
+        dest[0] = val;
+  }
+  return retval;
+}
+
+#elif defined( KOKKOS_ENABLE_SERIAL_ATOMICS )
+
+template< typename T >
+KOKKOS_INLINE_FUNCTION
+T atomic_compare_exchange( volatile T * const dest_v, const T compare, const T val )
+{
+  T* dest = const_cast<T*>(dest_v);
+  T retval = *dest;
+  if (retval == compare) *dest = val;
+  return retval;
+}
+
+#endif
+#endif
+#endif // !defined ROCM_ATOMICS
+
+template <typename T>
+KOKKOS_INLINE_FUNCTION
+bool atomic_compare_exchange_strong(volatile T* const dest, const T compare, const T val)
+{
+  return compare == atomic_compare_exchange(dest, compare, val);
+}
+//----------------------------------------------------------------------------
+
+} // namespace Kokkos
+
+#endif
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Add.hpp b/packages/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Add.hpp
index d6fab811332bc4aba65118d9da96582c42db1b6c..495fd48477a872c1e8fac5b52b8a8dd079fb7787 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Add.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Add.hpp
@@ -90,10 +90,12 @@ __inline__ __device__
 T atomic_fetch_add( volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) == sizeof(int) , const T >::type val )
 {
-  union U {
+  // to work around a bug in the clang cuda compiler, the name here needs to be
+  // different from the one internal to the other overloads
+  union U1 {
     int i ;
     T t ;
-    KOKKOS_INLINE_FUNCTION U() {};
+    KOKKOS_INLINE_FUNCTION U1() {};
   } assume , oldval , newval ;
 
   oldval.t = *dest ;
@@ -113,10 +115,12 @@ T atomic_fetch_add( volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) != sizeof(int) &&
                                     sizeof(T) == sizeof(unsigned long long int) , const T >::type val )
 {
-  union U {
+  // to work around a bug in the clang cuda compiler, the name here needs to be
+  // different from the one internal to the other overloads
+  union U2 {
     unsigned long long int i ;
     T t ;
-    KOKKOS_INLINE_FUNCTION U() {};
+    KOKKOS_INLINE_FUNCTION U2() {};
   } assume , oldval , newval ;
 
   oldval.t = *dest ;
@@ -176,7 +180,7 @@ T atomic_fetch_add( volatile T * const dest ,
 #if !defined(__CUDA_ARCH__) || defined(KOKKOS_IMPL_CUDA_CLANG_WORKAROUND)
 #if defined(KOKKOS_ENABLE_GNU_ATOMICS) || defined(KOKKOS_ENABLE_INTEL_ATOMICS)
 
-#if defined( KOKKOS_ENABLE_ASM ) && defined ( KOKKOS_ENABLE_ISA_X86_64 )
+#if defined( KOKKOS_ENABLE_ASM ) && (defined(KOKKOS_ENABLE_ISA_X86_64) || defined(KOKKOS_KNL_USE_ASM_WORKAROUND))
 inline
 int atomic_fetch_add( volatile int * dest , const int val )
 {
diff --git a/packages/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp b/packages/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp
index 48dc8731ef8a6551dbcb0ce19cc0620320d0096b..7a4f95cd9960e5643382e34c95d2d4529aeaf0ef 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp
@@ -89,7 +89,11 @@ __inline__ __device__
 T atomic_fetch_sub( volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) == sizeof(int) , const T >::type val )
 {
-  union { int i ; T t ; } oldval , assume , newval ;
+  union U {
+    int i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {}
+  } oldval , assume , newval ;
 
   oldval.t = *dest ;
 
@@ -108,7 +112,11 @@ T atomic_fetch_sub( volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) != sizeof(int) &&
                                     sizeof(T) == sizeof(unsigned long long int) , const T >::type val )
 {
-  union { unsigned long long int i ; T t ; } oldval , assume , newval ;
+  union U {
+    unsigned long long int i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {}
+  } oldval , assume , newval ;
 
   oldval.t = *dest ;
 
@@ -211,7 +219,11 @@ inline
 T atomic_fetch_sub( volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) == sizeof(int) , const T >::type val )
 {
-  union { int i ; T t ; } assume , oldval , newval ;
+  union U {
+    int i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {}
+  } oldval , assume , newval ;
 
 #if defined( KOKKOS_ENABLE_RFO_PREFETCH )
   _mm_prefetch( (const char*) dest, _MM_HINT_ET0 );
@@ -238,7 +250,11 @@ T atomic_fetch_sub( volatile T * const dest ,
   _mm_prefetch( (const char*) dest, _MM_HINT_ET0 );
 #endif
 
-  union { long i ; T t ; } assume , oldval , newval ;
+  union U {
+     long i ;
+     T t ;
+     KOKKOS_INLINE_FUNCTION U() {}
+   } oldval , assume , newval ;
 
   oldval.t = *dest ;
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_Atomic_Generic.hpp b/packages/kokkos/core/src/impl/Kokkos_Atomic_Generic.hpp
index a3a18166af4b2b00f6ea94aad2b6fe8a0b869da7..c1a7d803642515f321f9cd18f1f61cdee4d88585 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Atomic_Generic.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Atomic_Generic.hpp
@@ -156,13 +156,17 @@ T atomic_fetch_oper( const Oper& op, volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) != sizeof(int) &&
                                     sizeof(T) == sizeof(unsigned long long int) , const T >::type val )
 {
-  union { unsigned long long int i ; T t ; } oldval , assume , newval ;
+  union U {
+    unsigned long long int i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {}
+  } oldval , assume , newval ;
 
   oldval.t = *dest ;
 
   do {
     assume.i = oldval.i ;
-    newval.t = Oper::apply(assume.t, val) ;
+    newval.t = op.apply(assume.t, val) ;
     oldval.i = Kokkos::atomic_compare_exchange( (unsigned long long int*)dest , assume.i , newval.i );
   } while ( assume.i != oldval.i );
 
@@ -175,7 +179,11 @@ T atomic_oper_fetch( const Oper& op, volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) != sizeof(int) &&
                                     sizeof(T) == sizeof(unsigned long long int) , const T >::type val )
 {
-  union { unsigned long long int i ; T t ; } oldval , assume , newval ;
+  union U {
+    unsigned long long int i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {}
+  } oldval , assume , newval ;
 
   oldval.t = *dest ;
 
@@ -193,13 +201,17 @@ KOKKOS_INLINE_FUNCTION
 T atomic_fetch_oper( const Oper& op, volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) == sizeof(int) , const T >::type val )
 {
-  union { int i ; T t ; } oldval , assume , newval ;
+  union U {
+    int i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {}
+  } oldval , assume , newval ;
 
   oldval.t = *dest ;
 
   do {
     assume.i = oldval.i ;
-    newval.t = Oper::apply(assume.t, val) ;
+    newval.t = op.apply(assume.t, val) ;
     oldval.i = Kokkos::atomic_compare_exchange( (int*)dest , assume.i , newval.i );
   } while ( assume.i != oldval.i );
 
@@ -211,7 +223,11 @@ KOKKOS_INLINE_FUNCTION
 T atomic_oper_fetch( const Oper& op, volatile T * const dest ,
   typename Kokkos::Impl::enable_if< sizeof(T) == sizeof(int), const T >::type val )
 {
-  union { int i ; T t ; } oldval , assume , newval ;
+  union U {
+    int i ;
+    T t ;
+    KOKKOS_INLINE_FUNCTION U() {}
+  } oldval , assume , newval ;
 
   oldval.t = *dest ;
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_Atomic_Load.hpp b/packages/kokkos/core/src/impl/Kokkos_Atomic_Load.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..2db74b9f1e90519f5000fd947ce254913dd84f89
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_Atomic_Load.hpp
@@ -0,0 +1,266 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2019) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_KOKKOS_ATOMIC_LOAD_HPP
+#define KOKKOS_IMPL_KOKKOS_ATOMIC_LOAD_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined(KOKKOS_ATOMIC_HPP)
+
+#include <impl/Kokkos_Atomic_Memory_Order.hpp>
+
+#if defined(KOKKOS_ENABLE_CUDA)
+#include <Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp>
+#endif
+
+namespace Kokkos {
+namespace Impl {
+
+// Olivier's implementation helpfully binds to the same builtins as GNU, so
+// we make this code common across multiple options
+#if (defined(KOKKOS_ENABLE_GNU_ATOMICS) && !defined(__CUDA_ARCH__)) \
+    || (defined(KOKKOS_ENABLE_INTEL_ATOMICS) && !defined(__CUDA_ARCH__)) \
+    || defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+
+#if defined(__CUDA_ARCH__) && defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+  #define KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH __inline__ __device__
+#else
+  #define KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH inline
+#endif
+
+template <class T, class MemoryOrder>
+KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH
+T _atomic_load(
+  T* ptr, MemoryOrder,
+  typename std::enable_if<
+    (
+      sizeof(T) == 1
+        || sizeof(T) == 2
+        || sizeof(T) == 4
+        || sizeof(T) == 8
+    )
+    && std::is_same<
+      typename MemoryOrder::memory_order,
+      typename std::remove_cv<MemoryOrder>::type
+    >::value,
+    void const**
+  >::type = nullptr
+) {
+  return __atomic_load_n(ptr, MemoryOrder::gnu_constant);
+}
+
+template <class T, class MemoryOrder>
+KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH
+T _atomic_load(
+  T* ptr, MemoryOrder,
+  typename std::enable_if<
+    !(
+      sizeof(T) == 1
+        || sizeof(T) == 2
+        || sizeof(T) == 4
+        || sizeof(T) == 8
+    )
+    && std::is_default_constructible<T>::value
+    && std::is_same<
+      typename MemoryOrder::memory_order,
+      typename std::remove_cv<MemoryOrder>::type
+    >::value,
+    void const**
+  >::type = nullptr
+) {
+  T rv{};
+  __atomic_load(ptr, &rv, MemoryOrder::gnu_constant);
+  return rv;
+}
+
+#undef KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH
+
+#elif defined(__CUDA_ARCH__)
+
+// Not compiling for Volta or later, or Cuda ASM atomics were manually disabled
+
+template <class T>
+__device__ __inline__
+T _relaxed_atomic_load_impl(
+  T* ptr,
+  typename std::enable_if<
+    (
+      sizeof(T) == 1
+      || sizeof(T) == 2
+      || sizeof(T) == 4
+      || sizeof(T) == 8
+    ),
+    void const**
+  >::type = nullptr
+) {
+  return *ptr;
+}
+
+template <class T>
+struct NoOpOper {
+  __device__ __inline__
+  static constexpr T apply(T const&, T const&) noexcept { }
+};
+
+template <class T>
+__device__ __inline__
+T _relaxed_atomic_load_impl(
+  T* ptr,
+  typename std::enable_if<
+    !(
+      sizeof(T) == 1
+      || sizeof(T) == 2
+      || sizeof(T) == 4
+      || sizeof(T) == 8
+    ),
+    void const**
+  >::type = nullptr
+) {
+  T rv{};
+  // TODO remove a copy operation here?
+  Kokkos::atomic_oper_fetch(NoOpOper<T>{}, &rv, rv);
+  return rv;
+}
+
+template <class T>
+__device__ __inline__
+T _atomic_load(T* ptr, memory_order_seq_cst_t) {
+  Kokkos::memory_fence();
+  T rv = Impl::_relaxed_atomic_load_impl(ptr);
+  Kokkos::memory_fence();
+  return rv;
+}
+
+template <class T>
+__device__ __inline__
+T _atomic_load(T* ptr, memory_order_acquire_t) {
+  T rv = Impl::_relaxed_atomic_load_impl(ptr);
+  Kokkos::memory_fence();
+  return rv;
+}
+
+template <class T>
+__device__ __inline__
+T _atomic_load(T* ptr, memory_order_relaxed_t) {
+  return _relaxed_atomic_load_impl(ptr);
+}
+
+#elif defined(KOKKOS_ENABLE_OPENMP_ATOMICS)
+
+template <class T, class MemoryOrder>
+inline
+T _atomic_load(T* ptr, MemoryOrder)
+{
+  // AFAICT, all OpenMP atomics are sequentially consistent, so memory order doesn't matter
+  T retval{ };
+#pragma omp atomic read
+  {
+    retval = *ptr;
+  }
+  return retval;
+}
+
+#elif defined(KOKKOS_ENABLE_SERIAL_ATOMICS)
+
+template <class T, class MemoryOrder>
+inline
+T _atomic_load(T* ptr, MemoryOrder)
+{
+  return *ptr;
+}
+
+#endif // end of all atomic implementations
+
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+T atomic_load(T* ptr, Impl::memory_order_seq_cst_t) {
+  return _atomic_load(ptr, Impl::memory_order_seq_cst);
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+T atomic_load(T* ptr, Impl::memory_order_acquire_t) {
+  return _atomic_load(ptr, Impl::memory_order_acquire);
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+T atomic_load(T* ptr, Impl::memory_order_relaxed_t) {
+  return _atomic_load(ptr, Impl::memory_order_relaxed);
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+T atomic_load(T* ptr, Impl::memory_order_release_t) {
+  static_assert(
+    sizeof(T) == 0, // just something that will always be false, but only on instantiation
+    "atomic_load with memory order release doesn't make any sense!"
+  );
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+T atomic_load(T* ptr, Impl::memory_order_acq_rel_t) {
+  static_assert(
+    sizeof(T) == 0, // just something that will always be false, but only on instantiation
+    "atomic_load with memory order acq_rel doesn't make any sense!"
+  );
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+T atomic_load(T* ptr) {
+  // relaxed by default!
+  return _atomic_load(ptr, Impl::memory_order_relaxed);
+}
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+#if defined(KOKKOS_ENABLE_CUDA)
+#include <Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp>
+#endif
+
+#endif // defined(KOKKOS_ATOMIC_HPP)
+#endif //KOKKOS_IMPL_KOKKOS_ATOMIC_LOAD_HPP
diff --git a/packages/kokkos/core/src/impl/Kokkos_Atomic_Memory_Order.hpp b/packages/kokkos/core/src/impl/Kokkos_Atomic_Memory_Order.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..7b9c08551c0fcc460ebfb046ef25ff394b2d406f
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_Atomic_Memory_Order.hpp
@@ -0,0 +1,122 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2019) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_KOKKOS_ATOMIC_MEMORY_ORDER_HPP
+#define KOKKOS_KOKKOS_ATOMIC_MEMORY_ORDER_HPP
+
+#include <Kokkos_Macros.hpp>
+
+#include <atomic>
+
+namespace Kokkos {
+namespace Impl {
+
+/** @file
+ * Provides strongly-typed analogs of the standard memory order enumerators.
+ * In addition to (very slightly) reducing the constant propagation burden on
+ * the compiler, this allows us to give compile-time errors for things that
+ * don't make sense, like atomic_load with memory order release.
+ */
+
+struct memory_order_seq_cst_t {
+  using memory_order = memory_order_seq_cst_t;
+#if defined(KOKKOS_ENABLE_GNU_ATOMICS) \
+    || defined(KOKKOS_ENABLE_INTEL_ATOMICS) \
+    || defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+  static constexpr auto gnu_constant = __ATOMIC_SEQ_CST;
+#endif
+  static constexpr auto std_constant = std::memory_order_seq_cst;
+};
+constexpr memory_order_seq_cst_t memory_order_seq_cst = { };
+
+struct memory_order_relaxed_t {
+  using memory_order = memory_order_relaxed_t;
+#if defined(KOKKOS_ENABLE_GNU_ATOMICS) \
+    || defined(KOKKOS_ENABLE_INTEL_ATOMICS) \
+    || defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+  static constexpr auto gnu_constant = __ATOMIC_RELAXED;
+#endif
+  static constexpr auto std_constant = std::memory_order_relaxed;
+};
+constexpr memory_order_relaxed_t memory_order_relaxed = { };
+
+struct memory_order_acquire_t {
+  using memory_order = memory_order_acquire_t;
+#if defined(KOKKOS_ENABLE_GNU_ATOMICS) \
+    || defined(KOKKOS_ENABLE_INTEL_ATOMICS) \
+    || defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+  static constexpr auto gnu_constant = __ATOMIC_ACQUIRE;
+#endif
+  static constexpr auto std_constant = std::memory_order_acquire;
+};
+constexpr memory_order_acquire_t memory_order_acquire = { };
+
+struct memory_order_release_t {
+  using memory_order = memory_order_release_t;
+#if defined(KOKKOS_ENABLE_GNU_ATOMICS) \
+    || defined(KOKKOS_ENABLE_INTEL_ATOMICS) \
+    || defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+  static constexpr auto gnu_constant = __ATOMIC_RELEASE;
+#endif
+  static constexpr auto std_constant = std::memory_order_release;
+};
+constexpr memory_order_release_t memory_order_release = { };
+
+struct memory_order_acq_rel_t {
+  using memory_order = memory_order_acq_rel_t;
+#if defined(KOKKOS_ENABLE_GNU_ATOMICS) \
+    || defined(KOKKOS_ENABLE_INTEL_ATOMICS) \
+    || defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+  static constexpr auto gnu_constant = __ATOMIC_ACQ_REL;
+#endif
+  static constexpr auto std_constant = std::memory_order_acq_rel;
+};
+constexpr memory_order_acq_rel_t memory_order_acq_rel = { };
+
+
+// Intentionally omit consume (for now)
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+#endif //KOKKOS_KOKKOS_ATOMIC_MEMORY_ORDER_HPP
diff --git a/packages/kokkos/core/src/impl/Kokkos_Atomic_Store.hpp b/packages/kokkos/core/src/impl/Kokkos_Atomic_Store.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..066f90480d594b008eb177d9df676367c9a76b3e
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_Atomic_Store.hpp
@@ -0,0 +1,258 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2019) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_KOKKOS_ATOMIC_STORE_HPP
+#define KOKKOS_IMPL_KOKKOS_ATOMIC_STORE_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined(KOKKOS_ATOMIC_HPP)
+
+#include <impl/Kokkos_Atomic_Memory_Order.hpp>
+
+#if defined(KOKKOS_ENABLE_CUDA)
+#include <Cuda/Kokkos_Cuda_Atomic_Intrinsics.hpp>
+#endif
+
+namespace Kokkos {
+namespace Impl {
+
+// Olivier's implementation helpfully binds to the same builtins as GNU, so
+// we make this code common across multiple options
+#if (defined(KOKKOS_ENABLE_GNU_ATOMICS) && !defined(__CUDA_ARCH__)) \
+    || (defined(KOKKOS_ENABLE_INTEL_ATOMICS) && !defined(__CUDA_ARCH__)) \
+    || defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+
+#if defined(__CUDA_ARCH__) && defined(KOKKOS_ENABLE_CUDA_ASM_ATOMICS)
+  #define KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH __inline__ __device__
+#else
+  #define KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH inline
+#endif
+
+template <class T, class MemoryOrder>
+KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH
+void _atomic_store(
+  T* ptr, T val, MemoryOrder,
+  typename std::enable_if<
+    (
+      sizeof(T) == 1
+        || sizeof(T) == 2
+        || sizeof(T) == 4
+        || sizeof(T) == 8
+    )
+    && std::is_same<
+      typename MemoryOrder::memory_order,
+      typename std::remove_cv<MemoryOrder>::type
+    >::value,
+    void const**
+  >::type = nullptr
+) {
+  __atomic_store_n(ptr, val, MemoryOrder::gnu_constant);
+}
+
+template <class T, class MemoryOrder>
+KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH
+void _atomic_store(
+  T* ptr, T val, MemoryOrder,
+  typename std::enable_if<
+    !(
+      sizeof(T) == 1
+        || sizeof(T) == 2
+        || sizeof(T) == 4
+        || sizeof(T) == 8
+    )
+    && std::is_default_constructible<T>::value
+    && std::is_same<
+      typename MemoryOrder::memory_order,
+      typename std::remove_cv<MemoryOrder>::type
+    >::value,
+    void const**
+  >::type = nullptr
+) {
+  __atomic_store(ptr, &val, MemoryOrder::gnu_constant);
+}
+
+#undef KOKKOS_INTERNAL_INLINE_DEVICE_IF_CUDA_ARCH
+
+#elif defined(__CUDA_ARCH__)
+
+// Not compiling for Volta or later, or Cuda ASM atomics were manually disabled
+
+template <class T>
+__device__ __inline__
+void _relaxed_atomic_store_impl(
+  T* ptr, T val,
+  typename std::enable_if<
+    (
+      sizeof(T) == 1
+      || sizeof(T) == 2
+      || sizeof(T) == 4
+      || sizeof(T) == 8
+    ),
+    void const**
+  >::type = nullptr
+) {
+  *ptr = val;
+}
+
+template <class T>
+struct StoreOper {
+  __device__ __inline__
+  static constexpr T apply(T const&, T const& val) noexcept { return val; }
+};
+
+template <class T>
+__device__ __inline__
+void _relaxed_atomic_store_impl(
+  T* ptr, T val,
+  typename std::enable_if<
+    !(
+      sizeof(T) == 1
+      || sizeof(T) == 2
+      || sizeof(T) == 4
+      || sizeof(T) == 8
+    ),
+    void const**
+  >::type = nullptr
+) {
+  Kokkos::atomic_oper_fetch(StoreOper<T>{}, &rv, (T&&)val);
+}
+
+template <class T>
+__device__ __inline__
+void _atomic_store(T* ptr, T val, memory_order_seq_cst_t) {
+  Kokkos::memory_fence();
+  Impl::_relaxed_atomic_store_impl(ptr, val);
+  Kokkos::memory_fence();
+  return rv;
+}
+
+template <class T>
+__device__ __inline__
+void _atomic_store(T* ptr, T val, memory_order_release_t) {
+  Kokkos::memory_fence();
+  _relaxed_atomic_store_impl(ptr, val);
+}
+
+template <class T>
+__device__ __inline__
+void _atomic_store(T* ptr, T val, memory_order_relaxed_t) {
+  _relaxed_atomic_store_impl(ptr, val);
+}
+
+#elif defined(KOKKOS_ENABLE_OPENMP_ATOMICS)
+
+template <class T, class MemoryOrder>
+inline
+void _atomic_store(T* ptr, T val, MemoryOrder)
+{
+  // AFAICT, all OpenMP atomics are sequentially consistent, so memory order doesn't matter
+#pragma omp atomic write
+  {
+    *ptr = val;
+  }
+}
+
+#elif defined(KOKKOS_ENABLE_SERIAL_ATOMICS)
+
+template <class T, class MemoryOrder>
+inline
+void _atomic_store(T* ptr, T val, MemoryOrder)
+{
+  *ptr = val;
+}
+
+#endif // end of all atomic implementations
+
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+void atomic_store(T* ptr, T val, Impl::memory_order_seq_cst_t) {
+  _atomic_store(ptr, val, Impl::memory_order_seq_cst);
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+void atomic_store(T* ptr, T val, Impl::memory_order_release_t) {
+  _atomic_store(ptr, val, Impl::memory_order_release);
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+void atomic_store(T* ptr, T val, Impl::memory_order_relaxed_t) {
+  _atomic_store(ptr, val, Impl::memory_order_relaxed);
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+void atomic_store(T* ptr, T val, Impl::memory_order_acquire_t) {
+  static_assert(
+    sizeof(T) == 0, // just something that will always be false, but only on instantiation
+    "atomic_store with memory order acquire doesn't make any sense!"
+  );
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+void atomic_store(T* ptr, T val, Impl::memory_order_acq_rel_t) {
+  static_assert(
+    sizeof(T) == 0, // just something that will always be false, but only on instantiation
+    "atomic_store with memory order acq_rel doesn't make any sense!"
+  );
+}
+
+template <class T>
+KOKKOS_FORCEINLINE_FUNCTION
+void atomic_store(T* ptr, T val) {
+  // relaxed by default!
+  _atomic_store(ptr, Impl::memory_order_relaxed);
+}
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+#if defined(KOKKOS_ENABLE_CUDA)
+#include <Cuda/Kokkos_Cuda_Atomic_Intrinsics_Restore_Builtins.hpp>
+#endif
+
+#endif // defined(KOKKOS_ATOMIC_HPP)
+#endif //KOKKOS_IMPL_KOKKOS_ATOMIC_STORE_HPP
diff --git a/packages/kokkos/core/src/impl/Kokkos_ChaseLev.hpp b/packages/kokkos/core/src/impl/Kokkos_ChaseLev.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..f86e68cb1d52c386c6a7ef1c937a13e9adfbea8c
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_ChaseLev.hpp
@@ -0,0 +1,314 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_LOCKFREEDEQUE_HPP
+#define KOKKOS_IMPL_LOCKFREEDEQUE_HPP
+
+#include <Kokkos_Macros.hpp>
+#ifdef KOKKOS_ENABLE_TASKDAG // Note: implies CUDA_VERSION >= 8000 if using CUDA
+
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_PointerOwnership.hpp>
+#include <impl/Kokkos_OptionalRef.hpp>
+#include <impl/Kokkos_Error.hpp> // KOKKOS_EXPECTS
+#include <impl/Kokkos_LinkedListNode.hpp> // KOKKOS_EXPECTS
+
+#include <Kokkos_Atomic.hpp>  // atomic_compare_exchange, atomic_fence
+#include "Kokkos_LIFO.hpp"
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template <class NodeType, size_t CircularBufferSize, class SizeType = size_t>
+struct fixed_size_circular_buffer {
+public:
+
+  using node_type = NodeType;
+  using size_type = SizeType;
+
+private:
+
+  node_type* m_buffer[CircularBufferSize] = { nullptr };
+
+public:
+
+  fixed_size_circular_buffer() = default;
+  fixed_size_circular_buffer(fixed_size_circular_buffer const&) = delete;
+  fixed_size_circular_buffer(fixed_size_circular_buffer&&) = default;
+  fixed_size_circular_buffer& operator=(fixed_size_circular_buffer const&) = delete;
+  fixed_size_circular_buffer& operator=(fixed_size_circular_buffer&&) = default;
+  ~fixed_size_circular_buffer() = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  static constexpr size_type size() noexcept {
+    return size_type(CircularBufferSize);
+  }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  node_type* operator[](size_type idx) const noexcept {
+    return m_buffer[idx % size()];
+  }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  node_type*& operator[](size_type idx) noexcept {
+    return m_buffer[idx % size()];
+  }
+};
+
+template <class NodeType, class SizeType = size_t>
+struct non_owning_variable_size_circular_buffer {
+public:
+
+  using node_type = NodeType;
+  using size_type = SizeType;
+
+private:
+
+  ObservingRawPtr<node_type*> m_buffer = nullptr;
+  size_type m_size = 0;
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  non_owning_variable_size_circular_buffer(
+    ObservingRawPtr<node_type*> buffer,
+    size_type arg_size
+  ) noexcept
+    : m_buffer(buffer),
+      m_size(arg_size)
+  { }
+
+  non_owning_variable_size_circular_buffer() = default;
+  non_owning_variable_size_circular_buffer(non_owning_variable_size_circular_buffer const&) = delete;
+  non_owning_variable_size_circular_buffer(non_owning_variable_size_circular_buffer&&) = default;
+  non_owning_variable_size_circular_buffer& operator=(non_owning_variable_size_circular_buffer const&) = delete;
+  non_owning_variable_size_circular_buffer& operator=(non_owning_variable_size_circular_buffer&&) = default;
+  ~non_owning_variable_size_circular_buffer() = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr size_type size() const noexcept {
+    return m_size;
+  }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  node_type* operator[](size_type idx) const noexcept {
+    return m_buffer[idx % size()];
+  }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  node_type*& operator[](size_type idx) noexcept {
+    return m_buffer[idx % size()];
+  }
+};
+
+/** Based on "Correct and Efficient Work-Stealing for Weak Memory Models,"
+ * PPoPP '13, https://www.di.ens.fr/~zappa/readings/ppopp13.pdf
+ *
+ */
+template <
+  class T,
+  class CircularBufferT,
+  class SizeType = int32_t
+>
+struct ChaseLevDeque {
+public:
+
+  using size_type = SizeType;
+  using value_type = T;
+  // Still using intrusive linked list for waiting queue
+  using node_type = SimpleSinglyLinkedListNode<>;
+
+private:
+
+  // TODO @tasking @new_feature DSH variable size circular buffer?
+
+  CircularBufferT m_array;
+  size_type m_top = 0;
+  size_type m_bottom = 0;
+
+
+public:
+
+  template <
+    class _ignore=void,
+    class=typename std::enable_if<
+      std::is_default_constructible<CircularBufferT>::value
+    >::type
+  >
+  ChaseLevDeque() : m_array() { }
+
+  explicit
+  ChaseLevDeque(CircularBufferT buffer)
+    : m_array(std::move(buffer))
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  bool empty() const {
+    // TODO @tasking @memory_order DSH memory order
+    return m_top > m_bottom - 1;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<T>
+  pop() {
+    auto b = m_bottom - 1; // atomic load relaxed
+    auto& a = m_array; // atomic load relaxed
+    m_bottom = b; // atomic store relaxed
+    Kokkos::memory_fence(); // memory order seq_cst
+    auto t = m_top; // atomic load relaxed
+    OptionalRef<T> return_value;
+    if(t <= b) {
+      /* non-empty queue */
+      return_value = *static_cast<T*>(a[b]); // relaxed load
+      if(t == b) {
+        /* single last element in the queue. */
+        if(not Impl::atomic_compare_exchange_strong(&m_top, t, t+1, memory_order_seq_cst, memory_order_relaxed)) {
+          /* failed race, someone else stole it */
+          return_value = nullptr;
+        }
+        m_bottom = b + 1; // memory order relaxed
+      }
+    } else {
+      /* empty queue */
+      m_bottom = b + 1; // memory order relaxed
+    }
+    return return_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool push(node_type&& node)
+  {
+    // Just forward to the lvalue version
+    return push(node);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool push(node_type& node)
+  {
+    auto b = m_bottom; // memory order relaxed
+    auto t = Impl::atomic_load(&m_top, memory_order_acquire);
+    auto& a = m_array;
+    if(b - t > a.size() - 1) {
+      /* queue is full, resize */
+      //m_array = a->grow();
+      //a = m_array;
+      return false;
+    }
+    a[b] = &node; // relaxed
+    Impl::atomic_store(&m_bottom, b + 1, memory_order_release);
+    return true;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<T>
+  steal() {
+    auto t = m_top; // TODO @tasking @memory_order DSH: atomic load acquire
+    Kokkos::memory_fence(); // seq_cst fence, so why does the above need to be acquire?
+    auto b = Impl::atomic_load(&m_bottom, memory_order_acquire);
+    OptionalRef<T> return_value;
+    if(t < b) {
+      /* Non-empty queue */
+      auto& a = m_array; // TODO @tasking @memory_order DSH: technically consume ordered, but acquire should be fine
+      Kokkos::load_fence(); // TODO @tasking @memory_order DSH memory order instead of fence
+      return_value = *static_cast<T*>(a[t]); // relaxed
+      if(not Impl::atomic_compare_exchange_strong(&m_top, t, t+1, memory_order_seq_cst, memory_order_relaxed)) {
+        return_value = nullptr;
+      }
+    }
+    return return_value;
+  }
+
+};
+
+/*
+      // The atomicity of this load was more important in the paper's version
+      // because that version had a circular buffer that could grow.  We're
+      // essentially using the memory order in this version as a fence, which
+      // may be unnecessary
+      auto buffer_ptr = (node_type***)&m_array.buffer;
+      auto a = Impl::atomic_load(buffer_ptr, memory_order_acquire); // technically consume ordered, but acquire should be fine
+      return_value = *static_cast<T*>(a[t % m_array->size]); // relaxed; we'd have to replace the m_array->size if we ever allow growth
+*/
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template <size_t CircularBufferSize>
+struct TaskQueueTraitsChaseLev {
+
+  template <class Task>
+  using ready_queue_type = ChaseLevDeque<
+    Task,
+    fixed_size_circular_buffer<SimpleSinglyLinkedListNode<>, CircularBufferSize, int32_t>,
+    int32_t
+  >;
+
+  template <class Task>
+  using waiting_queue_type = SingleConsumeOperationLIFO<Task>;
+
+  template <class Task>
+  using intrusive_task_base_type =
+    typename ready_queue_type<Task>::node_type;
+
+  static constexpr auto ready_queue_insertion_may_fail = true;
+
+};
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* defined KOKKOS_ENABLE_TASKDAG */
+#endif /* #ifndef KOKKOS_IMPL_LOCKFREEDEQUE_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_Core.cpp b/packages/kokkos/core/src/impl/Kokkos_Core.cpp
index 82fdee4399384c1e55df44753872d90c64d6649c..0d472e98bb7d4dc8c7039e7ffc257c3d11cc397c 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Core.cpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Core.cpp
@@ -85,7 +85,8 @@ setenv("MEMKIND_HBW_NODES", "1", 0);
   }
 
   // Protect declarations, to prevent "unused variable" warnings.
-#if defined( KOKKOS_ENABLE_OPENMP ) || defined( KOKKOS_ENABLE_THREADS ) || defined( KOKKOS_ENABLE_OPENMPTARGET )
+#if defined( KOKKOS_ENABLE_OPENMP ) || defined( KOKKOS_ENABLE_THREADS ) ||\
+    defined( KOKKOS_ENABLE_OPENMPTARGET ) || defined ( KOKKOS_ENABLE_HPX )
   const int num_threads = args.num_threads;
 #endif
 #if defined( KOKKOS_ENABLE_THREADS ) || defined( KOKKOS_ENABLE_OPENMPTARGET )
@@ -160,6 +161,21 @@ setenv("MEMKIND_HBW_NODES", "1", 0);
   }
 #endif
 
+#if defined( KOKKOS_ENABLE_HPX )
+  if( std::is_same< Kokkos::Experimental::HPX , Kokkos::DefaultExecutionSpace >::value ||
+      std::is_same< Kokkos::Experimental::HPX , Kokkos::HostSpace::execution_space >::value ) {
+      if(num_threads>0) {
+        Kokkos::Experimental::HPX::impl_initialize(num_threads);
+      } else {
+        Kokkos::Experimental::HPX::impl_initialize();
+      }
+      //std::cout << "Kokkos::initialize() fyi: HPX enabled and initialized" << std::endl ;
+  }
+  else {
+      //std::cout << "Kokkos::initialize() fyi: HPX enabled but not initialized" << std::endl ;
+  }
+#endif
+
 #if defined( KOKKOS_ENABLE_SERIAL )
   // Prevent "unused variable" warning for 'args' input struct.  If
   // Serial::initialize() ever needs to take arguments from the input
@@ -268,6 +284,8 @@ void finalize_internal( const bool all_spaces = false )
       Kokkos::Cuda::impl_finalize();
 #endif
   }
+#else
+  (void)all_spaces;
 #endif
 
 #if defined( KOKKOS_ENABLE_ROCM )
@@ -298,6 +316,15 @@ void finalize_internal( const bool all_spaces = false )
   }
 #endif
 
+#if defined( KOKKOS_ENABLE_HPX )
+  if( std::is_same< Kokkos::Experimental::HPX , Kokkos::DefaultExecutionSpace >::value ||
+      std::is_same< Kokkos::Experimental::HPX , Kokkos::HostSpace::execution_space >::value ||
+      all_spaces ) {
+    if(Kokkos::Experimental::HPX::impl_is_initialized())
+      Kokkos::Experimental::HPX::impl_finalize();
+  }
+#endif
+
 #if defined( KOKKOS_ENABLE_THREADS )
   if( std::is_same< Kokkos::Threads , Kokkos::DefaultExecutionSpace >::value ||
       std::is_same< Kokkos::Threads , Kokkos::HostSpace::execution_space >::value ||
@@ -331,34 +358,38 @@ void fence_internal()
 
 #if defined( KOKKOS_ENABLE_CUDA )
   if( std::is_same< Kokkos::Cuda , Kokkos::DefaultExecutionSpace >::value ) {
-    Kokkos::Cuda::fence();
+    Kokkos::Cuda::impl_static_fence();
   }
 #endif
 
 #if defined( KOKKOS_ENABLE_ROCM )
   if( std::is_same< Kokkos::Experimental::ROCm , Kokkos::DefaultExecutionSpace >::value ) {
-    Kokkos::Experimental::ROCm::fence();
+    Kokkos::Experimental::ROCm().fence();
   }
 #endif
 
 #if defined( KOKKOS_ENABLE_OPENMP )
   if( std::is_same< Kokkos::OpenMP , Kokkos::DefaultExecutionSpace >::value ||
       std::is_same< Kokkos::OpenMP , Kokkos::HostSpace::execution_space >::value ) {
-    Kokkos::OpenMP::fence();
+    Kokkos::OpenMP::impl_static_fence();
   }
 #endif
 
+#if defined( KOKKOS_ENABLE_HPX )
+  Kokkos::Experimental::HPX::impl_static_fence();
+#endif
+
 #if defined( KOKKOS_ENABLE_THREADS )
   if( std::is_same< Kokkos::Threads , Kokkos::DefaultExecutionSpace >::value ||
       std::is_same< Kokkos::Threads , Kokkos::HostSpace::execution_space >::value ) {
-    Kokkos::Threads::fence();
+    Kokkos::Threads::impl_static_fence();
   }
 #endif
 
 #if defined( KOKKOS_ENABLE_SERIAL )
   if( std::is_same< Kokkos::Serial , Kokkos::DefaultExecutionSpace >::value ||
       std::is_same< Kokkos::Serial , Kokkos::HostSpace::execution_space >::value ) {
-    Kokkos::Serial::fence();
+    Kokkos::Serial::impl_static_fence();
   }
 #endif
 
@@ -708,6 +739,12 @@ void print_configuration( std::ostream & out , const bool detail )
   msg << "yes" << std::endl;
 #else
   msg << "no" << std::endl;
+#endif
+  msg << "  KOKKOS_ENABLE_HPX: ";
+#ifdef KOKKOS_ENABLE_HPX
+  msg << "yes" << std::endl;
+#else
+  msg << "no" << std::endl;
 #endif
   msg << "  KOKKOS_ENABLE_THREADS: ";
 #ifdef KOKKOS_ENABLE_THREADS
@@ -957,6 +994,9 @@ void print_configuration( std::ostream & out , const bool detail )
 #ifdef KOKKOS_ENABLE_OPENMP
   OpenMP::print_configuration(msg, detail);
 #endif
+#ifdef KOKKOS_ENABLE_HPX
+  Experimental::HPX::print_configuration(msg, detail);
+#endif
 #if defined( KOKKOS_ENABLE_THREADS )
   Threads::print_configuration(msg, detail);
 #endif
diff --git a/packages/kokkos/core/src/impl/Kokkos_EBO.hpp b/packages/kokkos/core/src/impl/Kokkos_EBO.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..69bb74e2c5fcabb3d8c7c4975980c705bad2b6fb
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_EBO.hpp
@@ -0,0 +1,343 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EBO_HPP
+#define KOKKOS_EBO_HPP
+
+//----------------------------------------------------------------------------
+
+#include <Kokkos_Macros.hpp>
+
+#include <Kokkos_Core_fwd.hpp>
+//----------------------------------------------------------------------------
+
+
+#include <utility>
+#include <type_traits>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template <int I>
+struct NotOnDeviceCtorDisambiguator { };
+
+template <class... Args>
+struct NoCtorsNotOnDevice : std::false_type { };
+
+template <class... Args>
+struct DefaultCtorNotOnDevice : std::false_type { };
+
+template <>
+struct DefaultCtorNotOnDevice<> : std::true_type { };
+
+template <class T, bool Empty, template <class...> class CtorNotOnDevice = NoCtorsNotOnDevice>
+struct EBOBaseImpl;
+
+template <class T, template <class...> class CtorNotOnDevice>
+struct EBOBaseImpl<T, true, CtorNotOnDevice> {
+
+  /*
+   * Workaround for constexpr in C++11: we need to still call T(args...), but we
+   * can't do so in the body of a constexpr function (in C++11), and there's no
+   * data member to construct into. But we can construct into an argument
+   * of a delegating constructor...
+   */
+  // TODO @minor DSH the destructor gets called too early with this workaround
+  struct _constexpr_14_workaround_tag { };
+  struct _constexpr_14_workaround_no_device_tag { };
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr EBOBaseImpl(_constexpr_14_workaround_tag, T&&) noexcept { }
+  inline constexpr EBOBaseImpl(_constexpr_14_workaround_no_device_tag, T&&) noexcept { }
+
+  template <
+    class... Args,
+    class _ignored = void,
+    typename std::enable_if<
+      std::is_void<_ignored>::value
+      && std::is_constructible<T, Args...>::value
+      && !CtorNotOnDevice<Args...>::value,
+      int
+    >::type = 0
+  >
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr explicit
+  EBOBaseImpl(
+    Args&&... args
+  ) noexcept(noexcept(T(std::forward<Args>(args)...)))
+    // still call the constructor
+    : EBOBaseImpl(_constexpr_14_workaround_tag{}, T(std::forward<Args>(args)...))
+  { }
+
+  template <
+    class... Args,
+    class _ignored=void,
+    typename std::enable_if<
+      std::is_void<_ignored>::value
+      && std::is_constructible<T, Args...>::value
+      && CtorNotOnDevice<Args...>::value,
+      long
+    >::type = 0
+  >
+  inline constexpr explicit
+  EBOBaseImpl(
+    Args&&... args
+  ) noexcept(noexcept(T(std::forward<Args>(args)...)))
+    // still call the constructor
+    : EBOBaseImpl(_constexpr_14_workaround_no_device_tag{}, T(std::forward<Args>(args)...))
+  { }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr EBOBaseImpl(EBOBaseImpl const&) = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr EBOBaseImpl(EBOBaseImpl&&) = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  KOKKOS_CONSTEXPR_14
+  EBOBaseImpl& operator=(EBOBaseImpl const&) = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  KOKKOS_CONSTEXPR_14
+  EBOBaseImpl& operator=(EBOBaseImpl&&) = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  ~EBOBaseImpl() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  KOKKOS_CONSTEXPR_14
+  T& _ebo_data_member() & {
+    return *reinterpret_cast<T*>(this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr
+  T const& _ebo_data_member() const & {
+    return *reinterpret_cast<T const*>(this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T volatile& _ebo_data_member() volatile & {
+    return *reinterpret_cast<T volatile*>(this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T const volatile& _ebo_data_member() const volatile & {
+    return *reinterpret_cast<T const volatile*>(this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  KOKKOS_CONSTEXPR_14
+  T&& _ebo_data_member() && {
+    return std::move(*reinterpret_cast<T*>(this));
+  }
+
+};
+
+template <class T, template <class...> class CTorsNotOnDevice>
+struct EBOBaseImpl<T, false, CTorsNotOnDevice> {
+
+  T m_ebo_object;
+
+  template <
+    class... Args,
+    class _ignored=void,
+    typename std::enable_if<
+      std::is_void<_ignored>::value
+        && !CTorsNotOnDevice<Args...>::value
+        && std::is_constructible<T, Args...>::value,
+      int
+    >::type = 0
+  >
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr explicit
+  EBOBaseImpl(
+    Args&&... args
+  ) noexcept(noexcept(T(std::forward<Args>(args)...)))
+    : m_ebo_object(std::forward<Args>(args)...)
+  { }
+
+  template <
+    class... Args,
+    class _ignored=void,
+    typename std::enable_if<
+      std::is_void<_ignored>::value
+        && CTorsNotOnDevice<Args...>::value
+        && std::is_constructible<T, Args...>::value,
+      long
+    >::type = 0
+  >
+  inline
+  constexpr explicit
+  EBOBaseImpl(
+    Args&&... args
+  ) noexcept(noexcept(T(std::forward<Args>(args)...)))
+    : m_ebo_object(std::forward<Args>(args)...)
+  { }
+
+
+  // TODO @tasking @minor DSH noexcept in the right places?
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr
+  EBOBaseImpl(EBOBaseImpl const&) = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr
+  EBOBaseImpl(EBOBaseImpl&&) noexcept = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  KOKKOS_CONSTEXPR_14
+  EBOBaseImpl& operator=(EBOBaseImpl const&) = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  KOKKOS_CONSTEXPR_14
+  EBOBaseImpl& operator=(EBOBaseImpl&&) = default;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  ~EBOBaseImpl() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  T& _ebo_data_member() & {
+    return m_ebo_object;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T const& _ebo_data_member() const & {
+    return m_ebo_object;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T volatile& _ebo_data_member() volatile & {
+    return m_ebo_object;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T const volatile& _ebo_data_member() const volatile & {
+    return m_ebo_object;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T&& _ebo_data_member() && {
+    return m_ebo_object;
+  }
+
+};
+
+/**
+ *
+ * @tparam T
+ */
+template <class T, template <class...> class CtorsNotOnDevice=NoCtorsNotOnDevice>
+struct StandardLayoutNoUniqueAddressMemberEmulation
+  : EBOBaseImpl<T, std::is_empty<T>::value, CtorsNotOnDevice>
+{
+private:
+
+  using ebo_base_t = EBOBaseImpl<T, std::is_empty<T>::value, CtorsNotOnDevice>;
+
+public:
+
+  using ebo_base_t::ebo_base_t;
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  KOKKOS_CONSTEXPR_14
+  T& no_unique_address_data_member() & {
+    return this->ebo_base_t::_ebo_data_member();
+  }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  constexpr
+  T const& no_unique_address_data_member() const & {
+    return this->ebo_base_t::_ebo_data_member();
+  }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  T volatile& no_unique_address_data_member() volatile & {
+    return this->ebo_base_t::_ebo_data_member();
+  }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  T const volatile& no_unique_address_data_member() const volatile & {
+    return this->ebo_base_t::_ebo_data_member();
+  }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  KOKKOS_CONSTEXPR_14
+  T&& no_unique_address_data_member() && {
+    return this->ebo_base_t::_ebo_data_member();
+  }
+};
+
+/**
+ *
+ * @tparam T
+ */
+template <class T, template <class...> class CtorsNotOnDevice=NoCtorsNotOnDevice>
+class NoUniqueAddressMemberEmulation
+  : private StandardLayoutNoUniqueAddressMemberEmulation<T, CtorsNotOnDevice>
+{
+private:
+
+  using base_t = StandardLayoutNoUniqueAddressMemberEmulation<T, CtorsNotOnDevice>;
+
+public:
+
+  using base_t::base_t;
+  using base_t::no_unique_address_data_member;
+
+};
+
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+
+#endif /* #ifndef KOKKOS_EBO_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_Error.hpp b/packages/kokkos/core/src/impl/Kokkos_Error.hpp
index e7d5f9344c334bbb590ab1e3453cdf7bc4fdf9f2..3d634fe5d14e7a0ebe7de0e5cc39dddb90d2df72 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Error.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Error.hpp
@@ -51,6 +51,10 @@
 #include <Cuda/Kokkos_Cuda_abort.hpp>
 #endif
 
+#ifndef KOKKOS_ABORT_MESSAGE_BUFFER_SIZE
+#  define KOKKOS_ABORT_MESSAGE_BUFFER_SIZE 2048
+#endif // ifndef KOKKOS_ABORT_MESSAGE_BUFFER_SIZE
+
 namespace Kokkos {
 namespace Impl {
 
@@ -83,6 +87,50 @@ void abort( const char * const message ) {
 
 }
 
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+
+#if !defined(NDEBUG) || defined(KOKKOS_ENFORCE_CONTRACTS) || defined(KOKKOS_DEBUG)
+#  define KOKKOS_EXPECTS(...) \
+  { \
+    if(!bool(__VA_ARGS__)) { \
+      ::Kokkos::abort( \
+        "Kokkos contract violation:\n  " \
+        "  Expected precondition `" #__VA_ARGS__ "` evaluated false." \
+      ); \
+    } \
+  }
+#  define KOKKOS_ENSURES(...) \
+  { \
+    if(!bool(__VA_ARGS__)) { \
+      ::Kokkos::abort( \
+        "Kokkos contract violation:\n  " \
+        "  Ensured postcondition `" #__VA_ARGS__ "` evaluated false." \
+      ); \
+    } \
+  }
+// some projects already define this for themselves, so don't mess them up
+#  ifndef KOKKOS_ASSERT
+#    define KOKKOS_ASSERT(...) \
+  { \
+    if(!bool(__VA_ARGS__)) { \
+      ::Kokkos::abort( \
+        "Kokkos contract violation:\n  " \
+        "  Asserted condition `" #__VA_ARGS__ "` evaluated false." \
+      ); \
+    } \
+  }
+#  endif // ifndef KOKKOS_ASSERT
+#else // not debug mode
+#  define KOKKOS_EXPECTS(...)
+#  define KOKKOS_ENSURES(...)
+#  ifndef KOKKOS_ASSERT
+#    define KOKKOS_ASSERT(...)
+#  endif // ifndef KOKKOS_ASSERT
+#endif // end debug mode ifdefs
+
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_FixedBufferMemoryPool.hpp b/packages/kokkos/core/src/impl/Kokkos_FixedBufferMemoryPool.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..3053d8d9d0d9341a1babde3379270ea063891b55
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_FixedBufferMemoryPool.hpp
@@ -0,0 +1,307 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2019) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_KOKKOS_FIXEDBUFFERMEMORYPOOL_HPP
+#define KOKKOS_IMPL_KOKKOS_FIXEDBUFFERMEMORYPOOL_HPP
+
+#include <Kokkos_Core_fwd.hpp>
+#include <Kokkos_Atomic.hpp>
+
+#include <Kokkos_PointerOwnership.hpp>
+#include <impl/Kokkos_SimpleTaskScheduler.hpp>
+
+namespace Kokkos {
+namespace Impl {
+
+template <
+  class DeviceType,
+  size_t Size,
+  size_t Align=1,
+  class SizeType = typename DeviceType::execution_space::size_type
+>
+class FixedBlockSizeMemoryPool
+  : private MemorySpaceInstanceStorage<typename DeviceType::memory_space>
+{
+public:
+
+  using memory_space = typename DeviceType::memory_space;
+  using size_type = SizeType;
+
+private:
+
+  using memory_space_storage_base = MemorySpaceInstanceStorage<typename DeviceType::memory_space>;
+  using tracker_type = Kokkos::Impl::SharedAllocationTracker;
+  using record_type = Kokkos::Impl::SharedAllocationRecord<memory_space>;
+
+  struct alignas(Align) Block { union { char ignore; char data[Size]; }; };
+
+  static constexpr auto actual_size = sizeof(Block);
+
+  // TODO shared allocation tracker
+  // TODO @optimization put the index values on different cache lines (CPU) or pages (GPU)?
+
+  tracker_type m_tracker = { };
+  size_type m_num_blocks = 0;
+  size_type m_first_free_idx = 0;
+  size_type m_last_free_idx = 0;
+  Kokkos::OwningRawPtr<Block> m_first_block = nullptr;
+  Kokkos::OwningRawPtr<size_type> m_free_indices = nullptr;
+
+  enum : size_type { IndexInUse = ~size_type(0) };
+
+public:
+
+  FixedBlockSizeMemoryPool(
+    memory_space const& mem_space,
+    size_type num_blocks
+  ) : memory_space_storage_base(mem_space),
+      m_tracker(),
+      m_num_blocks(num_blocks),
+      m_first_free_idx(0),
+      m_last_free_idx(num_blocks)
+  {
+    // TODO alignment?
+    auto block_record = record_type::allocate(
+      mem_space, "FixedBlockSizeMemPool_blocks", num_blocks * sizeof(Block)
+    );
+    KOKKOS_ASSERT(intptr_t(block_record->data()) % Align == 0);
+    m_tracker.assign_allocated_record_to_uninitialized(block_record);
+    m_first_block = (Block*)block_record->data();
+
+    auto idx_record = record_type::allocate(
+      mem_space, "FixedBlockSizeMemPool_blocks", num_blocks * sizeof(size_type)
+    );
+    KOKKOS_ASSERT(intptr_t(idx_record->data()) % alignof(size_type) == 0);
+    m_tracker.assign_allocated_record_to_uninitialized(idx_record);
+    m_free_indices = (size_type*)idx_record->data();
+
+    for(size_type i = 0; i < num_blocks; ++i) {
+      m_free_indices[i] = i;
+    }
+
+    Kokkos::memory_fence();
+  }
+
+  // For compatibility with MemoryPool<>
+  FixedBlockSizeMemoryPool(
+    memory_space const& mem_space,
+    size_t mempool_capacity,
+    unsigned, unsigned, unsigned
+  ) : FixedBlockSizeMemoryPool(mem_space, mempool_capacity / actual_size)
+  { /* forwarding ctor, must be empty */ }
+
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool() = default;
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool(FixedBlockSizeMemoryPool&&) = default;
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool(FixedBlockSizeMemoryPool const&) = default;
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool& operator=(FixedBlockSizeMemoryPool&&) = default;
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool& operator=(FixedBlockSizeMemoryPool const&) = default;
+
+
+  KOKKOS_INLINE_FUNCTION
+  void* allocate(size_type alloc_size) const noexcept
+  {
+    KOKKOS_EXPECTS(alloc_size <= Size);
+    auto free_idx_counter = Kokkos::atomic_fetch_add((volatile size_type*)&m_first_free_idx, size_type(1));
+    auto free_idx_idx = free_idx_counter % m_num_blocks;
+
+    // We don't have exclusive access to m_free_indices[free_idx_idx] because
+    // the allocate counter might have lapped us since we incremented it
+    auto current_free_idx = m_free_indices[free_idx_idx];
+    size_type free_idx = IndexInUse;
+    free_idx =
+      Kokkos::atomic_compare_exchange(&m_free_indices[free_idx_idx], current_free_idx, free_idx);
+    Kokkos::memory_fence();
+
+    // TODO figure out how to decrement here?
+
+    if(free_idx == IndexInUse) {
+      return nullptr;
+    }
+    else {
+      return (void*)&m_first_block[free_idx];
+    }
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void deallocate(void* ptr, size_type alloc_size) const noexcept
+  {
+    // figure out which block we are
+    auto offset = intptr_t(ptr) - intptr_t(m_first_block);
+
+    KOKKOS_EXPECTS(offset % actual_size == 0 && offset/actual_size < m_num_blocks);
+
+    Kokkos::memory_fence();
+    auto last_idx_idx = Kokkos::atomic_fetch_add((volatile size_type*)&m_last_free_idx, size_type(1));
+    last_idx_idx %= m_num_blocks;
+    m_free_indices[last_idx_idx] = offset / actual_size;
+  }
+
+};
+
+#if 0
+template <
+  class DeviceType,
+  size_t Size,
+  size_t Align=1,
+  class SizeType = typename DeviceType::execution_space::size_type
+>
+class FixedBlockSizeChaseLevMemoryPool
+  : private MemorySpaceInstanceStorage<typename DeviceType::memory_space>
+{
+public:
+
+  using memory_space = typename DeviceType::memory_space;
+  using size_type = SizeType;
+
+private:
+
+  using memory_space_storage_base = MemorySpaceInstanceStorage<typename DeviceType::memory_space>;
+  using tracker_type = Kokkos::Impl::SharedAllocationTracker;
+  using record_type = Kokkos::Impl::SharedAllocationRecord<memory_space>;
+
+  struct alignas(Align) Block { union { char ignore; char data[Size]; }; };
+
+  static constexpr auto actual_size = sizeof(Block);
+
+  tracker_type m_tracker = { };
+  size_type m_num_blocks = 0;
+  size_type m_first_free_idx = 0;
+  size_type m_last_free_idx = 0;
+
+
+  enum : size_type { IndexInUse = ~size_type(0) };
+
+public:
+
+  FixedBlockSizeMemoryPool(
+    memory_space const& mem_space,
+    size_type num_blocks
+  ) : memory_space_storage_base(mem_space),
+    m_tracker(),
+    m_num_blocks(num_blocks),
+    m_first_free_idx(0),
+    m_last_free_idx(num_blocks)
+  {
+    // TODO alignment?
+    auto block_record = record_type::allocate(
+      mem_space, "FixedBlockSizeMemPool_blocks", num_blocks * sizeof(Block)
+    );
+    KOKKOS_ASSERT(intptr_t(block_record->data()) % Align == 0);
+    m_tracker.assign_allocated_record_to_uninitialized(block_record);
+    m_first_block = (Block*)block_record->data();
+
+    auto idx_record = record_type::allocate(
+      mem_space, "FixedBlockSizeMemPool_blocks", num_blocks * sizeof(size_type)
+    );
+    KOKKOS_ASSERT(intptr_t(idx_record->data()) % alignof(size_type) == 0);
+    m_tracker.assign_allocated_record_to_uninitialized(idx_record);
+    m_free_indices = (size_type*)idx_record->data();
+
+    for(size_type i = 0; i < num_blocks; ++i) {
+      m_free_indices[i] = i;
+    }
+
+    Kokkos::memory_fence();
+  }
+
+  // For compatibility with MemoryPool<>
+  FixedBlockSizeMemoryPool(
+    memory_space const& mem_space,
+    size_t mempool_capacity,
+    unsigned, unsigned, unsigned
+  ) : FixedBlockSizeMemoryPool(mem_space, mempool_capacity / actual_size)
+  { /* forwarding ctor, must be empty */ }
+
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool() = default;
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool(FixedBlockSizeMemoryPool&&) = default;
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool(FixedBlockSizeMemoryPool const&) = default;
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool& operator=(FixedBlockSizeMemoryPool&&) = default;
+  KOKKOS_INLINE_FUNCTION FixedBlockSizeMemoryPool& operator=(FixedBlockSizeMemoryPool const&) = default;
+
+
+  KOKKOS_INLINE_FUNCTION
+  void* allocate(size_type alloc_size) const noexcept
+  {
+    KOKKOS_EXPECTS(alloc_size <= Size);
+    auto free_idx_counter = Kokkos::atomic_fetch_add((volatile size_type*)&m_first_free_idx, size_type(1));
+    auto free_idx_idx = free_idx_counter % m_num_blocks;
+
+    // We don't have exclusive access to m_free_indices[free_idx_idx] because
+    // the allocate counter might have lapped us since we incremented it
+    auto current_free_idx = m_free_indices[free_idx_idx];
+    size_type free_idx = IndexInUse;
+    free_idx =
+      Kokkos::atomic_compare_exchange(&m_free_indices[free_idx_idx], current_free_idx, free_idx);
+    Kokkos::memory_fence();
+
+    // TODO figure out how to decrement here?
+
+    if(free_idx == IndexInUse) {
+      return nullptr;
+    }
+    else {
+      return (void*)&m_first_block[free_idx];
+    }
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void deallocate(void* ptr, size_type alloc_size) const noexcept
+  {
+    // figure out which block we are
+    auto offset = intptr_t(ptr) - intptr_t(m_first_block);
+
+    KOKKOS_EXPECTS(offset % actual_size == 0 && offset/actual_size < m_num_blocks);
+
+    Kokkos::memory_fence();
+    auto last_idx_idx = Kokkos::atomic_fetch_add((volatile size_type*)&m_last_free_idx, size_type(1));
+    last_idx_idx %= m_num_blocks;
+    m_free_indices[last_idx_idx] = offset / actual_size;
+  }
+
+};
+#endif
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+#endif //KOKKOS_IMPL_KOKKOS_FIXEDBUFFERMEMORYPOOL_HPP
diff --git a/packages/kokkos/core/src/impl/Kokkos_FunctorAdapter.hpp b/packages/kokkos/core/src/impl/Kokkos_FunctorAdapter.hpp
index 7d4ffb85c124fe6b9249e7521f251e1a30692105..ea3480b48bf69419fc138fa6eda72a9dfbffd79b 100644
--- a/packages/kokkos/core/src/impl/Kokkos_FunctorAdapter.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_FunctorAdapter.hpp
@@ -1432,7 +1432,10 @@ namespace Impl {
   template<typename ValueType, class JoinOp>
   struct JoinLambdaAdapter<ValueType, JoinOp, decltype( FunctorValueJoinFunction< JoinOp , void >::enable_if( & JoinOp::join ) )> {
     typedef ValueType value_type;
-    typedef StaticAssertSame<ValueType,typename JoinOp::value_type> assert_value_types_match;
+    static_assert(
+        std::is_same<ValueType,typename JoinOp::value_type>::value,
+        "JoinLambdaAdapter static_assert Fail: ValueType != JoinOp::value_type");
+
     const JoinOp& lambda;
     KOKKOS_INLINE_FUNCTION
     JoinLambdaAdapter(const JoinOp& lambda_):lambda(lambda_) {}
diff --git a/packages/kokkos/core/src/impl/Kokkos_HostSpace.cpp b/packages/kokkos/core/src/impl/Kokkos_HostSpace.cpp
index d8cb7593bf4dc86edb83e777b5096c990c06aeca..848746d265946cb8b9d4e362581a7011ccc58ba2 100644
--- a/packages/kokkos/core/src/impl/Kokkos_HostSpace.cpp
+++ b/packages/kokkos/core/src/impl/Kokkos_HostSpace.cpp
@@ -420,15 +420,19 @@ SharedAllocationRecord< Kokkos::HostSpace , void >::get_record( void * alloc_ptr
 }
 
 // Iterate records to print orphaned memory ...
+#ifdef KOKKOS_DEBUG
 void SharedAllocationRecord< Kokkos::HostSpace , void >::
 print_records( std::ostream & s , const Kokkos::HostSpace & , bool detail )
 {
-#ifdef KOKKOS_DEBUG
   SharedAllocationRecord< void , void >::print_host_accessible_records( s , "HostSpace" , & s_root_record , detail );
+}
 #else
+void SharedAllocationRecord< Kokkos::HostSpace , void >::
+print_records( std::ostream & , const Kokkos::HostSpace & , bool )
+{
   throw_runtime_exception("SharedAllocationRecord<HostSpace>::print_records only works with KOKKOS_DEBUG enabled");
-#endif
 }
+#endif
 
 } // namespace Impl
 } // namespace Kokkos
diff --git a/packages/kokkos/core/src/impl/Kokkos_HostSpace_deepcopy.cpp b/packages/kokkos/core/src/impl/Kokkos_HostSpace_deepcopy.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..21b95f6985fa6d0e302c3ee5d06a57c2cfa693dd
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_HostSpace_deepcopy.cpp
@@ -0,0 +1,134 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include "Kokkos_Core.hpp"
+#include "Kokkos_HostSpace_deepcopy.hpp"
+
+namespace Kokkos {
+
+namespace Impl {
+
+#ifndef KOKKOS_IMPL_HOST_DEEP_COPY_SERIAL_LIMIT
+#define KOKKOS_IMPL_HOST_DEEP_COPY_SERIAL_LIMIT 10*8192
+#endif
+
+void hostspace_parallel_deepcopy(void * dst, const void * src, ptrdiff_t n) {
+  if((n<KOKKOS_IMPL_HOST_DEEP_COPY_SERIAL_LIMIT) || (Kokkos::DefaultHostExecutionSpace().concurrency()==1)) {
+    std::memcpy(dst,src,n);
+    return;
+  }
+
+  typedef Kokkos::RangePolicy<Kokkos::DefaultHostExecutionSpace> policy_t;
+
+  // Both src and dst are aligned the same way with respect to 8 byte words
+  if(reinterpret_cast<ptrdiff_t>(src)%8 == reinterpret_cast<ptrdiff_t>(dst)%8) {
+    char* dst_c = reinterpret_cast<char*>(dst);
+    const char* src_c = reinterpret_cast<const char*>(src);
+    int count = 0;
+    // get initial bytes copied
+    while(reinterpret_cast<ptrdiff_t>(dst_c)%8!=0) {
+      *dst_c=*src_c;
+      dst_c++; src_c++; count++;
+    }
+
+    // copy the bulk of the data
+    double* dst_p = reinterpret_cast<double*>(dst_c);
+    const double* src_p = reinterpret_cast<const double*>(src_c);
+    Kokkos::parallel_for("Kokkos::Impl::host_space_deepcopy_double",policy_t(0,(n-count)/8),[=](const ptrdiff_t i) {
+      dst_p[i] = src_p[i];
+    });
+
+    // get final data copied
+    dst_c += ((n-count)/8) * 8;
+    src_c += ((n-count)/8) * 8;
+    char* dst_end = reinterpret_cast<char*>(dst)+n;
+    while(dst_c != dst_end) {
+      *dst_c = *src_c;
+      dst_c++; src_c++;
+    }
+    return;
+  }
+
+  // Both src and dst are aligned the same way with respect to 4 byte words
+  if(reinterpret_cast<ptrdiff_t>(src)%4 == reinterpret_cast<ptrdiff_t>(dst)%4) {
+    char* dst_c = reinterpret_cast<char*>(dst);
+    const char* src_c = reinterpret_cast<const char*>(src);
+    int count = 0;
+    // get initial bytes copied
+    while(reinterpret_cast<ptrdiff_t>(dst_c)%4!=0) {
+      *dst_c=*src_c;
+      dst_c++; src_c++; count++;
+    }
+
+    // copy the bulk of the data
+    int32_t* dst_p = reinterpret_cast<int32_t*>(dst_c);
+    const int32_t* src_p = reinterpret_cast<const int32_t*>(src_c);
+    Kokkos::parallel_for("Kokkos::Impl::host_space_deepcopy_int",policy_t(0,(n-count)/4),[=](const ptrdiff_t i) {
+      dst_p[i] = src_p[i];
+    });
+
+    // get final data copied
+    dst_c += ((n-count)/4) * 4;
+    src_c += ((n-count)/4) * 4;
+    char* dst_end = reinterpret_cast<char*>(dst)+n;
+    while(dst_c != dst_end) {
+      *dst_c = *src_c;
+      dst_c++; src_c++;
+    }
+    return;
+  }
+
+  // Src and dst are not aligned the same way, we can only to byte wise copy.
+  {
+    char* dst_p = reinterpret_cast<char*>(dst);
+    const char* src_p = reinterpret_cast<const char*>(src);
+    Kokkos::parallel_for("Kokkos::Impl::host_space_deepcopy_char",policy_t(0,n),[=](const ptrdiff_t i) {
+      dst_p[i] = src_p[i];
+    });
+  }
+}
+
+} // namespace Impl
+
+} // namespace Kokkos
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_HostSpace_deepcopy.hpp b/packages/kokkos/core/src/impl/Kokkos_HostSpace_deepcopy.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..b8aea9536363ad1d9981e68f5c6bfa1043bd8e83
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_HostSpace_deepcopy.hpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+#include<cstdint>
+
+namespace Kokkos {
+
+namespace Impl {
+
+void hostspace_parallel_deepcopy(void * dst, const void * src, ptrdiff_t n);
+
+} // namespace Impl
+
+} // namespace Kokkos
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_HostThreadTeam.hpp b/packages/kokkos/core/src/impl/Kokkos_HostThreadTeam.hpp
index fff48e87f601b7c2aec724311d3ef0dba577440d..f44a13c5740346deb0afbf32f35c9545365337a5 100644
--- a/packages/kokkos/core/src/impl/Kokkos_HostThreadTeam.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_HostThreadTeam.hpp
@@ -52,6 +52,8 @@
 #include <impl/Kokkos_FunctorAnalysis.hpp>
 #include <impl/Kokkos_HostBarrier.hpp>
 
+#include <limits> // std::numeric_limits
+
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 
@@ -477,6 +479,9 @@ class HostThreadTeamMember {
 public:
 
   using scratch_memory_space = typename HostExecSpace::scratch_memory_space ;
+  using execution_space = HostExecSpace;
+  using thread_team_member = HostThreadTeamMember;
+  using host_thread_team_member = HostThreadTeamMember;
 
 private:
 
@@ -490,8 +495,8 @@ public:
   constexpr HostThreadTeamMember( HostThreadTeamData & arg_data ) noexcept
     : m_scratch( arg_data.team_shared() , arg_data.team_shared_bytes() )
     , m_data( arg_data )
-    , m_league_rank(0)
-    , m_league_size(1)
+    , m_league_rank(arg_data.m_league_rank)
+    , m_league_size(arg_data.m_league_size)
     {}
 
   constexpr HostThreadTeamMember( HostThreadTeamData & arg_data
@@ -630,6 +635,12 @@ public:
   KOKKOS_INLINE_FUNCTION
   typename std::enable_if< is_reducer< ReducerType >::value >::type
   team_reduce( ReducerType const & reducer ) const noexcept
+  { team_reduce(reducer,reducer.reference()); }
+
+  template< typename ReducerType >
+  KOKKOS_INLINE_FUNCTION
+  typename std::enable_if< is_reducer< ReducerType >::value >::type
+  team_reduce( ReducerType const & reducer, typename ReducerType::value_type contribution ) const noexcept
 #if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
     {
       if ( 1 < m_data.m_team_size ) {
@@ -640,7 +651,7 @@ public:
           // Non-root copies to their local buffer:
           /*reducer.copy( (value_type*) m_data.team_reduce_local()
                       , reducer.data() );*/
-          *((value_type*) m_data.team_reduce_local()) = reducer.reference();
+          *((value_type*) m_data.team_reduce_local()) = contribution;
         }
 
         // Root does not overwrite shared memory until all threads arrive
@@ -656,12 +667,13 @@ public:
             value_type * const src =
               (value_type*) m_data.team_member(i)->team_reduce_local();
 
-            reducer.join( reducer.reference(), *src);
+            reducer.join( contribution, *src);
           }
 
           // Copy result to root member's buffer:
           // reducer.copy( (value_type*) m_data.team_reduce() , reducer.data() );
-          *((value_type*) m_data.team_reduce()) = reducer.reference();
+          *((value_type*) m_data.team_reduce()) = contribution;
+          reducer.reference() = contribution;
           m_data.team_rendezvous_release();
           // This thread released all other threads from 'team_rendezvous'
           // with a return value of 'false'
@@ -670,6 +682,8 @@ public:
           // Copy from root member's buffer:
           reducer.reference() = *((value_type*) m_data.team_reduce());
         }
+      } else {
+        reducer.reference() = contribution;
       }
     }
 #else
@@ -795,50 +809,105 @@ public:
 
 namespace Kokkos {
 
-template<class Space,typename iType>
+template<typename iType, typename Member>
 KOKKOS_INLINE_FUNCTION
-Impl::TeamThreadRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >
-TeamThreadRange( Impl::HostThreadTeamMember<Space> const & member
-               , iType const & count )
+Impl::TeamThreadRangeBoundariesStruct<iType, Member>
+TeamThreadRange(
+  Member const & member,
+  iType count,
+  typename std::enable_if<
+    Impl::is_thread_team_member<Member>::value
+  >::type const** = nullptr
+)
 {
   return
     Impl::TeamThreadRangeBoundariesStruct
-      <iType,Impl::HostThreadTeamMember<Space> >(member,0,count);
+      <iType, Member>(member,0,count);
 }
 
-template<class Space, typename iType1, typename iType2>
+template<typename iType1, typename iType2, typename Member>
 KOKKOS_INLINE_FUNCTION
-Impl::TeamThreadRangeBoundariesStruct
-  < typename std::common_type< iType1, iType2 >::type
-  , Impl::HostThreadTeamMember<Space> >
-TeamThreadRange( Impl::HostThreadTeamMember<Space> const & member
-               , iType1 const & begin , iType2 const & end )
+Impl::TeamThreadRangeBoundariesStruct<
+  typename std::common_type< iType1, iType2 >::type, Member
+>
+TeamThreadRange(
+  Member const & member,
+  iType1 begin,
+  iType2 end,
+  typename std::enable_if<
+    Impl::is_thread_team_member<Member>::value
+  >::type const** = nullptr
+)
 {
   return
     Impl::TeamThreadRangeBoundariesStruct
       < typename std::common_type< iType1, iType2 >::type
-      , Impl::HostThreadTeamMember<Space> >( member , begin , end );
+      , Member >( member , begin , end );
 }
 
-template<class Space, typename iType>
+template<typename iType, typename Member>
 KOKKOS_INLINE_FUNCTION
-Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >
-ThreadVectorRange
-  ( Impl::HostThreadTeamMember<Space> const & member
-  , const iType & count )
+Impl::TeamThreadRangeBoundariesStruct<iType, Member>
+TeamVectorRange(
+  Member const & member,
+  iType count,
+  typename std::enable_if<
+    Impl::is_thread_team_member<Member>::value
+  >::type const** = nullptr
+)
 {
-  return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >(member,count);
+  return
+    Impl::TeamThreadRangeBoundariesStruct
+      <iType, Member>(member,0,count);
 }
 
-template<class Space, typename iType>
+template<typename iType1, typename iType2, typename Member>
 KOKKOS_INLINE_FUNCTION
-Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >
-ThreadVectorRange
-  ( Impl::HostThreadTeamMember<Space> const & member
-  , const iType & arg_begin
-  , const iType & arg_end )
+Impl::TeamThreadRangeBoundariesStruct<
+  typename std::common_type< iType1, iType2 >::type, Member
+>
+TeamVectorRange(
+  Member const & member,
+  iType1 begin,
+  iType2 end,
+  typename std::enable_if<
+    Impl::is_thread_team_member<Member>::value
+  >::type const** = nullptr
+)
 {
-  return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >(member,arg_begin,arg_end);
+  return
+    Impl::TeamThreadRangeBoundariesStruct
+      < typename std::common_type< iType1, iType2 >::type
+      , Member >( member , begin , end );
+}
+
+template<typename iType, typename Member>
+KOKKOS_INLINE_FUNCTION
+Impl::ThreadVectorRangeBoundariesStruct<iType, Member>
+ThreadVectorRange(
+  Member const & member,
+  iType count,
+  typename std::enable_if<
+    Impl::is_thread_team_member<Member>::value
+  >::type const** = nullptr
+)
+{
+  return Impl::ThreadVectorRangeBoundariesStruct<iType, Member>(member,count);
+}
+
+template<typename iType, typename Member>
+KOKKOS_INLINE_FUNCTION
+Impl::ThreadVectorRangeBoundariesStruct<iType, Member>
+ThreadVectorRange(
+  Member const & member,
+  iType arg_begin,
+  iType arg_end,
+  typename std::enable_if<
+    Impl::is_thread_team_member<Member>::value
+  >::type const** = nullptr
+)
+{
+  return Impl::ThreadVectorRangeBoundariesStruct<iType, Member>(member,arg_begin,arg_end);
 }
 
 //----------------------------------------------------------------------------
@@ -848,11 +917,14 @@ ThreadVectorRange
  *
  * The range [0..N) is mapped to all threads of the the calling thread team.
 */
-template<typename iType, class Space, class Closure>
+template<typename iType, class Closure, class Member>
 KOKKOS_INLINE_FUNCTION
 void parallel_for
-  ( Impl::TeamThreadRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> > const & loop_boundaries
+  ( Impl::TeamThreadRangeBoundariesStruct<iType, Member> const & loop_boundaries
   , Closure const & closure
+  , typename std::enable_if<
+      Impl::is_host_thread_team_member<Member>::value
+    >::type const** = nullptr
   )
 {
   for( iType i = loop_boundaries.start
@@ -862,11 +934,14 @@ void parallel_for
   }
 }
 
-template<typename iType, class Space, class Closure>
+template<typename iType, class Closure, class Member>
 KOKKOS_INLINE_FUNCTION
 void parallel_for
-  ( Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> > const & loop_boundaries
+  ( Impl::ThreadVectorRangeBoundariesStruct<iType, Member> const & loop_boundaries
   , Closure const & closure
+  , typename std::enable_if<
+      Impl::is_host_thread_team_member<Member>::value
+    >::type const** = nullptr
   )
 {
   #ifdef KOKKOS_ENABLE_PRAGMA_IVDEP
@@ -881,40 +956,47 @@ void parallel_for
 
 //----------------------------------------------------------------------------
 
-template< typename iType, class Space, class Closure, class Reducer >
+template< typename iType, class Closure, class Reducer, class Member >
 KOKKOS_INLINE_FUNCTION
-typename std::enable_if< Kokkos::is_reducer< Reducer >::value >::type
+typename std::enable_if<
+  Kokkos::is_reducer< Reducer >::value
+  && Impl::is_host_thread_team_member<Member>::value
+>::type
 parallel_reduce
-  ( Impl::TeamThreadRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >
+  ( Impl::TeamThreadRangeBoundariesStruct<iType, Member>
              const & loop_boundaries
   , Closure  const & closure
   , Reducer  const & reducer
   )
 {
-  reducer.init( reducer.reference() );
+  typename Reducer::value_type value;
+  reducer.init( value );
 
   for( iType i = loop_boundaries.start
      ; i <  loop_boundaries.end
      ; i += loop_boundaries.increment ) {
-    closure( i , reducer.reference() );
+    closure( i , value );
   }
-
-  loop_boundaries.thread.team_reduce( reducer );
+  
+  loop_boundaries.thread.team_reduce( reducer, value );
 }
 
-template< typename iType, class Space, typename Closure, typename ValueType >
+template< typename iType, typename Closure, typename ValueType, typename Member >
 KOKKOS_INLINE_FUNCTION
-typename std::enable_if< ! Kokkos::is_reducer<ValueType>::value >::type
+typename std::enable_if<
+  ! Kokkos::is_reducer<ValueType>::value
+  && Impl::is_host_thread_team_member<Member>::value
+>::type
 parallel_reduce
-  ( Impl::TeamThreadRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >
+  ( Impl::TeamThreadRangeBoundariesStruct<iType, Member >
              const & loop_boundaries
   , Closure  const & closure
   , ValueType      & result
   )
 {
-  Sum<ValueType> reducer( result );
-
-  reducer.init( result );
+  ValueType val;
+  Sum<ValueType> reducer( val );
+  reducer.init( val );
 
   for( iType i = loop_boundaries.start
      ; i <  loop_boundaries.end
@@ -923,6 +1005,7 @@ parallel_reduce
   }
 
   loop_boundaries.thread.team_reduce( reducer );
+  result = reducer.reference();
 }
 
 /*template< typename iType, class Space
@@ -958,11 +1041,14 @@ void parallel_reduce
  *  calling thread team and a summation of  val is
  *  performed and put into result.
  */
-template< typename iType, class Space , class Lambda, typename ValueType >
+template< typename iType, class Lambda, typename ValueType, typename Member >
 KOKKOS_INLINE_FUNCTION
-typename std::enable_if< ! Kokkos::is_reducer<ValueType>::value >::type
+typename std::enable_if<
+  ! Kokkos::is_reducer<ValueType>::value
+  && Impl::is_host_thread_team_member<Member>::value
+>::type
 parallel_reduce
-  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >& loop_boundaries,
+  (const Impl::ThreadVectorRangeBoundariesStruct<iType, Member>& loop_boundaries,
    const Lambda & lambda,
    ValueType& result)
 {
@@ -974,11 +1060,14 @@ parallel_reduce
   }
 }
 
-template< typename iType, class Space , class Lambda, typename ReducerType >
+template< typename iType, class Lambda, typename ReducerType, typename Member >
 KOKKOS_INLINE_FUNCTION
-typename std::enable_if< Kokkos::is_reducer< ReducerType >::value >::type
+typename std::enable_if<
+  Kokkos::is_reducer< ReducerType >::value
+  && Impl::is_host_thread_team_member<Member>::value
+>::type
 parallel_reduce
-  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >& loop_boundaries,
+  (const Impl::ThreadVectorRangeBoundariesStruct<iType, Member>& loop_boundaries,
    const Lambda & lambda,
    const ReducerType& reducer)
 {
@@ -990,41 +1079,15 @@ parallel_reduce
   }
 }
 
-/** \brief  Intra-thread vector parallel_reduce.
- *
- *  Executes lambda(iType i, ValueType & val) for each i=[0..N)
- *
- *  The range [0..N) is mapped to all vector lanes of the the
- *  calling thread and a reduction of val is performed using
- *  JoinType(ValueType& val, const ValueType& update)
- *  and put into init_result.
- *  The input value of init_result is used as initializer for
- *  temporary variables of ValueType. Therefore * the input
- *  value should be the neutral element with respect to the
- *  join operation (e.g. '0 for +-' or * '1 for *').
- */
-template< typename iType, class Space
-        , class Lambda, class JoinType , typename ValueType >
-KOKKOS_INLINE_FUNCTION
-void parallel_reduce
-  (const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> >& loop_boundaries,
-   const Lambda & lambda,
-   const JoinType & join,
-   ValueType& result)
-{
-  for( iType i =  loop_boundaries.start ;
-             i <  loop_boundaries.end ;
-             i += loop_boundaries.increment ) {
-    lambda(i,result);
-  }
-}
-
 //----------------------------------------------------------------------------
 
-template< typename iType, class Space, class Closure >
+template< typename iType, class Closure, class Member >
 KOKKOS_INLINE_FUNCTION
-void parallel_scan
-  ( Impl::TeamThreadRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> > const & loop_boundaries
+typename std::enable_if<
+  Impl::is_host_thread_team_member<Member>::value
+>::type
+parallel_scan
+  ( Impl::TeamThreadRangeBoundariesStruct<iType, Member> const & loop_boundaries
   , Closure const & closure
   )
 {
@@ -1056,10 +1119,13 @@ void parallel_scan
 }
 
 
-template< typename iType, class Space, class ClosureType >
+template< typename iType, class ClosureType, class Member >
 KOKKOS_INLINE_FUNCTION
-void parallel_scan
-  ( Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::HostThreadTeamMember<Space> > const & loop_boundaries
+typename std::enable_if<
+  Impl::is_host_thread_team_member<Member>::value
+>::type
+parallel_scan
+  ( Impl::ThreadVectorRangeBoundariesStruct<iType, Member > const & loop_boundaries
   , ClosureType const & closure
   )
 {
@@ -1083,47 +1149,65 @@ void parallel_scan
 
 //----------------------------------------------------------------------------
 
-template< class Space >
+template< class Member >
 KOKKOS_INLINE_FUNCTION
-Impl::ThreadSingleStruct<Impl::HostThreadTeamMember<Space> >
-PerTeam(const Impl::HostThreadTeamMember<Space> & member )
+Impl::ThreadSingleStruct<Member>
+PerTeam(
+  Member const& member,
+  typename std::enable_if<Impl::is_thread_team_member<Member>::value>::type const** = nullptr
+)
 {
-  return Impl::ThreadSingleStruct<Impl::HostThreadTeamMember<Space> >(member);
+  return Impl::ThreadSingleStruct<Member>(member);
 }
 
-template< class Space >
+template< class Member >
 KOKKOS_INLINE_FUNCTION
-Impl::VectorSingleStruct<Impl::HostThreadTeamMember<Space> >
-PerThread(const Impl::HostThreadTeamMember<Space> & member)
+Impl::VectorSingleStruct<Member>
+PerThread(
+  Member const& member,
+  typename std::enable_if<Impl::is_thread_team_member<Member>::value>::type const** = nullptr
+)
 {
-  return Impl::VectorSingleStruct<Impl::HostThreadTeamMember<Space> >(member);
+  return Impl::VectorSingleStruct<Member>(member);
 }
 
-template< class Space , class FunctorType >
+template< class Member , class FunctorType >
 KOKKOS_INLINE_FUNCTION
-void single( const Impl::ThreadSingleStruct< Impl::HostThreadTeamMember<Space> > & single , const FunctorType & functor )
+typename std::enable_if<
+  Impl::is_host_thread_team_member<Member>::value
+>::type
+single( const Impl::ThreadSingleStruct<Member> & single , const FunctorType & functor )
 {
   // 'single' does not perform a barrier.
   if ( single.team_member.team_rank() == 0 ) functor();
 }
 
-template< class Space , class FunctorType , typename ValueType >
+template< class Member, class FunctorType , typename ValueType >
 KOKKOS_INLINE_FUNCTION
-void single( const Impl::ThreadSingleStruct< Impl::HostThreadTeamMember<Space> > & single , const FunctorType & functor , ValueType & val )
+typename std::enable_if<
+  Impl::is_host_thread_team_member<Member>::value
+>::type
+single( const Impl::ThreadSingleStruct<Member> & single , const FunctorType & functor , ValueType & val )
 {
   single.team_member.team_broadcast( functor , val , 0 );
 }
 
-template< class Space , class FunctorType >
+template< class Member, class FunctorType >
 KOKKOS_INLINE_FUNCTION
-void single( const Impl::VectorSingleStruct< Impl::HostThreadTeamMember<Space> > & , const FunctorType & functor )
+typename std::enable_if<
+  Impl::is_host_thread_team_member<Member>::value
+>::type
+single( const Impl::VectorSingleStruct<Member> & , const FunctorType & functor )
 {
   functor();
 }
 
-template< class Space , class FunctorType , typename ValueType >
+template< class Member, class FunctorType , typename ValueType >
 KOKKOS_INLINE_FUNCTION
-void single( const Impl::VectorSingleStruct< Impl::HostThreadTeamMember<Space> > & , const FunctorType & functor , ValueType & val )
+typename std::enable_if<
+  Impl::is_host_thread_team_member<Member>::value
+>::type
+single( const Impl::VectorSingleStruct<Member> & , const FunctorType & functor , ValueType & val )
 {
   functor(val);
 }
diff --git a/packages/kokkos/core/src/impl/Kokkos_LIFO.hpp b/packages/kokkos/core/src/impl/Kokkos_LIFO.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..43e9783beb39d785ad78022f440527ac2eb2ff84
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_LIFO.hpp
@@ -0,0 +1,431 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_LIFO_HPP
+#define KOKKOS_IMPL_LIFO_HPP
+
+#include <Kokkos_Macros.hpp>
+#ifdef KOKKOS_ENABLE_TASKDAG // Note: implies CUDA_VERSION >= 8000 if using CUDA
+
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_PointerOwnership.hpp>
+#include <impl/Kokkos_OptionalRef.hpp>
+#include <impl/Kokkos_Error.hpp> // KOKKOS_EXPECTS
+#include <impl/Kokkos_LinkedListNode.hpp>
+
+#include <Kokkos_Atomic.hpp>  // atomic_compare_exchange, atomic_fence
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template <class T>
+struct LockBasedLIFOCommon
+{
+
+  using value_type = T;
+
+  using node_type = SimpleSinglyLinkedListNode<>;
+
+  static constexpr uintptr_t LockTag = ~uintptr_t(0);
+  static constexpr uintptr_t EndTag = ~uintptr_t(1);
+
+  OwningRawPtr<node_type> m_head = (node_type*)EndTag;
+
+  KOKKOS_INLINE_FUNCTION
+  bool _try_push_node(node_type& node) {
+
+    KOKKOS_EXPECTS(!node.is_enqueued());
+
+    auto* volatile & next = LinkedListNodeAccess::next_ptr(node);
+
+    // store the head of the queue in a local variable
+    auto* old_head = m_head;
+
+    // retry until someone locks the queue or we successfully compare exchange
+    while (old_head != (node_type*)LockTag) {
+
+      // TODO @tasking @memory_order DSH this should have a memory order and not a memory fence
+
+      // set task->next to the head of the queue
+      next = old_head;
+
+      // fence to emulate acquire semantics on next and release semantics on
+      // the store of m_head
+      // Do not proceed until 'next' has been stored.
+      Kokkos::memory_fence();
+
+      // store the old head
+      auto* const old_head_tmp = old_head;
+
+      // attempt to swap task with the old head of the queue
+      // as if this were done atomically:
+      //   if(m_head == old_head) {
+      //     m_head = &node;
+      //   }
+      //   old_head = m_head;
+      old_head = ::Kokkos::atomic_compare_exchange(&m_head, old_head, &node);
+
+      if(old_head_tmp == old_head) return true;
+    }
+
+    // Failed, replace 'task->m_next' value since 'task' remains
+    // not a member of a queue.
+
+    // TODO @tasking @memory_order DSH this should have a memory order and not a memory fence
+    LinkedListNodeAccess::mark_as_not_enqueued(node);
+
+    // fence to emulate acquire semantics on next
+    // Do not proceed until 'next' has been stored.
+    ::Kokkos::memory_fence();
+
+    return false;
+  }
+
+  bool _is_empty() const noexcept {
+    // TODO @tasking @memory_order DSH make this an atomic load with memory order
+    return (volatile node_type*)this->m_head == (node_type*)EndTag;
+  }
+
+};
+
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+
+template <class T>
+class LockBasedLIFO
+  : private LockBasedLIFOCommon<T>
+{
+
+private:
+
+  using base_t = LockBasedLIFOCommon<T>;
+  using node_type = typename base_t::node_type;
+
+public:
+
+  using value_type = typename base_t::value_type; // = T
+  using intrusive_node_base_type = SimpleSinglyLinkedListNode<>;
+
+public:
+
+
+  LockBasedLIFO() = default;
+  LockBasedLIFO(LockBasedLIFO const&) = delete;
+  LockBasedLIFO(LockBasedLIFO&&) = delete;
+  LockBasedLIFO& operator=(LockBasedLIFO const&) = delete;
+  LockBasedLIFO& operator=(LockBasedLIFO&&) = delete;
+
+  ~LockBasedLIFO() = default;
+
+
+  bool empty() const noexcept {
+    // TODO @tasking @memory_order DSH memory order
+    return this->_is_empty();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<T> pop(bool abort_on_locked = false)
+  {
+    // Put this in here to avoid requiring value_type to be complete until now.
+    static_assert(
+      std::is_base_of<intrusive_node_base_type, value_type>::value,
+      "Intrusive linked-list value_type must be derived from intrusive_node_base_type"
+    );
+
+    // We can't use the static constexpr LockTag directly because
+    // atomic_compare_exchange needs to bind a reference to that, and you
+    // can't do that with static constexpr variables.
+    auto* const lock_tag = (node_type*)base_t::LockTag;
+
+    // TODO @tasking @memory_order DSH shouldn't this be a relaxed atomic load?
+    // start with the return value equal to the head
+    auto* rv = this->m_head;
+
+    // Retry until the lock is acquired or the queue is empty.
+    while(rv != (node_type*)base_t::EndTag) {
+
+      // The only possible values for the queue are
+      // (1) lock, (2) end, or (3) a valid task.
+      // Thus zero will never appear in the queue.
+      //
+      // If queue is locked then just read by guaranteeing the CAS will fail.
+      KOKKOS_ASSERT(rv != nullptr);
+
+      if(rv == lock_tag) {
+        // TODO @tasking @memory_order DSH this should just be an atomic load followed by a continue
+        // just set rv to nullptr for now, effectively turning the
+        // atomic_compare_exchange below into a load
+        rv = nullptr;
+        if(abort_on_locked) {
+          break;
+        }
+      }
+
+      auto* const old_rv = rv;
+
+      // TODO @tasking @memory_order DSH this should be a weak compare exchange in a loop
+      rv = Kokkos::atomic_compare_exchange(&(this->m_head), old_rv, lock_tag);
+
+      if(rv == old_rv) {
+        // CAS succeeded and queue is locked
+        //
+        // This thread has locked the queue and removed 'rv' from the queue.
+        // Extract the next entry of the queue from 'rv->m_next'
+        // and mark 'rv' as popped from a queue by setting
+        // 'rv->m_next = nullptr'.
+        //
+        // Place the next entry in the head of the queue,
+        // which also unlocks the queue.
+        //
+        // This thread has exclusive access to
+        // the queue and the popped task's m_next.
+
+        // TODO @tasking @memory_order DSH check whether the volatile is needed here
+        auto* volatile& next = LinkedListNodeAccess::next_ptr(*rv); //->m_next;
+
+        // This algorithm is not lockfree because a adversarial scheduler could
+        // context switch this thread at this point and the rest of the threads
+        // calling this method would never make forward progress
+
+        // TODO @tasking @memory_order DSH I think this needs to be a atomic store release (and the memory fence needs to be removed)
+        // TODO @tasking DSH prove that this doesn't need to be a volatile store
+        // Lock is released here
+        this->m_head = next;
+
+        // Mark rv as popped by assigning nullptr to the next
+        LinkedListNodeAccess::mark_as_not_enqueued(*rv);
+
+        Kokkos::memory_fence();
+
+        return OptionalRef<T>{ *static_cast<T*>(rv) };
+      }
+
+      // Otherwise, the CAS got a value that didn't match (either because
+      // another thread locked the queue and we observed the lock tag or because
+      // another thread replaced the head and now we want to try to lock the
+      // queue with that as the popped item.  Either way, try again.
+    }
+
+    // Return an empty OptionalRef by calling the default constructor
+    return { };
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<T>
+  steal()
+  {
+    // TODO @tasking @optimization DSH do this with fewer retries
+    return pop(/* abort_on_locked = */ true);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool push(node_type& node)
+  {
+    while(!this->_try_push_node(node)) { /* retry until success */ }
+    // for consistency with push interface on other queue types:
+    return true;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool push(node_type&& node)
+  {
+    // Just forward to the lvalue version
+    return push(node);
+  }
+
+};
+
+
+/** @brief A Multiple Producer, Single Consumer Queue with some special semantics
+ *
+ * This multi-producer, single consumer queue has the following semantics:
+ *
+ *   - Any number of threads may call `try_emplace`/`try_push`
+ *       + These operations are lock-free.
+ *   - Exactly one thread calls `consume()`, and the call occurs exactly once
+ *     in the lifetime of the queue.
+ *       + This operation is lock-free (and wait-free w.r.t. producers)
+ *   - Any calls to `try_push` that happen-before the call to
+ *     `consume()` will succeed and return an true, such that the `consume()`
+ *     call will visit that node.
+ *   - Any calls to `try_push` for which the single call to `consume()`
+ *     happens-before those calls will return false and the node given as
+ *     an argument to `try_push` will not be visited by consume()
+ *
+ *
+ * @tparam T The type of items in the queue
+ *
+ */
+template <class T>
+class SingleConsumeOperationLIFO
+  : private LockBasedLIFOCommon<T>
+{
+private:
+
+  using base_t = LockBasedLIFOCommon<T>;
+  using node_type = typename base_t::node_type;
+
+  // Allows us to reuse the existing infrastructure for
+  static constexpr auto ConsumedTag = base_t::LockTag;
+
+public:
+
+  using value_type = typename base_t::value_type; // = T
+
+  KOKKOS_INLINE_FUNCTION
+  SingleConsumeOperationLIFO() noexcept = default;
+
+  SingleConsumeOperationLIFO(SingleConsumeOperationLIFO const&) = delete;
+  SingleConsumeOperationLIFO(SingleConsumeOperationLIFO&&) = delete;
+  SingleConsumeOperationLIFO& operator=(SingleConsumeOperationLIFO const&) = delete;
+  SingleConsumeOperationLIFO& operator=(SingleConsumeOperationLIFO&&) = delete;
+
+  KOKKOS_INLINE_FUNCTION
+  ~SingleConsumeOperationLIFO() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  bool empty() const noexcept {
+    // TODO @tasking @memory_order DSH memory order
+    return this->_is_empty();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_consumed() const noexcept {
+    // TODO @tasking @memory_order DSH memory order?
+    return this->m_head == (node_type*)ConsumedTag;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool try_push(node_type& node)
+  {
+    return this->_try_push_node(node);
+    // Ensures: (return value is true) || (node.is_enqueued() == false);
+  }
+
+  template <class Function>
+  KOKKOS_INLINE_FUNCTION
+  void consume(Function&& f) {
+    auto* const consumed_tag = (node_type*)ConsumedTag;
+
+    // Swap the Consumed tag into the head of the queue:
+
+    // (local variable used for assertion only)
+    // TODO @tasking @memory_order DSH this should have memory order release, I think
+    Kokkos::memory_fence();
+    auto old_head = Kokkos::atomic_exchange(&(this->m_head), consumed_tag);
+
+    // Assert that the queue wasn't consumed before this
+    // This can't be an expects clause because the acquire fence on the read
+    // would be a side-effect
+    KOKKOS_ASSERT(old_head != consumed_tag);
+
+    // We now have exclusive access to the queue; loop over it and call
+    // the user function
+    while(old_head != (node_type*)base_t::EndTag) {
+
+      // get the Node to make the call with
+      auto* call_arg = old_head;
+
+      // advance the head
+      old_head = LinkedListNodeAccess::next_ptr(*old_head);
+
+      // Mark as popped before proceeding
+      LinkedListNodeAccess::mark_as_not_enqueued(*call_arg);
+
+      // Call the user function
+      auto& arg = *static_cast<T*>(call_arg);
+      f(std::move(arg));
+
+    }
+
+  }
+
+};
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+struct TaskQueueTraitsLockBased
+{
+
+  // TODO @tasking @documentation DSH document what concepts these match
+
+  template <class Task>
+  using ready_queue_type = LockBasedLIFO<Task>;
+
+  template <class Task>
+  using waiting_queue_type = SingleConsumeOperationLIFO<Task>;
+
+  template <class Task>
+  using intrusive_task_base_type =
+    typename ready_queue_type<Task>::intrusive_node_base_type;
+
+  static constexpr auto ready_queue_insertion_may_fail = false;
+
+};
+
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* defined KOKKOS_ENABLE_TASKDAG */
+#endif /* #ifndef KOKKOS_IMPL_LIFO_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_LinkedListNode.hpp b/packages/kokkos/core/src/impl/Kokkos_LinkedListNode.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..78a6faca907069b3a8cfe202d481ff80ea9ba5a8
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_LinkedListNode.hpp
@@ -0,0 +1,206 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_LINKEDLISTNODE_HPP
+#define KOKKOS_IMPL_LINKEDLISTNODE_HPP
+
+#include <Kokkos_Macros.hpp>
+#ifdef KOKKOS_ENABLE_TASKDAG // Note: implies CUDA_VERSION >= 8000 if using CUDA
+
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_PointerOwnership.hpp>
+#include <impl/Kokkos_OptionalRef.hpp>
+#include <impl/Kokkos_Error.hpp> // KOKKOS_EXPECTS
+
+#include <Kokkos_Atomic.hpp>  // atomic_compare_exchange, atomic_fence
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+struct LinkedListNodeAccess;
+
+template <
+  uintptr_t NotEnqueuedValue = 0,
+  template <class> class PointerTemplate = std::add_pointer
+>
+struct SimpleSinglyLinkedListNode
+{
+
+private:
+
+  using pointer_type = typename PointerTemplate<SimpleSinglyLinkedListNode>::type;
+
+  pointer_type m_next = reinterpret_cast<pointer_type>(NotEnqueuedValue);
+
+  // These are private because they are an implementation detail of the queue
+  // and should not get added to the value type's interface via the intrusive
+  // wrapper.
+
+  KOKKOS_INLINE_FUNCTION
+  void mark_as_not_enqueued() noexcept {
+    // TODO @tasking @memory_order DSH make this an atomic store with memory order
+    m_next = (pointer_type)NotEnqueuedValue;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void mark_as_not_enqueued() volatile noexcept {
+    // TODO @tasking @memory_order DSH make this an atomic store with memory order
+    m_next = (pointer_type)NotEnqueuedValue;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  pointer_type& _next_ptr() noexcept {
+    return m_next;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  pointer_type volatile& _next_ptr() volatile noexcept {
+    return m_next;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  pointer_type const& _next_ptr() const noexcept {
+    return m_next;
+  }
+  
+  KOKKOS_INLINE_FUNCTION
+  pointer_type const volatile& _next_ptr() const volatile noexcept {
+    return m_next;
+  }
+
+  friend struct LinkedListNodeAccess;
+
+public:
+
+  // KOKKOS_CONSTEXPR_14
+  KOKKOS_INLINE_FUNCTION
+  bool is_enqueued() const noexcept {
+    // TODO @tasking @memory_order DSH make this an atomic load with memory order
+    return m_next != reinterpret_cast<pointer_type>(NotEnqueuedValue);
+  }
+
+  // KOKKOS_CONSTEXPR_14
+  KOKKOS_INLINE_FUNCTION
+  bool is_enqueued() const volatile noexcept {
+    // TODO @tasking @memory_order DSH make this an atomic load with memory order
+    return m_next != reinterpret_cast<pointer_type>(NotEnqueuedValue);
+  }
+
+};
+
+/// Attorney for LinkedListNode, since user types inherit from it
+struct LinkedListNodeAccess
+{
+
+  template <class Node>
+  KOKKOS_INLINE_FUNCTION
+  static void mark_as_not_enqueued(Node& node) noexcept {
+    node.mark_as_not_enqueued();
+  }
+
+  template <class Node>
+  KOKKOS_INLINE_FUNCTION
+  static void mark_as_not_enqueued(Node volatile& node) noexcept {
+    node.mark_as_not_enqueued();
+  }
+
+  template <class Node>
+  KOKKOS_INLINE_FUNCTION
+  static
+  typename Node::pointer_type&
+  next_ptr(Node& node) noexcept {
+    return node._next_ptr();
+  }
+
+  template <class Node>
+  KOKKOS_INLINE_FUNCTION
+  static
+  typename Node::pointer_type&
+  next_ptr(Node volatile& node) noexcept {
+    return node._next_ptr();
+  }
+
+  template <class Node>
+  KOKKOS_INLINE_FUNCTION
+  static
+  typename Node::pointer_type&
+  next_ptr(Node const& node) noexcept {
+    return node._next_ptr();
+  }
+
+  template <class Node>
+  KOKKOS_INLINE_FUNCTION
+  static
+  typename Node::pointer_type&
+  prev_ptr(Node& node) noexcept {
+    return node._prev_ptr();
+  }
+
+  template <class Node>
+  KOKKOS_INLINE_FUNCTION
+  static
+  typename Node::pointer_type&
+  prev_ptr(Node const& node) noexcept {
+    return node._prev_ptr();
+  }
+
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* defined KOKKOS_ENABLE_TASKDAG */
+#endif /* #ifndef KOKKOS_IMPL_LINKEDLISTNODE_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_MemoryPoolAllocator.hpp b/packages/kokkos/core/src/impl/Kokkos_MemoryPoolAllocator.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..b4629df5b0a4260013ebe9d993fff885f81513be
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_MemoryPoolAllocator.hpp
@@ -0,0 +1,140 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_MEMORYPOOLALLOCATOR_HPP
+#define KOKKOS_IMPL_MEMORYPOOLALLOCATOR_HPP
+
+#include <Kokkos_Macros.hpp>
+
+#include <Kokkos_Core_fwd.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+namespace Kokkos {
+namespace Impl {
+
+template <class MemoryPool, class T>
+class MemoryPoolAllocator {
+public:
+
+  using memory_pool = MemoryPool;
+
+private:
+
+  memory_pool m_pool;
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  MemoryPoolAllocator() = default;
+  KOKKOS_INLINE_FUNCTION
+  MemoryPoolAllocator(MemoryPoolAllocator const&) = default;
+  KOKKOS_INLINE_FUNCTION
+  MemoryPoolAllocator(MemoryPoolAllocator&&) = default;
+  KOKKOS_INLINE_FUNCTION
+  MemoryPoolAllocator& operator=(MemoryPoolAllocator const&) = default;
+  KOKKOS_INLINE_FUNCTION
+  MemoryPoolAllocator& operator=(MemoryPoolAllocator&&) = default;
+  KOKKOS_INLINE_FUNCTION
+  ~MemoryPoolAllocator() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  explicit MemoryPoolAllocator(memory_pool const& arg_pool) : m_pool(arg_pool) { }
+  KOKKOS_INLINE_FUNCTION
+  explicit MemoryPoolAllocator(memory_pool&& arg_pool) : m_pool(std::move(arg_pool)) { }
+
+public:
+
+  using value_type = T;
+  using pointer = T*;
+  using size_type = typename MemoryPool::memory_space::size_type;
+  using difference_type = typename std::make_signed<size_type>::type;
+
+  template <class U>
+  struct rebind {
+    using other = MemoryPoolAllocator<MemoryPool, U>;
+  };
+
+  KOKKOS_INLINE_FUNCTION
+  pointer allocate(size_t n) {
+    void* rv = m_pool.allocate(n * sizeof(T));
+    if(rv == nullptr) {
+      Kokkos::abort("Kokkos MemoryPool allocator failed to allocate memory");
+    }
+    return reinterpret_cast<T*>(rv);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void deallocate(T* ptr, size_t n) {
+    m_pool.deallocate(ptr, n * sizeof(T));
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  size_type max_size() const {
+    return m_pool.max_block_size();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool operator==(MemoryPoolAllocator const& other) const {
+    return m_pool == other.m_pool;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool operator!=(MemoryPoolAllocator const& other) const {
+    return !(*this == other);
+  }
+
+};
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+
+
+#endif /* #ifndef KOKKOS_IMPL_MEMORYPOOLALLOCATOR_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_MultipleTaskQueue.hpp b/packages/kokkos/core/src/impl/Kokkos_MultipleTaskQueue.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..ed8d2be5aea514e9cb61e0221e6c2d916a4a0cdc
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_MultipleTaskQueue.hpp
@@ -0,0 +1,616 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_MULTIPLETASKQUEUE_HPP
+#define KOKKOS_IMPL_MULTIPLETASKQUEUE_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_MemoryPool.hpp>
+
+#include <impl/Kokkos_TaskBase.hpp>
+#include <impl/Kokkos_TaskResult.hpp>
+
+#include <impl/Kokkos_TaskQueueMemoryManager.hpp>
+#include <impl/Kokkos_TaskQueueCommon.hpp>
+#include <impl/Kokkos_Memory_Fence.hpp>
+#include <impl/Kokkos_Atomic_Increment.hpp>
+#include <impl/Kokkos_OptionalRef.hpp>
+#include <impl/Kokkos_LIFO.hpp>
+
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+// A *non*-concurrent linked list of tasks that failed to be enqueued
+// (We can't reuse the wait queue for this because of the semantics of that
+// queue that require it to be popped exactly once, and if a task has failed
+// to be enqueued, it has already been marked ready)
+template <class TaskQueueTraits>
+struct FailedQueueInsertionLinkedListSchedulingInfo {
+  using task_base_type = TaskNode<TaskQueueTraits>;
+  task_base_type* next = nullptr;
+};
+
+struct EmptyTaskSchedulingInfo { };
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template <
+  class ExecSpace,
+  class MemorySpace,
+  class TaskQueueTraits,
+  class MemoryPool
+>
+class MultipleTaskQueue;
+
+template <class TaskQueueTraits>
+struct MultipleTaskQueueTeamEntry {
+public:
+
+  using task_base_type = TaskNode<TaskQueueTraits>;
+  using runnable_task_base_type = RunnableTaskBase<TaskQueueTraits>;
+  using ready_queue_type = typename TaskQueueTraits::template ready_queue_type<task_base_type>;
+  using task_queue_traits = TaskQueueTraits;
+  using task_scheduling_info_type = typename std::conditional<
+    TaskQueueTraits::ready_queue_insertion_may_fail,
+    FailedQueueInsertionLinkedListSchedulingInfo<TaskQueueTraits>,
+    EmptyTaskSchedulingInfo
+  >::type;
+
+private:
+
+  // Number of allowed priorities
+  static constexpr int NumPriorities = 3;
+
+  ready_queue_type m_ready_queues[NumPriorities][2];
+
+  task_base_type* m_failed_heads[NumPriorities][2];
+
+  KOKKOS_INLINE_FUNCTION
+  task_base_type*&
+  failed_head_for(runnable_task_base_type const& task)
+  {
+    return m_failed_heads[int(task.get_priority())][int(task.get_task_type())];
+  }
+
+  template <class _always_void=void>
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<task_base_type>
+  _pop_failed_insertion(
+    int priority, TaskType type,
+    typename std::enable_if<
+      task_queue_traits::ready_queue_insertion_may_fail
+        and std::is_void<_always_void>::value,
+      void*
+    >::type = nullptr
+  ) {
+    auto* rv_ptr = m_failed_heads[priority][(int)type];
+    if(rv_ptr) {
+      m_failed_heads[priority][(int)type] =
+        rv_ptr->as_runnable_task()
+          .template scheduling_info_as<task_scheduling_info_type>()
+            .next;
+      return OptionalRef<task_base_type>{ *rv_ptr };
+    }
+    else {
+      return OptionalRef<task_base_type>{ nullptr };
+    }
+  }
+
+  template <class _always_void=void>
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<task_base_type>
+  _pop_failed_insertion(
+    int priority, TaskType type,
+    typename std::enable_if<
+      not task_queue_traits::ready_queue_insertion_may_fail
+        and std::is_void<_always_void>::value,
+      void*
+    >::type = nullptr
+  ) {
+    return OptionalRef<task_base_type>{ nullptr };
+  }
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  MultipleTaskQueueTeamEntry() {
+    for(int iPriority = 0; iPriority < NumPriorities; ++iPriority) {
+      for(int iType = 0; iType < 2; ++iType) {
+        m_failed_heads[iPriority][iType] = nullptr;
+      }
+    }
+  }
+
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<task_base_type>
+  try_to_steal_ready_task()
+  {
+    auto return_value = OptionalRef<task_base_type>{};
+    // prefer lower priority tasks when stealing
+    for(int i_priority = NumPriorities-1; i_priority >= 0; --i_priority) {
+      // Check for a single task with this priority
+      return_value = m_ready_queues[i_priority][TaskSingle].steal();
+      if(return_value) return return_value;
+
+      // Check for a team task with this priority
+      return_value = m_ready_queues[i_priority][TaskTeam].steal();
+      if(return_value) return return_value;
+
+    }
+    return return_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<task_base_type>
+  pop_ready_task()
+  {
+    auto return_value = OptionalRef<task_base_type>{};
+    for(int i_priority = 0; i_priority < NumPriorities; ++i_priority) {
+      return_value = _pop_failed_insertion(i_priority, TaskTeam);
+      if(not return_value) return_value = m_ready_queues[i_priority][TaskTeam].pop();
+      if(return_value) return return_value;
+
+      // Check for a single task with this priority
+      return_value = _pop_failed_insertion(i_priority, TaskSingle);
+      if(not return_value) return_value = m_ready_queues[i_priority][TaskSingle].pop();
+      if(return_value) return return_value;
+    }
+    return return_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  ready_queue_type&
+  team_queue_for(runnable_task_base_type const& task)
+  {
+    return m_ready_queues[int(task.get_priority())][int(task.get_task_type())];
+  }
+
+
+  template <class _always_void=void>
+  KOKKOS_INLINE_FUNCTION
+  void do_handle_failed_insertion(
+    runnable_task_base_type&& task,
+    typename std::enable_if<
+      task_queue_traits::ready_queue_insertion_may_fail
+        and std::is_void<_always_void>::value,
+      void*
+    >::type = nullptr
+  )
+  {
+    // failed insertions, if they happen, must be from the only thread that
+    // is allowed to push to m_ready_queues, so this linked-list insertion is not
+    // concurrent
+    auto& node = task.template scheduling_info_as<task_scheduling_info_type>();
+    auto*& head = failed_head_for(task);
+    node.next = head;
+    head = &task;
+  }
+
+  template <class _always_void=void>
+  KOKKOS_INLINE_FUNCTION
+  void do_handle_failed_insertion(
+    runnable_task_base_type&& task,
+    typename std::enable_if<
+      not task_queue_traits::ready_queue_insertion_may_fail
+        and std::is_void<_always_void>::value,
+      void*
+    >::type = nullptr
+  )
+  {
+    Kokkos::abort("should be unreachable!");
+  }
+
+
+  template <class _always_void=void>
+  KOKKOS_INLINE_FUNCTION
+  void
+  flush_failed_insertions(
+    int priority,
+    int task_type,
+    typename std::enable_if<
+      task_queue_traits::ready_queue_insertion_may_fail
+        and std::is_void<_always_void>::value, // just to make this dependent on template parameter
+      int
+    >::type = 0
+  ) {
+    // TODO @tasking @minor DSH this somethimes gets some things out of LIFO order, which may be undesirable (but not a bug)
+
+
+    auto*& failed_head = m_failed_heads[priority][task_type];
+    auto& team_queue = m_ready_queues[priority][task_type];
+
+    while(failed_head != nullptr) {
+      bool success = team_queue.push(*failed_head);
+      if(success) {
+        // Step to the next linked list element
+        failed_head = failed_head->as_runnable_task()
+          .template scheduling_info_as<task_scheduling_info_type>().next;
+      }
+      else {
+        // no more room, stop traversing and leave the head where it is
+        break;
+      }
+    }
+  }
+
+
+  template <class _always_void=void>
+  KOKKOS_INLINE_FUNCTION
+  void
+  flush_failed_insertions(
+    int, int,
+    typename std::enable_if<
+      not task_queue_traits::ready_queue_insertion_may_fail
+        and std::is_void<_always_void>::value, // just to make this dependent on template parameter
+      int
+    >::type = 0
+  ) { }
+
+
+  KOKKOS_INLINE_FUNCTION
+  void
+  flush_all_failed_insertions() {
+    for(int iPriority = 0; iPriority < NumPriorities; ++iPriority) {
+      flush_failed_insertions(iPriority, (int)TaskType::TaskTeam);
+      flush_failed_insertions(iPriority, (int)TaskType::TaskSingle);
+    }
+  }
+
+
+  template <class TeamSchedulerInfo, class ExecutionSpace, class MemorySpace, class MemoryPool>
+  KOKKOS_INLINE_FUNCTION
+  void
+  do_schedule_runnable(
+    MultipleTaskQueue<ExecutionSpace, MemorySpace, TaskQueueTraits, MemoryPool>& queue,
+    RunnableTaskBase<TaskQueueTraits>&& task,
+    TeamSchedulerInfo const& info
+
+  ) {
+    // Push on any nodes that failed to enqueue
+    auto& team_queue = team_queue_for(task);
+    auto priority = task.get_priority();
+    auto task_type = task.get_task_type();
+
+    // First schedule the task
+    queue.schedule_runnable_to_queue(
+      std::move(task),
+      team_queue,
+      info
+    );
+
+    // Task may be enqueued and may be run at any point; don't touch it (hence
+    // the use of move semantics)
+    flush_failed_insertions((int)priority, (int)task_type);
+  }
+
+
+
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template <
+  class ExecSpace,
+  class MemorySpace,
+  class TaskQueueTraits,
+  class MemoryPool
+>
+class MultipleTaskQueue final
+  : public TaskQueueMemoryManager<ExecSpace, MemorySpace, MemoryPool>,
+    public TaskQueueCommonMixin<MultipleTaskQueue<ExecSpace, MemorySpace, TaskQueueTraits, MemoryPool>>,
+    private ObjectWithVLAEmulation<
+      MultipleTaskQueue<ExecSpace, MemorySpace, TaskQueueTraits, MemoryPool>,
+      MultipleTaskQueueTeamEntry<TaskQueueTraits>
+    >
+{
+public:
+
+  using task_queue_type = MultipleTaskQueue; // mark as task_queue concept
+  using task_queue_traits = TaskQueueTraits;
+  using task_base_type = TaskNode<TaskQueueTraits>;
+  using ready_queue_type = typename TaskQueueTraits::template ready_queue_type<task_base_type>;
+
+private:
+
+  using base_t = TaskQueueMemoryManager<ExecSpace, MemorySpace, MemoryPool>;
+  using common_mixin_t = TaskQueueCommonMixin<MultipleTaskQueue>;
+  using vla_emulation_base_t = ObjectWithVLAEmulation<
+    MultipleTaskQueue<ExecSpace, MemorySpace, TaskQueueTraits, MemoryPool>,
+    MultipleTaskQueueTeamEntry<TaskQueueTraits>
+  >;
+
+  // Allow private inheritance from ObjectWithVLAEmulation
+  friend struct VLAEmulationAccess;
+
+public:
+
+  struct SchedulerInfo {
+    using team_queue_id_t = int32_t;
+    static constexpr team_queue_id_t NoAssociatedTeam = -1;
+    team_queue_id_t team_association = NoAssociatedTeam;
+
+    using scheduler_info_type = SchedulerInfo;
+
+    KOKKOS_INLINE_FUNCTION
+    constexpr explicit SchedulerInfo(team_queue_id_t association) noexcept
+      : team_association(association)
+    { }
+
+    KOKKOS_INLINE_FUNCTION
+    SchedulerInfo() = default;
+
+    KOKKOS_INLINE_FUNCTION
+    SchedulerInfo(SchedulerInfo const&) = default;
+
+    KOKKOS_INLINE_FUNCTION
+    SchedulerInfo(SchedulerInfo&&) = default;
+
+    KOKKOS_INLINE_FUNCTION
+    SchedulerInfo& operator=(SchedulerInfo const&) = default;
+
+    KOKKOS_INLINE_FUNCTION
+    SchedulerInfo& operator=(SchedulerInfo&&) = default;
+
+    KOKKOS_INLINE_FUNCTION
+    ~SchedulerInfo() = default;
+
+  };
+
+  using task_scheduling_info_type = typename std::conditional<
+    TaskQueueTraits::ready_queue_insertion_may_fail,
+    FailedQueueInsertionLinkedListSchedulingInfo<TaskQueueTraits>,
+    EmptyTaskSchedulingInfo
+  >::type;
+  using team_scheduler_info_type = SchedulerInfo;
+
+  using runnable_task_base_type = RunnableTaskBase<TaskQueueTraits>;
+
+  template <class Functor, class Scheduler>
+    // requires TaskScheduler<Scheduler> && TaskFunctor<Functor>
+  using runnable_task_type = RunnableTask<
+    task_queue_traits, Scheduler, typename Functor::value_type, Functor
+  >;
+
+  using aggregate_task_type = AggregateTask<task_queue_traits, task_scheduling_info_type>;
+
+  // Number of allowed priorities
+  static constexpr int NumPriorities = 3;
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr typename vla_emulation_base_t::vla_entry_count_type
+  n_queues() const noexcept { return this->n_vla_entries(); }
+
+public:
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Constructors, destructors, and assignment"> {{{2
+
+  MultipleTaskQueue() = delete;
+  MultipleTaskQueue(MultipleTaskQueue const&) = delete;
+  MultipleTaskQueue(MultipleTaskQueue&&) = delete;
+  MultipleTaskQueue& operator=(MultipleTaskQueue const&) = delete;
+  MultipleTaskQueue& operator=(MultipleTaskQueue&&) = delete;
+
+  MultipleTaskQueue(
+    typename base_t::execution_space const& arg_execution_space,
+    typename base_t::memory_space const&,
+    typename base_t::memory_pool const& arg_memory_pool
+  ) : base_t(arg_memory_pool),
+      vla_emulation_base_t(
+        Impl::TaskQueueSpecialization<
+          // TODO @tasking @generalization DSH avoid referencing SimpleTaskScheduler directly?
+          SimpleTaskScheduler<typename base_t::execution_space, MultipleTaskQueue>
+        >::get_max_team_count(arg_execution_space)
+      )
+  { }
+
+  // </editor-fold> end Constructors, destructors, and assignment }}}2
+  //----------------------------------------------------------------------------
+
+  KOKKOS_FUNCTION
+  void
+  schedule_runnable(
+    runnable_task_base_type&& task,
+    team_scheduler_info_type const& info
+  ) {
+    auto team_association = info.team_association;
+    // Should only not be assigned if this is a host spawn...
+    if(team_association == team_scheduler_info_type::NoAssociatedTeam) {
+      team_association = 0;
+    }
+    this->vla_value_at(team_association).do_schedule_runnable(*this, std::move(task), info);
+    // Task may be enqueued and may be run at any point; don't touch it (hence
+    // the use of move semantics)
+  }
+
+  KOKKOS_FUNCTION
+  OptionalRef<task_base_type>
+  pop_ready_task(
+    team_scheduler_info_type const& info
+  )
+  {
+    KOKKOS_EXPECTS(info.team_association != team_scheduler_info_type::NoAssociatedTeam);
+
+    auto return_value = OptionalRef<task_base_type>{};
+    auto team_association = info.team_association;
+
+    // always loop in order of priority first, then prefer team tasks over single tasks
+    auto& team_queue_info = this->vla_value_at(team_association);
+
+    if(task_queue_traits::ready_queue_insertion_may_fail) {
+      team_queue_info.flush_all_failed_insertions();
+    }
+
+    return_value = team_queue_info.pop_ready_task();
+
+    if(not return_value) {
+
+      // loop through the rest of the teams and try to steal
+      for(
+        auto isteal = (team_association + 1) % this->n_queues();
+        isteal != team_association;
+        isteal = (isteal + 1) % this->n_queues()
+      ) {
+        return_value = this->vla_value_at(isteal).try_to_steal_ready_task();
+        if(return_value) { break; }
+      }
+
+      // Note that this is where we'd update the task's scheduling info
+    }
+    // if nothing was found, return a default-constructed (empty) OptionalRef
+    return return_value;
+  }
+
+
+  // TODO @tasking @generalization DSH make this a property-based customization point
+  KOKKOS_INLINE_FUNCTION
+  team_scheduler_info_type
+  initial_team_scheduler_info(int rank_in_league) const noexcept {
+    return team_scheduler_info_type{
+      typename team_scheduler_info_type::team_queue_id_t(rank_in_league % n_queues())
+    };
+  }
+
+  // TODO @tasking @generalization DSH make this a property-based customization point
+  static /* KOKKOS_CONSTEXPR_14 */ size_t
+  task_queue_allocation_size(
+    typename base_t::execution_space const& exec_space,
+    typename base_t::memory_space const&,
+    typename base_t::memory_pool const&
+  )
+  {
+    using specialization =
+      Impl::TaskQueueSpecialization<
+        // TODO @tasking @generalization DSH avoid referencing SimpleTaskScheduler directly?
+        SimpleTaskScheduler<typename base_t::execution_space, MultipleTaskQueue>
+      >;
+
+    return vla_emulation_base_t::required_allocation_size(
+      /* num_vla_entries = */ specialization::get_max_team_count(exec_space)
+    );
+  }
+
+  // Provide a sensible default that can be overridden
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info_from_completed_predecessor(
+    runnable_task_base_type& ready_task,
+    runnable_task_base_type const& predecessor
+  ) const
+  {
+    // Do nothing; we're using the extra storage for the failure linked list
+  }
+
+  // Provide a sensible default that can be overridden
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info_from_completed_predecessor(
+    aggregate_task_type& aggregate,
+    runnable_task_base_type const& predecessor
+  ) const
+  {
+    // Do nothing; we're using the extra storage for the failure linked list
+  }
+
+  // Provide a sensible default that can be overridden
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info_from_completed_predecessor(
+    aggregate_task_type& aggregate,
+    aggregate_task_type const& predecessor
+  ) const
+  {
+    // Do nothing; we're using the extra storage for the failure linked list
+  }
+
+  // Provide a sensible default that can be overridden
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info_from_completed_predecessor(
+    runnable_task_base_type& ready_task,
+    aggregate_task_type const& predecessor
+  ) const
+  {
+    // Do nothing; we're using the extra storage for the failure linked list
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void
+  handle_failed_ready_queue_insertion(
+    runnable_task_base_type&& task,
+    ready_queue_type&,
+    team_scheduler_info_type const& info
+  ) {
+    KOKKOS_EXPECTS(info.team_association != team_scheduler_info_type::NoAssociatedTeam);
+
+    this->vla_value_at(info.team_association).do_handle_failed_insertion(
+      std::move(task)
+    );
+  }
+};
+
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_MULTIPLETASKQUEUE_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_OptionalRef.hpp b/packages/kokkos/core/src/impl/Kokkos_OptionalRef.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bf83d1831c2550fc88c2f7780fb8c72ea8312651
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_OptionalRef.hpp
@@ -0,0 +1,242 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_OPTIONALREF_HPP
+#define KOKKOS_IMPL_OPTIONALREF_HPP
+
+#include <Kokkos_Macros.hpp>
+
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_PointerOwnership.hpp>
+#include <impl/Kokkos_Error.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+namespace Kokkos {
+namespace Impl {
+
+struct InPlaceTag { };
+
+template <class T>
+struct OptionalRef {
+private:
+
+  ObservingRawPtr<T> m_value = nullptr;
+
+public:
+
+  using value_type = T;
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef(OptionalRef const&) = default;
+  
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef(OptionalRef&&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef& operator=(OptionalRef const&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  // Can't return a reference to volatile OptionalRef, since GCC issues a warning about
+  // reference to volatile not accessing the underlying value
+  void
+  operator=(OptionalRef const volatile& other) volatile noexcept
+  {
+    m_value = other.m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef& operator=(OptionalRef&&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  ~OptionalRef() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  explicit OptionalRef(T& arg_value) : m_value(&arg_value) { }
+
+  KOKKOS_INLINE_FUNCTION
+  explicit OptionalRef(std::nullptr_t) : m_value(nullptr) { }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef& operator=(T& arg_value) { m_value = &arg_value; return *this; }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef& operator=(std::nullptr_t) { m_value = nullptr; return *this; }
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<typename std::add_volatile<T>::type>
+  as_volatile() volatile noexcept {
+    return 
+      OptionalRef<typename std::add_volatile<T>::type>(*(*this));
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  OptionalRef<typename std::add_volatile<typename std::add_const<T>::type>::type>
+  as_volatile() const volatile noexcept {
+    return 
+      OptionalRef<typename std::add_volatile<typename std::add_const<T>::type>::type>(*(*this));
+  }
+
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  T& operator*() & {
+    KOKKOS_EXPECTS(this->has_value());
+    return *m_value;
+  }
+   
+  KOKKOS_INLINE_FUNCTION
+  T const& operator*() const & {
+    KOKKOS_EXPECTS(this->has_value());
+    return *m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T volatile& operator*() volatile & {
+    KOKKOS_EXPECTS(this->has_value());
+    return *m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T const volatile& operator*() const volatile & {
+    KOKKOS_EXPECTS(this->has_value());
+    return *m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T&& operator*() && {
+    KOKKOS_EXPECTS(this->has_value());
+    return std::move(*m_value);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T* operator->() {
+    KOKKOS_EXPECTS(this->has_value());
+    return m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T const* operator->() const {
+    KOKKOS_EXPECTS(this->has_value());
+    return m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T volatile* operator->() volatile {
+    KOKKOS_EXPECTS(this->has_value());
+    return m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T const volatile* operator->() const volatile {
+    KOKKOS_EXPECTS(this->has_value());
+    return m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T* get() {
+    return m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T const* get() const {
+    return m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T volatile* get() volatile {
+    return m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  T const volatile* get() const volatile {
+    return m_value;
+  }
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  operator bool() { return m_value != nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  operator bool() const { return m_value != nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  operator bool() volatile { return m_value != nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  operator bool() const volatile { return m_value != nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  bool has_value() { return m_value != nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  bool has_value() const { return m_value != nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  bool has_value() volatile { return m_value != nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  bool has_value() const volatile { return m_value != nullptr; }
+  
+};
+
+} // end namespace Impl
+} // end namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+
+
+#endif /* #ifndef KOKKOS_IMPL_OPTIONALREF_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_Serial_Task.cpp b/packages/kokkos/core/src/impl/Kokkos_Serial_Task.cpp
index d84a8546225808b9ac8a26de72fe61e394050989..687a0e9c371292b81ce9ebde90bb52e037397083 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Serial_Task.cpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Serial_Task.cpp
@@ -55,104 +55,7 @@
 namespace Kokkos {
 namespace Impl {
 
-template class TaskQueue< Kokkos::Serial > ;
-
-void TaskQueueSpecialization< Kokkos::Serial >::execute
-  ( TaskQueue< Kokkos::Serial > * const queue )
-{
-  using exec_space = Kokkos::Serial ;
-  using tqs_queue_type      = TaskQueue< exec_space > ;
-  using task_root_type  = TaskBase< void , void , void > ;
-  using Member          = Impl::HostThreadTeamMember< exec_space > ;
-
-  task_root_type * const end = (task_root_type *) task_root_type::EndTag ;
-
-  // Set default buffers
-  serial_resize_thread_team_data( 0   /* global reduce buffer */
-                                , 512 /* team reduce buffer */
-                                , 0   /* team shared buffer */
-                                , 0   /* thread local buffer */
-                                );
-
-  Impl::HostThreadTeamData * const data = Impl::serial_get_thread_team_data();
-
-  Member exec( *data );
-
-  // Loop until all queues are empty
-  while ( 0 < queue->m_ready_count ) {
-
-    task_root_type * task = end ;
-
-    for ( int i = 0 ; i < tqs_queue_type::NumQueue && end == task ; ++i ) {
-      for ( int j = 0 ; j < 2 && end == task ; ++j ) {
-        task = tqs_queue_type::pop_ready_task( & queue->m_ready[i][j] );
-      }
-    }
-
-    if ( end != task ) {
-
-      // pop_ready_task resulted in lock == task->m_next
-      // In the executing state
-
-      (*task->m_apply)( task , & exec );
-
-#if 0
-  printf( "TaskQueue<Serial>::executed: 0x%lx { 0x%lx 0x%lx %d %d %d }\n"
-        , uintptr_t(task)
-        , uintptr_t(task->m_wait)
-        , uintptr_t(task->m_next)
-        , task->m_task_type
-        , task->m_priority
-        , task->m_ref_count );
-#endif
-
-      // If a respawn then re-enqueue otherwise the task is complete
-      // and all tasks waiting on this task are updated.
-      queue->complete( task );
-    }
-    else if ( 0 != queue->m_ready_count ) {
-      Kokkos::abort("TaskQueue<Serial>::execute ERROR: ready_count");
-    }
-  }
-}
-
-void TaskQueueSpecialization< Kokkos::Serial > ::
-  iff_single_thread_recursive_execute(
-    TaskQueue< Kokkos::Serial > * const queue )
-{
-  using exec_space = Kokkos::Serial ;
-  using tqs_queue_type      = TaskQueue< exec_space > ;
-  using task_root_type  = TaskBase< void , void , void > ;
-  using Member          = Impl::HostThreadTeamMember< exec_space > ;
-
-  task_root_type * const end = (task_root_type *) task_root_type::EndTag ;
-
-  Impl::HostThreadTeamData * const data = Impl::serial_get_thread_team_data();
-
-  Member exec( *data );
-
-  // Loop until no runnable task
-
-  task_root_type * task = end ;
-
-  do {
-
-    task = end ;
-
-    for ( int i = 0 ; i < tqs_queue_type::NumQueue && end == task ; ++i ) {
-      for ( int j = 0 ; j < 2 && end == task ; ++j ) {
-        task = tqs_queue_type::pop_ready_task( & queue->m_ready[i][j] );
-      }
-    }
-
-    if ( end == task ) break ;
-
-    (*task->m_apply)( task , & exec );
-
-    queue->complete( task );
-
-  } while(1);
-}
+template class TaskQueue<Kokkos::Serial, typename Kokkos::Serial::memory_space>;
 
 }} /* namespace Kokkos::Impl */
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_Serial_Task.hpp b/packages/kokkos/core/src/impl/Kokkos_Serial_Task.hpp
index 2fec5dfb897bb4c4e86a3976076be44cfdf5371e..c379a12fb13be9e9e453c668aa701e11ecba0d1c 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Serial_Task.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Serial_Task.hpp
@@ -47,7 +47,11 @@
 #include <Kokkos_Macros.hpp>
 #if defined( KOKKOS_ENABLE_TASKDAG )
 
+#include <Kokkos_TaskScheduler_fwd.hpp>
+
 #include <impl/Kokkos_TaskQueue.hpp>
+#include <Kokkos_Serial.hpp>
+#include <impl/Kokkos_HostThreadTeam.hpp>
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
@@ -55,32 +59,217 @@
 namespace Kokkos {
 namespace Impl {
 
+template<class QueueType>
+class TaskQueueSpecialization<
+  SimpleTaskScheduler<Kokkos::Serial, QueueType>
+>
+{
+public:
+
+  // Note: Scheduler may be an incomplete type at class scope (but not inside
+  // of the methods, obviously)
+
+  using execution_space = Kokkos::Serial;
+  using memory_space = Kokkos::HostSpace;
+  using scheduler_type = SimpleTaskScheduler<Kokkos::Serial, QueueType>;
+  using member_type = TaskTeamMemberAdapter<
+    HostThreadTeamMember<Kokkos::Serial>, scheduler_type
+  >;
+
+  static
+  void execute(scheduler_type const& scheduler)
+  {
+    using task_base_type = typename scheduler_type::task_base_type;
+
+    // Set default buffers
+    serial_resize_thread_team_data(
+      0,   /* global reduce buffer */
+      512, /* team reduce buffer */
+      0,   /* team shared buffer */
+      0    /* thread local buffer */
+    );
+
+    Impl::HostThreadTeamData& self = *Impl::serial_get_thread_team_data();
+
+    auto& queue = scheduler.queue();
+    auto team_scheduler = scheduler.get_team_scheduler(0);
+
+    member_type member(scheduler, self);
+
+    auto current_task = OptionalRef<task_base_type>(nullptr);
+
+    while(not queue.is_done()) {
+
+      // Each team lead attempts to acquire either a thread team task
+      // or a single thread task for the team.
+
+      // pop a task off
+      current_task = queue.pop_ready_task(team_scheduler.team_scheduler_info());
+
+      // run the task
+      if(current_task) {
+        current_task->as_runnable_task().run(member);
+        // Respawns are handled in the complete function
+        queue.complete(
+          (*std::move(current_task)).as_runnable_task(),
+          team_scheduler.team_scheduler_info()
+        );
+      }
+
+    }
+
+  }
+
+  static constexpr uint32_t
+  get_max_team_count(execution_space const&) noexcept
+  {
+    return 1;
+  }
+
+  template <typename TaskType>
+  static void
+  get_function_pointer(
+    typename TaskType::function_type& ptr,
+    typename TaskType::destroy_type& dtor
+  )
+  {
+    ptr = TaskType::apply;
+    dtor = TaskType::destroy;
+  }
+};
+
 //----------------------------------------------------------------------------
 
-template<>
-class TaskQueueSpecialization< Kokkos::Serial >
+template<class Scheduler>
+class TaskQueueSpecializationConstrained<
+  Scheduler,
+  typename std::enable_if<
+    std::is_same<typename Scheduler::execution_space, Kokkos::Serial>::value
+  >::type
+>
 {
 public:
 
-  using execution_space = Kokkos::Serial ;
-  using memory_space    = Kokkos::HostSpace ;
-  using queue_type      = Kokkos::Impl::TaskQueue< execution_space > ;
-  using task_base_type  = Kokkos::Impl::TaskBase< void , void , void > ;
-  using member_type     = Kokkos::Impl::HostThreadTeamMember< execution_space > ;
+  // Note: Scheduler may be an incomplete type at class scope (but not inside
+  // of the methods, obviously)
 
-  static
-  void iff_single_thread_recursive_execute( queue_type * const );
+  using execution_space = Kokkos::Serial;
+  using memory_space = Kokkos::HostSpace;
+  using scheduler_type = Scheduler;
+  using member_type = TaskTeamMemberAdapter<
+    HostThreadTeamMember<Kokkos::Serial>, scheduler_type
+  >;
 
   static
-  void execute( queue_type * const );
+  void iff_single_thread_recursive_execute(scheduler_type const& scheduler) {
+    using task_base_type = TaskBase;
+    using queue_type = typename scheduler_type::queue_type;
+
+    task_base_type * const end = (task_base_type *) task_base_type::EndTag ;
+
+    Impl::HostThreadTeamData * const data = Impl::serial_get_thread_team_data();
+
+    member_type exec( scheduler, *data );
+
+    // Loop until no runnable task
+
+    task_base_type * task = end ;
+
+    auto* const queue = scheduler.m_queue;
+
+    do {
+
+      task = end ;
+
+      for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) {
+        for ( int j = 0 ; j < 2 && end == task ; ++j ) {
+          task = queue_type::pop_ready_task( & queue->m_ready[i][j] );
+        }
+      }
+
+      if ( end == task ) break ;
+
+      (*task->m_apply)( task , & exec );
+
+      queue->complete( task );
+
+    } while(1);
+
+  }
 
-  template< typename TaskType >
   static
-  typename TaskType::function_type
-  get_function_pointer() { return TaskType::apply ; }
+  void execute(scheduler_type const& scheduler)
+  {
+    using task_base_type = TaskBase;
+    using queue_type = typename scheduler_type::queue_type;
+
+    task_base_type * const end = (task_base_type *) task_base_type::EndTag ;
+
+    // Set default buffers
+    serial_resize_thread_team_data(
+      0,   /* global reduce buffer */
+      512, /* team reduce buffer */
+      0,   /* team shared buffer */
+      0    /* thread local buffer */
+    );
+
+    auto* const queue = scheduler.m_queue;
+
+    Impl::HostThreadTeamData * const data = Impl::serial_get_thread_team_data();
+
+    member_type exec( scheduler, *data );
+
+    // Loop until all queues are empty
+    while ( 0 < queue->m_ready_count ) {
+
+      task_base_type * task = end ;
+
+      for ( int i = 0 ; i < queue_type::NumQueue && end == task ; ++i ) {
+        for ( int j = 0 ; j < 2 && end == task ; ++j ) {
+          task = queue_type::pop_ready_task( & queue->m_ready[i][j] );
+        }
+      }
+
+      if ( end != task ) {
+
+        // pop_ready_task resulted in lock == task->m_next
+        // In the executing state
+
+        (*task->m_apply)( task , & exec );
+
+#if 0
+        printf( "TaskQueue<Serial>::executed: 0x%lx { 0x%lx 0x%lx %d %d %d }\n"
+        , uintptr_t(task)
+        , uintptr_t(task->m_wait)
+        , uintptr_t(task->m_next)
+        , task->m_task_type
+        , task->m_priority
+        , task->m_ref_count );
+#endif
+
+        // If a respawn then re-enqueue otherwise the task is complete
+        // and all tasks waiting on this task are updated.
+        queue->complete( task );
+      }
+      else if ( 0 != queue->m_ready_count ) {
+        Kokkos::abort("TaskQueue<Serial>::execute ERROR: ready_count");
+      }
+    }
+  }
+
+  template <typename TaskType>
+  static void
+  get_function_pointer(
+    typename TaskType::function_type& ptr,
+    typename TaskType::destroy_type& dtor
+  )
+  {
+    ptr = TaskType::apply;
+    dtor = TaskType::destroy;
+  }
 };
 
-extern template class TaskQueue< Kokkos::Serial > ;
+extern template class TaskQueue< Kokkos::Serial, typename Kokkos::Serial::memory_space > ;
 
 }} /* namespace Kokkos::Impl */
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_SharedAlloc.cpp b/packages/kokkos/core/src/impl/Kokkos_SharedAlloc.cpp
index 658f1db06b7443be44282a2074ed8d1cd801db19..77eb69d0812620a5c5801b7500e145ecd810d215 100644
--- a/packages/kokkos/core/src/impl/Kokkos_SharedAlloc.cpp
+++ b/packages/kokkos/core/src/impl/Kokkos_SharedAlloc.cpp
@@ -48,11 +48,11 @@ namespace Impl {
 
 __thread int SharedAllocationRecord<void, void>::t_tracking_enabled = 1;
 
+#ifdef KOKKOS_DEBUG
 bool
 SharedAllocationRecord< void , void >::
 is_sane( SharedAllocationRecord< void , void > * arg_record )
 {
-#ifdef KOKKOS_DEBUG
   SharedAllocationRecord * const root = arg_record ? arg_record->m_root : 0 ;
 
   bool ok = root != 0 && root->use_count() == 0 ;
@@ -102,16 +102,23 @@ is_sane( SharedAllocationRecord< void , void > * arg_record )
     }
   }
   return ok ;
+}
+
 #else
+
+bool
+SharedAllocationRecord< void , void >::
+is_sane( SharedAllocationRecord< void , void > * )
+{
   Kokkos::Impl::throw_runtime_exception("Kokkos::Impl::SharedAllocationRecord::is_sane only works with KOKKOS_DEBUG enabled");
   return false ;
-#endif
 }
+#endif //#ifdef KOKKOS_DEBUG
 
+#ifdef KOKKOS_DEBUG
 SharedAllocationRecord<void,void> *
 SharedAllocationRecord<void,void>::find( SharedAllocationRecord<void,void> * const arg_root , void * const arg_data_ptr )
 {
-#ifdef KOKKOS_DEBUG
   SharedAllocationRecord * root_next = 0 ;
   static constexpr SharedAllocationRecord * zero = nullptr;
 
@@ -130,11 +137,15 @@ SharedAllocationRecord<void,void>::find( SharedAllocationRecord<void,void> * con
     Kokkos::Impl::throw_runtime_exception("Kokkos::Impl::SharedAllocationRecord failed locking/unlocking");
   }
   return r ;
+}
 #else
+SharedAllocationRecord<void,void> *
+SharedAllocationRecord<void,void>::find( SharedAllocationRecord<void,void> * const , void * const )
+{
   Kokkos::Impl::throw_runtime_exception("Kokkos::Impl::SharedAllocationRecord::find only works with KOKKOS_DEBUG enabled");
   return nullptr;
-#endif
 }
+#endif
 
 
 /**\brief  Construct and insert into 'arg_root' tracking set.
@@ -271,6 +282,7 @@ decrement( SharedAllocationRecord< void , void > * arg_record )
   return arg_record ;
 }
 
+#ifdef KOKKOS_DEBUG
 void
 SharedAllocationRecord< void , void >::
 print_host_accessible_records( std::ostream & s
@@ -278,7 +290,6 @@ print_host_accessible_records( std::ostream & s
                              , const SharedAllocationRecord * const root
                              , const bool detail )
 {
-#ifdef KOKKOS_DEBUG
   const SharedAllocationRecord< void , void > * r = root ;
 
   char buffer[256] ;
@@ -339,12 +350,20 @@ print_host_accessible_records( std::ostream & s
       r = r->m_next ;
     } while ( r != root );
   }
+}
 #else
+void
+SharedAllocationRecord< void , void >::
+print_host_accessible_records( std::ostream &
+                             , const char * const
+                             , const SharedAllocationRecord * const
+                             , const bool )
+{
   Kokkos::Impl::throw_runtime_exception(
       "Kokkos::Impl::SharedAllocationRecord::print_host_accessible_records"
       " only works with KOKKOS_DEBUG enabled");
-#endif
 }
+#endif
 
 } /* namespace Impl */
 } /* namespace Kokkos */
diff --git a/packages/kokkos/core/src/impl/Kokkos_SimpleTaskScheduler.hpp b/packages/kokkos/core/src/impl/Kokkos_SimpleTaskScheduler.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..c2dbc968146fe93ad6642b0eec81b92ebf97304b
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_SimpleTaskScheduler.hpp
@@ -0,0 +1,646 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_SIMPLETASKSCHEDULER_HPP
+#define KOKKOS_SIMPLETASKSCHEDULER_HPP
+
+//----------------------------------------------------------------------------
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_Core_fwd.hpp>
+#include <Kokkos_TaskScheduler_fwd.hpp>
+//----------------------------------------------------------------------------
+
+#include <Kokkos_MemoryPool.hpp>
+#include <impl/Kokkos_Tags.hpp>
+
+#include <Kokkos_Future.hpp>
+#include <impl/Kokkos_TaskQueue.hpp>
+#include <impl/Kokkos_SingleTaskQueue.hpp>
+#include <impl/Kokkos_MultipleTaskQueue.hpp>
+#include <impl/Kokkos_TaskQueueMultiple.hpp>
+#include <impl/Kokkos_TaskPolicyData.hpp>
+#include <impl/Kokkos_TaskTeamMember.hpp>
+#include <impl/Kokkos_EBO.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
+namespace Impl {
+
+// TODO @tasking @cleanup move this
+template <class T>
+struct DefaultDestroy {
+  T* managed_object;
+  KOKKOS_FUNCTION
+  void destroy_shared_allocation() {
+    managed_object->~T();
+  }
+};
+
+
+template <class ExecutionSpace>
+class ExecutionSpaceInstanceStorage
+  : private NoUniqueAddressMemberEmulation<ExecutionSpace, DefaultCtorNotOnDevice>
+{
+private:
+
+  using base_t = NoUniqueAddressMemberEmulation<ExecutionSpace, DefaultCtorNotOnDevice>;
+
+protected:
+
+  constexpr explicit
+  ExecutionSpaceInstanceStorage()
+    : base_t()
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr explicit
+  ExecutionSpaceInstanceStorage(ExecutionSpace const& arg_execution_space)
+    : base_t(arg_execution_space)
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr explicit
+  ExecutionSpaceInstanceStorage(ExecutionSpace&& arg_execution_space)
+    : base_t(std::move(arg_execution_space))
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  ExecutionSpace& execution_space_instance() &
+  {
+    return this->no_unique_address_data_member();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  ExecutionSpace const& execution_space_instance() const &
+  {
+    return this->no_unique_address_data_member();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  ExecutionSpace&& execution_space_instance() &&
+  {
+    return std::move(*this).no_unique_address_data_member();
+  }
+};
+
+
+template <class MemorySpace>
+class MemorySpaceInstanceStorage
+  : private NoUniqueAddressMemberEmulation<MemorySpace, DefaultCtorNotOnDevice>
+{
+private:
+
+  using base_t = NoUniqueAddressMemberEmulation<MemorySpace, DefaultCtorNotOnDevice>;
+
+protected:
+
+  MemorySpaceInstanceStorage()
+    : base_t()
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  MemorySpaceInstanceStorage(MemorySpace const& arg_memory_space)
+    : base_t(arg_memory_space)
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr explicit
+  MemorySpaceInstanceStorage(MemorySpace&& arg_memory_space)
+    : base_t(arg_memory_space)
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  MemorySpace& memory_space_instance() &
+  {
+    return this->no_unique_address_data_member();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  MemorySpace const& memory_space_instance() const &
+  {
+    return this->no_unique_address_data_member();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  MemorySpace&& memory_space_instance() &&
+  {
+    return std::move(*this).no_unique_address_data_member();
+  }
+};
+
+} // end namespace Impl
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template <class ExecSpace, class QueueType>
+  // requires ExecutionSpace<ExecSpace> && TaskQueue<QueueType>
+class SimpleTaskScheduler
+  : public Impl::TaskSchedulerBase,
+    private Impl::ExecutionSpaceInstanceStorage<ExecSpace>,
+    private Impl::MemorySpaceInstanceStorage<typename QueueType::memory_space>,
+    private Impl::NoUniqueAddressMemberEmulation<typename QueueType::team_scheduler_info_type>
+{
+public:
+  // TODO @tasking @generalization (maybe?) don't force QueueType to be complete here
+
+  using scheduler_type = SimpleTaskScheduler; // tag as scheduler concept
+  using execution_space = ExecSpace;
+  using task_queue_type = QueueType;
+  using memory_space = typename task_queue_type::memory_space;
+  using memory_pool = typename task_queue_type::memory_pool;
+
+  using team_scheduler_info_type = typename task_queue_type::team_scheduler_info_type;
+  using task_scheduling_info_type = typename task_queue_type::task_scheduling_info_type;
+  using specialization = Impl::TaskQueueSpecialization<SimpleTaskScheduler>;
+  using member_type = typename specialization::member_type;
+
+  template <class Functor>
+  using runnable_task_type = typename QueueType::template runnable_task_type<Functor, SimpleTaskScheduler>;
+
+  using task_base_type = typename task_queue_type::task_base_type;
+  using runnable_task_base_type = typename task_queue_type::runnable_task_base_type;
+
+  using task_queue_traits = typename QueueType::task_queue_traits;
+
+  template <class ValueType>
+  using future_type = Kokkos::BasicFuture<ValueType, SimpleTaskScheduler>;
+  template <class FunctorType>
+  using future_type_for_functor = future_type<typename FunctorType::value_type>;
+
+private:
+
+  template <typename, typename>
+  friend class BasicFuture;
+
+  using track_type = Kokkos::Impl::SharedAllocationTracker;
+  using execution_space_storage = Impl::ExecutionSpaceInstanceStorage<execution_space>;
+  using memory_space_storage = Impl::MemorySpaceInstanceStorage<memory_space>;
+  using team_scheduler_info_storage = Impl::NoUniqueAddressMemberEmulation<team_scheduler_info_type>;
+
+  track_type m_track;
+  task_queue_type* m_queue = nullptr;
+
+  KOKKOS_INLINE_FUNCTION
+  static constexpr task_base_type* _get_task_ptr(std::nullptr_t) { return nullptr; }
+
+  template <class ValueType>
+  KOKKOS_INLINE_FUNCTION
+  static constexpr task_base_type* _get_task_ptr(future_type<ValueType>&& f)
+  {
+    return f.m_task;
+  }
+
+  template <
+    int TaskEnum,
+    class DepTaskType,
+    class FunctorType
+  >
+  KOKKOS_FUNCTION
+  future_type_for_functor<typename std::decay<FunctorType>::type>
+  _spawn_impl(
+    DepTaskType arg_predecessor_task,
+    TaskPriority arg_priority,
+    typename runnable_task_base_type::function_type apply_function_ptr,
+    typename runnable_task_base_type::destroy_type destroy_function_ptr,
+    FunctorType&& functor
+  )
+  {
+    KOKKOS_EXPECTS(m_queue != nullptr);
+
+    using functor_future_type = future_type_for_functor<typename std::decay<FunctorType>::type>;
+    using task_type = typename task_queue_type::template runnable_task_type<
+      FunctorType, scheduler_type
+    >;
+
+    // Reference count starts at two:
+    //   +1 for the matching decrement when task is complete
+    //   +1 for the future
+    auto& runnable_task = *m_queue->template allocate_and_construct<task_type>(
+      /* functor = */ std::forward<FunctorType>(functor),
+      /* apply_function_ptr = */ apply_function_ptr,
+      /* task_type = */ static_cast<Impl::TaskType>(TaskEnum),
+      /* priority = */ arg_priority,
+      /* queue_base = */ m_queue,
+      /* initial_reference_count = */ 2
+    );
+
+    if(arg_predecessor_task != nullptr) {
+      m_queue->initialize_scheduling_info_from_predecessor(
+        runnable_task, *arg_predecessor_task
+      );
+      runnable_task.set_predecessor(*arg_predecessor_task);
+      arg_predecessor_task->decrement_and_check_reference_count();
+    }
+    else {
+      m_queue->initialize_scheduling_info_from_team_scheduler_info(
+        runnable_task, team_scheduler_info()
+      );
+    }
+
+    auto rv = functor_future_type(&runnable_task);
+
+    Kokkos::memory_fence(); // fence to ensure dependent stores are visible
+
+    m_queue->schedule_runnable(
+      std::move(runnable_task),
+      team_scheduler_info()
+    );
+    // note that task may be already completed even here, so don't touch it again
+
+    return rv;
+  }
+
+
+public:
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Constructors, destructor, and assignment"> {{{2
+
+  SimpleTaskScheduler() = default;
+
+  explicit
+  SimpleTaskScheduler(
+    execution_space const& arg_execution_space,
+    memory_space const& arg_memory_space,
+    memory_pool const& arg_memory_pool
+  ) : execution_space_storage(arg_execution_space),
+      memory_space_storage(arg_memory_space)
+  {
+    // Ask the task queue how much space it needs (usually will just be
+    // sizeof(task_queue_type), but some queues may need additional storage
+    // dependent on runtime conditions or properties of the execution space)
+    auto const allocation_size = task_queue_type::task_queue_allocation_size(
+      arg_execution_space,
+      arg_memory_space,
+      arg_memory_pool
+    );
+
+    // TODO @tasking @generalization DSH better encapsulation of the SharedAllocationRecord pattern
+    using record_type = Impl::SharedAllocationRecord<
+      memory_space, Impl::DefaultDestroy<task_queue_type>
+    >;
+
+    // Allocate space for the task queue
+    auto* record = record_type::allocate(
+      memory_space(), "TaskQueue", allocation_size
+    );
+    m_queue = new (record->data()) task_queue_type(
+      arg_execution_space,
+      arg_memory_space,
+      arg_memory_pool
+    );
+    record->m_destroy.managed_object = m_queue;
+    m_track.assign_allocated_record_to_uninitialized(record);
+  }
+
+  explicit
+  SimpleTaskScheduler(
+    execution_space const& arg_execution_space,
+    memory_pool const& pool
+  ) : SimpleTaskScheduler(arg_execution_space, memory_space{}, pool)
+  { /* forwarding ctor, must be empty */ }
+
+  explicit
+  SimpleTaskScheduler(memory_pool const& pool)
+    : SimpleTaskScheduler(execution_space{}, memory_space{}, pool)
+  { /* forwarding ctor, must be empty */ }
+
+  SimpleTaskScheduler(
+    memory_space const & arg_memory_space,
+    size_t const mempool_capacity,
+    unsigned const mempool_min_block_size, // = 1u << 6
+    unsigned const mempool_max_block_size, // = 1u << 10
+    unsigned const mempool_superblock_size // = 1u << 12
+  ) : SimpleTaskScheduler(
+        execution_space{},
+        arg_memory_space,
+        memory_pool(
+          arg_memory_space, mempool_capacity, mempool_min_block_size,
+          mempool_max_block_size, mempool_superblock_size
+        )
+      )
+  { /* forwarding ctor, must be empty */ }
+
+  // </editor-fold> end Constructors, destructor, and assignment }}}2
+  //----------------------------------------------------------------------------
+
+  // Note that this is an expression of shallow constness
+  KOKKOS_INLINE_FUNCTION
+  task_queue_type& queue() const
+  {
+    KOKKOS_EXPECTS(m_queue != nullptr);
+    return *m_queue;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  SimpleTaskScheduler
+  get_team_scheduler(int rank_in_league) const noexcept
+  {
+    KOKKOS_EXPECTS(m_queue != nullptr);
+    auto rv = SimpleTaskScheduler{ *this };
+    rv.team_scheduler_info() = m_queue->initial_team_scheduler_info(rank_in_league);
+    return rv;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  execution_space const& get_execution_space() const { return this->execution_space_instance(); }
+
+  KOKKOS_INLINE_FUNCTION
+  team_scheduler_info_type& team_scheduler_info() &
+  {
+    return this->team_scheduler_info_storage::no_unique_address_data_member();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  team_scheduler_info_type const& team_scheduler_info() const &
+  {
+    return this->team_scheduler_info_storage::no_unique_address_data_member();
+  }
+
+  //----------------------------------------------------------------------------
+
+  #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+  // For backwards compatibility purposes only
+  KOKKOS_DEPRECATED
+  KOKKOS_INLINE_FUNCTION
+  memory_pool*
+  memory() const noexcept KOKKOS_DEPRECATED_TRAILING_ATTRIBUTE
+  {
+    if(m_queue != nullptr) return &(m_queue->get_memory_pool());
+    else return nullptr;
+  }
+  #endif
+
+  //----------------------------------------------------------------------------
+
+  template <int TaskEnum, typename DepFutureType, typename FunctorType>
+  KOKKOS_FUNCTION
+  static
+  Kokkos::BasicFuture<typename FunctorType::value_type, scheduler_type>
+  spawn(
+    Impl::TaskPolicyWithScheduler<TaskEnum, scheduler_type, DepFutureType>&& arg_policy,
+    typename runnable_task_base_type::function_type arg_function,
+    typename runnable_task_base_type::destroy_type arg_destroy,
+    FunctorType&& arg_functor
+  )
+  {
+    return std::move(arg_policy.scheduler()).template _spawn_impl<TaskEnum>(
+      _get_task_ptr(std::move(arg_policy.predecessor())),
+      arg_policy.priority(),
+      arg_function,
+      arg_destroy,
+      std::forward<FunctorType>(arg_functor)
+    );
+  }
+
+  template <int TaskEnum, typename DepFutureType, typename FunctorType>
+  KOKKOS_FUNCTION
+  Kokkos::BasicFuture<typename FunctorType::value_type, scheduler_type>
+  spawn(
+    Impl::TaskPolicyWithPredecessor<TaskEnum, DepFutureType>&& arg_policy,
+    FunctorType&& arg_functor
+  )
+  {
+    static_assert(
+      std::is_same<typename DepFutureType::scheduler_type, scheduler_type>::value,
+      "Can't create a task policy from a scheduler and a future from a different scheduler"
+    );
+
+    using task_type = runnable_task_type<FunctorType>;
+    typename task_type::function_type const ptr = task_type::apply;
+    typename task_type::destroy_type const dtor = task_type::destroy;
+
+    return _spawn_impl<TaskEnum>(
+      std::move(arg_policy).predecessor().m_task,
+      arg_policy.priority(),
+      ptr, dtor,
+      std::forward<FunctorType>(arg_functor)
+    );
+  }
+
+  template <class FunctorType, class ValueType, class Scheduler>
+  KOKKOS_FUNCTION
+  static void
+  respawn(
+    FunctorType* functor,
+    BasicFuture<ValueType, Scheduler> const& predecessor,
+    TaskPriority priority = TaskPriority::Regular
+  ) {
+    using task_type = typename task_queue_type::template runnable_task_type<
+      FunctorType, scheduler_type
+    >;
+
+    auto& task = *static_cast<task_type*>(functor);
+
+    KOKKOS_EXPECTS(!task.get_respawn_flag());
+
+    task.set_priority(priority);
+    task.set_predecessor(*predecessor.m_task);
+    task.set_respawn_flag(true);
+  }
+
+  template <class FunctorType>
+  KOKKOS_FUNCTION
+  static void
+  respawn(
+    FunctorType* functor,
+    scheduler_type const&,
+    TaskPriority priority = TaskPriority::Regular
+  ) {
+    using task_type = typename task_queue_type::template runnable_task_type<
+      FunctorType, scheduler_type
+    >;
+
+    auto& task = *static_cast<task_type*>(functor);
+
+    KOKKOS_EXPECTS(!task.get_respawn_flag());
+
+    task.set_priority(priority);
+    KOKKOS_ASSERT(not task.has_predecessor());
+    task.set_respawn_flag(true);
+  }
+
+
+  template <class ValueType>
+  KOKKOS_FUNCTION
+  future_type<void>
+  when_all(BasicFuture<ValueType, scheduler_type> const predecessors[], int n_predecessors) {
+
+    // TODO @tasking @generalization DSH propagate scheduling info
+
+    using task_type = typename task_queue_type::aggregate_task_type;
+
+    future_type<void> rv;
+
+    if(n_predecessors > 0) {
+      task_queue_type* queue_ptr = nullptr;
+
+      // Loop over the predecessors to find the queue and increment the reference
+      // counts
+      for(int i_pred = 0; i_pred < n_predecessors; ++i_pred) {
+
+        auto* predecessor_task_ptr = predecessors[i_pred].m_task;
+
+        if(predecessor_task_ptr != nullptr) {
+          // TODO @tasking @cleanup DSH figure out when this is allowed to be nullptr (if at all anymore)
+
+          // Increment reference count to track subsequent assignment.
+          // TODO @tasking @optimization DSH figure out if this reference count increment is necessary
+          predecessor_task_ptr->increment_reference_count();
+
+          // TODO @tasking @cleanup DSH we should just set a boolean here instead to make this more readable
+          queue_ptr = m_queue;
+        }
+
+      } // end loop over predecessors
+
+      // This only represents a non-ready future if at least one of the predecessors
+      // has a task (and thus, a queue)
+      if(queue_ptr != nullptr) {
+        auto& q = *queue_ptr;
+
+        auto* aggregate_task_ptr = q.template allocate_and_construct_with_vla_emulation<
+          task_type, task_base_type*
+        >(
+          /* n_vla_entries = */ n_predecessors,
+          /* aggregate_predecessor_count = */ n_predecessors,
+          /* queue_base = */ &q,
+          /* initial_reference_count = */ 2
+        );
+
+        rv = future_type<void>(aggregate_task_ptr);
+
+        for(int i_pred = 0; i_pred < n_predecessors; ++i_pred) {
+          aggregate_task_ptr->vla_value_at(i_pred) = predecessors[i_pred].m_task;
+        }
+
+        Kokkos::memory_fence(); // we're touching very questionable memory, so be sure to fence
+
+        q.schedule_aggregate(std::move(*aggregate_task_ptr), team_scheduler_info());
+        // the aggregate may be processed at any time, so don't touch it after this
+      }
+    }
+
+    return rv;
+  }
+
+  template <class F>
+  KOKKOS_FUNCTION
+  future_type<void>
+  when_all(int n_calls, F&& func)
+  {
+    // TODO @tasking @generalization DSH propagate scheduling info?
+
+    // later this should be std::invoke_result_t
+    using generated_type = decltype(func(0));
+    using task_type = typename task_queue_type::aggregate_task_type;
+
+    static_assert(
+      is_future<generated_type>::value,
+      "when_all function must return a Kokkos future (an instance of Kokkos::BasicFuture)"
+    );
+    static_assert(
+      std::is_base_of<scheduler_type, typename generated_type::scheduler_type>::value,
+      "when_all function must return a Kokkos::BasicFuture of a compatible scheduler type"
+    );
+
+    auto* aggregate_task = m_queue->template allocate_and_construct_with_vla_emulation<
+      task_type, task_base_type*
+    >(
+      /* n_vla_entries = */ n_calls,
+      /* aggregate_predecessor_count = */ n_calls,
+      /* queue_base = */ m_queue,
+      /* initial_reference_count = */ 2
+    );
+
+    auto rv = future_type<void>(aggregate_task);
+
+    for(int i_call = 0; i_call < n_calls; ++i_call) {
+
+      auto generated_future = func(i_call);
+
+      if(generated_future.m_task != nullptr) {
+        generated_future.m_task->increment_reference_count();
+        aggregate_task->vla_value_at(i_call) = generated_future.m_task;
+
+        KOKKOS_ASSERT(m_queue == generated_future.m_task->ready_queue_base_ptr()
+          && "Queue mismatch in when_all"
+        );
+      }
+
+    }
+
+    Kokkos::memory_fence();
+
+    m_queue->schedule_aggregate(std::move(*aggregate_task), team_scheduler_info());
+    // This could complete at any moment, so don't touch anything after this
+
+    return rv;
+  }
+
+};
+
+
+template<class ExecSpace, class QueueType>
+inline
+void wait(SimpleTaskScheduler<ExecSpace, QueueType> const& scheduler)
+{
+  using scheduler_type = SimpleTaskScheduler<ExecSpace, QueueType>;
+  scheduler_type::specialization::execute(scheduler);
+}
+
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//---------------------------------------------------------------------------#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_SIMPLETASKSCHEDULER_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_SingleTaskQueue.hpp b/packages/kokkos/core/src/impl/Kokkos_SingleTaskQueue.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..d73028eb5b9da77a3a3cc46c6f327327299d1239
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_SingleTaskQueue.hpp
@@ -0,0 +1,207 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_SINGLETASKQUEUE_HPP
+#define KOKKOS_IMPL_SINGLETASKQUEUE_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_MemoryPool.hpp>
+
+#include <impl/Kokkos_TaskBase.hpp>
+#include <impl/Kokkos_TaskResult.hpp>
+
+#include <impl/Kokkos_TaskQueueMemoryManager.hpp>
+#include <impl/Kokkos_TaskQueueCommon.hpp>
+#include <impl/Kokkos_Memory_Fence.hpp>
+#include <impl/Kokkos_Atomic_Increment.hpp>
+#include <impl/Kokkos_OptionalRef.hpp>
+#include <impl/Kokkos_LIFO.hpp>
+
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template <
+  class ExecSpace,
+  class MemorySpace,
+  class TaskQueueTraits,
+  class MemoryPool
+>
+class SingleTaskQueue
+  : public TaskQueueMemoryManager<ExecSpace, MemorySpace, MemoryPool>,
+    public TaskQueueCommonMixin<SingleTaskQueue<ExecSpace, MemorySpace, TaskQueueTraits, MemoryPool>>
+{
+private:
+
+  using base_t = TaskQueueMemoryManager<ExecSpace, MemorySpace, MemoryPool>;
+  using common_mixin_t = TaskQueueCommonMixin<SingleTaskQueue>;
+
+  struct EmptyTeamSchedulerInfo { };
+  struct EmptyTaskSchedulingInfo { };
+
+public:
+
+  using task_queue_type = SingleTaskQueue; // mark as task_queue concept
+  using task_queue_traits = TaskQueueTraits;
+  using task_base_type = TaskNode<TaskQueueTraits>;
+  using ready_queue_type = typename TaskQueueTraits::template ready_queue_type<task_base_type>;
+
+  using team_scheduler_info_type = EmptyTeamSchedulerInfo;
+  using task_scheduling_info_type = EmptyTaskSchedulingInfo;
+
+  using runnable_task_base_type = RunnableTaskBase<TaskQueueTraits>;
+
+  template <class Functor, class Scheduler>
+    // requires TaskScheduler<Scheduler> && TaskFunctor<Functor>
+  using runnable_task_type = RunnableTask<
+    task_queue_traits, Scheduler, typename Functor::value_type, Functor
+  >;
+
+  using aggregate_task_type = AggregateTask<task_queue_traits, task_scheduling_info_type>;
+
+  // Number of allowed priorities
+  static constexpr int NumQueue = 3;
+
+private:
+
+  ready_queue_type m_ready_queues[NumQueue][2];
+
+public:
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Constructors, destructors, and assignment"> {{{2
+
+  SingleTaskQueue() = delete;
+  SingleTaskQueue(SingleTaskQueue const&) = delete;
+  SingleTaskQueue(SingleTaskQueue&&) = delete;
+  SingleTaskQueue& operator=(SingleTaskQueue const&) = delete;
+  SingleTaskQueue& operator=(SingleTaskQueue&&) = delete;
+
+  explicit
+  SingleTaskQueue(
+    typename base_t::execution_space const&,
+    typename base_t::memory_space const&,
+    typename base_t::memory_pool const& arg_memory_pool
+  )
+    : base_t(arg_memory_pool)
+  { }
+
+  ~SingleTaskQueue() {
+    for(int i_priority = 0; i_priority < NumQueue; ++i_priority) {
+      KOKKOS_EXPECTS(m_ready_queues[i_priority][TaskTeam].empty());
+      KOKKOS_EXPECTS(m_ready_queues[i_priority][TaskSingle].empty());
+    }
+  }
+
+  // </editor-fold> end Constructors, destructors, and assignment }}}2
+  //----------------------------------------------------------------------------
+
+  KOKKOS_FUNCTION
+  void
+  schedule_runnable(
+    runnable_task_base_type&& task,
+    team_scheduler_info_type const& info
+  ) {
+    this->schedule_runnable_to_queue(
+      std::move(task),
+      m_ready_queues[int(task.get_priority())][int(task.get_task_type())],
+      info
+    );
+    // Task may be enqueued and may be run at any point; don't touch it (hence
+    // the use of move semantics)
+  }
+
+  KOKKOS_FUNCTION
+  OptionalRef<task_base_type>
+  pop_ready_task(
+    team_scheduler_info_type const& info
+  )
+  {
+    OptionalRef<task_base_type> return_value;
+    // always loop in order of priority first, then prefer team tasks over single tasks
+    for(int i_priority = 0; i_priority < NumQueue; ++i_priority) {
+
+      // Check for a team task with this priority
+      return_value = m_ready_queues[i_priority][TaskTeam].pop();
+      if(return_value) return return_value;
+
+      // Check for a single task with this priority
+      return_value = m_ready_queues[i_priority][TaskSingle].pop();
+      if(return_value) return return_value;
+
+    }
+    // if nothing was found, return a default-constructed (empty) OptionalRef
+    return return_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr team_scheduler_info_type
+  initial_team_scheduler_info(int) const noexcept { return { }; }
+
+};
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_SINGLETASKQUEUE_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskBase.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskBase.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..b0c06fb26eb9e82ab365ef9afe676d6c1fd3c388
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskBase.hpp
@@ -0,0 +1,329 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_TASKBASE_HPP
+#define KOKKOS_IMPL_TASKBASE_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
+
+#include <impl/Kokkos_LIFO.hpp>
+
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+/** \brief  Base class for task management, access, and execution.
+ *
+ *  Inheritance structure to allow static_cast from the task root type
+ *  and a task's FunctorType.
+ *
+ *    // Enable a functor to access the base class
+ *    // and provide memory for result value.
+ *    TaskBase< Space , ResultType , FunctorType >
+ *      : TaskBase< void , void , void >
+ *      , FunctorType
+ *      { ... };
+ *    Followed by memory allocated for result value.
+ *
+ *
+ *  States of a task:
+ *
+ *    Constructing State, NOT IN a linked list
+ *      m_wait == 0
+ *      m_next == 0
+ *
+ *    Scheduling transition : Constructing -> Waiting
+ *      before:
+ *        m_wait == 0
+ *        m_next == this task's initial dependence, 0 if none
+ *      after:
+ *        m_wait == EndTag
+ *        m_next == EndTag
+ *
+ *    Waiting State, IN a linked list
+ *      m_apply != 0
+ *      m_queue != 0
+ *      m_ref_count > 0
+ *      m_wait == head of linked list of tasks waiting on this task
+ *      m_next == next of linked list of tasks
+ *
+ *    transition : Waiting -> Executing
+ *      before:
+ *        m_next == EndTag
+ *      after::
+ *        m_next == LockTag
+ *
+ *    Executing State, NOT IN a linked list
+ *      m_apply != 0
+ *      m_queue != 0
+ *      m_ref_count > 0
+ *      m_wait == head of linked list of tasks waiting on this task
+ *      m_next == LockTag
+ *
+ *    Respawn transition : Executing -> Executing-Respawn
+ *      before:
+ *        m_next == LockTag
+ *      after:
+ *        m_next == this task's updated dependence, 0 if none
+ *
+ *    Executing-Respawn State, NOT IN a linked list
+ *      m_apply != 0
+ *      m_queue != 0
+ *      m_ref_count > 0
+ *      m_wait == head of linked list of tasks waiting on this task
+ *      m_next == this task's updated dependence, 0 if none
+ *
+ *    transition : Executing -> Complete
+ *      before:
+ *        m_wait == head of linked list
+ *      after:
+ *        m_wait == LockTag
+ *
+ *    Complete State, NOT IN a linked list
+ *      m_wait == LockTag: cannot add dependence (<=> complete)
+ *      m_next == LockTag: not a member of a wait queue
+ *
+ */
+class TaskBase
+{
+public:
+
+  enum : int16_t   { TaskTeam = 0 , TaskSingle = 1 , Aggregate = 2 };
+  enum : uintptr_t { LockTag = ~uintptr_t(0) , EndTag = ~uintptr_t(1) };
+
+  template<typename, typename> friend class Kokkos::BasicTaskScheduler ;
+
+  using queue_type = TaskQueueBase;
+
+  using function_type = void(*)( TaskBase * , void * );
+  typedef void (* destroy_type) ( TaskBase * );
+
+  // sizeof(TaskBase) == 48
+
+  function_type m_apply = nullptr;         ///< Apply function pointer
+  queue_type* m_queue = nullptr;          ///< Pointer to the scheduler
+  TaskBase* m_next = nullptr; ///< next in linked list of ready tasks
+  TaskBase* m_wait = nullptr; ///< Queue of tasks waiting on this
+  int32_t m_ref_count = 0;
+  int32_t m_alloc_size = 0;
+  int32_t m_dep_count ;                    ///< Aggregate's number of dependences
+  int16_t        m_task_type ;   ///< Type of task
+  int16_t        m_priority ;    ///< Priority of runnable task
+
+  TaskBase( TaskBase && ) = delete ;
+  TaskBase( const TaskBase & ) = delete ;
+  TaskBase & operator = ( TaskBase && ) = delete ;
+  TaskBase & operator = ( const TaskBase & ) = delete ;
+
+#ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND
+  KOKKOS_INLINE_FUNCTION ~TaskBase() {};
+#else
+  KOKKOS_INLINE_FUNCTION ~TaskBase() = default;
+#endif
+
+  KOKKOS_INLINE_FUNCTION constexpr
+  TaskBase()
+    : m_apply( nullptr )
+    , m_queue( nullptr )
+    , m_next( nullptr )
+    , m_wait( nullptr )
+    , m_ref_count( 0 )
+    , m_alloc_size( 0 )
+    , m_dep_count( 0 )
+    , m_task_type( 0 )
+    , m_priority( 0 )
+    {}
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  TaskBase * volatile * aggregate_dependences() volatile
+    { return reinterpret_cast<TaskBase*volatile*>( this + 1 ); }
+
+  KOKKOS_INLINE_FUNCTION
+  bool requested_respawn()
+    {
+      // This should only be called when a task has finished executing and is
+      // in the transition to either the complete or executing-respawn state.
+      TaskBase * const lock = reinterpret_cast< TaskBase * >( LockTag );
+      return lock != m_next;
+    }
+
+  KOKKOS_INLINE_FUNCTION
+  void add_dependence( TaskBase* dep )
+    {
+      // Precondition: lock == m_next
+
+      TaskBase * const lock = (TaskBase *) LockTag ;
+
+      // Assign dependence to m_next.  It will be processed in the subsequent
+      // call to schedule.  Error if the dependence is reset.
+      if ( lock != Kokkos::atomic_exchange( & m_next, dep ) ) {
+        Kokkos::abort("TaskScheduler ERROR: resetting task dependence");
+      }
+
+      if ( 0 != dep ) {
+        // The future may be destroyed upon returning from this call
+        // so increment reference count to track this assignment.
+        Kokkos::atomic_increment( &(dep->m_ref_count) );
+      }
+    }
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  int32_t reference_count() const
+    { return *((int32_t volatile *)( & m_ref_count )); }
+
+};
+
+static_assert( sizeof(TaskBase) == 48
+             , "Verifying expected sizeof(TaskBase)" );
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template< class Scheduler, typename ResultType , class FunctorType >
+class Task
+  : public TaskBase,
+    public FunctorType
+{
+public:
+
+  Task() = delete ;
+  Task( Task && ) = delete ;
+  Task( const Task & ) = delete ;
+  Task & operator = ( Task && ) = delete ;
+  Task & operator = ( const Task & ) = delete ;
+
+
+  using root_type = TaskBase;
+  using functor_type = FunctorType ;
+  using result_type = ResultType ;
+
+  using specialization = TaskQueueSpecialization<Scheduler> ;
+  using member_type = typename specialization::member_type ;
+
+  KOKKOS_INLINE_FUNCTION
+  void apply_functor( member_type * const member , void * )
+    { this->functor_type::operator()( *member ); }
+
+  template< typename T >
+  KOKKOS_INLINE_FUNCTION
+  void apply_functor( member_type * const member
+                    , T           * const result )
+    { this->functor_type::operator()( *member , *result ); }
+
+  KOKKOS_FUNCTION static
+  void destroy( root_type * root )
+  {
+    TaskResult<result_type>::destroy(root);
+  }
+
+  KOKKOS_FUNCTION static
+  void apply( root_type * root , void * exec )
+    {
+      Task* const task = static_cast< Task * >( root );
+      member_type * const member = reinterpret_cast< member_type * >( exec );
+      result_type * const result = TaskResult< result_type >::ptr( task );
+
+      // Task may be serial or team.
+      // If team then must synchronize before querying if respawn was requested.
+      // If team then only one thread calls destructor.
+
+      const bool only_one_thread =
+#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA)
+        0 == threadIdx.x && 0 == threadIdx.y ;
+#else
+        0 == member->team_rank();
+#endif
+
+      task->apply_functor( member , result );
+
+      member->team_barrier();
+
+      if ( only_one_thread && !(task->requested_respawn()) ) {
+        // Did not respawn, destroy the functor to free memory.
+        task->functor_type::~functor_type();
+        // Cannot destroy and deallocate the task until its dependences
+        // have been processed.
+      }
+    }
+
+  // Constructor for runnable task
+  KOKKOS_INLINE_FUNCTION constexpr
+  Task( FunctorType && arg_functor )
+    : root_type() , functor_type( std::move(arg_functor) )
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  ~Task() = delete;
+};
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKBASE_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskNode.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskNode.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..35f8853f1fee7c74c0f446ec1bd5e15eb77982d9
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskNode.hpp
@@ -0,0 +1,758 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_TASKNODE_HPP
+#define KOKKOS_IMPL_TASKNODE_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_PointerOwnership.hpp>
+
+#include <impl/Kokkos_VLAEmulation.hpp>
+#include <impl/Kokkos_LIFO.hpp>
+#include <impl/Kokkos_ChaseLev.hpp>
+#include <impl/Kokkos_EBO.hpp>
+#include <Kokkos_Concepts.hpp>
+
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+enum TaskType : int16_t   { TaskTeam = 0 , TaskSingle = 1 , Aggregate = 2, TaskSpecial = -1 };
+
+//==============================================================================
+
+/** Intrusive base class for things allocated with a Kokkos::MemoryPool
+ *
+ *  @warning Memory pools assume that the address of this class is the same
+ *           as the address of the most derived type that was allocated to
+ *           have the given size.  As a consequence, when interacting with
+ *           multiple inheritance, this must always be the first base class
+ *           of any derived class that uses it!
+ *  @todo Consider inverting inheritance structure to avoid this problem?
+ *
+ *  @tparam CountType type of integer used to store the allocation size
+ */
+template <class CountType = int32_t>
+class alignas(void*) PoolAllocatedObjectBase {
+public:
+
+  using pool_allocation_size_type = CountType;
+
+private:
+
+  pool_allocation_size_type m_alloc_size;
+
+public:
+
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr explicit PoolAllocatedObjectBase(pool_allocation_size_type allocation_size)
+    : m_alloc_size(allocation_size)
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  CountType get_allocation_size() const noexcept { return m_alloc_size; }
+
+};
+
+//==============================================================================
+
+
+// TODO @tasking @cleanup DSH move this?
+template <class CountType = int32_t>
+class ReferenceCountedBase {
+public:
+
+  using reference_count_size_type = CountType;
+
+private:
+
+  reference_count_size_type m_ref_count = 0;
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr explicit
+  ReferenceCountedBase(reference_count_size_type initial_reference_count)
+    : m_ref_count(initial_reference_count)
+  {
+    // This can't be here because it breaks constexpr
+    // KOKKOS_EXPECTS(initial_reference_count > 0);
+  }
+
+  /** Decrement the reference count,
+   *  and return true iff this decrement caused
+   *  the reference count to become zero
+   */
+  KOKKOS_INLINE_FUNCTION
+  bool decrement_and_check_reference_count()
+  {
+    // TODO @tasking @memory_order DSH memory order
+    auto old_count = Kokkos::atomic_fetch_add(&m_ref_count, -1);
+
+    KOKKOS_ASSERT(old_count > 0 && "reference count greater less than zero!");
+
+    return (old_count == 1);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void increment_reference_count()
+  {
+    Kokkos::atomic_increment(&m_ref_count);
+  }
+
+};
+
+template <class TaskQueueTraits, class SchedulingInfo>
+class AggregateTask;
+
+template <class TaskQueueTraits>
+class RunnableTaskBase;
+
+//==============================================================================
+
+template <class TaskQueueTraits>
+class TaskNode
+  : public PoolAllocatedObjectBase<int32_t>, // size 4, must be first!
+    public ReferenceCountedBase<int32_t>, // size 4
+    public TaskQueueTraits::template intrusive_task_base_type<TaskNode<TaskQueueTraits>> // size 8+
+{
+public:
+
+  using priority_type = int16_t;
+
+private:
+
+  using task_base_type = TaskNode<TaskQueueTraits>;
+  using pool_allocated_base_type = PoolAllocatedObjectBase<int32_t>;
+  using reference_counted_base_type = ReferenceCountedBase<int32_t>;
+  using task_queue_traits = TaskQueueTraits;
+  using waiting_queue_type =
+    typename task_queue_traits::template waiting_queue_type<TaskNode>;
+
+  waiting_queue_type m_wait_queue; // size 8+
+
+  // TODO @tasking @cleanup DSH eliminate this, or make its purpose a bit more clear.  It's only used in BasicFuture, and only for deallocation purposes
+  TaskQueueBase* m_ready_queue_base;
+
+  TaskType m_task_type;  // size 2
+  priority_type m_priority; // size 2
+  bool m_is_respawning = false;
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr
+  TaskNode(
+    TaskType task_type,
+    TaskPriority priority,
+    TaskQueueBase* queue_base,
+    reference_count_size_type initial_reference_count,
+    pool_allocation_size_type allocation_size
+  ) : pool_allocated_base_type(
+        /* allocation_size = */ allocation_size
+      ),
+      reference_counted_base_type(
+        /* initial_reference_count = */ initial_reference_count
+      ),
+      m_wait_queue(),
+      m_ready_queue_base(queue_base),
+      m_task_type(task_type),
+      m_priority(static_cast<priority_type>(priority)),
+      m_is_respawning(false)
+  { }
+
+  TaskNode() = delete;
+  TaskNode(TaskNode const&) = delete;
+  TaskNode(TaskNode&&) = delete;
+  TaskNode& operator=(TaskNode const&) = delete;
+  TaskNode& operator=(TaskNode&&) = delete;
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_aggregate() const noexcept { return m_task_type == TaskType::Aggregate; }
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_runnable() const noexcept { return m_task_type != TaskType::Aggregate; }
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_runnable() const volatile noexcept { return m_task_type != TaskType::Aggregate; }
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_single_runnable() const noexcept { return m_task_type == TaskType::TaskSingle; }
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_team_runnable() const noexcept { return m_task_type == TaskType::TaskTeam; }
+
+  KOKKOS_INLINE_FUNCTION
+  TaskType get_task_type() const noexcept { return m_task_type; }
+
+  KOKKOS_INLINE_FUNCTION
+  RunnableTaskBase<TaskQueueTraits>&
+  as_runnable_task() & {
+    KOKKOS_EXPECTS(this->is_runnable());
+    return static_cast<RunnableTaskBase<TaskQueueTraits>&>(*this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  RunnableTaskBase<TaskQueueTraits> const&
+  as_runnable_task() const & {
+    KOKKOS_EXPECTS(this->is_runnable());
+    return static_cast<RunnableTaskBase<TaskQueueTraits> const&>(*this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  RunnableTaskBase<TaskQueueTraits> volatile&
+  as_runnable_task() volatile & {
+    KOKKOS_EXPECTS(this->is_runnable());
+    return static_cast<RunnableTaskBase<TaskQueueTraits> volatile&>(*this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  RunnableTaskBase<TaskQueueTraits> const volatile&
+  as_runnable_task() const volatile & {
+    KOKKOS_EXPECTS(this->is_runnable());
+    return static_cast<RunnableTaskBase<TaskQueueTraits> const volatile&>(*this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  RunnableTaskBase<TaskQueueTraits>&&
+  as_runnable_task() && {
+    KOKKOS_EXPECTS(this->is_runnable());
+    return static_cast<RunnableTaskBase<TaskQueueTraits>&&>(*this);
+  }
+
+  template <class SchedulingInfo>
+  KOKKOS_INLINE_FUNCTION
+  AggregateTask<TaskQueueTraits, SchedulingInfo>&
+  as_aggregate() & {
+    KOKKOS_EXPECTS(this->is_aggregate());
+    return static_cast<AggregateTask<TaskQueueTraits, SchedulingInfo>&>(*this);
+  }
+
+  template <class SchedulingInfo>
+  KOKKOS_INLINE_FUNCTION
+  AggregateTask<TaskQueueTraits, SchedulingInfo> const&
+  as_aggregate() const & {
+    KOKKOS_EXPECTS(this->is_aggregate());
+    return static_cast<AggregateTask<TaskQueueTraits, SchedulingInfo> const&>(*this);
+  }
+
+  template <class SchedulingInfo>
+  KOKKOS_INLINE_FUNCTION
+  AggregateTask<TaskQueueTraits, SchedulingInfo>&&
+  as_aggregate() && {
+    KOKKOS_EXPECTS(this->is_aggregate());
+    return static_cast<AggregateTask<TaskQueueTraits, SchedulingInfo>&&>(*this);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool try_add_waiting(task_base_type& depends_on_this) {
+    return m_wait_queue.try_push(depends_on_this);
+  }
+
+  template <class Function>
+  KOKKOS_INLINE_FUNCTION
+  void consume_wait_queue(Function&& f) {
+    KOKKOS_EXPECTS(not m_wait_queue.is_consumed());
+    m_wait_queue.consume(std::forward<Function>(f));
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool wait_queue_is_consumed() const noexcept {
+    // TODO @tasking @memory_order DSH memory order
+    return m_wait_queue.is_consumed();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  TaskQueueBase*
+  ready_queue_base_ptr() const noexcept {
+    return m_ready_queue_base;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void set_priority(TaskPriority priority) noexcept {
+    KOKKOS_EXPECTS(!this->is_enqueued());
+    m_priority = (priority_type)priority;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void set_priority(TaskPriority priority) volatile noexcept {
+    KOKKOS_EXPECTS(!this->is_enqueued());
+    m_priority = (priority_type)priority;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPriority get_priority() const noexcept {
+    return (TaskPriority)m_priority;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool get_respawn_flag() const { return m_is_respawning; }
+
+  KOKKOS_INLINE_FUNCTION
+  void set_respawn_flag(bool value = true) {
+    m_is_respawning = value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void set_respawn_flag(bool value = true) volatile {
+    m_is_respawning = value;
+  }
+
+};
+
+//==============================================================================
+
+template <class BaseClass, class SchedulingInfo>
+class SchedulingInfoStorage;
+
+//==============================================================================
+
+template <class BaseType, class SchedulingInfo>
+class SchedulingInfoStorage
+  : public BaseType, // must be first base class for allocation reasons!!!
+    private NoUniqueAddressMemberEmulation<SchedulingInfo>
+{
+
+private:
+
+  using base_t = BaseType;
+  using task_scheduling_info_type = SchedulingInfo;
+
+public:
+
+  using base_t::base_t;
+
+  KOKKOS_INLINE_FUNCTION
+  task_scheduling_info_type& scheduling_info() &
+  {
+    return this->no_unique_address_data_member();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  task_scheduling_info_type const& scheduling_info() const &
+  {
+    return this->no_unique_address_data_member();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  task_scheduling_info_type&& scheduling_info() &&
+  {
+    return std::move(*this).no_unique_address_data_member();
+  }
+
+};
+
+
+//==============================================================================
+
+template <class TaskQueueTraits, class SchedulingInfo>
+class alignas(16) AggregateTask final
+  : public SchedulingInfoStorage<
+      TaskNode<TaskQueueTraits>,
+      SchedulingInfo
+    >, // must be first base class for allocation reasons!!!
+    public ObjectWithVLAEmulation<
+      AggregateTask<TaskQueueTraits, SchedulingInfo>,
+      OwningRawPtr<TaskNode<TaskQueueTraits>>
+    >
+{
+private:
+
+  using base_t = SchedulingInfoStorage<
+    TaskNode<TaskQueueTraits>,
+    SchedulingInfo
+  >;
+  using vla_base_t = ObjectWithVLAEmulation<
+    AggregateTask<TaskQueueTraits, SchedulingInfo>,
+    OwningRawPtr<TaskNode<TaskQueueTraits>>
+  >;
+
+  using task_base_type = TaskNode<TaskQueueTraits>;
+
+public:
+
+  using aggregate_task_type = AggregateTask; // concept marker
+
+  template <class... Args>
+    // requires std::is_constructible_v<base_t, Args&&...>
+  KOKKOS_INLINE_FUNCTION
+  constexpr explicit
+  AggregateTask(
+    int32_t aggregate_predecessor_count,
+    Args&&... args
+  ) : base_t(
+        TaskType::Aggregate,
+        TaskPriority::Regular, // all aggregates are regular priority
+        std::forward<Args>(args)...
+      ),
+      vla_base_t(aggregate_predecessor_count)
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  int32_t dependence_count() const { return this->n_vla_entries(); }
+
+};
+
+//KOKKOS_IMPL_IS_CONCEPT(aggregate_task);
+
+//==============================================================================
+
+
+template <class TaskQueueTraits>
+class RunnableTaskBase
+  : public TaskNode<TaskQueueTraits> // must be first base class for allocation reasons!!!
+{
+private:
+
+  using base_t = TaskNode<TaskQueueTraits>;
+
+public:
+
+  using task_base_type = TaskNode<TaskQueueTraits>;
+  using function_type = void(*)( task_base_type * , void * );
+  using destroy_type = void(*)( task_base_type * );
+  using runnable_task_type = RunnableTaskBase;
+
+private:
+
+  function_type m_apply;
+  task_base_type* m_predecessor = nullptr;
+
+public:
+
+  template <class... Args>
+    // requires std::is_constructible_v<base_t, Args&&...>
+  KOKKOS_INLINE_FUNCTION
+  constexpr explicit
+  RunnableTaskBase(
+    function_type apply_function_ptr,
+    Args&&... args
+  ) : base_t(std::forward<Args>(args)...),
+      m_apply(apply_function_ptr)
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  bool has_predecessor() const { return m_predecessor != nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  void clear_predecessor() { m_predecessor = nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  void clear_predecessor() volatile { m_predecessor = nullptr; }
+
+  template <class SchedulingInfo>
+  KOKKOS_INLINE_FUNCTION
+  SchedulingInfo&
+  scheduling_info_as()
+  {
+    using info_storage_type = SchedulingInfoStorage<RunnableTaskBase, SchedulingInfo>;
+
+    return static_cast<info_storage_type*>(this)->scheduling_info();
+  }
+
+  template <class SchedulingInfo>
+  KOKKOS_INLINE_FUNCTION
+  SchedulingInfo const&
+  scheduling_info_as() const
+  {
+    using info_storage_type = SchedulingInfoStorage<RunnableTaskBase, SchedulingInfo>;
+
+    return static_cast<info_storage_type const*>(this)->scheduling_info();
+  }
+
+
+  KOKKOS_INLINE_FUNCTION
+  task_base_type& get_predecessor() const {
+    KOKKOS_EXPECTS(m_predecessor != nullptr);
+    return *m_predecessor;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void set_predecessor(task_base_type& predecessor)
+  {
+    KOKKOS_EXPECTS(m_predecessor == nullptr);
+    // Increment the reference count so that predecessor doesn't go away
+    // before this task is enqueued.
+    // (should be memory order acquire)
+    predecessor.increment_reference_count();
+    m_predecessor = &predecessor;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void acquire_predecessor_from(runnable_task_type& other)
+  {
+    KOKKOS_EXPECTS(m_predecessor == nullptr || other.m_predecessor == m_predecessor);
+    // since we're transfering, no need to modify the reference count
+    m_predecessor = other.m_predecessor;
+    other.m_predecessor = nullptr;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void acquire_predecessor_from(runnable_task_type& other) volatile
+  {
+    KOKKOS_EXPECTS(m_predecessor == nullptr || other.m_predecessor == m_predecessor);
+    // since we're transfering, no need to modify the reference count
+    m_predecessor = other.m_predecessor;
+    other.m_predecessor = nullptr;
+  }
+
+  template <class TeamMember>
+  KOKKOS_INLINE_FUNCTION
+  void run(TeamMember& member) {
+    (*m_apply)(this, &member);
+  }
+};
+
+//KOKKOS_IMPL_IS_CONCEPT(runnable_task);
+
+//==============================================================================
+
+template <class ResultType, class Base>
+class TaskResultStorage : public Base
+{
+private:
+
+  using base_t = Base;
+
+  alignas(Base) ResultType m_value = ResultType{};
+
+
+public:
+
+  using base_t::base_t;
+
+  KOKKOS_INLINE_FUNCTION
+  ResultType* value_pointer() {
+    // Over-alignment makes this a non-standard-layout class,
+    // so alignas() doesn't work
+    //static_assert(
+    //  offsetof(TaskResultStorage, m_value) == sizeof(Base),
+    //  "TaskResultStorage must be POD for layout purposes"
+    //);
+    return &m_value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  ResultType& value_reference() { return m_value; }
+
+};
+
+
+// TODO @tasking @optimization DSH optimization for empty types (in addition to void)
+template <class Base>
+class TaskResultStorage<void, Base> : public Base
+{
+private:
+
+  using base_t = Base;
+
+public:
+
+  using base_t::base_t;
+
+  KOKKOS_INLINE_FUNCTION
+  void* value_pointer() noexcept { return nullptr; }
+
+  KOKKOS_INLINE_FUNCTION
+  void value_reference() noexcept { }
+
+};
+
+//==============================================================================
+
+template <
+  class TaskQueueTraits,
+  class Scheduler,
+  class ResultType,
+  class FunctorType
+>
+class alignas(16) RunnableTask
+  : // using nesting of base classes to control layout; multiple empty base classes
+    // may not be ABI compatible with CUDA on Windows
+    public TaskResultStorage<
+      ResultType,
+      SchedulingInfoStorage<
+        RunnableTaskBase<TaskQueueTraits>,
+        typename Scheduler::task_queue_type::task_scheduling_info_type
+      >
+    >, // must be first base class
+    public FunctorType
+{
+private:
+  using base_t = TaskResultStorage<
+    ResultType,
+    SchedulingInfoStorage<
+      RunnableTaskBase<TaskQueueTraits>,
+      typename Scheduler::task_queue_type::task_scheduling_info_type
+    >
+  >;
+
+  using runnable_task_base_type = RunnableTaskBase<TaskQueueTraits>;
+  using scheduler_type = Scheduler;
+  using scheduling_info_type =
+      typename scheduler_type::task_scheduling_info_type;
+  using scheduling_info_storage_base = base_t;
+
+  using task_base_type = TaskNode<TaskQueueTraits>;
+  using specialization = TaskQueueSpecialization<scheduler_type>;
+  using member_type = typename specialization::member_type;
+  using result_type = ResultType;
+  using functor_type = FunctorType;
+
+public:
+
+  template <class... Args>
+    // requires std::is_constructible_v<base_t, Args&&...>
+  KOKKOS_INLINE_FUNCTION
+  constexpr explicit
+  RunnableTask(
+    FunctorType&& functor,
+    Args&&... args
+  ) : base_t(
+        std::forward<Args>(args)...
+      ),
+      functor_type(std::move(functor))
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  ~RunnableTask() = delete;
+
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info(
+    member_type& member
+  ) {
+    // TODO @tasking @generalization DSH call a queue-specific hook here; for now, this info is already updated elsewhere
+    // this->scheduling_info() = member.scheduler().scheduling_info();
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void apply_functor(member_type* member, void*)
+  {
+    update_scheduling_info(*member);
+    this->functor_type::operator()(*member);
+  }
+
+  template <typename T>
+  KOKKOS_INLINE_FUNCTION
+  void apply_functor(member_type* member, T* val)
+  {
+    update_scheduling_info(*member);
+    //this->functor_type::operator()(*member, *val);
+    this->functor_type::operator()(*member, *val);
+  }
+
+  KOKKOS_FUNCTION static
+  void destroy( task_base_type * root )
+  {
+    //TaskResult<result_type>::destroy(root);
+  }
+
+  KOKKOS_FUNCTION static
+  void apply(task_base_type* self, void* member_as_void)
+  {
+    using task_type = Impl::RunnableTask<TaskQueueTraits, Scheduler, ResultType, FunctorType>*;
+    auto* const task = static_cast<task_type>(self);
+    auto* const member = reinterpret_cast<member_type*>(member_as_void);
+
+    // Now that we're over-aligning the result storage, this isn't a problem any more
+    //static_assert(std::is_standard_layout<task_type>::value,
+    //  "Tasks must be standard layout"
+    //);
+    //static_assert(std::is_pod<task_type>::value,
+    //  "Tasks must be PODs"
+    //);
+
+    // Task may be serial or team.
+    // If team then must synchronize before querying if respawn was requested.
+    // If team then only one thread calls destructor.
+
+    const bool only_one_thread =
+#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA)
+      0 == threadIdx.x && 0 == threadIdx.y ;
+#else
+      0 == member->team_rank();
+#endif
+
+    // Ensure that the respawn flag is set to zero
+    self->set_respawn_flag(false);
+
+    //task->apply_functor(member, TaskResult<result_type>::ptr(task));
+    task->apply_functor(member, task->value_pointer());
+
+    member->team_barrier();
+
+    if ( only_one_thread && !(task->get_respawn_flag()) ) {
+      // Did not respawn, destroy the functor to free memory.
+      task->functor_type::~functor_type();
+      // Cannot destroy and deallocate the task until its dependences
+      // have been processed.
+    }
+  }
+
+};
+
+} /* namespace Impl */
+
+
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKNODE_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskPolicyData.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskPolicyData.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..85e665fffc169af03b20f17f214dce6c96daaf02
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskPolicyData.hpp
@@ -0,0 +1,195 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_TASKPOLICYDATA_HPP
+#define KOKKOS_IMPL_TASKPOLICYDATA_HPP
+
+//----------------------------------------------------------------------------
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_Core_fwd.hpp>
+#include <Kokkos_TaskScheduler_fwd.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+//----------------------------------------------------------------------------
+
+template<int TaskEnum, typename DepFutureType>
+struct TaskPolicyWithPredecessor
+{
+private:
+
+  DepFutureType m_predecessor;
+  Kokkos::TaskPriority m_priority;
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithPredecessor(
+    DepFutureType arg_predecessor,
+    Kokkos::TaskPriority arg_priority
+  ) : m_predecessor(std::move(arg_predecessor)),
+      m_priority(arg_priority)
+  { }
+
+  TaskPolicyWithPredecessor() = delete;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithPredecessor(TaskPolicyWithPredecessor const&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithPredecessor(TaskPolicyWithPredecessor&&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithPredecessor& operator=(TaskPolicyWithPredecessor const&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithPredecessor& operator=(TaskPolicyWithPredecessor&&) = default;
+  
+  KOKKOS_INLINE_FUNCTION
+  ~TaskPolicyWithPredecessor() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  DepFutureType&& predecessor() && {
+    return std::move(m_predecessor);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr TaskPriority priority() const { return m_priority; }
+
+  KOKKOS_INLINE_FUNCTION
+  static constexpr int task_type() noexcept { return TaskEnum; }
+
+};
+
+// TODO @tasking @cleanup DSH clean this up. Using nullptr_t here is too clever
+template<int TaskEnum, typename Scheduler, typename PredecessorFuture=std::nullptr_t>
+struct TaskPolicyWithScheduler
+{
+public:
+
+  using predecessor_future_type = PredecessorFuture;
+
+private:
+
+  Scheduler m_scheduler;
+  Kokkos::TaskPriority m_priority;
+  predecessor_future_type m_predecessor;
+
+public:
+
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithScheduler(
+    Scheduler arg_scheduler,
+    Kokkos::TaskPriority arg_priority
+  ) : m_scheduler(std::move(arg_scheduler)),
+      m_priority(arg_priority)
+  { }
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithScheduler(
+    Scheduler arg_scheduler,
+    predecessor_future_type arg_predecessor,
+    Kokkos::TaskPriority arg_priority
+  ) : m_scheduler(std::move(arg_scheduler)),
+      m_priority(arg_priority),
+      m_predecessor(std::move(arg_predecessor))
+  { }
+
+  TaskPolicyWithScheduler() = delete;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithScheduler(TaskPolicyWithScheduler const&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithScheduler(TaskPolicyWithScheduler&&) = default;
+ 
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithScheduler& operator=(TaskPolicyWithScheduler const&) = default;
+  
+  KOKKOS_INLINE_FUNCTION
+  TaskPolicyWithScheduler& operator=(TaskPolicyWithScheduler&&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  ~TaskPolicyWithScheduler() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  Scheduler& scheduler() & {
+    return m_scheduler;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr TaskPriority priority() const { return m_priority; }
+
+  KOKKOS_INLINE_FUNCTION
+  predecessor_future_type& predecessor() & {
+    return m_predecessor;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  static constexpr bool has_predecessor() noexcept
+  {
+    return not std::is_same<PredecessorFuture, std::nullptr_t>::value;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  static constexpr int task_type() noexcept { return TaskEnum; }
+
+};
+
+} // namespace Impl
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKPOLICYDATA_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskQueue.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskQueue.hpp
index eacf0837faff8f75e1880e7a715f37628089c9b3..1adcfe4cc4ca3215636af44d390049dafdc7b67d 100644
--- a/packages/kokkos/core/src/impl/Kokkos_TaskQueue.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskQueue.hpp
@@ -49,240 +49,24 @@
 #include <Kokkos_Macros.hpp>
 #if defined( KOKKOS_ENABLE_TASKDAG )
 
-#include <string>
-#include <typeinfo>
-#include <stdexcept>
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-namespace Kokkos {
-namespace Impl {
-
-template< class Space , typename ResultType , class FunctorType >
-class TaskBase ;
-
-template< typename Space >
-class TaskQueue ;
-
-template< typename Space >
-class TaskQueueSpecialization ;
-
-} /* namespace Impl */
-} /* namespace Kokkos */
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-namespace Kokkos {
-namespace Impl {
-
-/** \brief  Base class for task management, access, and execution.
- *
- *  Inheritance structure to allow static_cast from the task root type
- *  and a task's FunctorType.
- *
- *    // Enable a functor to access the base class
- *    // and provide memory for result value.
- *    TaskBase< Space , ResultType , FunctorType >
- *      : TaskBase< void , void , void >
- *      , FunctorType
- *      { ... };
- *    Followed by memory allocated for result value.
- *
- *
- *  States of a task:
- *
- *    Constructing State, NOT IN a linked list
- *      m_wait == 0
- *      m_next == 0
- *
- *    Scheduling transition : Constructing -> Waiting
- *      before:
- *        m_wait == 0
- *        m_next == this task's initial dependence, 0 if none
- *      after:
- *        m_wait == EndTag
- *        m_next == EndTag
- *
- *    Waiting State, IN a linked list
- *      m_apply != 0
- *      m_queue != 0
- *      m_ref_count > 0
- *      m_wait == head of linked list of tasks waiting on this task
- *      m_next == next of linked list of tasks
- *
- *    transition : Waiting -> Executing
- *      before:
- *        m_next == EndTag
- *      after::
- *        m_next == LockTag
- *
- *    Executing State, NOT IN a linked list
- *      m_apply != 0
- *      m_queue != 0
- *      m_ref_count > 0
- *      m_wait == head of linked list of tasks waiting on this task
- *      m_next == LockTag
- *
- *    Respawn transition : Executing -> Executing-Respawn
- *      before:
- *        m_next == LockTag
- *      after:
- *        m_next == this task's updated dependence, 0 if none
- *
- *    Executing-Respawn State, NOT IN a linked list
- *      m_apply != 0
- *      m_queue != 0
- *      m_ref_count > 0
- *      m_wait == head of linked list of tasks waiting on this task
- *      m_next == this task's updated dependence, 0 if none
- *
- *    transition : Executing -> Complete
- *      before:
- *        m_wait == head of linked list
- *      after:
- *        m_wait == LockTag
- *
- *    Complete State, NOT IN a linked list
- *      m_wait == LockTag: cannot add dependence (<=> complete)
- *      m_next == LockTag: not a member of a wait queue
- *
- */
-template<>
-class TaskBase< void , void , void >
-{
-public:
-
-  enum : int16_t   { TaskTeam = 0 , TaskSingle = 1 , Aggregate = 2 };
-  enum : uintptr_t { LockTag = ~uintptr_t(0) , EndTag = ~uintptr_t(1) };
-
-  template< typename > friend class Kokkos::TaskScheduler ;
-
-  typedef TaskQueue< void > queue_type ;
-
-  typedef void (* function_type) ( TaskBase * , void * );
 
-  // sizeof(TaskBase) == 48
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
 
-  function_type  m_apply ;       ///< Apply function pointer
-  queue_type   * m_queue ;       ///< Pointer to queue
-  TaskBase     * m_wait ;        ///< Linked list of tasks waiting on this
-  TaskBase     * m_next ;        ///< Waiting linked-list next
-  int32_t        m_ref_count ;   ///< Reference count
-  int32_t        m_alloc_size ;  ///< Allocation size
-  int32_t        m_dep_count ;   ///< Aggregate's number of dependences
-  int16_t        m_task_type ;   ///< Type of task
-  int16_t        m_priority ;    ///< Priority of runnable task
-
-  TaskBase( TaskBase && ) = delete ;
-  TaskBase( const TaskBase & ) = delete ;
-  TaskBase & operator = ( TaskBase && ) = delete ;
-  TaskBase & operator = ( const TaskBase & ) = delete ;
-
-#ifdef KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND
-  KOKKOS_INLINE_FUNCTION ~TaskBase() {};
-#else
-  KOKKOS_INLINE_FUNCTION ~TaskBase() = default;
-#endif
-
-  KOKKOS_INLINE_FUNCTION constexpr
-  TaskBase()
-    : m_apply(      0 )
-    , m_queue(      0 )
-    , m_wait(       0 )
-    , m_next(       0 )
-    , m_ref_count(  0 )
-    , m_alloc_size( 0 )
-    , m_dep_count(  0 )
-    , m_task_type(  0 )
-    , m_priority(   0 )
-    {}
-
-  //----------------------------------------
-
-  KOKKOS_INLINE_FUNCTION
-  TaskBase * volatile * aggregate_dependences() volatile
-    { return reinterpret_cast<TaskBase*volatile*>( this + 1 ); }
+#include <Kokkos_MemoryPool.hpp>
 
-  KOKKOS_INLINE_FUNCTION
-  bool requested_respawn()
-    {
-      // This should only be called when a task has finished executing and is
-      // in the transition to either the complete or executing-respawn state.
-      TaskBase * const lock = reinterpret_cast< TaskBase * >( LockTag );
-      return lock != m_next;
-    }
-
-  KOKKOS_INLINE_FUNCTION
-  void add_dependence( TaskBase* dep )
-    {
-      // Precondition: lock == m_next
-
-      TaskBase * const lock = (TaskBase *) LockTag ;
-
-      // Assign dependence to m_next.  It will be processed in the subsequent
-      // call to schedule.  Error if the dependence is reset.
-      if ( lock != Kokkos::atomic_exchange( & m_next, dep ) ) {
-        Kokkos::abort("TaskScheduler ERROR: resetting task dependence");
-      }
-
-      if ( 0 != dep ) {
-        // The future may be destroyed upon returning from this call
-        // so increment reference count to track this assignment.
-        Kokkos::atomic_increment( &(dep->m_ref_count) );
-      }
-    }
-
-  //----------------------------------------
-
-  KOKKOS_INLINE_FUNCTION
-  int32_t reference_count() const
-    { return *((int32_t volatile *)( & m_ref_count )); }
-
-};
+#include <impl/Kokkos_TaskBase.hpp>
+#include <impl/Kokkos_TaskResult.hpp>
 
-static_assert( sizeof(TaskBase<void,void,void>) == 48
-             , "Verifying expected sizeof(TaskBase<void,void,void>)" );
+#include <impl/Kokkos_Memory_Fence.hpp>
+#include <impl/Kokkos_Atomic_Increment.hpp>
+#include <impl/Kokkos_OptionalRef.hpp>
+#include <impl/Kokkos_LIFO.hpp>
 
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
-template< typename ResultType >
-struct TaskResult {
-
-  enum : int32_t { size = sizeof(ResultType) };
-
-  using reference_type = ResultType & ;
-
-  KOKKOS_INLINE_FUNCTION static
-  ResultType * ptr( TaskBase<void,void,void> * task )
-    {
-      return reinterpret_cast< ResultType * >
-        ( reinterpret_cast< char * >(task) + task->m_alloc_size - sizeof(ResultType) );
-    }
-
-  KOKKOS_INLINE_FUNCTION static
-  reference_type get( TaskBase<void,void,void> * task )
-    { return *ptr( task ); }
-};
-
-template<>
-struct TaskResult< void > {
-
-  enum : int32_t { size = 0 };
-
-  using reference_type = void ;
-
-  KOKKOS_INLINE_FUNCTION static
-  void * ptr( TaskBase<void,void,void> * ) { return (void*) 0 ; }
-
-  KOKKOS_INLINE_FUNCTION static
-  reference_type get( TaskBase<void,void,void> * ) {}
-};
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
 
-} /* namespace Impl */
-} /* namespace Kokkos */
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
@@ -290,27 +74,29 @@ struct TaskResult< void > {
 namespace Kokkos {
 namespace Impl {
 
-template<>
-class TaskQueue< void > {};
 
 /** \brief  Manage task allocation, deallocation, and scheduling.
  *
  *  Task execution is deferred to the TaskQueueSpecialization.
  *  All other aspects of task management have shared implementation.
  */
-template< typename ExecSpace >
-class TaskQueue : public TaskQueue<void> {
-private:
-
-  friend class TaskQueueSpecialization< ExecSpace > ;
-  friend class Kokkos::TaskScheduler< ExecSpace > ;
-
-  using execution_space = ExecSpace ;
-  using specialization  = TaskQueueSpecialization< execution_space > ;
-  using memory_space    = typename specialization::memory_space ;
-  using device_type     = Kokkos::Device< execution_space , memory_space > ;
-  using memory_pool     = Kokkos::MemoryPool< device_type > ;
-  using task_root_type  = Kokkos::Impl::TaskBase<void,void,void> ;
+template< typename ExecSpace, typename MemorySpace >
+class TaskQueue : public TaskQueueBase {
+protected:
+
+  template <class>
+  friend struct TaskQueueSpecialization;
+  template <class, class>
+  friend class TaskQueueSpecializationConstrained;
+  template <class, class>
+  friend class Kokkos::BasicTaskScheduler;
+
+  using execution_space = ExecSpace;
+  using memory_space = MemorySpace;
+  using device_type = Kokkos::Device< execution_space , memory_space > ;
+  using memory_pool = Kokkos::MemoryPool< device_type > ;
+  using task_root_type = Kokkos::Impl::TaskBase;
+  using team_queue_type = TaskQueue;
 
   struct Destroy {
     TaskQueue * m_queue ;
@@ -325,8 +111,8 @@ private:
 
   memory_pool               m_memory ;
   task_root_type * volatile m_ready[ NumQueue ][ 2 ];
-  long                      m_accum_alloc ; // Accumulated number of allocations
-  int                       m_count_alloc ; // Current number of allocations
+  //long                      m_accum_alloc ; // Accumulated number of allocations
+  int                       m_count_alloc = 0 ; // Current number of allocations
   int                       m_max_alloc ;   // Maximum number of allocations
   int                       m_ready_count ; // Number of ready or executing
 
@@ -347,8 +133,8 @@ private:
   //     task->m_next is the dependence or zero
   //   Postcondition:
   //     task->m_next is linked list membership
-  KOKKOS_FUNCTION void schedule_runnable(  task_root_type * const );
-  KOKKOS_FUNCTION void schedule_aggregate( task_root_type * const );
+  KOKKOS_FUNCTION void schedule_runnable(task_root_type*);
+  KOKKOS_FUNCTION void schedule_aggregate(task_root_type*);
 
   // Reschedule a task
   //   Precondition:
@@ -381,23 +167,29 @@ private:
   KOKKOS_FUNCTION static
   void decrement( task_root_type * task );
 
+
 public:
 
-  // If and only if the execution space is a single thread
-  // then execute ready tasks.
   KOKKOS_INLINE_FUNCTION
-  void iff_single_thread_recursive_execute()
-    {
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-      specialization::iff_single_thread_recursive_execute( this );
-#endif
-    }
+  int allocation_count() const noexcept { return m_count_alloc; }
+
+
+  KOKKOS_INLINE_FUNCTION
+  void initialize_team_queues(int pool_size) const noexcept { }
+
+  KOKKOS_INLINE_FUNCTION
+  task_root_type* attempt_to_steal_task() const noexcept { return nullptr; }
 
-  void execute() { specialization::execute( this ); }
+  KOKKOS_INLINE_FUNCTION
+  team_queue_type& get_team_queue(int team_rank) { return *this; }
+
+  //void execute() { specialization::execute( this ); }
 
   template< typename FunctorType >
   void proc_set_apply( typename task_root_type::function_type * ptr )
     {
+      using specialization =
+        TaskQueueSpecialization<BasicTaskScheduler<ExecSpace, TaskQueue>>;
       specialization::template proc_set_apply< FunctorType >( ptr );
     }
 
@@ -451,9 +243,7 @@ public:
     {
       using value_type = typename FunctorType::value_type ;
 
-      using task_type = Impl::TaskBase< execution_space
-                                      , value_type
-                                      , FunctorType > ;
+      using task_type = Impl::Task<execution_space, value_type, FunctorType> ;
 
       enum : size_t { align = ( 1 << 4 ) , align_mask = align - 1 };
       enum : size_t { task_size   = sizeof(task_type) };
@@ -480,86 +270,6 @@ public:
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 
-namespace Kokkos {
-namespace Impl {
-
-template< class ExecSpace , typename ResultType , class FunctorType >
-class TaskBase
-  : public TaskBase< void , void , void >
-  , public FunctorType
-{
-private:
-
-  TaskBase() = delete ;
-  TaskBase( TaskBase && ) = delete ;
-  TaskBase( const TaskBase & ) = delete ;
-  TaskBase & operator = ( TaskBase && ) = delete ;
-  TaskBase & operator = ( const TaskBase & ) = delete ;
-
-public:
-
-  using root_type       = TaskBase< void , void , void > ;
-  using functor_type    = FunctorType ;
-  using result_type     = ResultType ;
-
-  using specialization  = TaskQueueSpecialization< ExecSpace > ;
-  using member_type     = typename specialization::member_type ;
-
-  KOKKOS_INLINE_FUNCTION
-  void apply_functor( member_type * const member , void * )
-    { functor_type::operator()( *member ); }
-
-  template< typename T >
-  KOKKOS_INLINE_FUNCTION
-  void apply_functor( member_type * const member
-                    , T           * const result )
-    { functor_type::operator()( *member , *result ); }
-
-  KOKKOS_FUNCTION static
-  void apply( root_type * root , void * exec )
-    {
-      TaskBase    * const task   = static_cast< TaskBase * >( root );
-      member_type * const member = reinterpret_cast< member_type * >( exec );
-      result_type * const result = TaskResult< result_type >::ptr( task );
-
-      // Task may be serial or team.
-      // If team then must synchronize before querying if respawn was requested.
-      // If team then only one thread calls destructor.
-
-      const bool only_one_thread =
-#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA)
-        0 == threadIdx.x && 0 == threadIdx.y ;
-#else
-        0 == member->team_rank();
-#endif
-
-      task->apply_functor( member , result );
-
-      member->team_barrier();
-
-      if ( only_one_thread && !(task->requested_respawn()) ) {
-        // Did not respawn, destroy the functor to free memory.
-        static_cast<functor_type*>(task)->~functor_type();
-        // Cannot destroy and deallocate the task until its dependences
-        // have been processed.
-      }
-    }
-
-  // Constructor for runnable task
-  KOKKOS_INLINE_FUNCTION constexpr
-  TaskBase( FunctorType && arg_functor )
-    : root_type() , functor_type( arg_functor ) {}
-
-  KOKKOS_INLINE_FUNCTION
-  ~TaskBase() {}
-};
-
-} /* namespace Impl */
-} /* namespace Kokkos */
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
 #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
 #endif /* #ifndef KOKKOS_IMPL_TASKQUEUE_HPP */
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskQueueCommon.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskQueueCommon.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..b0685506d45b846e69de62721aee1131cb46edfd
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskQueueCommon.hpp
@@ -0,0 +1,569 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_TASKQUEUECOMMON_HPP
+#define KOKKOS_IMPL_TASKQUEUECOMMON_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_MemoryPool.hpp>
+
+#include <impl/Kokkos_TaskNode.hpp>
+#include <impl/Kokkos_TaskResult.hpp>
+
+#include <impl/Kokkos_TaskQueueMemoryManager.hpp>
+#include <impl/Kokkos_Memory_Fence.hpp>
+#include <impl/Kokkos_Atomic_Increment.hpp>
+#include <impl/Kokkos_OptionalRef.hpp>
+#include <impl/Kokkos_LIFO.hpp>
+
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+/// @brief CRTP Base class implementing the ready count parts common to most task queues
+template <class Derived>
+class TaskQueueCommonMixin
+{
+private:
+
+  int32_t m_ready_count = 0;
+
+  // CRTP boilerplate
+  KOKKOS_INLINE_FUNCTION
+  Derived& _self() { return *static_cast<Derived*>(this); }
+
+public:
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Constructors, destructor, and assignment"> {{{2
+
+  TaskQueueCommonMixin()
+    : m_ready_count(0)
+  {
+    // TODO @tasking @memory_order DSH figure out if I need this store to be atomic
+  }
+
+  ~TaskQueueCommonMixin() {
+    KOKKOS_EXPECTS((Kokkos::memory_fence(), m_ready_count < 1));
+    KOKKOS_EXPECTS(m_ready_count == 0);
+  }
+
+  // </editor-fold> end Constructors, destructor, and assignment }}}2
+  //----------------------------------------------------------------------------
+
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Task and queue completion"> {{{2
+
+private:
+
+  // This would be more readable with a lambda, but that comes with
+  // all the baggage associated with a lambda (compilation times, bugs with
+  // nvcc, etc.), so we'll use a simple little helper functor here.
+  template <class TaskQueueTraits, class TeamSchedulerInfo>
+  struct _schedule_waiting_tasks_operation {
+    TaskNode<TaskQueueTraits> const& m_predecessor;
+    Derived& m_queue;
+    TeamSchedulerInfo const& m_info;
+    KOKKOS_INLINE_FUNCTION
+    void operator()(TaskNode<TaskQueueTraits>&& task) const noexcept
+      // requires Same<TaskType, Derived::task_base_type>
+    {
+      using task_scheduling_info_type = typename Derived::task_scheduling_info_type;
+      if(task.is_runnable()) // KOKKOS_LIKELY
+      {
+        // TODO @tasking @optimiazation DSH check this outside of the loop ?
+        if(m_predecessor.is_runnable()) {
+          m_queue.update_scheduling_info_from_completed_predecessor(
+            /* ready_task = */ task.as_runnable_task(),
+            /* predecessor = */ m_predecessor.as_runnable_task()
+          );
+        }
+        else {
+          KOKKOS_ASSERT(m_predecessor.is_aggregate());
+          m_queue.update_scheduling_info_from_completed_predecessor(
+            /* ready_task = */ task.as_runnable_task(),
+            /* predecessor = */ m_predecessor.template as_aggregate<task_scheduling_info_type>()
+          );
+        }
+        m_queue.schedule_runnable(
+          std::move(task).as_runnable_task(),
+          m_info
+        );
+      }
+      else {
+        // The scheduling info update happens inside of schedule_aggregate
+        m_queue.schedule_aggregate(
+          std::move(task).template as_aggregate<task_scheduling_info_type>(),
+          m_info
+        );
+      }
+    }
+  };
+
+protected:
+
+  template <class TaskQueueTraits, class TeamSchedulerInfo>
+  KOKKOS_FUNCTION
+  void _complete_finished_task(
+    TaskNode<TaskQueueTraits>&& task,
+    TeamSchedulerInfo const& info
+  ) {
+    task.consume_wait_queue(
+      _schedule_waiting_tasks_operation<TaskQueueTraits, TeamSchedulerInfo>{
+        task,
+        _self(),
+        info
+      }
+    );
+    bool should_delete = task.decrement_and_check_reference_count();
+    if(should_delete) {
+      _self().deallocate(std::move(task));
+    }
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void _increment_ready_count() {
+    // TODO @tasking @memory_order DSH memory order
+    Kokkos::atomic_increment(&this->m_ready_count);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void _decrement_ready_count() {
+    // TODO @tasking @memory_order DSH memory order
+    Kokkos::atomic_decrement(&this->m_ready_count);
+    Kokkos::memory_fence();
+  }
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  bool is_done() const noexcept {
+    // TODO @tasking @memory_order DSH Memory order, instead of volatile
+    return (*(volatile int*)(&m_ready_count)) == 0;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  int32_t ready_count() const noexcept {
+    // TODO @tasking @memory_order DSH Memory order, instead of volatile
+    return (*(volatile int*)(&m_ready_count));
+  }
+
+  template <class TaskQueueTraits, class TeamSchedulerInfo>
+  KOKKOS_FUNCTION
+  void
+  complete(
+    RunnableTaskBase<TaskQueueTraits>&& task,
+    TeamSchedulerInfo const& info
+  )
+  {
+    if(task.get_respawn_flag()) {
+      _self().schedule_runnable(std::move(task), info);
+    }
+    else {
+      _complete_finished_task(std::move(task), info);
+    }
+    // A runnable task was popped from a ready queue finished executing.
+    // If respawned into a ready queue then the ready count was incremented
+    // so decrement whether respawned or not.  If finished, all of the
+    // tasks waiting on this have been enqueued (either in the ready queue
+    // or the next waiting queue, in the case of an aggregate), and the
+    // ready count has been incremented for each of those, preventing
+    // quiescence.  Thus, it's safe to decrement the ready count here.
+    // TODO @tasking @memory_order DSH memory order? (probably release)
+    _decrement_ready_count();
+  }
+
+  template <class TaskQueueTraits, class SchedulingInfo, class TeamSchedulerInfo>
+  KOKKOS_FUNCTION
+  void
+  complete(
+    AggregateTask<TaskQueueTraits, SchedulingInfo>&& task,
+    TeamSchedulerInfo const& info
+  ) {
+    // TODO @tasking DSH old code has a ifndef __HCC_ACCELERATOR__ here; figure out why
+    _complete_finished_task(std::move(task), info);
+  }
+
+  // </editor-fold> end Task and queue completion }}}2
+  //----------------------------------------------------------------------------
+
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Scheduling"> {{{2
+
+public:
+
+  // This isn't actually generic; the template parameters are just to keep
+  // Derived from having to be complete
+  template <class TaskQueueTraits, class ReadyQueueType, class TeamSchedulerInfo>
+  KOKKOS_INLINE_FUNCTION
+  void
+  schedule_runnable_to_queue(
+    RunnableTaskBase<TaskQueueTraits>&& task,
+    ReadyQueueType& ready_queue,
+    TeamSchedulerInfo const& info
+  )
+  {
+    bool task_is_ready = true;
+    bool scheduling_info_updated = false;
+
+    // do this before enqueueing and potentially losing exclusive access to task
+    bool task_is_respawning = task.get_respawn_flag();
+
+    // clear the respawn flag, since we're handling the respawn (if any) here.
+    // We must make sure this is written through the cache, since the next
+    // thread to access it might be a Cuda thread from a different thread block.
+    ((RunnableTaskBase<TaskQueueTraits> volatile&)task).set_respawn_flag(false);
+
+    if(task.has_predecessor()) {
+      // save the predecessor into a local variable, then clear it from the
+      // task before adding it to the wait queue of the predecessor
+      // (We have exclusive access to the task's predecessor, so we don't need
+      // to do this atomically)
+      // TODO @tasking @internal_documentation DSH document that we expect exclusive access to `task` in this function
+      auto& predecessor = task.get_predecessor();
+      // This needs a load/store fence here, technically
+      // making this a release store would also do this
+      ((RunnableTaskBase<TaskQueueTraits> volatile&)task).clear_predecessor();
+
+      // TODO @tasking @memory_order DSH remove this fence in favor of memory orders
+      Kokkos::memory_fence(); // for now
+
+      // Try to add the task to the predecessor's waiting queue.  If it fails,
+      // the predecessor is already done
+      bool predecessor_not_ready = predecessor.try_add_waiting(task);
+
+      // NOTE: if the predecessor was not ready and the task was enqueued,
+      // we've lost exclusive access and should nt touch task again
+
+      // If the predecessor is not done, then task is not ready
+      task_is_ready = not predecessor_not_ready;
+
+      if(task_is_ready and predecessor.is_runnable()) {
+        // this is our last chance to update the scheduling info before
+        // predecessor is potentially deleted
+        _self().update_scheduling_info_from_completed_predecessor(
+          /* ready_task = */ task,
+          /* predecessor = */ predecessor.as_runnable_task()
+        );
+        scheduling_info_updated = true;
+      }
+
+      if(task_is_respawning) {
+        // Reference count for predecessor was incremented when
+        // respawn called set_dependency()
+        // so that if predecessor completed prior to the
+        // above try_add_waiting(), predecessor would not be destroyed.
+        // predecessor reference count can now be decremented,
+        // which may deallocate it.
+        bool should_delete = predecessor.decrement_and_check_reference_count();
+        if(should_delete) {
+          // TODO @tasking @cleanup DSH better encapsulation of this!
+          _self().deallocate(std::move(predecessor));
+        }
+      }
+      // Note! predecessor may be destroyed at this point, so don't add anything
+      // here
+    }
+
+    if(scheduling_info_updated) {
+      // We need to go back to the queue itself and see if it wants to schedule
+      // somewhere else
+      _self().schedule_runnable(std::move(task), info);
+    }
+    // Put it in the appropriate ready queue if it's ready
+    else if(task_is_ready) {
+      // Increment the ready count
+      _self()._increment_ready_count();
+      // and enqueue the task
+      // (can't move because the task isn't expired unless the push succeeds
+      bool push_success = ready_queue.push(task);
+      if(not push_success) {
+        _self().handle_failed_ready_queue_insertion(
+          std::move(task), ready_queue, info
+        );
+      }
+    }
+
+    // Task may be enqueued and may be run at any point; don't touch it (hence
+    // the use of move semantics)
+  }
+
+  template <class TaskQueueTraits, class ReadyQueueType, class TeamSchedulerInfo>
+  KOKKOS_INLINE_FUNCTION
+  void
+  handle_failed_ready_queue_insertion(
+    RunnableTaskBase<TaskQueueTraits>&& task,
+    ReadyQueueType& ready_queue,
+    TeamSchedulerInfo const& info
+  ) {
+    Kokkos::abort("Unhandled failure of ready task queue insertion!\n");
+  }
+
+  // This isn't actually generic; the template parameters are just to keep
+  // Derived from having to be complete
+  template <class TaskQueueTraits, class SchedulingInfo, class TeamSchedulerInfo>
+  KOKKOS_FUNCTION
+  void
+  schedule_aggregate(
+    AggregateTask<TaskQueueTraits, SchedulingInfo>&& aggregate,
+    TeamSchedulerInfo const& info
+  )
+  {
+    // Because the aggregate is being scheduled, should not be in any queue
+    KOKKOS_EXPECTS(not aggregate.is_enqueued());
+
+    using task_scheduling_info_type = typename Derived::task_scheduling_info_type;
+    using team_scheduler_info_type = typename Derived::team_scheduler_info_type;
+    static_assert(
+      std::is_same<TeamSchedulerInfo, team_scheduler_info_type>::value,
+      "SchedulingInfo type mismatch!"
+    );
+
+    bool incomplete_dependence_found = false;
+
+    for(auto*& predecessor_ptr_ref : aggregate) {
+
+      // if a previous scheduling operation hasn't already set the predecessor
+      // to nullptr, try to enqueue the aggregate into the predecessorendence's waiting
+      // queue
+      if(predecessor_ptr_ref != nullptr) {
+
+        // Swap the pointer onto the stack and set the one in the aggregate VLA
+        // to nullptr before we try to add it to the waiting queue so that some
+        // other thread doesn't also get to here and find the pointer to be
+        // not null (since as soon as we try and schedule the aggregate, we
+        // potentially lose exclusive access to it if that enqueueing operation
+        // succeeds.  The swap doesn't need to happen atomically since we have
+        // exclusive access to aggregate until an insertion succeeds
+        auto* predecessor_ptr = std::move(predecessor_ptr_ref);
+
+        // TODO @tasking @memory_order DSH I think this needs to be a store release so that it doesn't get reordered after the queue insertion
+        predecessor_ptr_ref = nullptr;
+
+        // TODO @tasking @memory_order DSH remove this fence in favor of memory orders
+        Kokkos::memory_fence();
+
+        // If adding the aggregate to the waiting queue succeeds, the predecessor is not
+        // complete
+        bool pred_not_ready = predecessor_ptr->try_add_waiting(aggregate);
+
+        // NOTE! At this point it is unsafe to access aggregate (unless the
+        // enqueueing failed, so we can't use move semantics to expire it)
+
+        // we found an incomplete dependence, so we can't make task's successors
+        // ready yet
+        incomplete_dependence_found = pred_not_ready;
+
+        if(not pred_not_ready) {
+          // A predecessor was done, and we didn't enqueue the aggregate
+          // Update the aggregate's scheduling info (we still have exclusive
+          // access to it here)
+          if(predecessor_ptr->is_runnable()) {
+            _self().update_scheduling_info_from_completed_predecessor(
+              aggregate, predecessor_ptr->as_runnable_task()
+            );
+          }
+          else {
+            KOKKOS_ASSERT(predecessor_ptr->is_aggregate());
+            _self().update_scheduling_info_from_completed_predecessor(
+              aggregate, (*predecessor_ptr).template as_aggregate<task_scheduling_info_type>()
+            );
+          }
+        }
+
+        // the reference count for the predecessor was incremented when we put
+        // it into the predecessor list, so decrement it here
+        bool should_delete = predecessor_ptr->decrement_and_check_reference_count();
+        if(should_delete) {
+          // TODO @tasking @cleanup DSH better encapsulation of this!
+          _self().deallocate(std::move(*predecessor_ptr));
+        }
+
+        // Stop the loop if we found an incomplete dependence
+        if(incomplete_dependence_found) break;
+      }
+    }
+
+    // NOTE: it's not safe to access aggregate any more if an incomplete dependence
+    // was found, because some other thread could have already popped it off
+    // of another waiting queue
+
+    if(not incomplete_dependence_found) {
+      // all of the predecessors were completed, so we can complete `task`
+      _self().complete(std::move(aggregate), info);
+    }
+    // Note!! task may have been deleted at this point, so don't add anything here!
+  }
+
+  // Provide a sensible default that can be overridden
+  template <class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info_from_completed_predecessor(
+    RunnableTaskBase<TaskQueueTraits>& ready_task,
+    RunnableTaskBase<TaskQueueTraits> const& predecessor
+  ) const
+  {
+    // by default, tell a ready task to use the scheduling info of its most
+    // recent predecessor
+    using task_scheduling_info_type = typename Derived::task_scheduling_info_type;
+    ready_task.template scheduling_info_as<task_scheduling_info_type>() =
+      predecessor.template scheduling_info_as<task_scheduling_info_type>();
+  }
+
+  // Provide a sensible default that can be overridden
+  template <class SchedulingInfo, class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info_from_completed_predecessor(
+    AggregateTask<TaskQueueTraits, SchedulingInfo>& aggregate,
+    RunnableTaskBase<TaskQueueTraits> const& predecessor
+  ) const
+  {
+    // by default, tell a ready task to use the scheduling info of its most
+    // recent predecessor
+    using task_scheduling_info_type = typename Derived::task_scheduling_info_type;
+    aggregate.scheduling_info() =
+      predecessor.template scheduling_info_as<task_scheduling_info_type>();
+  }
+
+  // Provide a sensible default that can be overridden
+  template <class SchedulingInfo, class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info_from_completed_predecessor(
+    AggregateTask<TaskQueueTraits, SchedulingInfo>& aggregate,
+    AggregateTask<TaskQueueTraits, SchedulingInfo> const& predecessor
+  ) const
+  {
+    // by default, tell a ready task to use the scheduling info of its most
+    // recent predecessor
+    aggregate.scheduling_info() = predecessor.scheduling_info();
+  }
+
+  // Provide a sensible default that can be overridden
+  template <class SchedulingInfo, class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION
+  void update_scheduling_info_from_completed_predecessor(
+    RunnableTaskBase<TaskQueueTraits>& ready_task,
+    AggregateTask<TaskQueueTraits, SchedulingInfo> const& predecessor
+  ) const
+  {
+    // by default, tell a ready task to use the scheduling info of its most
+    // recent predecessor
+    using task_scheduling_info_type = typename Derived::task_scheduling_info_type;
+    ready_task.template scheduling_info_as<task_scheduling_info_type>() =
+      predecessor.scheduling_info();
+  }
+
+  template <class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION
+  void initialize_scheduling_info_from_predecessor(
+    TaskNode<TaskQueueTraits>& task,
+    TaskNode<TaskQueueTraits>& predecessor
+  ) const
+  {
+    /* do nothing by default */
+  }
+
+  template <class TeamSchedulerInfo, class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION
+  void initialize_scheduling_info_from_team_scheduler_info(
+    TaskNode<TaskQueueTraits>& task,
+    TeamSchedulerInfo const& info
+  ) const
+  {
+    /* do nothing by default */
+  }
+
+  template <
+    class ExecutionSpace,
+    class MemorySpace,
+    class MemoryPool
+  >
+  static /* KOKKOS_CONSTEXPR_14 */ size_t
+  task_queue_allocation_size(
+    ExecutionSpace const&,
+    MemorySpace const&,
+    MemoryPool const&
+  )
+    // requires Same<ExecutionSpace, typename Derived::execution_space>
+    //            && Same<MemorySpace, typename Derived::memory_space>
+    //            && Same<MemoryPool, typename Derived::memory_pool>
+  {
+    static_assert(
+      std::is_same<ExecutionSpace, typename Derived::execution_space>::value
+        && std::is_same<MemorySpace, typename Derived::memory_space>::value
+        && std::is_same<MemoryPool, typename Derived::memory_pool>::value,
+      "Type mismatch in task_queue_allocation_size customization point"
+    );
+
+    return sizeof(Derived);
+  }
+
+  // </editor-fold> end Scheduling }}}2
+  //----------------------------------------------------------------------------
+
+};
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKQUEUECOMMON_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskQueueMemoryManager.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskQueueMemoryManager.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..c3ed1d6c71687cdf9768e4e21d7b6302724cb569
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskQueueMemoryManager.hpp
@@ -0,0 +1,251 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_TASKQUEUEMEMORYMANAGER_HPP
+#define KOKKOS_IMPL_TASKQUEUEMEMORYMANAGER_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_MemoryPool.hpp>
+
+#include <impl/Kokkos_TaskBase.hpp>
+#include <impl/Kokkos_TaskResult.hpp>
+
+#include <impl/Kokkos_Memory_Fence.hpp>
+#include <impl/Kokkos_Atomic_Increment.hpp>
+#include <impl/Kokkos_OptionalRef.hpp>
+#include <impl/Kokkos_LIFO.hpp>
+
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template <
+  class ExecSpace,
+  class MemorySpace,
+  class MemoryPool = Kokkos::MemoryPool<Kokkos::Device<ExecSpace, MemorySpace>>
+>
+class TaskQueueMemoryManager
+  : public TaskQueueBase
+{
+public:
+
+  using execution_space = ExecSpace;
+  using memory_space = MemorySpace;
+  using device_type = Kokkos::Device<execution_space, memory_space>;
+  using memory_pool = MemoryPool;
+  using allocation_size_type = size_t;
+
+private:
+
+  memory_pool m_pool;
+  // TODO @tasking @generalization DSH re-enable this with a flag in the type
+  //long m_accum_alloc = 0;
+  int m_count_alloc = 0;
+  int m_max_alloc = 0;
+
+  struct _allocation_result {
+    bool success;
+    void* pointer;
+  };
+
+  KOKKOS_INLINE_FUNCTION
+  _allocation_result
+  _do_pool_allocate(allocation_size_type requested_size) {
+    // KOKKOS_EXPECTS(requested_size >= 0); generates a warning when allocation_size_type is unsigned
+    if(requested_size == 0 ) {
+      return { true, nullptr };
+    }
+    else {
+      void* data = m_pool.allocate(static_cast<size_t>(requested_size));
+
+      //Kokkos::atomic_increment(&m_accum_alloc); // memory_order_relaxed
+      Kokkos::atomic_increment(&m_count_alloc); // memory_order_relaxed
+      // TODO @tasking @minor DSH make this thread safe? (otherwise, it's just an approximation, which is probably fine...)
+      if(m_max_alloc < m_count_alloc) m_max_alloc = m_count_alloc;
+
+      return { data != nullptr, data };
+    }
+  }
+
+  template <class T, class... Args>
+  KOKKOS_INLINE_FUNCTION
+  T*
+  _do_contruct(void* allocated, allocation_size_type allocated_size, Args&&... args) {
+
+    static_assert(
+      std::is_base_of<PoolAllocatedObjectBase<int32_t>, T>::value,
+      "TaskQueueMemoryManager can only allocate objects with PoolAllocatedObjectBase base class"
+    );
+
+    // TODO @tasking DSH figure out why this isn't working
+    //static_assert(
+    //  std::is_constructible<T, Args..., int32_t>::value,
+    //  "TaskQueueMemoryManager can't construct object of the requested type from the "
+    //  " allocation size and the given arguments"
+    //);
+
+
+    auto rv = new (allocated) T(
+      std::forward<Args>(args)...,
+      allocated_size
+    );
+
+    // It feels like there should be a way to check this at compile-time
+    KOKKOS_ASSERT(
+      (intptr_t)(rv) == (intptr_t)(static_cast<PoolAllocatedObjectBase<int32_t>*>(rv))
+        && "PoolAllocatedObjectBase must be the first base class of the allocated type"
+    );
+
+    return rv;
+
+  }
+
+
+public:
+
+  explicit
+  TaskQueueMemoryManager(memory_pool const& pool)
+    : m_pool(pool)
+  { }
+
+
+  template <class T, class... Args>
+  KOKKOS_FUNCTION
+  T*
+  allocate_and_construct(Args&&... args)
+    // requires
+    //   std::is_base_of_v<PoolAllocatedObjectBase<typename memory_pool::size_type>, T>
+    //     && std::is_constructible_v<T, Args&&..., allocation_size_type>
+  {
+    constexpr auto allocation_size = sizeof(T);
+
+
+    auto result = _do_pool_allocate(allocation_size);
+
+    KOKKOS_ASSERT(result.success && "Memory allocation failure");
+
+    auto rv = _do_contruct<T>(result.pointer, allocation_size, std::forward<Args>(args)...);
+
+    KOKKOS_ENSURES(intptr_t(rv) % alignof(T) == 0 && "alignment not preserved!");
+
+    return rv;
+  }
+
+  template <class T, class VLAValueType, class... Args>
+  KOKKOS_INLINE_FUNCTION
+  T*
+  allocate_and_construct_with_vla_emulation(
+    allocation_size_type n_vla_entries,
+    Args&&... args
+  )
+    // requires
+    //   std::is_base_of_v<PoolAllocatedObjectBase<typename memory_pool::size_type>, T>
+    //     && std::is_base_of<ObjectWithVLAEmulation<T, VLAValueType>, T>::value
+    //     && std::is_constructible_v<T, allocation_size_type, Args&&...>
+  {
+
+
+    static_assert(
+      std::is_base_of<ObjectWithVLAEmulation<T, VLAValueType>, T>::value,
+      "Can't append emulated variable length array of type with greater alignment than"
+      "  the type to which the VLA is being appended"
+    );
+
+    using vla_emulation_base = ObjectWithVLAEmulation<T, VLAValueType>;
+
+    auto const allocation_size = vla_emulation_base::required_allocation_size(n_vla_entries);
+    auto result = _do_pool_allocate(allocation_size);
+
+    KOKKOS_ASSERT(result.success && "Memory allocation failure");
+
+    auto rv = _do_contruct<T>(result.pointer, allocation_size, std::forward<Args>(args)...);
+
+    KOKKOS_ENSURES(intptr_t(rv) % alignof(T) == 0);
+
+    return rv;
+  }
+
+  template <class CountType>
+  KOKKOS_INLINE_FUNCTION
+  void deallocate(PoolAllocatedObjectBase<CountType>&& obj)
+  {
+    m_pool.deallocate((void*)&obj, 1);
+    Kokkos::atomic_decrement(&m_count_alloc); // memory_order_relaxed
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  memory_pool& get_memory_pool() { return m_pool; }
+  KOKKOS_INLINE_FUNCTION
+  memory_pool const& get_memory_pool() const { return m_pool; }
+
+  KOKKOS_INLINE_FUNCTION
+  int allocation_count() const noexcept { return m_count_alloc; }
+};
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+////////////////////////////////////////////////////////////////////////////////
+// END OLD CODE
+////////////////////////////////////////////////////////////////////////////////
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKQUEUEMEMORYMANAGER_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskQueueMultiple.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskQueueMultiple.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..17c357ff31252020c84b801af0b50d7f87bfa81b
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskQueueMultiple.hpp
@@ -0,0 +1,286 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_TASKQUEUEMULTIPLE_HPP
+#define KOKKOS_IMPL_TASKQUEUEMULTIPLE_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
+
+#include <Kokkos_MemoryPool.hpp>
+
+#include <impl/Kokkos_TaskBase.hpp>
+#include <impl/Kokkos_TaskResult.hpp>
+#include <impl/Kokkos_TaskQueue.hpp>
+
+#include <impl/Kokkos_Memory_Fence.hpp>
+#include <impl/Kokkos_Atomic_Increment.hpp>
+#include <impl/Kokkos_Atomic_Decrement.hpp>
+
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
+#include <cassert>
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template< typename ExecSpace, typename MemorySpace = typename ExecSpace::memory_space >
+class LeagueQueueCollection;
+
+template <class ExecSpace, class MemorySpace>
+class TaskQueueMultiple : public TaskQueue<ExecSpace, MemorySpace> {
+private:
+
+  using base_t = TaskQueue<ExecSpace, MemorySpace>;
+  using queue_collection_t = LeagueQueueCollection<ExecSpace, MemorySpace>;
+
+  int m_league_rank = static_cast<int>(KOKKOS_INVALID_INDEX);
+
+  // This pointer is owning only if m_league_rank == 0
+  queue_collection_t* m_other_queues = nullptr;
+
+
+public:
+
+  struct Destroy {
+    TaskQueueMultiple* m_queue ;
+    void destroy_shared_allocation();
+  };
+
+
+  using team_queue_type = TaskQueueMultiple;
+
+  TaskQueueMultiple(
+    int arg_league_rank,
+    queue_collection_t* arg_other_queues,
+    typename base_t::memory_pool const& arg_memory_pool
+  )
+    : base_t(arg_memory_pool),
+      m_league_rank(arg_league_rank),
+      m_other_queues(arg_other_queues)
+  { }
+
+  explicit TaskQueueMultiple(
+    typename base_t::memory_pool const& arg_memory_pool
+  )
+    : base_t(arg_memory_pool),
+      m_league_rank(0)
+  {
+    void* other_queues_buffer = typename base_t::memory_space{}.allocate(sizeof(queue_collection_t));
+    m_other_queues = new(other_queues_buffer) queue_collection_t(this);
+  }
+
+  ~TaskQueueMultiple() {
+    if(m_league_rank == 0 && m_other_queues != nullptr) {
+      m_other_queues->~queue_collection_t();
+      typename base_t::memory_space{}.deallocate(m_other_queues, sizeof(queue_collection_t));
+    }
+    // rest of destruction is handled in the base class
+  }
+
+  //----------------------------------------
+
+  void initialize_team_queues(int arg_league_size) const noexcept {
+    m_other_queues->initialize_team_queues(arg_league_size, this->m_memory);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  team_queue_type& get_team_queue(int arg_league_rank) noexcept {
+    if(arg_league_rank == m_league_rank) return *this;
+    else return m_other_queues->get_team_queue(arg_league_rank);
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  typename base_t::task_root_type*
+  attempt_to_steal_task() noexcept {
+    TaskBase* rv = nullptr;
+    auto* const end_tag = reinterpret_cast<TaskBase*>(TaskBase::EndTag);
+
+    if (m_other_queues == nullptr) {
+      Kokkos::abort("attempted to steal task before queues were initialized!");
+    }
+
+    // Loop by priority and then type, and then team
+    for ( int i = 0 ; i < base_t::NumQueue; ++i ) {
+      for ( int j = 0 ; j < 2; ++j ) {
+        // for now, always start by trying to steal from team zero
+        for(int iteam = 0; iteam < m_other_queues->size(); ++iteam) {
+          if(iteam == m_league_rank) continue;
+          auto& steal_from = get_team_queue(iteam);
+          if( *((volatile int *) & steal_from.m_ready_count) > 0 ) {
+            // we've found at least one queue that's not done, so even if we can't
+            // pop something off of it we shouldn't return a nullptr indicating
+            // completion.  rv will be end_tag when the pop fails
+            rv = base_t::pop_ready_task(&steal_from.m_ready[i][j]);
+            if(rv != end_tag) {
+              // task stolen.
+              // first increment our ready count, then decrement the ready count
+              // on the other queue:
+              Kokkos::atomic_increment(&this->m_ready_count);
+              Kokkos::atomic_decrement(&steal_from.m_ready_count);
+              return rv;
+            }
+          }
+        }
+      }
+    }
+
+    // at this point, rv will only be nullptr if *all* of the queues had an
+    // m_ready_count of 0.  This indicates quiescence.  If at least some of them
+    // had non-zero, there would have been at least one pop_ready_task that
+    // was called and returned end_tag if it couldn't pop a task
+    return rv;
+  }
+
+
+};
+
+template<typename ExecSpace, typename MemorySpace>
+class LeagueQueueCollection {
+private:
+
+  using execution_space = ExecSpace;
+  using memory_space = MemorySpace;
+  using device_type = Kokkos::Device<execution_space, memory_space>;
+  using memory_pool = Kokkos::MemoryPool<device_type>;
+  using team_queue_type = TaskQueueMultiple<execution_space, memory_space>;
+  using team_scheduler_type = BasicTaskScheduler<ExecSpace, team_queue_type>;
+  using specialization = TaskQueueSpecialization<team_scheduler_type>;
+
+  enum : long { max_num_queues = 6 }; //specialization::max_league_size };
+
+  // this is a non-owning pointer
+  team_queue_type* m_rank_zero_queue = nullptr;
+  // This really needs to be an optional<TaskQueue<ExecSpace>>
+  union optional_queue {
+    KOKKOS_INLINE_FUNCTION
+    optional_queue() : uninitialized(0) { }
+    KOKKOS_INLINE_FUNCTION
+    ~optional_queue() { uninitialized = 0; }
+    char uninitialized;
+    team_queue_type initialized;
+  } m_queues[max_num_queues];
+  int m_size = static_cast<int>(KOKKOS_INVALID_INDEX);
+
+public:
+
+  LeagueQueueCollection() = delete;
+  LeagueQueueCollection(LeagueQueueCollection const&) = delete;
+  LeagueQueueCollection(LeagueQueueCollection&&) = delete;
+  LeagueQueueCollection& operator=(LeagueQueueCollection const&) = delete;
+  LeagueQueueCollection& operator=(LeagueQueueCollection&&) = delete;
+
+  ~LeagueQueueCollection() {
+    // destroy only the initialized queues that we own
+    for(int iteam = 0; iteam < m_size - 1; ++iteam) {
+      m_queues[iteam].initialized.~team_queue_type();
+      m_queues[iteam].uninitialized = 0;
+    }
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  explicit LeagueQueueCollection(
+    team_queue_type* arg_rank_zero_queue
+  ) : m_rank_zero_queue(arg_rank_zero_queue),
+      m_size(1)
+  { }
+
+  void initialize_team_queues(
+    int arg_count, memory_pool const& arg_memory_pool
+  ) noexcept
+  {
+    arg_count = std::min((int)max_num_queues, arg_count);
+    //assert(arg_count <= max_num_queues);
+    if(arg_count > m_size) {
+      for(int i = m_size; i < arg_count; ++i) {
+        new(&m_queues[i-1].initialized) team_queue_type(i, this, arg_memory_pool);
+      }
+      m_size = arg_count;
+    }
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr int size() const noexcept { return m_size; }
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr bool initialized() const noexcept { return m_size != int(KOKKOS_INVALID_INDEX); }
+
+  KOKKOS_INLINE_FUNCTION
+  team_queue_type& get_team_queue(int iteam) {
+    iteam %= max_num_queues;
+    #if !defined(__HCC_ACCELERATOR__) && !defined(__CUDA_ARCH__)
+    assert(initialized());
+    assert(iteam < m_size);
+    assert(iteam >= 0);
+    #endif
+    if(iteam == 0) return *m_rank_zero_queue;
+    else return m_queues[iteam-1].initialized;
+  }
+
+};
+
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#include <impl/Kokkos_TaskQueueMultiple_impl.hpp>
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKQUEUEMULTIPLE_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskQueueMultiple_impl.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskQueueMultiple_impl.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..81bcc968315ca00e22a1e41f857d3160621ba168
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskQueueMultiple_impl.hpp
@@ -0,0 +1,72 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_TASKQUEUEMULTIPLE_IMPL_HPP
+#define KOKKOS_IMPL_TASKQUEUEMULTIPLE_IMPL_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <impl/Kokkos_TaskQueueMultiple.hpp>
+
+#define KOKKOS_IMPL_DEBUG_TASKDAG_SCHEDULING_MULTIPLE 0
+
+namespace Kokkos {
+namespace Impl {
+
+template <class ExecSpace, class MemorySpace>
+void TaskQueueMultiple<ExecSpace, MemorySpace>::Destroy::destroy_shared_allocation() {
+// KOKKOS WORKAROUND for CUDA 10.1 with GCC 7.3.0
+#if(KOKKOS_COMPILER_CUDA_VERSION==101) && defined(KOKKOS_COMPILER_NVCC) && (KOKKOS_COMPILER_GNU>=730)
+  (*m_queue).get_team_queue(0).~TaskQueueMultiple();
+#else
+  m_queue->get_team_queue(0).~TaskQueueMultiple();
+#endif
+}
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKQUEUEMULTIPLE_IMPL_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskQueue_impl.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskQueue_impl.hpp
index 5bcf672ff638ded5179528bc7473e5ab96ecd636..b5f8db0085874a0b3de033e0379fa7cea02420f5 100644
--- a/packages/kokkos/core/src/impl/Kokkos_TaskQueue_impl.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskQueue_impl.hpp
@@ -41,6 +41,8 @@
 //@HEADER
 */
 
+#ifndef KOKKOS_IMPL_TASKQUEUE_IMPL_HPP
+#define KOKKOS_IMPL_TASKQUEUE_IMPL_HPP
 #include <Kokkos_Macros.hpp>
 #if defined( KOKKOS_ENABLE_TASKDAG )
 
@@ -51,22 +53,22 @@ namespace Impl {
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
-void TaskQueue< ExecSpace >::Destroy::destroy_shared_allocation()
+template< typename ExecSpace, typename MemorySpace >
+void TaskQueue< ExecSpace, MemorySpace >::Destroy::destroy_shared_allocation()
 {
   m_queue->~TaskQueue();
 }
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
-TaskQueue< ExecSpace >::TaskQueue
-  ( typename TaskQueue< ExecSpace >::memory_pool const & arg_memory_pool )
+template< typename ExecSpace, typename MemorySpace>
+TaskQueue< ExecSpace, MemorySpace>::TaskQueue
+  ( typename TaskQueue< ExecSpace, MemorySpace>::memory_pool const & arg_memory_pool )
   : m_memory( arg_memory_pool )
   , m_ready()
-  , m_accum_alloc(0)
-  , m_count_alloc(0)
-  , m_max_alloc(0)
+  //, m_accum_alloc(0)
+  //, m_count_alloc(0)
+  //, m_max_alloc(0)
   , m_ready_count(0)
 {
   for ( int i = 0 ; i < NumQueue ; ++i ) {
@@ -77,8 +79,8 @@ TaskQueue< ExecSpace >::TaskQueue
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
-TaskQueue< ExecSpace >::~TaskQueue()
+template< typename ExecSpace, typename MemorySpace>
+TaskQueue< ExecSpace, MemorySpace>::~TaskQueue()
 {
   // Verify that queues are empty and ready count is zero
 
@@ -97,10 +99,10 @@ TaskQueue< ExecSpace >::~TaskQueue()
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-void TaskQueue< ExecSpace >::decrement
-  ( TaskQueue< ExecSpace >::task_root_type * task )
+void TaskQueue< ExecSpace, MemorySpace>::decrement
+  ( TaskQueue< ExecSpace, MemorySpace>::task_root_type * task )
 {
   task_root_type volatile & t = *task ;
 
@@ -121,8 +123,13 @@ void TaskQueue< ExecSpace >::decrement
        ( t.m_next == (task_root_type *) task_root_type::LockTag ) ) {
     // Reference count is zero and task is complete, deallocate.
 
-    TaskQueue< ExecSpace > * const queue =
-      static_cast< TaskQueue< ExecSpace > * >( t.m_queue );
+    //TaskQueue< ExecSpace, MemorySpace> * const queue =
+    //  static_cast<scheduler_type const *>( t.m_scheduler )->m_queue;
+    auto* const volatile queue = static_cast<TaskQueue*>(t.m_queue);
+
+    // TODO @tasking @minor DSH this should call the destructor for a non-trivially destructible type (possibly just ignore this in the old version, though?)
+    // (Can't just do this; it needs to be queued since it's device code
+    // if(task->m_destroy) task->m_destroy(task);
 
     queue->deallocate( task , t.m_alloc_size );
   }
@@ -133,32 +140,32 @@ void TaskQueue< ExecSpace >::decrement
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-size_t TaskQueue< ExecSpace >::allocate_block_size( size_t n )
+size_t TaskQueue< ExecSpace, MemorySpace>::allocate_block_size( size_t n )
 {
   return m_memory.allocate_block_size( n );
 }
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-void * TaskQueue< ExecSpace >::allocate( size_t n )
+void * TaskQueue< ExecSpace, MemorySpace>::allocate( size_t n )
 {
   void * const p = m_memory.allocate(n);
 
   if ( p ) {
-    Kokkos::atomic_increment( & m_accum_alloc );
+    //Kokkos::atomic_increment( & m_accum_alloc );
     Kokkos::atomic_increment( & m_count_alloc );
 
-    if ( m_max_alloc < m_count_alloc ) m_max_alloc = m_count_alloc ;
+    //if ( m_max_alloc < m_count_alloc ) m_max_alloc = m_count_alloc ;
   }
 
   return p ;
 }
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-void TaskQueue< ExecSpace >::deallocate( void * p , size_t n )
+void TaskQueue< ExecSpace, MemorySpace>::deallocate( void * p , size_t n )
 {
   m_memory.deallocate( p , n );
   Kokkos::atomic_decrement( & m_count_alloc );
@@ -166,11 +173,11 @@ void TaskQueue< ExecSpace >::deallocate( void * p , size_t n )
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-bool TaskQueue< ExecSpace >::push_task
-  ( TaskQueue< ExecSpace >::task_root_type * volatile * const queue
-  , TaskQueue< ExecSpace >::task_root_type * const task
+bool TaskQueue< ExecSpace, MemorySpace>::push_task
+  ( TaskQueue< ExecSpace, MemorySpace>::task_root_type * volatile * const queue
+  , TaskQueue< ExecSpace, MemorySpace>::task_root_type * const task
   )
 {
   // Push task into a concurrently pushed and popped queue.
@@ -200,20 +207,29 @@ bool TaskQueue< ExecSpace >::push_task
     Kokkos::abort("TaskQueue::push_task ERROR: already a member of another queue" );
   }
 
-  task_root_type * y = *queue ;
+  // store the head of the queue
+  task_root_type * old_head = *queue ;
 
-  while ( lock != y ) {
+  while ( old_head != lock ) {
 
-    next = y ;
+    // set task->next to the head of the queue
+    next = old_head;
 
     // Do not proceed until 'next' has been stored.
     Kokkos::memory_fence();
 
-    task_root_type * const x = y ;
+    // store the old head
+    task_root_type * const old_head_tmp = old_head;
 
-    y = Kokkos::atomic_compare_exchange(queue,y,task);
+    // attempt to swap task with the old head of the queue
+    // as if this were done atomically:
+    //   if(*queue == old_head) {
+    //     *queue = task;
+    //   }
+    //   old_head = *queue;
+    old_head = Kokkos::atomic_compare_exchange(queue, old_head, task);
 
-    if ( x == y ) return true ;
+    if(old_head_tmp == old_head) return true;
   }
 
   // Failed, replace 'task->m_next' value since 'task' remains
@@ -229,11 +245,11 @@ bool TaskQueue< ExecSpace >::push_task
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-typename TaskQueue< ExecSpace >::task_root_type *
-TaskQueue< ExecSpace >::pop_ready_task
-  ( TaskQueue< ExecSpace >::task_root_type * volatile * const queue )
+typename TaskQueue< ExecSpace, MemorySpace>::task_root_type *
+TaskQueue< ExecSpace, MemorySpace>::pop_ready_task
+  ( TaskQueue< ExecSpace, MemorySpace>::task_root_type * volatile * const queue )
 {
   // Pop task from a concurrently pushed and popped ready task queue.
   // The queue is a linked list where 'task->m_next' form the links.
@@ -280,6 +296,10 @@ TaskQueue< ExecSpace >::pop_ready_task
 
       task_root_type * volatile & next = task->m_next ;
 
+      // This algorithm is not lockfree because a adversarial scheduler could
+      // context switch this thread at this point and the rest of the threads
+      // calling this method would never make forward progress
+
       *queue = next ; next = lock ;
 
       Kokkos::memory_fence();
@@ -304,10 +324,10 @@ TaskQueue< ExecSpace >::pop_ready_task
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-void TaskQueue< ExecSpace >::schedule_runnable
-  ( TaskQueue< ExecSpace >::task_root_type * const task )
+void TaskQueue< ExecSpace, MemorySpace>::schedule_runnable
+  ( TaskQueue< ExecSpace, MemorySpace>::task_root_type * const task )
 {
   // Schedule a runnable task upon construction / spawn
   // and upon completion of other tasks that 'task' is waiting on.
@@ -389,6 +409,8 @@ void TaskQueue< ExecSpace >::schedule_runnable
 
   Kokkos::memory_fence();
 
+  // If we don't have a dependency, or if pushing onto the wait queue of that dependency
+  // failed (since the only time that queue should be locked is when the task is transitioning to complete??!?)
   const bool is_ready =
     ( 0 == dep ) || ( ! push_task( & dep->m_wait , task ) );
 
@@ -431,10 +453,10 @@ void TaskQueue< ExecSpace >::schedule_runnable
   //   from a queue and processed it as appropriate.
 }
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-void TaskQueue< ExecSpace >::schedule_aggregate
-  ( TaskQueue< ExecSpace >::task_root_type * const task )
+void TaskQueue< ExecSpace, MemorySpace>::schedule_aggregate
+  ( TaskQueue< ExecSpace, MemorySpace>::task_root_type * const task )
 {
   // Schedule an aggregate task upon construction
   // and upon completion of other tasks that 'task' is waiting on.
@@ -556,9 +578,9 @@ void TaskQueue< ExecSpace >::schedule_aggregate
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-void TaskQueue< ExecSpace >::reschedule( task_root_type * task )
+void TaskQueue< ExecSpace, MemorySpace>::reschedule( task_root_type * task )
 {
   // Precondition:
   //   task is in Executing state
@@ -578,10 +600,10 @@ void TaskQueue< ExecSpace >::reschedule( task_root_type * task )
 
 //----------------------------------------------------------------------------
 
-template< typename ExecSpace >
+template< typename ExecSpace, typename MemorySpace>
 KOKKOS_FUNCTION
-void TaskQueue< ExecSpace >::complete
-  ( TaskQueue< ExecSpace >::task_root_type * task )
+void TaskQueue< ExecSpace, MemorySpace>::complete
+  ( TaskQueue< ExecSpace, MemorySpace>::task_root_type * task )
 {
   // Complete a runnable task that has finished executing
   // or a when_all task when all of its dependeneces are complete.
@@ -679,4 +701,5 @@ void TaskQueue< ExecSpace >::complete
 } /* namespace Kokkos */
 
 #endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKQUEUE_IMPL_HPP */
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskResult.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskResult.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..d45ebff00b07d390d16292b87fa62f559771e11b
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskResult.hpp
@@ -0,0 +1,151 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// Experimental unified task-data parallel manycore LDRD
+
+#ifndef KOKKOS_IMPL_TASKRESULT_HPP
+#define KOKKOS_IMPL_TASKRESULT_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_TaskScheduler_fwd.hpp>
+#include <Kokkos_Core_fwd.hpp>
+
+#include <impl/Kokkos_TaskBase.hpp>
+#include <impl/Kokkos_TaskNode.hpp>
+
+#include <string>
+#include <typeinfo>
+#include <stdexcept>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template< typename ResultType >
+struct TaskResult {
+
+  enum : int32_t { size = sizeof(ResultType) };
+
+  using reference_type = ResultType & ;
+
+  template <class CountType>
+  KOKKOS_INLINE_FUNCTION static
+  ResultType * ptr( PoolAllocatedObjectBase<CountType>* task )
+  {
+    return reinterpret_cast< ResultType * >
+    ( reinterpret_cast< char * >(task) + task->get_allocation_size() - sizeof(ResultType) );
+  }
+
+  KOKKOS_INLINE_FUNCTION static
+  ResultType * ptr( TaskBase* task )
+    {
+      return reinterpret_cast< ResultType * >
+        ( reinterpret_cast< char * >(task) + task->m_alloc_size - sizeof(ResultType) );
+    }
+
+  KOKKOS_INLINE_FUNCTION static
+  reference_type get( TaskBase* task )
+    { return *ptr( task ); }
+
+  template <class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION static
+  reference_type get( TaskNode<TaskQueueTraits>* task )
+  { return *ptr( task ); }
+
+  KOKKOS_INLINE_FUNCTION static
+  void destroy( TaskBase* task )
+    { get(task).~ResultType(); }
+
+
+  //template <class TaskQueueTraits>
+  //KOKKOS_INLINE_FUNCTION static
+  //void destroy( TaskNode<TaskQueueTraits>* task )
+  //{ get(task).~ResultType(); }
+};
+
+template<>
+struct TaskResult< void > {
+
+  enum : int32_t { size = 0 };
+
+  using reference_type = void ;
+
+  template <class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION static
+  void* ptr( TaskNode<TaskQueueTraits>* task )
+  { return nullptr; }
+
+  KOKKOS_INLINE_FUNCTION static
+  void * ptr( TaskBase* ) { return (void*) nullptr ; }
+
+  template <class TaskQueueTraits>
+  KOKKOS_INLINE_FUNCTION static
+  reference_type get( TaskNode<TaskQueueTraits>* task )
+  { /* Should never be called */ }
+
+  KOKKOS_INLINE_FUNCTION static
+  reference_type get( TaskBase* ) {}
+
+  KOKKOS_INLINE_FUNCTION static
+  void destroy( TaskBase* task )
+    { }
+
+  //template <class TaskQueueTraits>
+  //KOKKOS_INLINE_FUNCTION static
+  //void destroy( TaskNode<TaskQueueTraits>* task )
+  //{ }
+};
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_TASKRESULT_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_TaskTeamMember.hpp b/packages/kokkos/core/src/impl/Kokkos_TaskTeamMember.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..4bf3f4fa94d366541af3cbeab399249116c62562
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_TaskTeamMember.hpp
@@ -0,0 +1,135 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_TASKTEAMMEMBER_HPP
+#define KOKKOS_TASKTEAMMEMBER_HPP
+
+//----------------------------------------------------------------------------
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+#include <Kokkos_Core_fwd.hpp>
+#include <Kokkos_TaskScheduler_fwd.hpp>
+//----------------------------------------------------------------------------
+
+#include <Kokkos_MemoryPool.hpp>
+#include <impl/Kokkos_Tags.hpp>
+
+#include <Kokkos_Future.hpp>
+#include <impl/Kokkos_TaskQueue.hpp>
+#include <impl/Kokkos_SingleTaskQueue.hpp>
+#include <impl/Kokkos_TaskQueueMultiple.hpp>
+#include <impl/Kokkos_TaskPolicyData.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template <class TeamMember, class Scheduler>
+class TaskTeamMemberAdapter : public TeamMember {
+private:
+
+  Scheduler m_scheduler;
+
+public:
+
+  //----------------------------------------
+
+  // Forward everything but the Scheduler to the constructor of the TeamMember
+  // type that we're adapting
+  template <typename... Args>
+  KOKKOS_INLINE_FUNCTION
+  explicit TaskTeamMemberAdapter(
+    typename std::enable_if<
+      std::is_constructible<TeamMember, Args...>::value,
+      Scheduler
+    >::type arg_scheduler,
+    Args&&... args
+  ) // TODO @tasking @minor DSH noexcept specification
+    : TeamMember(std::forward<Args>(args)...),
+      m_scheduler(std::move(arg_scheduler).get_team_scheduler(this->league_rank()))
+  { }
+
+  // (rule of 6 constructors)
+
+  KOKKOS_INLINE_FUNCTION
+  TaskTeamMemberAdapter() = default;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskTeamMemberAdapter(TaskTeamMemberAdapter const&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskTeamMemberAdapter(TaskTeamMemberAdapter&&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskTeamMemberAdapter& operator=(TaskTeamMemberAdapter const&) = default;
+
+  KOKKOS_INLINE_FUNCTION
+  TaskTeamMemberAdapter& operator=(TaskTeamMemberAdapter&&) = default;
+
+  KOKKOS_INLINE_FUNCTION ~TaskTeamMemberAdapter() = default;
+
+  //----------------------------------------
+
+  KOKKOS_INLINE_FUNCTION
+  Scheduler const& scheduler() const noexcept { return m_scheduler; }
+
+  KOKKOS_INLINE_FUNCTION
+  Scheduler& scheduler() noexcept { return m_scheduler; }
+
+  //----------------------------------------
+
+};
+
+} // end namespace Impl
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_TASKTEAMMEMBER_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_Traits.hpp b/packages/kokkos/core/src/impl/Kokkos_Traits.hpp
index 475a696719a962d571899077ef49dcdef8001809..a5af82838ff2770b8faefa15cb335e4c5649dc8d 100644
--- a/packages/kokkos/core/src/impl/Kokkos_Traits.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_Traits.hpp
@@ -483,6 +483,54 @@ struct is_integral_constant< integral_constant<T,v> > : public true_
   enum { integral_value = v };
 };
 
+//----------------------------------------------------------------------------
+
+template <class...>
+class TypeList;
+
+//----------------------------------------------------------------------------
+
+template <class>
+struct ReverseTypeList;
+
+template <class Head, class... Tail>
+struct ReverseTypeList<TypeList<Head, Tail...>> {
+  template <class... ReversedTail>
+  struct impl {
+    using type = typename ReverseTypeList<TypeList<Tail...>>::template impl<Head, ReversedTail...>::type;
+  };
+  using type = typename impl<>::type;
+};
+
+template <>
+struct ReverseTypeList<TypeList<>> {
+  template <class... ReversedTail>
+  struct impl {
+    using type = TypeList<ReversedTail...>;
+  };
+  using type = TypeList<>;
+};
+
+//----------------------------------------------------------------------------
+
+template <class T>
+struct make_all_extents_into_pointers
+{
+  using type = T;
+};
+
+template <class T, unsigned N>
+struct make_all_extents_into_pointers<T[N]>
+{
+  using type = typename make_all_extents_into_pointers<T>::type*;
+};
+
+template <class T>
+struct make_all_extents_into_pointers<T*>
+{
+  using type = typename make_all_extents_into_pointers<T>::type*;
+};
+
 } // namespace Impl
 } // namespace Kokkos
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_VLAEmulation.hpp b/packages/kokkos/core/src/impl/Kokkos_VLAEmulation.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..48e1851e60f382d93e6e69424b68b7e754350cd7
--- /dev/null
+++ b/packages/kokkos/core/src/impl/Kokkos_VLAEmulation.hpp
@@ -0,0 +1,295 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_IMPL_VLAEMULATION_HPP
+#define KOKKOS_IMPL_VLAEMULATION_HPP
+
+#include <Kokkos_Macros.hpp>
+#if defined( KOKKOS_ENABLE_TASKDAG )
+
+
+#include <Kokkos_Core_fwd.hpp>
+
+#include <impl/Kokkos_Error.hpp> // KOKKOS_EXPECTS
+
+#include <type_traits> // std::is_abstract<>, ...
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template <
+  class Derived,
+  class VLAValueType,
+  class EntryCountType = int32_t
+>
+struct ObjectWithVLAEmulation;
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+/** @brief Attorney to enable private CRTP inheritance from ObjectWithVLAEmulation
+ */
+struct VLAEmulationAccess {
+private:
+
+  template <class, class, class>
+  friend struct ObjectWithVLAEmulation;
+
+  template <class Derived, class VLAValueType, class EntryCountType>
+  KOKKOS_FORCEINLINE_FUNCTION
+  static constexpr Derived*
+  _cast_to_derived(ObjectWithVLAEmulation<Derived, VLAValueType, EntryCountType>* base) noexcept
+  {
+    return static_cast<Derived*>(base);
+  }
+
+  template <class Derived, class VLAValueType, class EntryCountType>
+  KOKKOS_FORCEINLINE_FUNCTION
+  static constexpr Derived const*
+  _cast_to_derived(ObjectWithVLAEmulation<Derived, VLAValueType, EntryCountType> const* base) noexcept
+  {
+    return static_cast<Derived const*>(base);
+  }
+
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+/** \brief A CRTP base class for a type that includes a variable-length array by allocation
+ *
+ *  The storage for the derived type must be allocated manually and the objects
+ *  (both derived type and VLA objects) must be constructed with placement new.
+ *  Obviously, this can't be done for objects on the stack.
+ *
+ *  Note: Though most uses of this currently delete the copy and move constructor
+ *  in the `Derived` type, this type is intended to have value semantics.
+ *
+ *  \todo @documentation elaborate on implications of value semantics for this class template
+ *
+ */
+template <
+  class Derived,
+  class VLAValueType,
+  class EntryCountType /* = int32_t */
+>
+struct ObjectWithVLAEmulation {
+public:
+
+  using object_type = Derived;
+  using vla_value_type = VLAValueType;
+  using vla_entry_count_type = EntryCountType;
+
+  using iterator = VLAValueType*;
+  using const_iterator = typename std::add_const<VLAValueType>::type*;
+
+
+  // TODO @tasking @minor DSH require that Derived be marked final? (note that std::is_final is C++14)
+  // TODO @tasking @minor DSH delete non-placement operator new for Derived type?
+
+private:
+
+  vla_entry_count_type m_num_entries;
+
+  // CRTP boilerplate
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  /* KOKKOS_CONSTEXPR_14 */
+  Derived* _this() noexcept { return VLAEmulationAccess::_cast_to_derived(this); }
+
+  KOKKOS_FORCEINLINE_FUNCTION
+  /* KOKKOS_CONSTEXPR_14 */
+  Derived const* _this() const noexcept { return VLAEmulationAccess::_cast_to_derived(this); }
+
+  // Note: can't be constexpr because of reinterpret_cast
+  KOKKOS_FORCEINLINE_FUNCTION
+  /* KOKKOS_CONSTEXPR_14 */
+  vla_value_type* _vla_pointer() noexcept {
+    // The data starts right after the aligned storage of Derived
+    return reinterpret_cast<vla_value_type*>(_this() + 1);
+  }
+
+  // Note: can't be constexpr because of reinterpret_cast
+  KOKKOS_FORCEINLINE_FUNCTION
+  /* KOKKOS_CONSTEXPR_14 */
+  vla_value_type const* _vla_pointer() const noexcept {
+    // The data starts right after the aligned storage of Derived
+    return reinterpret_cast<vla_value_type const*>(_this() + 1);
+  }
+
+public:
+
+  KOKKOS_INLINE_FUNCTION
+  static /* KOKKOS_CONSTEXPR_14 */ size_t
+  required_allocation_size(vla_entry_count_type num_vla_entries) {
+    KOKKOS_EXPECTS(num_vla_entries >= 0);
+    return sizeof(Derived) + num_vla_entries * sizeof(VLAValueType);
+  }
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Constructors, destructor, and assignment"> {{{2
+
+  // TODO @tasking @optimization DSH specialization for trivially constructible VLAValueType?
+  // TODO @tasking @minor DSH SFINAE-out this constructor for non-default contructible vla_value_types
+  KOKKOS_INLINE_FUNCTION
+  explicit
+  ObjectWithVLAEmulation(vla_entry_count_type num_entries)
+    noexcept(noexcept(vla_value_type()))
+    : m_num_entries(num_entries)
+  {
+    // Note: We can't do this at class scope because it unnecessarily requires
+    // object_type to be a complete type
+    static_assert(
+      alignof(object_type) >= alignof(vla_value_type),
+      "Can't append emulated variable length array of type with greater alignment than"
+      "  the type to which the VLA is being appended"
+    );
+
+    // Note: We can't do this at class scope because it unnecessarily requires
+    // vla_value_type to be a complete type
+    static_assert(
+      not std::is_abstract<vla_value_type>::value,
+      "Can't use abstract type with VLA emulation"
+    );
+
+    KOKKOS_EXPECTS(num_entries >= 0);
+    for(vla_entry_count_type i = 0; i < m_num_entries; ++i) {
+      new (_vla_pointer() + i) vla_value_type();
+    }
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  ~ObjectWithVLAEmulation()
+    noexcept(noexcept(std::declval<vla_value_type>().~vla_value_type()))
+  {
+    for(auto&& value : *this) { value.~vla_value_type(); }
+  }
+
+  // TODO @tasking @new_feature DSH constrained analogs for move and copy ctors and assignment ops
+  // TODO @tasking @new_feature DSH forwarding in_place constructor
+  // TODO @tasking @new_feature DSH initializer_list constructor?
+
+  // </editor-fold> end Constructors, destructor, and assignment }}}2
+  //----------------------------------------------------------------------------
+
+
+  KOKKOS_INLINE_FUNCTION
+  constexpr EntryCountType n_vla_entries() const noexcept { return m_num_entries; }
+
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Accessing the object and the VLA values"> {{{2
+
+  KOKKOS_INLINE_FUNCTION
+  object_type& object() & { return static_cast<Derived&>(*this); }
+
+  KOKKOS_INLINE_FUNCTION
+  object_type const& object() const & { return static_cast<Derived const&>(*this); }
+
+  KOKKOS_INLINE_FUNCTION
+  object_type&& object() && { return static_cast<Derived&&>(*this); }
+
+
+  KOKKOS_INLINE_FUNCTION
+  vla_value_type& vla_value_at(vla_entry_count_type n) &
+  {
+    KOKKOS_EXPECTS(n < n_vla_entries());
+    return _vla_pointer()[n];
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  vla_value_type const& vla_value_at(vla_entry_count_type n) const &
+  {
+    KOKKOS_EXPECTS(n < n_vla_entries());
+    return _vla_pointer()[n];
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  vla_value_type& vla_value_at(vla_entry_count_type n) &&
+  {
+    KOKKOS_EXPECTS(n < n_vla_entries());
+    return _vla_pointer()[n];
+  }
+
+  // </editor-fold> end Accessing the object and the VLA values }}}2
+  //----------------------------------------------------------------------------
+
+
+  //----------------------------------------------------------------------------
+  // <editor-fold desc="Iterators"> {{{2
+
+  KOKKOS_INLINE_FUNCTION
+  iterator begin() noexcept { return _vla_pointer(); }
+
+  KOKKOS_INLINE_FUNCTION
+  const_iterator begin() const noexcept { return _vla_pointer(); }
+
+  KOKKOS_INLINE_FUNCTION
+  const_iterator cbegin() noexcept { return _vla_pointer(); }
+
+  KOKKOS_INLINE_FUNCTION
+  iterator end() noexcept { return _vla_pointer() + m_num_entries; }
+
+  KOKKOS_INLINE_FUNCTION
+  const_iterator end() const noexcept { return _vla_pointer() + m_num_entries; }
+
+  KOKKOS_INLINE_FUNCTION
+  const_iterator cend() noexcept { return _vla_pointer() + m_num_entries; }
+
+  // </editor-fold> end Iterators }}}2
+  //----------------------------------------------------------------------------
+
+};
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_ENABLE_TASKDAG ) */
+#endif /* #ifndef KOKKOS_IMPL_VLAEMULATION_HPP */
+
diff --git a/packages/kokkos/core/src/impl/Kokkos_ViewArray.hpp b/packages/kokkos/core/src/impl/Kokkos_ViewArray.hpp
index e1539d10b06335b20bf35a26e54228d380af1585..07774da27915f94664268f76471a728890888ca7 100644
--- a/packages/kokkos/core/src/impl/Kokkos_ViewArray.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_ViewArray.hpp
@@ -367,6 +367,8 @@ public:
 
   // Can only convert to View::array_type
 
+  enum { is_assignable_data_type = std::is_same< typename DstTraits::data_type ,    typename SrcTraits::scalar_array_type >::value &&
+                                   (DstTraits::rank==SrcTraits::rank+1)};
   enum { is_assignable = std::is_same< typename DstTraits::data_type ,    typename SrcTraits::scalar_array_type >::value &&
                          std::is_same< typename DstTraits::array_layout , typename SrcTraits::array_layout >::value };
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_ViewMapping.hpp b/packages/kokkos/core/src/impl/Kokkos_ViewMapping.hpp
index 773f3362815f3e681315d598435291584e80bb98..b2d8dea20acc398f9e480116e1069e62e26d7d78 100644
--- a/packages/kokkos/core/src/impl/Kokkos_ViewMapping.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_ViewMapping.hpp
@@ -50,6 +50,7 @@
 #include <Kokkos_Core_fwd.hpp>
 #include <Kokkos_Pair.hpp>
 #include <Kokkos_Layout.hpp>
+#include <Kokkos_Extents.hpp>
 #include <impl/Kokkos_Error.hpp>
 #include <impl/Kokkos_Traits.hpp>
 #include <impl/Kokkos_ViewCtor.hpp>
@@ -275,7 +276,7 @@ struct ALL_t {
   constexpr const ALL_t & operator()() const { return *this ; }
 
   KOKKOS_INLINE_FUNCTION
-  constexpr bool operator == ( const ALL_t & right) const { return true;}
+  constexpr bool operator == ( const ALL_t & ) const { return true;}
 };
 
 }} // namespace Kokkos::Impl
@@ -1548,7 +1549,7 @@ struct ViewOffset< Dimension , Kokkos::LayoutRight
   template< class DimRHS >
   KOKKOS_INLINE_FUNCTION
   constexpr ViewOffset
-    ( const ViewOffset< DimRHS , Kokkos::LayoutRight , void > & rhs
+    ( const ViewOffset< DimRHS , Kokkos::LayoutRight , void > &
     , const SubviewExtents< DimRHS::rank , dimension_type::rank > & sub
     )
     : m_dim( sub.range_extent(0) , 0, 0, 0, 0, 0, 0, 0 )
@@ -2319,7 +2320,7 @@ struct ViewDataHandle< Traits ,
                             &&
                             std::is_same< typename Traits::specialize , void >::value
                             &&
-                            Traits::memory_traits::Atomic
+                            Traits::memory_traits::is_atomic
                           )>::type >
 {
   typedef typename Traits::value_type  value_type ;
@@ -2348,16 +2349,16 @@ struct ViewDataHandle< Traits ,
   typename std::enable_if<(
                             std::is_same< typename Traits::specialize , void >::value
                             &&
-                            (!Traits::memory_traits::Aligned)
+                            (!Traits::memory_traits::is_aligned)
                             &&
-                            Traits::memory_traits::Restrict
+                            Traits::memory_traits::is_restrict
 #ifdef KOKKOS_ENABLE_CUDA
                             &&
                             (!( std::is_same< typename Traits::memory_space,Kokkos::CudaSpace>::value ||
                                 std::is_same< typename Traits::memory_space,Kokkos::CudaUVMSpace>::value ))
 #endif
                             &&
-                            (!Traits::memory_traits::Atomic)
+                            (!Traits::memory_traits::is_atomic)
                           )>::type >
 {
   typedef typename Traits::value_type  value_type ;
@@ -2366,17 +2367,17 @@ struct ViewDataHandle< Traits ,
   typedef Kokkos::Impl::SharedAllocationTracker  track_type  ;
 
   KOKKOS_INLINE_FUNCTION
-  static handle_type assign( value_type * arg_data_ptr
+  static value_type* assign( value_type * arg_data_ptr
                            , track_type const & /*arg_tracker*/ )
   {
-    return handle_type( arg_data_ptr );
+    return (value_type*)( arg_data_ptr );
   }
 
   KOKKOS_INLINE_FUNCTION
-  static handle_type assign( handle_type const arg_data_ptr
+  static value_type* assign( handle_type const arg_data_ptr
                            , size_t offset )
   {
-    return handle_type( arg_data_ptr + offset );
+    return (value_type*)( arg_data_ptr + offset );
   }
 };
 
@@ -2385,16 +2386,16 @@ struct ViewDataHandle< Traits ,
   typename std::enable_if<(
                             std::is_same< typename Traits::specialize , void >::value
                             &&
-                            Traits::memory_traits::Aligned
+                            Traits::memory_traits::is_aligned
 			    &&
-                            (!Traits::memory_traits::Restrict)
+                            (!Traits::memory_traits::is_restrict)
 #ifdef KOKKOS_ENABLE_CUDA
                             &&
                             (!( std::is_same< typename Traits::memory_space,Kokkos::CudaSpace>::value ||
                                 std::is_same< typename Traits::memory_space,Kokkos::CudaUVMSpace>::value ))
 #endif
                             &&
-                            (!Traits::memory_traits::Atomic)
+                            (!Traits::memory_traits::is_atomic)
                           )>::type >
 {
   typedef typename Traits::value_type  value_type ;
@@ -2428,16 +2429,16 @@ struct ViewDataHandle< Traits ,
   typename std::enable_if<(
                             std::is_same< typename Traits::specialize , void >::value
                             &&
-                            Traits::memory_traits::Aligned
+                            Traits::memory_traits::is_aligned
                             &&
-                            Traits::memory_traits::Restrict
+                            Traits::memory_traits::is_restrict
 #ifdef KOKKOS_ENABLE_CUDA
                             &&
                             (!( std::is_same< typename Traits::memory_space,Kokkos::CudaSpace>::value ||
                                 std::is_same< typename Traits::memory_space,Kokkos::CudaUVMSpace>::value ))
 #endif
                             &&
-                            (!Traits::memory_traits::Atomic)
+                            (!Traits::memory_traits::is_atomic)
                           )>::type >
 {
   typedef typename Traits::value_type  value_type ;
@@ -2446,23 +2447,23 @@ struct ViewDataHandle< Traits ,
   typedef Kokkos::Impl::SharedAllocationTracker  track_type  ;
 
   KOKKOS_INLINE_FUNCTION
-  static handle_type assign( value_type * arg_data_ptr
+  static value_type* assign( value_type * arg_data_ptr
                            , track_type const & /*arg_tracker*/ )
   {
     if ( reinterpret_cast<uintptr_t>(arg_data_ptr) % Impl::MEMORY_ALIGNMENT ) {
       Kokkos::abort("Assigning NonAligned View or Pointer to Kokkos::View with Aligned attribute");
     }
-    return handle_type( arg_data_ptr );
+    return (value_type*)( arg_data_ptr );
   }
 
   KOKKOS_INLINE_FUNCTION
-  static handle_type assign( handle_type const arg_data_ptr
+  static value_type* assign( handle_type const arg_data_ptr
                            , size_t offset )
   {
     if ( reinterpret_cast<uintptr_t>(arg_data_ptr+offset) % Impl::MEMORY_ALIGNMENT ) {
       Kokkos::abort("Assigning NonAligned View or Pointer to Kokkos::View with Aligned attribute");
     }
-    return handle_type( arg_data_ptr + offset );
+    return (value_type*)( arg_data_ptr + offset );
   }
 };
 }} // namespace Kokkos::Impl
@@ -2955,7 +2956,8 @@ private:
     };
 
 public:
-
+  enum { is_assignable_data_type = is_assignable_value_type &&
+                                   is_assignable_dimension };
   enum { is_assignable = is_assignable_space &&
                          is_assignable_value_type &&
                          is_assignable_dimension &&
@@ -3052,7 +3054,8 @@ private:
                            , typename SrcTraits::dimension >::value };
 
 public:
-
+  enum { is_assignable_data_type = is_assignable_value_type &&
+                                   is_assignable_dimension };
   enum { is_assignable = is_assignable_space &&
                          is_assignable_value_type &&
                          is_assignable_dimension };
@@ -3062,7 +3065,7 @@ public:
   typedef ViewMapping< SrcTraits , void >  SrcType ;
 
   KOKKOS_INLINE_FUNCTION
-  static bool assignable_layout_check(DstType & dst, const SrcType & src) //Runtime check
+  static bool assignable_layout_check(DstType &, const SrcType & src) //Runtime check
     {
       size_t strides[9];
       bool assignable = true;
@@ -3134,6 +3137,73 @@ public:
 // Subview mapping.
 // Deduce destination view type from source view traits and subview arguments
 
+template <class, class ValueType, class Exts, class... Args>
+struct SubViewDataTypeImpl;
+
+/* base case */
+template <class ValueType>
+struct SubViewDataTypeImpl<
+  void,
+  ValueType,
+  Experimental::Extents<>
+>
+{ using type = ValueType; };
+
+/* for integral args, subview doesn't have that dimension */
+template <class ValueType, ptrdiff_t Ext, ptrdiff_t... Exts, class Integral, class... Args>
+struct SubViewDataTypeImpl<
+  typename std::enable_if<std::is_integral<typename std::decay<Integral>::type>::value>::type,
+  ValueType,
+  Experimental::Extents<Ext, Exts...>,
+  Integral, Args...
+> : SubViewDataTypeImpl<
+      void, ValueType,
+      Experimental::Extents<Exts...>,
+      Args...
+    >
+{ };
+
+
+/* for ALL slice, subview has the same dimension */
+template <class ValueType, ptrdiff_t Ext, ptrdiff_t... Exts, class... Args>
+struct SubViewDataTypeImpl<
+  void,
+  ValueType,
+  Experimental::Extents<Ext, Exts...>,
+  ALL_t, Args...
+> : SubViewDataTypeImpl<
+      void, typename ApplyExtent<ValueType, Ext>::type,
+      Experimental::Extents<Exts...>,
+      Args...
+    >
+{ };
+
+
+/* for pair-style slice, subview has dynamic dimension, since pair doesn't give static sizes */
+/* Since we don't allow interleaving of dynamic and static extents, make all of the dimensions to the left dynamic  */
+template <class ValueType, ptrdiff_t Ext, ptrdiff_t... Exts, class PairLike, class... Args>
+struct SubViewDataTypeImpl<
+  typename std::enable_if<is_pair_like<PairLike>::value>::type,
+  ValueType,
+  Experimental::Extents<Ext, Exts...>,
+  PairLike, Args...
+> : SubViewDataTypeImpl<
+      void, typename make_all_extents_into_pointers<ValueType>::type*,
+      Experimental::Extents<Exts...>,
+      Args...
+    >
+{ };
+
+
+template <class ValueType, class Exts, class... Args>
+struct SubViewDataType
+  : SubViewDataTypeImpl<
+      void, ValueType, Exts, Args...
+    >
+{ };
+
+//----------------------------------------------------------------------------
+
 template< class SrcTraits , class ... Args >
 struct ViewMapping
   < typename std::enable_if<(
@@ -3201,17 +3271,25 @@ private:
 
   typedef typename SrcTraits::value_type  value_type ;
 
-  typedef typename std::conditional< rank == 0 , value_type ,
-          typename std::conditional< rank == 1 , value_type * ,
-          typename std::conditional< rank == 2 , value_type ** ,
-          typename std::conditional< rank == 3 , value_type *** ,
-          typename std::conditional< rank == 4 , value_type **** ,
-          typename std::conditional< rank == 5 , value_type ***** ,
-          typename std::conditional< rank == 6 , value_type ****** ,
-          typename std::conditional< rank == 7 , value_type ******* ,
-                                                 value_type ********
-          >::type >::type >::type >::type >::type >::type >::type >::type
-     data_type ;
+  using data_type =
+    typename SubViewDataType<
+      value_type,
+      typename Kokkos::Impl::ParseViewExtents<
+        typename SrcTraits::data_type
+      >::type,
+      Args...
+    >::type;
+  //typedef typename std::conditional< rank == 0 , value_type ,
+  //        typename std::conditional< rank == 1 , value_type * ,
+  //        typename std::conditional< rank == 2 , value_type ** ,
+  //        typename std::conditional< rank == 3 , value_type *** ,
+  //        typename std::conditional< rank == 4 , value_type **** ,
+  //        typename std::conditional< rank == 5 , value_type ***** ,
+  //        typename std::conditional< rank == 6 , value_type ****** ,
+  //        typename std::conditional< rank == 7 , value_type ******* ,
+  //                                               value_type ********
+  //        >::type >::type >::type >::type >::type >::type >::type >::type
+  //   data_type ;
 
 public:
 
diff --git a/packages/kokkos/core/src/impl/Kokkos_ViewTile.hpp b/packages/kokkos/core/src/impl/Kokkos_ViewTile.hpp
index 716b9ceca5389b3fe64ae9ed6ee2549260932589..a8645db451c6ff5831bf331cdf327cdd89547056 100644
--- a/packages/kokkos/core/src/impl/Kokkos_ViewTile.hpp
+++ b/packages/kokkos/core/src/impl/Kokkos_ViewTile.hpp
@@ -50,6 +50,9 @@
 namespace Kokkos {
 namespace Impl {
 
+// ===========================================================================
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+
 // View mapping for rank two tiled array
 
 template< class L >
@@ -208,11 +211,17 @@ struct ViewMapping
     }
 };
 
+#endif // KOKKOS_ENABLE_DEPRECATED_CODE
+// ===============================================================================
+
 } /* namespace Impl */
 } /* namespace Kokkos */
 
 namespace Kokkos {
 
+// ==============================================================================
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+
 template< typename T , unsigned N0 , unsigned N1 , class ... P >
 KOKKOS_INLINE_FUNCTION
 Kokkos::View< T[N0][N1] , LayoutLeft , P... >
@@ -229,6 +238,9 @@ tile_subview( const Kokkos::View<T**,Kokkos::LayoutTileLeft<N0,N1,true>,P...> &
     ( src , SrcLayout() , i_tile0 , i_tile1 );
 }
 
+#endif // KOKKOS_ENABLE_DEPRECATED_CODE
+// ===============================================================================
+
 } /* namespace Kokkos */
 
 //----------------------------------------------------------------------------
diff --git a/packages/kokkos/core/unit_test/CMakeLists.txt b/packages/kokkos/core/unit_test/CMakeLists.txt
index fad4e1d45eaca26f3a030de87a81cabafd5fa108..6a480daa8d4ea3c13b3826fbe9a3afb8acefec06 100644
--- a/packages/kokkos/core/unit_test/CMakeLists.txt
+++ b/packages/kokkos/core/unit_test/CMakeLists.txt
@@ -11,6 +11,7 @@ IF(NOT KOKKOS_HAS_TRILINOS)
 ENDIF()
 
 SET(GTEST_SOURCE_DIR ${${PARENT_PACKAGE_NAME}_SOURCE_DIR}/tpls/gtest)
+# TODO get the C++ standard flag from KOKKOS_CXX_STANDARD
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_HAS_PTHREAD=0")
 
 INCLUDE_DIRECTORIES(${GTEST_SOURCE_DIR})
@@ -21,6 +22,17 @@ TRIBITS_ADD_LIBRARY(
   TESTONLY
   )
 
+IF(NOT KOKKOS_HAS_TRILINOS)
+target_compile_options(
+  kokkos_gtest
+  PUBLIC $<$<COMPILE_LANGUAGE:CXX>:${KOKKOS_CXX_FLAGS}>
+)
+target_link_libraries(
+  kokkos_gtest
+  PUBLIC ${KOKKOS_LD_FLAGS}
+)
+ENDIF()
+
 #
 # Define the tests
 #
@@ -29,69 +41,212 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
 INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR})
 
 IF(Kokkos_ENABLE_Serial)
-  TRIBITS_ADD_EXECUTABLE_AND_TEST(
-    UnitTest_Serial
-    SOURCES
-      UnitTestMainInit.cpp
-      serial/TestSerial_AtomicOperations_int.cpp
-      serial/TestSerial_AtomicOperations_unsignedint.cpp
-      serial/TestSerial_AtomicOperations_longint.cpp
-      serial/TestSerial_AtomicOperations_unsignedlongint.cpp
-      serial/TestSerial_AtomicOperations_longlongint.cpp
-      serial/TestSerial_AtomicOperations_double.cpp
-      serial/TestSerial_AtomicOperations_float.cpp
-      serial/TestSerial_AtomicViews.cpp
-      serial/TestSerial_Atomics.cpp
-      serial/TestSerial_Complex.cpp
-      serial/TestSerial_Init.cpp
-      serial/TestSerial_MDRange_a.cpp
-      serial/TestSerial_MDRange_b.cpp
-      serial/TestSerial_MDRange_c.cpp
-      serial/TestSerial_MDRange_d.cpp
-      serial/TestSerial_MDRange_e.cpp
-      serial/TestSerial_Other.cpp
-      serial/TestSerial_RangePolicy.cpp
-      serial/TestSerial_Reductions.cpp
-      serial/TestSerial_Reducers_a.cpp
-      serial/TestSerial_Reducers_b.cpp
-      serial/TestSerial_Reducers_c.cpp
-      serial/TestSerial_Reducers_d.cpp
-      serial/TestSerial_Scan.cpp
-      serial/TestSerial_SharedAlloc.cpp
-      serial/TestSerial_SubView_a.cpp
-      serial/TestSerial_SubView_b.cpp
-      serial/TestSerial_SubView_c01.cpp
-      serial/TestSerial_SubView_c02.cpp
-      serial/TestSerial_SubView_c03.cpp
-      serial/TestSerial_SubView_c04.cpp
-      serial/TestSerial_SubView_c05.cpp
-      serial/TestSerial_SubView_c06.cpp
-      serial/TestSerial_SubView_c07.cpp
-      serial/TestSerial_SubView_c08.cpp
-      serial/TestSerial_SubView_c09.cpp
-      serial/TestSerial_SubView_c10.cpp
-      serial/TestSerial_SubView_c11.cpp
-      serial/TestSerial_SubView_c12.cpp
-      serial/TestSerial_SubView_c13.cpp
-      serial/TestSerial_Team.cpp
-      serial/TestSerial_TeamReductionScan.cpp
-      serial/TestSerial_TeamScratch.cpp
-      serial/TestSerial_ViewAPI_a.cpp
-      serial/TestSerial_ViewAPI_b.cpp
-      serial/TestSerial_ViewAPI_c.cpp
-      serial/TestSerial_ViewAPI_d.cpp
-      serial/TestSerial_ViewAPI_e.cpp
-      serial/TestSerial_ViewMapping_a.cpp
-      serial/TestSerial_ViewMapping_b.cpp
-      serial/TestSerial_ViewMapping_subview.cpp
-      serial/TestSerial_ViewOfClass.cpp
-      serial/TestSerial_Crs.cpp
-      serial/TestSerial_WorkGraph.cpp
-    COMM serial mpi
-    NUM_MPI_PROCS 1
-    FAIL_REGULAR_EXPRESSION "  FAILED  "
-    TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
-  )
+  IF(KOKKOS_SEPARATE_TESTS)
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_Atomics
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_AtomicOperations_int.cpp
+        serial/TestSerial_AtomicOperations_unsignedint.cpp
+        serial/TestSerial_AtomicOperations_longint.cpp
+        serial/TestSerial_AtomicOperations_unsignedlongint.cpp
+        serial/TestSerial_AtomicOperations_longlongint.cpp
+        serial/TestSerial_AtomicOperations_double.cpp
+        serial/TestSerial_AtomicOperations_float.cpp
+        serial/TestSerial_AtomicOperations_complexdouble.cpp
+        serial/TestSerial_AtomicOperations_complexfloat.cpp
+        serial/TestSerial_AtomicViews.cpp
+        serial/TestSerial_Atomics.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_SubView
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_SubView_a.cpp
+        serial/TestSerial_SubView_b.cpp
+        serial/TestSerial_SubView_c01.cpp
+        serial/TestSerial_SubView_c02.cpp
+        serial/TestSerial_SubView_c03.cpp
+        serial/TestSerial_SubView_c04.cpp
+        serial/TestSerial_SubView_c05.cpp
+        serial/TestSerial_SubView_c06.cpp
+        serial/TestSerial_SubView_c07.cpp
+        serial/TestSerial_SubView_c08.cpp
+        serial/TestSerial_SubView_c09.cpp
+        serial/TestSerial_SubView_c10.cpp
+        serial/TestSerial_SubView_c11.cpp
+        serial/TestSerial_SubView_c12.cpp
+        serial/TestSerial_SubView_c13.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_ViewAPI
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_ViewAPI_a.cpp
+        serial/TestSerial_ViewAPI_b.cpp
+        serial/TestSerial_ViewAPI_c.cpp
+        serial/TestSerial_ViewAPI_d.cpp
+        serial/TestSerial_ViewAPI_e.cpp
+        serial/TestSerial_ViewOfClass.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_ViewMapping
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_ViewMapping_a.cpp
+        serial/TestSerial_ViewMapping_b.cpp
+        serial/TestSerial_ViewMapping_subview.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_Reducers
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_Reductions.cpp
+        serial/TestSerial_Reducers_a.cpp
+        serial/TestSerial_Reducers_b.cpp
+        serial/TestSerial_Reducers_c.cpp
+        serial/TestSerial_Reducers_d.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_MDRange
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_MDRange_a.cpp
+        serial/TestSerial_MDRange_b.cpp
+        serial/TestSerial_MDRange_c.cpp
+        serial/TestSerial_MDRange_d.cpp
+        serial/TestSerial_MDRange_e.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_Team
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_Team.cpp
+        serial/TestSerial_TeamReductionScan.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_Tasking
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_Task.cpp
+        serial/TestSerial_WorkGraph.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial_Misc
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_Complex.cpp
+        serial/TestSerial_Init.cpp
+        serial/TestSerial_Other.cpp
+        serial/TestSerial_RangePolicy.cpp
+        serial/TestSerial_Scan.cpp
+        serial/TestSerial_SharedAlloc.cpp
+        serial/TestSerial_Crs.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+  ELSE()
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_Serial
+      SOURCES
+        UnitTestMainInit.cpp
+        serial/TestSerial_AtomicOperations_int.cpp
+        serial/TestSerial_AtomicOperations_unsignedint.cpp
+        serial/TestSerial_AtomicOperations_longint.cpp
+        serial/TestSerial_AtomicOperations_unsignedlongint.cpp
+        serial/TestSerial_AtomicOperations_longlongint.cpp
+        serial/TestSerial_AtomicOperations_double.cpp
+        serial/TestSerial_AtomicOperations_float.cpp
+        serial/TestSerial_AtomicOperations_complexdouble.cpp
+        serial/TestSerial_AtomicOperations_complexfloat.cpp
+        serial/TestSerial_AtomicViews.cpp
+        serial/TestSerial_Atomics.cpp
+        serial/TestSerial_Complex.cpp
+        serial/TestSerial_Init.cpp
+        serial/TestSerial_MDRange_a.cpp
+        serial/TestSerial_MDRange_b.cpp
+        serial/TestSerial_MDRange_c.cpp
+        serial/TestSerial_MDRange_d.cpp
+        serial/TestSerial_MDRange_e.cpp
+        serial/TestSerial_Other.cpp
+        serial/TestSerial_RangePolicy.cpp
+        serial/TestSerial_Reductions.cpp
+        serial/TestSerial_Reducers_a.cpp
+        serial/TestSerial_Reducers_b.cpp
+        serial/TestSerial_Reducers_c.cpp
+        serial/TestSerial_Reducers_d.cpp
+        serial/TestSerial_Scan.cpp
+        serial/TestSerial_SharedAlloc.cpp
+        serial/TestSerial_SubView_a.cpp
+        serial/TestSerial_SubView_b.cpp
+        serial/TestSerial_SubView_c01.cpp
+        serial/TestSerial_SubView_c02.cpp
+        serial/TestSerial_SubView_c03.cpp
+        serial/TestSerial_SubView_c04.cpp
+        serial/TestSerial_SubView_c05.cpp
+        serial/TestSerial_SubView_c06.cpp
+        serial/TestSerial_SubView_c07.cpp
+        serial/TestSerial_SubView_c08.cpp
+        serial/TestSerial_SubView_c09.cpp
+        serial/TestSerial_SubView_c10.cpp
+        serial/TestSerial_SubView_c11.cpp
+        serial/TestSerial_SubView_c12.cpp
+        serial/TestSerial_SubView_c13.cpp
+        serial/TestSerial_Task.cpp
+        serial/TestSerial_Team.cpp
+        serial/TestSerial_TeamReductionScan.cpp
+        serial/TestSerial_TeamScratch.cpp
+        serial/TestSerial_ViewAPI_a.cpp
+        serial/TestSerial_ViewAPI_b.cpp
+        serial/TestSerial_ViewAPI_c.cpp
+        serial/TestSerial_ViewAPI_d.cpp
+        serial/TestSerial_ViewAPI_e.cpp
+        serial/TestSerial_ViewMapping_a.cpp
+        serial/TestSerial_ViewMapping_b.cpp
+        serial/TestSerial_ViewMapping_subview.cpp
+        serial/TestSerial_ViewOfClass.cpp
+        serial/TestSerial_Crs.cpp
+        serial/TestSerial_WorkGraph.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+  ENDIF()
 ENDIF()
 
 IF(Kokkos_ENABLE_Pthread)
@@ -106,6 +261,8 @@ IF(Kokkos_ENABLE_Pthread)
       threads/TestThreads_AtomicOperations_longlongint.cpp
       threads/TestThreads_AtomicOperations_double.cpp
       threads/TestThreads_AtomicOperations_float.cpp
+      threads/TestThreads_AtomicOperations_complexdouble.cpp
+      threads/TestThreads_AtomicOperations_complexfloat.cpp
       threads/TestThreads_AtomicViews.cpp
       threads/TestThreads_Atomics.cpp
       threads/TestThreads_Complex.cpp
@@ -161,75 +318,305 @@ IF(Kokkos_ENABLE_Pthread)
 ENDIF()
 
 IF(Kokkos_ENABLE_OpenMP)
+  IF(KOKKOS_SEPARATE_TESTS)
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_Atomics
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_AtomicOperations_int.cpp
+        openmp/TestOpenMP_AtomicOperations_unsignedint.cpp
+        openmp/TestOpenMP_AtomicOperations_longint.cpp
+        openmp/TestOpenMP_AtomicOperations_unsignedlongint.cpp
+        openmp/TestOpenMP_AtomicOperations_longlongint.cpp
+        openmp/TestOpenMP_AtomicOperations_double.cpp
+        openmp/TestOpenMP_AtomicOperations_float.cpp
+        openmp/TestOpenMP_AtomicOperations_complexdouble.cpp
+        openmp/TestOpenMP_AtomicOperations_complexfloat.cpp
+        openmp/TestOpenMP_AtomicViews.cpp
+        openmp/TestOpenMP_Atomics.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_SubView
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_SubView_a.cpp
+        openmp/TestOpenMP_SubView_b.cpp
+        openmp/TestOpenMP_SubView_c01.cpp
+        openmp/TestOpenMP_SubView_c02.cpp
+        openmp/TestOpenMP_SubView_c03.cpp
+        openmp/TestOpenMP_SubView_c04.cpp
+        openmp/TestOpenMP_SubView_c05.cpp
+        openmp/TestOpenMP_SubView_c06.cpp
+        openmp/TestOpenMP_SubView_c07.cpp
+        openmp/TestOpenMP_SubView_c08.cpp
+        openmp/TestOpenMP_SubView_c09.cpp
+        openmp/TestOpenMP_SubView_c10.cpp
+        openmp/TestOpenMP_SubView_c11.cpp
+        openmp/TestOpenMP_SubView_c12.cpp
+        openmp/TestOpenMP_SubView_c13.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_ViewAPI
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_ViewAPI_a.cpp
+        openmp/TestOpenMP_ViewAPI_b.cpp
+        openmp/TestOpenMP_ViewAPI_c.cpp
+        openmp/TestOpenMP_ViewAPI_d.cpp
+        openmp/TestOpenMP_ViewAPI_e.cpp
+        openmp/TestOpenMP_ViewOfClass.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_ViewMapping
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_ViewMapping_a.cpp
+        openmp/TestOpenMP_ViewMapping_b.cpp
+        openmp/TestOpenMP_ViewMapping_subview.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_Reducers
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_Reductions.cpp
+        openmp/TestOpenMP_Reducers_a.cpp
+        openmp/TestOpenMP_Reducers_b.cpp
+        openmp/TestOpenMP_Reducers_c.cpp
+        openmp/TestOpenMP_Reducers_d.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_MDRange
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_MDRange_a.cpp
+        openmp/TestOpenMP_MDRange_b.cpp
+        openmp/TestOpenMP_MDRange_c.cpp
+        openmp/TestOpenMP_MDRange_d.cpp
+        openmp/TestOpenMP_MDRange_e.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_Team
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_Team.cpp
+        openmp/TestOpenMP_TeamReductionScan.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_Tasking
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_Task.cpp
+        openmp/TestOpenMP_WorkGraph.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP_Misc
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_Complex.cpp
+        openmp/TestOpenMP_Init.cpp
+        openmp/TestOpenMP_Other.cpp
+        openmp/TestOpenMP_RangePolicy.cpp
+        openmp/TestOpenMP_Scan.cpp
+        openmp/TestOpenMP_SharedAlloc.cpp
+        openmp/TestOpenMP_Crs.cpp
+        openmp/TestOpenMP_UniqueToken.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMPInterOp
+      SOURCES
+        UnitTestMain.cpp
+        openmp/TestOpenMP_InterOp.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+  ELSE()
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMP
+      SOURCES
+        UnitTestMainInit.cpp
+        openmp/TestOpenMP_AtomicOperations_int.cpp
+        openmp/TestOpenMP_AtomicOperations_unsignedint.cpp
+        openmp/TestOpenMP_AtomicOperations_longint.cpp
+        openmp/TestOpenMP_AtomicOperations_unsignedlongint.cpp
+        openmp/TestOpenMP_AtomicOperations_longlongint.cpp
+        openmp/TestOpenMP_AtomicOperations_double.cpp
+        openmp/TestOpenMP_AtomicOperations_float.cpp
+        openmp/TestOpenMP_AtomicOperations_complexdouble.cpp
+        openmp/TestOpenMP_AtomicOperations_complexfloat.cpp
+        openmp/TestOpenMP_AtomicViews.cpp
+        openmp/TestOpenMP_Atomics.cpp
+        openmp/TestOpenMP_Complex.cpp
+        openmp/TestOpenMP_Init.cpp
+        openmp/TestOpenMP_MDRange_a.cpp
+        openmp/TestOpenMP_MDRange_b.cpp
+        openmp/TestOpenMP_MDRange_c.cpp
+        openmp/TestOpenMP_MDRange_d.cpp
+        openmp/TestOpenMP_MDRange_e.cpp
+        openmp/TestOpenMP_Other.cpp
+        openmp/TestOpenMP_RangePolicy.cpp
+        openmp/TestOpenMP_Reductions.cpp
+        openmp/TestOpenMP_Reducers_a.cpp
+        openmp/TestOpenMP_Reducers_b.cpp
+        openmp/TestOpenMP_Reducers_c.cpp
+        openmp/TestOpenMP_Reducers_d.cpp
+        openmp/TestOpenMP_Scan.cpp
+        openmp/TestOpenMP_SharedAlloc.cpp
+        openmp/TestOpenMP_SubView_a.cpp
+        openmp/TestOpenMP_SubView_b.cpp
+        openmp/TestOpenMP_SubView_c01.cpp
+        openmp/TestOpenMP_SubView_c02.cpp
+        openmp/TestOpenMP_SubView_c03.cpp
+        openmp/TestOpenMP_SubView_c04.cpp
+        openmp/TestOpenMP_SubView_c05.cpp
+        openmp/TestOpenMP_SubView_c06.cpp
+        openmp/TestOpenMP_SubView_c07.cpp
+        openmp/TestOpenMP_SubView_c08.cpp
+        openmp/TestOpenMP_SubView_c09.cpp
+        openmp/TestOpenMP_SubView_c10.cpp
+        openmp/TestOpenMP_SubView_c11.cpp
+        openmp/TestOpenMP_SubView_c12.cpp
+        openmp/TestOpenMP_SubView_c13.cpp
+        openmp/TestOpenMP_Task.cpp
+        openmp/TestOpenMP_Team.cpp
+        openmp/TestOpenMP_TeamReductionScan.cpp
+        openmp/TestOpenMP_ViewAPI_a.cpp
+        openmp/TestOpenMP_ViewAPI_b.cpp
+        openmp/TestOpenMP_ViewAPI_c.cpp
+        openmp/TestOpenMP_ViewAPI_d.cpp
+        openmp/TestOpenMP_ViewAPI_e.cpp
+        openmp/TestOpenMP_ViewMapping_a.cpp
+        openmp/TestOpenMP_ViewMapping_b.cpp
+        openmp/TestOpenMP_ViewMapping_subview.cpp
+        openmp/TestOpenMP_ViewOfClass.cpp
+        openmp/TestOpenMP_Crs.cpp
+        openmp/TestOpenMP_WorkGraph.cpp
+        openmp/TestOpenMP_UniqueToken.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+    TRIBITS_ADD_EXECUTABLE_AND_TEST(
+      UnitTest_OpenMPInterOp
+      SOURCES
+        UnitTestMain.cpp
+        openmp/TestOpenMP_InterOp.cpp
+      COMM serial mpi
+      NUM_MPI_PROCS 1
+      FAIL_REGULAR_EXPRESSION "  FAILED  "
+      TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+    )
+  ENDIF()
+ENDIF()
+
+IF(Kokkos_ENABLE_HPX)
   TRIBITS_ADD_EXECUTABLE_AND_TEST(
-    UnitTest_OpenMP
+    UnitTest_HPX
     SOURCES
       UnitTestMainInit.cpp
-      openmp/TestOpenMP_AtomicOperations_int.cpp
-      openmp/TestOpenMP_AtomicOperations_unsignedint.cpp
-      openmp/TestOpenMP_AtomicOperations_longint.cpp
-      openmp/TestOpenMP_AtomicOperations_unsignedlongint.cpp
-      openmp/TestOpenMP_AtomicOperations_longlongint.cpp
-      openmp/TestOpenMP_AtomicOperations_double.cpp
-      openmp/TestOpenMP_AtomicOperations_float.cpp
-      openmp/TestOpenMP_AtomicViews.cpp
-      openmp/TestOpenMP_Atomics.cpp
-      openmp/TestOpenMP_Complex.cpp
-      openmp/TestOpenMP_Init.cpp
-      openmp/TestOpenMP_MDRange_a.cpp
-      openmp/TestOpenMP_MDRange_b.cpp
-      openmp/TestOpenMP_MDRange_c.cpp
-      openmp/TestOpenMP_MDRange_d.cpp
-      openmp/TestOpenMP_MDRange_e.cpp
-      openmp/TestOpenMP_Other.cpp
-      openmp/TestOpenMP_RangePolicy.cpp
-      openmp/TestOpenMP_Reductions.cpp
-      openmp/TestOpenMP_Reducers_a.cpp
-      openmp/TestOpenMP_Reducers_b.cpp
-      openmp/TestOpenMP_Reducers_c.cpp
-      openmp/TestOpenMP_Reducers_d.cpp
-      openmp/TestOpenMP_Scan.cpp
-      openmp/TestOpenMP_SharedAlloc.cpp
-      openmp/TestOpenMP_SubView_a.cpp
-      openmp/TestOpenMP_SubView_b.cpp
-      openmp/TestOpenMP_SubView_c01.cpp
-      openmp/TestOpenMP_SubView_c02.cpp
-      openmp/TestOpenMP_SubView_c03.cpp
-      openmp/TestOpenMP_SubView_c04.cpp
-      openmp/TestOpenMP_SubView_c05.cpp
-      openmp/TestOpenMP_SubView_c06.cpp
-      openmp/TestOpenMP_SubView_c07.cpp
-      openmp/TestOpenMP_SubView_c08.cpp
-      openmp/TestOpenMP_SubView_c09.cpp
-      openmp/TestOpenMP_SubView_c10.cpp
-      openmp/TestOpenMP_SubView_c11.cpp
-      openmp/TestOpenMP_SubView_c12.cpp
-      openmp/TestOpenMP_SubView_c13.cpp
-      openmp/TestOpenMP_Task.cpp
-      openmp/TestOpenMP_Team.cpp
-      openmp/TestOpenMP_TeamReductionScan.cpp
-      openmp/TestOpenMP_ViewAPI_a.cpp
-      openmp/TestOpenMP_ViewAPI_b.cpp
-      openmp/TestOpenMP_ViewAPI_c.cpp
-      openmp/TestOpenMP_ViewAPI_d.cpp
-      openmp/TestOpenMP_ViewAPI_e.cpp
-      openmp/TestOpenMP_ViewMapping_a.cpp
-      openmp/TestOpenMP_ViewMapping_b.cpp
-      openmp/TestOpenMP_ViewMapping_subview.cpp
-      openmp/TestOpenMP_ViewOfClass.cpp
-      openmp/TestOpenMP_Crs.cpp
-      openmp/TestOpenMP_WorkGraph.cpp
-      openmp/TestOpenMP_UniqueToken.cpp
+      hpx/TestHPX_AtomicOperations_int.cpp
+      hpx/TestHPX_AtomicOperations_unsignedint.cpp
+      hpx/TestHPX_AtomicOperations_longint.cpp
+      hpx/TestHPX_AtomicOperations_unsignedlongint.cpp
+      hpx/TestHPX_AtomicOperations_longlongint.cpp
+      hpx/TestHPX_AtomicOperations_double.cpp
+      hpx/TestHPX_AtomicOperations_float.cpp
+      hpx/TestHPX_AtomicViews.cpp
+      hpx/TestHPX_Atomics.cpp
+      hpx/TestHPX_Complex.cpp
+      hpx/TestHPX_Init.cpp
+      hpx/TestHPX_MDRange_a.cpp
+      hpx/TestHPX_MDRange_b.cpp
+      hpx/TestHPX_MDRange_c.cpp
+      hpx/TestHPX_MDRange_d.cpp
+      hpx/TestHPX_MDRange_e.cpp
+      hpx/TestHPX_Other.cpp
+      hpx/TestHPX_RangePolicy.cpp
+      hpx/TestHPX_Reductions.cpp
+      hpx/TestHPX_Reducers_a.cpp
+      hpx/TestHPX_Reducers_b.cpp
+      hpx/TestHPX_Reducers_c.cpp
+      hpx/TestHPX_Reducers_d.cpp
+      hpx/TestHPX_Scan.cpp
+      hpx/TestHPX_SharedAlloc.cpp
+      hpx/TestHPX_SubView_a.cpp
+      hpx/TestHPX_SubView_b.cpp
+      hpx/TestHPX_SubView_c01.cpp
+      hpx/TestHPX_SubView_c02.cpp
+      hpx/TestHPX_SubView_c03.cpp
+      hpx/TestHPX_SubView_c04.cpp
+      hpx/TestHPX_SubView_c05.cpp
+      hpx/TestHPX_SubView_c06.cpp
+      hpx/TestHPX_SubView_c07.cpp
+      hpx/TestHPX_SubView_c08.cpp
+      hpx/TestHPX_SubView_c09.cpp
+      hpx/TestHPX_SubView_c10.cpp
+      hpx/TestHPX_SubView_c11.cpp
+      hpx/TestHPX_SubView_c12.cpp
+      hpx/TestHPX_SubView_c13.cpp
+      hpx/TestHPX_Task.cpp
+      hpx/TestHPX_Team.cpp
+      hpx/TestHPX_TeamReductionScan.cpp
+      hpx/TestHPX_ViewAPI_a.cpp
+      hpx/TestHPX_ViewAPI_b.cpp
+      hpx/TestHPX_ViewAPI_c.cpp
+      hpx/TestHPX_ViewAPI_d.cpp
+      hpx/TestHPX_ViewAPI_e.cpp
+      hpx/TestHPX_ViewMapping_a.cpp
+      hpx/TestHPX_ViewMapping_b.cpp
+      hpx/TestHPX_ViewMapping_subview.cpp
+      hpx/TestHPX_ViewOfClass.cpp
+      hpx/TestHPX_Crs.cpp
+      hpx/TestHPX_WorkGraph.cpp
+      hpx/TestHPX_UniqueToken.cpp
     COMM serial mpi
     NUM_MPI_PROCS 1
     FAIL_REGULAR_EXPRESSION "  FAILED  "
     TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
   )
   TRIBITS_ADD_EXECUTABLE_AND_TEST(
-    UnitTest_OpenMPInterOp
+    UnitTest_HPXInterOp
     SOURCES
       UnitTestMain.cpp
-      openmp/TestOpenMP_InterOp.cpp
+      hpx/TestHPX_InterOp.cpp
     COMM serial mpi
     NUM_MPI_PROCS 1
     FAIL_REGULAR_EXPRESSION "  FAILED  "
@@ -310,6 +697,8 @@ IF(Kokkos_ENABLE_Cuda)
       cuda/TestCuda_AtomicOperations_longlongint.cpp
       cuda/TestCuda_AtomicOperations_double.cpp
       cuda/TestCuda_AtomicOperations_float.cpp
+      cuda/TestCuda_AtomicOperations_complexdouble.cpp
+      cuda/TestCuda_AtomicOperations_complexfloat.cpp
       cuda/TestCuda_AtomicViews.cpp
       cuda/TestCuda_Atomics.cpp
       cuda/TestCuda_Complex.cpp
@@ -366,10 +755,20 @@ IF(Kokkos_ENABLE_Cuda)
     TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
   )
   TRIBITS_ADD_EXECUTABLE_AND_TEST(
-    UnitTest_CudaInterOp
+    UnitTest_CudaInterOpInit
+    SOURCES
+      UnitTestMain.cpp
+      cuda/TestCuda_InterOp_Init.cpp
+    COMM serial mpi
+    NUM_MPI_PROCS 1
+    FAIL_REGULAR_EXPRESSION "  FAILED  "
+    TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
+  )
+  TRIBITS_ADD_EXECUTABLE_AND_TEST(
+    UnitTest_CudaInterOpStreams
     SOURCES
       UnitTestMain.cpp
-      cuda/TestCuda_InterOp.cpp
+      cuda/TestCuda_InterOp_Streams.cpp
     COMM serial mpi
     NUM_MPI_PROCS 1
     FAIL_REGULAR_EXPRESSION "  FAILED  "
@@ -456,3 +855,40 @@ TRIBITS_ADD_EXECUTABLE_AND_TEST(
   FAIL_REGULAR_EXPRESSION "  FAILED  "
     TESTONLYLIBS kokkos_gtest ${TEST_LINK_TARGETS}
 )
+
+#
+# Compile-only tests
+#
+FUNCTION(KOKKOS_ADD_COMPILE_TEST TEST_NAME)
+
+  SET(options LINK_KOKKOS)
+  SET(oneValueArgs)
+  SET(multiValueArgs)
+
+  CMAKE_PARSE_ARGUMENTS(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+  IF(PARSE_LINK_KOKKOS)
+    SET(libs ${TEST_LINK_TARGETS})
+  ELSE()
+    SET(libs)
+  ENDIF()
+
+  TRIBITS_ADD_EXECUTABLE(
+    ${TEST_NAME}
+    TESTONLY
+    COMM serial
+    TESTONLYLIBS ${libs}
+    ${PARSE_UNPARSED_ARGUMENTS}
+  )
+
+  target_compile_options(
+    ${PACKAGE_NAME}_${TEST_NAME}
+    PUBLIC $<$<COMPILE_LANGUAGE:CXX>:${KOKKOS_CXX_FLAGS}>
+  )
+  target_link_libraries(
+    ${PACKAGE_NAME}_${TEST_NAME}
+    PUBLIC ${KOKKOS_LD_FLAGS}
+  )
+
+ENDFUNCTION()
+
diff --git a/packages/kokkos/core/unit_test/Makefile b/packages/kokkos/core/unit_test/Makefile
index 72832271c8785809e19c5ae33435a2ff0fbfaaa8..5a6921310884c639925954112babd8cdc43c243d 100644
--- a/packages/kokkos/core/unit_test/Makefile
+++ b/packages/kokkos/core/unit_test/Makefile
@@ -9,6 +9,7 @@ vpath %.cpp ${KOKKOS_PATH}/core/unit_test/threads
 vpath %.cpp ${KOKKOS_PATH}/core/unit_test/openmp
 vpath %.cpp ${KOKKOS_PATH}/core/unit_test/openmptarget
 vpath %.cpp ${KOKKOS_PATH}/core/unit_test/qthreads
+vpath %.cpp ${KOKKOS_PATH}/core/unit_test/hpx
 vpath %.cpp ${KOKKOS_PATH}/core/unit_test/cuda
 vpath %.cpp ${KOKKOS_PATH}/core/unit_test/rocm
 
@@ -38,253 +39,310 @@ TEST_TARGETS =
 TARGETS =
 
 ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
-	OBJ_CUDA = UnitTestMainInit.o gtest-all.o
-	OBJ_CUDA += TestCuda_Init.o
-	OBJ_CUDA += TestCuda_SharedAlloc.o TestCudaUVM_SharedAlloc.o TestCudaHostPinned_SharedAlloc.o
-	OBJ_CUDA += TestCuda_RangePolicy.o
-	OBJ_CUDA += TestCuda_ViewAPI_a.o TestCuda_ViewAPI_b.o TestCuda_ViewAPI_c.o TestCuda_ViewAPI_d.o TestCuda_ViewAPI_e.o
-	OBJ_CUDA += TestCuda_ViewMapping_a.o TestCuda_ViewMapping_b.o TestCuda_ViewMapping_subview.o TestCuda_ViewLayoutStrideAssignment.o
-	OBJ_CUDA += TestCudaUVM_ViewCopy.o TestCudaUVM_ViewAPI_a.o TestCudaUVM_ViewAPI_b.o TestCudaUVM_ViewAPI_c.o TestCudaUVM_ViewAPI_d.o TestCudaUVM_ViewAPI_e.o
-	OBJ_CUDA += TestCudaUVM_ViewMapping_a.o TestCudaUVM_ViewMapping_b.o TestCudaUVM_ViewMapping_subview.o
-	OBJ_CUDA += TestCudaHostPinned_ViewCopy.o TestCudaHostPinned_ViewAPI_a.o TestCudaHostPinned_ViewAPI_b.o TestCudaHostPinned_ViewAPI_c.o TestCudaHostPinned_ViewAPI_d.o TestCudaHostPinned_ViewAPI_e.o
-	OBJ_CUDA += TestCudaHostPinned_ViewMapping_a.o TestCudaHostPinned_ViewMapping_b.o TestCudaHostPinned_ViewMapping_subview.o
-	OBJ_CUDA += TestCuda_View_64bit.o
-	OBJ_CUDA += TestCuda_ViewOfClass.o
-	OBJ_CUDA += TestCuda_SubView_a.o TestCuda_SubView_b.o
-	OBJ_CUDA += TestCuda_SubView_c01.o TestCuda_SubView_c02.o TestCuda_SubView_c03.o
-	OBJ_CUDA += TestCuda_SubView_c04.o TestCuda_SubView_c05.o TestCuda_SubView_c06.o
-	OBJ_CUDA += TestCuda_SubView_c07.o TestCuda_SubView_c08.o TestCuda_SubView_c09.o
-	OBJ_CUDA += TestCuda_SubView_c10.o TestCuda_SubView_c11.o TestCuda_SubView_c12.o
-	OBJ_CUDA += TestCuda_SubView_c13.o
-	OBJ_CUDA += TestCuda_Reductions.o TestCuda_Scan.o
-	OBJ_CUDA += TestCuda_Reductions_DeviceView.o
-	OBJ_CUDA += TestCuda_Reducers_a.o TestCuda_Reducers_b.o TestCuda_Reducers_c.o TestCuda_Reducers_d.o
-	OBJ_CUDA += TestCuda_Complex.o
-	OBJ_CUDA += TestCuda_AtomicOperations_int.o TestCuda_AtomicOperations_unsignedint.o TestCuda_AtomicOperations_longint.o 
-	OBJ_CUDA += TestCuda_AtomicOperations_unsignedlongint.o TestCuda_AtomicOperations_longlongint.o TestCuda_AtomicOperations_double.o TestCuda_AtomicOperations_float.o
-	OBJ_CUDA += TestCuda_AtomicViews.o TestCuda_Atomics.o
-	OBJ_CUDA += TestCuda_Team.o TestCuda_TeamScratch.o
-	OBJ_CUDA += TestCuda_TeamReductionScan.o TestCuda_TeamTeamSize.o
-	OBJ_CUDA += TestCuda_Other.o
-	OBJ_CUDA += TestCuda_MDRange_a.o TestCuda_MDRange_b.o TestCuda_MDRange_c.o TestCuda_MDRange_d.o TestCuda_MDRange_e.o
-	OBJ_CUDA += TestCuda_Crs.o
-	OBJ_CUDA += TestCuda_Task.o TestCuda_WorkGraph.o
-	OBJ_CUDA += TestCuda_Spaces.o
-	OBJ_CUDA += TestCuda_UniqueToken.o
-	
-	TARGETS += KokkosCore_UnitTest_Cuda
-    TARGETS += KokkosCore_UnitTest_CudaInterOp
-	TEST_TARGETS += test-cuda
+    OBJ_CUDA = UnitTestMainInit.o gtest-all.o
+    OBJ_CUDA += TestCuda_Init.o
+    OBJ_CUDA += TestCuda_SharedAlloc.o TestCudaUVM_SharedAlloc.o TestCudaHostPinned_SharedAlloc.o
+    OBJ_CUDA += TestCuda_RangePolicy.o
+    OBJ_CUDA += TestCuda_ViewAPI_a.o TestCuda_ViewAPI_b.o TestCuda_ViewAPI_c.o TestCuda_ViewAPI_d.o TestCuda_ViewAPI_e.o
+    OBJ_CUDA += TestCuda_DeepCopyAlignment.o
+    OBJ_CUDA += TestCuda_ViewMapping_a.o TestCuda_ViewMapping_b.o TestCuda_ViewMapping_subview.o TestCuda_ViewLayoutStrideAssignment.o
+    OBJ_CUDA += TestCudaUVM_ViewCopy.o TestCudaUVM_ViewAPI_a.o TestCudaUVM_ViewAPI_b.o TestCudaUVM_ViewAPI_c.o TestCudaUVM_ViewAPI_d.o TestCudaUVM_ViewAPI_e.o
+    OBJ_CUDA += TestCudaUVM_ViewMapping_a.o TestCudaUVM_ViewMapping_b.o TestCudaUVM_ViewMapping_subview.o
+    OBJ_CUDA += TestCudaHostPinned_ViewCopy.o TestCudaHostPinned_ViewAPI_a.o TestCudaHostPinned_ViewAPI_b.o TestCudaHostPinned_ViewAPI_c.o TestCudaHostPinned_ViewAPI_d.o TestCudaHostPinned_ViewAPI_e.o
+    OBJ_CUDA += TestCudaHostPinned_ViewMapping_a.o TestCudaHostPinned_ViewMapping_b.o TestCudaHostPinned_ViewMapping_subview.o
+    OBJ_CUDA += TestCuda_View_64bit.o
+    OBJ_CUDA += TestCuda_ViewOfClass.o
+    OBJ_CUDA += TestCuda_SubView_a.o TestCuda_SubView_b.o
+    OBJ_CUDA += TestCuda_SubView_c01.o TestCuda_SubView_c02.o TestCuda_SubView_c03.o
+    OBJ_CUDA += TestCuda_SubView_c04.o TestCuda_SubView_c05.o TestCuda_SubView_c06.o
+    OBJ_CUDA += TestCuda_SubView_c07.o TestCuda_SubView_c08.o TestCuda_SubView_c09.o
+    OBJ_CUDA += TestCuda_SubView_c10.o TestCuda_SubView_c11.o TestCuda_SubView_c12.o
+    OBJ_CUDA += TestCuda_SubView_c13.o
+    OBJ_CUDA += TestCuda_Reductions.o TestCuda_Scan.o
+    OBJ_CUDA += TestCuda_Reductions_DeviceView.o
+    OBJ_CUDA += TestCuda_Reducers_a.o TestCuda_Reducers_b.o TestCuda_Reducers_c.o TestCuda_Reducers_d.o
+    OBJ_CUDA += TestCuda_Complex.o
+    OBJ_CUDA += TestCuda_AtomicOperations_int.o TestCuda_AtomicOperations_unsignedint.o TestCuda_AtomicOperations_longint.o
+    OBJ_CUDA += TestCuda_AtomicOperations_unsignedlongint.o TestCuda_AtomicOperations_longlongint.o TestCuda_AtomicOperations_double.o TestCuda_AtomicOperations_float.o
+    OBJ_CUDA += TestCuda_AtomicOperations_complexfloat.o TestCuda_AtomicOperations_complexdouble.o
+    OBJ_CUDA += TestCuda_AtomicViews.o TestCuda_Atomics.o
+    OBJ_CUDA += TestCuda_Team.o TestCuda_TeamScratch.o
+    OBJ_CUDA += TestCuda_TeamReductionScan.o TestCuda_TeamTeamSize.o
+    OBJ_CUDA += TestCuda_TeamVectorRange.o
+    OBJ_CUDA += TestCuda_Other.o
+    OBJ_CUDA += TestCuda_MDRange_a.o TestCuda_MDRange_b.o TestCuda_MDRange_c.o TestCuda_MDRange_d.o TestCuda_MDRange_e.o
+    OBJ_CUDA += TestCuda_Crs.o
+    OBJ_CUDA += TestCuda_Task.o TestCuda_WorkGraph.o
+    OBJ_CUDA += TestCuda_Spaces.o
+    OBJ_CUDA += TestCuda_UniqueToken.o
+    OBJ_CUDA += TestCuda_LocalDeepCopy.o
+
+    TARGETS += KokkosCore_UnitTest_Cuda
+    TARGETS += KokkosCore_UnitTest_CudaInterOpInit
+    TARGETS += KokkosCore_UnitTest_CudaInterOpStreams
+    TEST_TARGETS += test-cuda
 endif
 
 ifeq ($(KOKKOS_INTERNAL_USE_ROCM), 1)
-        OBJ_ROCM = UnitTestMainInit.o gtest-all.o
-        OBJ_ROCM += TestROCm_Init.o
-        OBJ_ROCM += TestROCm_Complex.o
-        OBJ_ROCM += TestROCm_RangePolicy.o
-	OBJ_ROCM += TestROCm_AtomicOperations_int.o TestROCm_AtomicOperations_unsignedint.o TestROCm_AtomicOperations_longint.o 
-	OBJ_ROCM += TestROCm_AtomicOperations_unsignedlongint.o TestROCm_AtomicOperations_longlongint.o TestROCm_AtomicOperations_double.o TestROCm_AtomicOperations_float.o
-        OBJ_ROCM += TestROCm_Atomics.o
-        OBJ_ROCM += TestROCm_AtomicViews.o
-        OBJ_ROCM += TestROCm_Other.o
-        OBJ_ROCM += TestROCm_MDRange_a.o TestROCm_MDRange_b.o TestROCm_MDRange_c.o TestROCm_MDRange_d.o TestROCm_MDRange_e.o
-        OBJ_ROCM += TestROCm_MDRangeReduce_a.o TestROCm_MDRangeReduce_b.o TestROCm_MDRangeReduce_c.o TestROCm_MDRangeReduce_d.o TestROCm_MDRangeReduce_e.o
-	OBJ_ROCM += TestROCm_Reductions.o
-	OBJ_ROCM += TestROCm_Reducers_a.o TestROCm_Reducers_b.o TestROCm_Reducers_c.o TestROCm_Reducers_d.o
-        OBJ_ROCM += TestROCm_Scan.o
-        OBJ_ROCM += TestROCm_SharedAlloc.o
-        OBJ_ROCM += TestROCm_SubView_a.o
-        OBJ_ROCM += TestROCm_SubView_b.o
-        OBJ_ROCM += TestROCm_SubView_c01.o
-        OBJ_ROCM += TestROCm_SubView_c02.o
-        OBJ_ROCM += TestROCm_SubView_c03.o
-        OBJ_ROCM += TestROCm_SubView_c04.o
-        OBJ_ROCM += TestROCm_SubView_c05.o
-        OBJ_ROCM += TestROCm_SubView_c06.o
-        OBJ_ROCM += TestROCm_SubView_c07.o
-        OBJ_ROCM += TestROCm_SubView_c08.o
-        OBJ_ROCM += TestROCm_SubView_c09.o
-        OBJ_ROCM += TestROCm_SubView_c10.o
-        OBJ_ROCM += TestROCm_SubView_c11.o
-        OBJ_ROCM += TestROCm_SubView_c12.o
-        OBJ_ROCM += TestROCm_SubView_c13.o
-        OBJ_ROCM += TestROCm_Team.o
-        OBJ_ROCM += TestROCm_TeamReductionScan.o
-        OBJ_ROCM += TestROCm_TeamScratch.o TestROCm_TeamTeamSize.o
-        OBJ_ROCM += TestROCm_ViewAPI_a.o TestROCm_ViewAPI_b.o TestROCm_ViewAPI_c.o TestROCm_ViewAPI_d.o TestROCm_ViewAPI_e.o
-        OBJ_ROCM += TestROCm_ViewMapping_a.o
-        OBJ_ROCM += TestROCm_ViewMapping_b.o
-        OBJ_ROCM += TestROCm_ViewMapping_subview.o
-        OBJ_ROCM += TestROCmHostPinned_ViewCopy.o TestROCmHostPinned_ViewAPI_a.o TestROCmHostPinned_ViewAPI_b.o TestROCmHostPinned_ViewAPI_c.o TestROCmHostPinned_ViewAPI_d.o TestROCmHostPinned_ViewAPI_e.o
-        OBJ_ROCM += TestROCmHostPinned_View_64bit.o
-        OBJ_ROCM += TestROCmHostPinned_ViewMapping_a.o 
-        OBJ_ROCM += TestROCmHostPinned_ViewMapping_b.o 
-        OBJ_ROCM += TestROCmHostPinned_ViewMapping_subview.o
-        OBJ_ROCM += TestROCm_ViewOfClass.o
-        OBJ_ROCM += TestROCm_Spaces.o
-        OBJ_ROCM += TestROCm_Crs.o
-     
-        TARGETS += KokkosCore_UnitTest_ROCm
-        TEST_TARGETS += test-rocm
+    OBJ_ROCM = UnitTestMainInit.o gtest-all.o
+    OBJ_ROCM += TestROCm_Init.o
+    OBJ_ROCM += TestROCm_Complex.o
+    OBJ_ROCM += TestROCm_RangePolicy.o
+    OBJ_ROCM += TestROCm_AtomicOperations_int.o TestROCm_AtomicOperations_unsignedint.o TestROCm_AtomicOperations_longint.o
+    OBJ_ROCM += TestROCm_AtomicOperations_unsignedlongint.o TestROCm_AtomicOperations_longlongint.o TestROCm_AtomicOperations_double.o TestROCm_AtomicOperations_float.o
+    OBJ_ROCM += TestROCm_Atomics.o
+    OBJ_ROCM += TestROCm_AtomicViews.o
+    OBJ_ROCM += TestROCm_Other.o
+    OBJ_ROCM += TestROCm_MDRange_a.o TestROCm_MDRange_b.o TestROCm_MDRange_c.o TestROCm_MDRange_d.o TestROCm_MDRange_e.o
+    OBJ_ROCM += TestROCm_MDRangeReduce_a.o TestROCm_MDRangeReduce_b.o TestROCm_MDRangeReduce_c.o TestROCm_MDRangeReduce_d.o TestROCm_MDRangeReduce_e.o
+    OBJ_ROCM += TestROCm_Reductions.o
+    OBJ_ROCM += TestROCm_Reducers_a.o TestROCm_Reducers_b.o TestROCm_Reducers_c.o TestROCm_Reducers_d.o
+    OBJ_ROCM += TestROCm_Scan.o
+    OBJ_ROCM += TestROCm_SharedAlloc.o
+    OBJ_ROCM += TestROCm_SubView_a.o
+    OBJ_ROCM += TestROCm_SubView_b.o
+    OBJ_ROCM += TestROCm_SubView_c01.o
+    OBJ_ROCM += TestROCm_SubView_c02.o
+    OBJ_ROCM += TestROCm_SubView_c03.o
+    OBJ_ROCM += TestROCm_SubView_c04.o
+    OBJ_ROCM += TestROCm_SubView_c05.o
+    OBJ_ROCM += TestROCm_SubView_c06.o
+    OBJ_ROCM += TestROCm_SubView_c07.o
+    OBJ_ROCM += TestROCm_SubView_c08.o
+    OBJ_ROCM += TestROCm_SubView_c09.o
+    OBJ_ROCM += TestROCm_SubView_c10.o
+    OBJ_ROCM += TestROCm_SubView_c11.o
+    OBJ_ROCM += TestROCm_SubView_c12.o
+    OBJ_ROCM += TestROCm_SubView_c13.o
+    OBJ_ROCM += TestROCm_Team.o
+    OBJ_ROCM += TestROCm_TeamReductionScan.o
+    OBJ_ROCM += TestROCm_TeamScratch.o TestROCm_TeamTeamSize.o
+    OBJ_ROCM += TestROCm_ViewAPI_a.o TestROCm_ViewAPI_b.o TestROCm_ViewAPI_c.o TestROCm_ViewAPI_d.o TestROCm_ViewAPI_e.o
+    OBJ_ROCM += TestROCm_DeepCopyAlignment.o
+    OBJ_ROCM += TestROCm_ViewMapping_a.o
+    OBJ_ROCM += TestROCm_ViewMapping_b.o
+    OBJ_ROCM += TestROCm_ViewMapping_subview.o
+    OBJ_ROCM += TestROCmHostPinned_ViewCopy.o TestROCmHostPinned_ViewAPI_a.o TestROCmHostPinned_ViewAPI_b.o TestROCmHostPinned_ViewAPI_c.o TestROCmHostPinned_ViewAPI_d.o TestROCmHostPinned_ViewAPI_e.o
+    OBJ_ROCM += TestROCmHostPinned_View_64bit.o
+    OBJ_ROCM += TestROCmHostPinned_ViewMapping_a.o
+    OBJ_ROCM += TestROCmHostPinned_ViewMapping_b.o
+    OBJ_ROCM += TestROCmHostPinned_ViewMapping_subview.o
+    OBJ_ROCM += TestROCm_ViewOfClass.o
+    OBJ_ROCM += TestROCm_Spaces.o
+    OBJ_ROCM += TestROCm_Crs.o
+
+    TARGETS += KokkosCore_UnitTest_ROCm
+    TEST_TARGETS += test-rocm
 endif
 
 ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
-
-	OBJ_THREADS = UnitTestMainInit.o gtest-all.o
-	OBJ_THREADS += TestThreads_Init.o
-	OBJ_THREADS += TestThreads_SharedAlloc.o
-	OBJ_THREADS += TestThreads_RangePolicy.o
+    OBJ_THREADS = UnitTestMainInit.o gtest-all.o
+    OBJ_THREADS += TestThreads_Init.o
+    OBJ_THREADS += TestThreads_SharedAlloc.o
+    OBJ_THREADS += TestThreads_RangePolicy.o
     OBJ_THREADS += TestThreads_View_64bit.o
-	OBJ_THREADS += TestThreads_ViewAPI_a.o TestThreads_ViewAPI_b.o TestThreads_ViewAPI_c.o TestThreads_ViewAPI_d.o TestThreads_ViewAPI_e.o
-	OBJ_THREADS += TestThreads_ViewMapping_a.o TestThreads_ViewMapping_b.o TestThreads_ViewMapping_subview.o TestThreads_ViewLayoutStrideAssignment.o
-	OBJ_THREADS += TestThreads_ViewOfClass.o
-	OBJ_THREADS += TestThreads_SubView_a.o TestThreads_SubView_b.o
-	OBJ_THREADS += TestThreads_SubView_c01.o TestThreads_SubView_c02.o TestThreads_SubView_c03.o
-	OBJ_THREADS += TestThreads_SubView_c04.o TestThreads_SubView_c05.o TestThreads_SubView_c06.o
-	OBJ_THREADS += TestThreads_SubView_c07.o TestThreads_SubView_c08.o TestThreads_SubView_c09.o
-	OBJ_THREADS += TestThreads_SubView_c10.o TestThreads_SubView_c11.o TestThreads_SubView_c12.o
-	OBJ_THREADS += TestThreads_Reductions.o TestThreads_Scan.o
-	OBJ_THREADS += TestThreads_Reductions_DeviceView.o
-	OBJ_THREADS += TestThreads_Reducers_a.o TestThreads_Reducers_b.o TestThreads_Reducers_c.o TestThreads_Reducers_d.o
-	OBJ_THREADS += TestThreads_Complex.o
-	OBJ_THREADS += TestThreads_AtomicOperations_int.o TestThreads_AtomicOperations_unsignedint.o TestThreads_AtomicOperations_longint.o 
-	OBJ_THREADS += TestThreads_AtomicOperations_unsignedlongint.o TestThreads_AtomicOperations_longlongint.o TestThreads_AtomicOperations_double.o TestThreads_AtomicOperations_float.o
-	OBJ_THREADS += TestThreads_AtomicViews.o TestThreads_Atomics.o
-	OBJ_THREADS += TestThreads_Team.o TestThreads_TeamScratch.o TestThreads_TeamTeamSize.o
-	OBJ_THREADS += TestThreads_TeamReductionScan.o
-	OBJ_THREADS += TestThreads_Other.o
-	OBJ_THREADS += TestThreads_MDRange_a.o TestThreads_MDRange_b.o TestThreads_MDRange_c.o TestThreads_MDRange_d.o TestThreads_MDRange_e.o
-
-	TARGETS += KokkosCore_UnitTest_Threads
-
-	TEST_TARGETS += test-threads
+    OBJ_THREADS += TestThreads_ViewAPI_a.o TestThreads_ViewAPI_b.o TestThreads_ViewAPI_c.o TestThreads_ViewAPI_d.o TestThreads_ViewAPI_e.o
+    OBJ_THREADS += TestThreads_DeepCopyAlignment.o
+    OBJ_THREADS += TestThreads_ViewMapping_a.o TestThreads_ViewMapping_b.o TestThreads_ViewMapping_subview.o TestThreads_ViewLayoutStrideAssignment.o
+    OBJ_THREADS += TestThreads_ViewOfClass.o
+    OBJ_THREADS += TestThreads_SubView_a.o TestThreads_SubView_b.o
+    OBJ_THREADS += TestThreads_SubView_c01.o TestThreads_SubView_c02.o TestThreads_SubView_c03.o
+    OBJ_THREADS += TestThreads_SubView_c04.o TestThreads_SubView_c05.o TestThreads_SubView_c06.o
+    OBJ_THREADS += TestThreads_SubView_c07.o TestThreads_SubView_c08.o TestThreads_SubView_c09.o
+    OBJ_THREADS += TestThreads_SubView_c10.o TestThreads_SubView_c11.o TestThreads_SubView_c12.o
+    OBJ_THREADS += TestThreads_Reductions.o TestThreads_Scan.o
+    OBJ_THREADS += TestThreads_Reductions_DeviceView.o
+    OBJ_THREADS += TestThreads_Reducers_a.o TestThreads_Reducers_b.o TestThreads_Reducers_c.o TestThreads_Reducers_d.o
+    OBJ_THREADS += TestThreads_Complex.o
+    OBJ_THREADS += TestThreads_AtomicOperations_int.o TestThreads_AtomicOperations_unsignedint.o TestThreads_AtomicOperations_longint.o
+    OBJ_THREADS += TestThreads_AtomicOperations_unsignedlongint.o TestThreads_AtomicOperations_longlongint.o TestThreads_AtomicOperations_double.o TestThreads_AtomicOperations_float.o
+    OBJ_THREADS += TestThreads_AtomicOperations_complexfloat.o TestThreads_AtomicOperations_complexdouble.o
+    OBJ_THREADS += TestThreads_AtomicViews.o TestThreads_Atomics.o
+    OBJ_THREADS += TestThreads_Team.o TestThreads_TeamScratch.o TestThreads_TeamTeamSize.o
+    OBJ_THREADS += TestThreads_TeamReductionScan.o
+    OBJ_THREADS += TestThreads_TeamVectorRange.o
+    OBJ_THREADS += TestThreads_Other.o
+    OBJ_THREADS += TestThreads_MDRange_a.o TestThreads_MDRange_b.o TestThreads_MDRange_c.o TestThreads_MDRange_d.o TestThreads_MDRange_e.o
+    OBJ_THREADS += TestThreads_LocalDeepCopy.o
+
+    TARGETS += KokkosCore_UnitTest_Threads
+
+    TEST_TARGETS += test-threads
 endif
 
 ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
-	OBJ_OPENMP = UnitTestMainInit.o gtest-all.o
-	OBJ_OPENMP += TestOpenMP_Init.o
-	OBJ_OPENMP += TestOpenMP_SharedAlloc.o
-	OBJ_OPENMP += TestOpenMP_RangePolicy.o
+    OBJ_OPENMP = UnitTestMainInit.o gtest-all.o
+    OBJ_OPENMP += TestOpenMP_Init.o
+    OBJ_OPENMP += TestOpenMP_SharedAlloc.o
+    OBJ_OPENMP += TestOpenMP_RangePolicy.o
     OBJ_OPENMP += TestOpenMP_View_64bit.o
-	OBJ_OPENMP += TestOpenMP_ViewAPI_a.o TestOpenMP_ViewAPI_b.o TestOpenMP_ViewAPI_c.o TestOpenMP_ViewAPI_d.o TestOpenMP_ViewAPI_e.o
-	OBJ_OPENMP += TestOpenMP_ViewMapping_a.o TestOpenMP_ViewMapping_b.o TestOpenMP_ViewMapping_subview.o TestOpenMP_ViewLayoutStrideAssignment.o
-	OBJ_OPENMP += TestOpenMP_ViewOfClass.o
-	OBJ_OPENMP += TestOpenMP_SubView_a.o TestOpenMP_SubView_b.o
-	OBJ_OPENMP += TestOpenMP_SubView_c01.o TestOpenMP_SubView_c02.o TestOpenMP_SubView_c03.o
-	OBJ_OPENMP += TestOpenMP_SubView_c04.o TestOpenMP_SubView_c05.o TestOpenMP_SubView_c06.o
-	OBJ_OPENMP += TestOpenMP_SubView_c07.o TestOpenMP_SubView_c08.o TestOpenMP_SubView_c09.o
-	OBJ_OPENMP += TestOpenMP_SubView_c10.o TestOpenMP_SubView_c11.o TestOpenMP_SubView_c12.o
-	OBJ_OPENMP += TestOpenMP_SubView_c13.o
-	OBJ_OPENMP += TestOpenMP_Reductions.o TestOpenMP_Scan.o
-	OBJ_OPENMP += TestOpenMP_Reductions_DeviceView.o
-	OBJ_OPENMP += TestOpenMP_Reducers_a.o TestOpenMP_Reducers_b.o TestOpenMP_Reducers_c.o TestOpenMP_Reducers_d.o
-	OBJ_OPENMP += TestOpenMP_Complex.o
-	OBJ_OPENMP += TestOpenMP_AtomicOperations_int.o TestOpenMP_AtomicOperations_unsignedint.o TestOpenMP_AtomicOperations_longint.o 
-	OBJ_OPENMP += TestOpenMP_AtomicOperations_unsignedlongint.o TestOpenMP_AtomicOperations_longlongint.o TestOpenMP_AtomicOperations_double.o TestOpenMP_AtomicOperations_float.o
-	OBJ_OPENMP += TestOpenMP_AtomicViews.o TestOpenMP_Atomics.o
-	OBJ_OPENMP += TestOpenMP_Team.o TestOpenMP_TeamScratch.o
-	OBJ_OPENMP += TestOpenMP_TeamReductionScan.o TestOpenMP_TeamTeamSize.o
-	OBJ_OPENMP += TestOpenMP_Other.o
-	OBJ_OPENMP += TestOpenMP_MDRange_a.o TestOpenMP_MDRange_b.o TestOpenMP_MDRange_c.o TestOpenMP_MDRange_d.o TestOpenMP_MDRange_e.o
-	OBJ_OPENMP += TestOpenMP_Crs.o
-	OBJ_OPENMP += TestOpenMP_Task.o TestOpenMP_WorkGraph.o
-	OBJ_OPENMP += TestOpenMP_UniqueToken.o
-	
-	TARGETS += KokkosCore_UnitTest_OpenMP
+    OBJ_OPENMP += TestOpenMP_ViewAPI_a.o TestOpenMP_ViewAPI_b.o TestOpenMP_ViewAPI_c.o TestOpenMP_ViewAPI_d.o TestOpenMP_ViewAPI_e.o
+    OBJ_OPENMP += TestOpenMP_DeepCopyAlignment.o
+    OBJ_OPENMP += TestOpenMP_ViewMapping_a.o TestOpenMP_ViewMapping_b.o TestOpenMP_ViewMapping_subview.o TestOpenMP_ViewLayoutStrideAssignment.o
+    OBJ_OPENMP += TestOpenMP_ViewOfClass.o
+    OBJ_OPENMP += TestOpenMP_SubView_a.o TestOpenMP_SubView_b.o
+    OBJ_OPENMP += TestOpenMP_SubView_c01.o TestOpenMP_SubView_c02.o TestOpenMP_SubView_c03.o
+    OBJ_OPENMP += TestOpenMP_SubView_c04.o TestOpenMP_SubView_c05.o TestOpenMP_SubView_c06.o
+    OBJ_OPENMP += TestOpenMP_SubView_c07.o TestOpenMP_SubView_c08.o TestOpenMP_SubView_c09.o
+    OBJ_OPENMP += TestOpenMP_SubView_c10.o TestOpenMP_SubView_c11.o TestOpenMP_SubView_c12.o
+    OBJ_OPENMP += TestOpenMP_SubView_c13.o
+    OBJ_OPENMP += TestOpenMP_Reductions.o TestOpenMP_Scan.o
+    OBJ_OPENMP += TestOpenMP_Reductions_DeviceView.o
+    OBJ_OPENMP += TestOpenMP_Reducers_a.o TestOpenMP_Reducers_b.o TestOpenMP_Reducers_c.o TestOpenMP_Reducers_d.o
+    OBJ_OPENMP += TestOpenMP_Complex.o
+    OBJ_OPENMP += TestOpenMP_AtomicOperations_int.o TestOpenMP_AtomicOperations_unsignedint.o TestOpenMP_AtomicOperations_longint.o
+    OBJ_OPENMP += TestOpenMP_AtomicOperations_unsignedlongint.o TestOpenMP_AtomicOperations_longlongint.o TestOpenMP_AtomicOperations_double.o TestOpenMP_AtomicOperations_float.o
+    OBJ_OPENMP += TestOpenMP_AtomicOperations_complexfloat.o TestOpenMP_AtomicOperations_complexdouble.o
+    OBJ_OPENMP += TestOpenMP_AtomicViews.o TestOpenMP_Atomics.o
+    OBJ_OPENMP += TestOpenMP_Team.o TestOpenMP_TeamScratch.o
+    OBJ_OPENMP += TestOpenMP_TeamReductionScan.o TestOpenMP_TeamTeamSize.o
+    OBJ_OPENMP += TestOpenMP_TeamVectorRange.o
+    OBJ_OPENMP += TestOpenMP_Other.o
+    OBJ_OPENMP += TestOpenMP_MDRange_a.o TestOpenMP_MDRange_b.o TestOpenMP_MDRange_c.o TestOpenMP_MDRange_d.o TestOpenMP_MDRange_e.o
+    OBJ_OPENMP += TestOpenMP_Crs.o
+    OBJ_OPENMP += TestOpenMP_Task.o TestOpenMP_WorkGraph.o
+    OBJ_OPENMP += TestOpenMP_UniqueToken.o
+    OBJ_OPENMP += TestOpenMP_LocalDeepCopy.o
+
+    TARGETS += KokkosCore_UnitTest_OpenMP
     TARGETS += KokkosCore_UnitTest_OpenMPInterOp
 
-	TEST_TARGETS += test-openmp
+    TEST_TARGETS += test-openmp
 endif
 
 ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
-	OBJ_OPENMPTARGET = UnitTestMainInit.o gtest-all.o
-	OBJ_OPENMPTARGET += TestOpenMPTarget_Init.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_SharedAlloc.o
-	OBJ_OPENMPTARGET += TestOpenMPTarget_RangePolicy.o
-	OBJ_OPENMPTARGET += TestOpenMPTarget_ViewAPI_a.o TestOpenMPTarget_ViewAPI_b.o TestOpenMPTarget_ViewAPI_c.o TestOpenMPTarget_ViewAPI_d.o TestOpenMPTarget_ViewAPI_e.o #Some commented out code
-	OBJ_OPENMPTARGET += TestOpenMPTarget_ViewMapping_a.o 
-    OBJ_OPENMPTARGET += TestOpenMPTarget_ViewMapping_b.o 
+    OBJ_OPENMPTARGET = UnitTestMainInit.o gtest-all.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_Init.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_SharedAlloc.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_RangePolicy.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_ViewAPI_a.o TestOpenMPTarget_ViewAPI_b.o TestOpenMPTarget_ViewAPI_c.o TestOpenMPTarget_ViewAPI_d.o TestOpenMPTarget_ViewAPI_e.o #Some commented out code
+    OBJ_OPENMPTARGET += TestOpenMPTarget_DeepCopyAlignment.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_ViewMapping_a.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_ViewMapping_b.o
     OBJ_OPENMPTARGET += TestOpenMPTarget_ViewMapping_subview.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_ViewOfClass.o
-	OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_a.o TestOpenMPTarget_SubView_b.o
-	#The following subview tests need something like UVM:
-        #OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_c01.o TestOpenMPTarget_SubView_c02.o TestOpenMPTarget_SubView_c03.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_c04.o TestOpenMPTarget_SubView_c05.o TestOpenMPTarget_SubView_c06.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_c07.o TestOpenMPTarget_SubView_c08.o TestOpenMPTarget_SubView_c09.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_c10.o TestOpenMPTarget_SubView_c11.o TestOpenMPTarget_SubView_c12.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_Reductions.o # Need custom reductions
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_Reducers_a.o TestOpenMPTarget_Reducers_b.o TestOpenMPTarget_Reducers_c.o TestOpenMPTarget_Reducers_d.o
-        #OBJ_OPENMPTARGET += TestOpenMPTarget_Scan.o
-	OBJ_OPENMPTARGET += TestOpenMPTarget_Complex.o
-	OBJ_OPENMPTARGET += TestOpenMPTarget_AtomicOperations_int.o TestOpenMPTarget_AtomicOperations_unsignedint.o TestOpenMPTarget_AtomicOperations_longint.o 
-	OBJ_OPENMPTARGET += TestOpenMPTarget_AtomicOperations_unsignedlongint.o TestOpenMPTarget_AtomicOperations_longlongint.o TestOpenMPTarget_AtomicOperations_double.o TestOpenMPTarget_AtomicOperations_float.o
-        OBJ_OPENMPTARGET += TestOpenMPTarget_AtomicViews.o 
-        OBJ_OPENMPTARGET += TestOpenMPTarget_Atomics.o # Commented Out Arbitrary Type Atomics
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_Team.o # There is still a static function in this
-        #OBJ_OPENMPTARGET += TestOpenMPTarget_TeamScratch.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_TeamReductionScan.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_Other.o
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_MDRange_a.o TestOpenMPTarget_MDRange_b.o TestOpenMPTarget_MDRange_c.o TestOpenMPTarget_MDRange_d.o TestOpenMPTarget_MDRange_d.e
-	#OBJ_OPENMPTARGET += TestOpenMPTarget_Task.o
-	
-	TARGETS += KokkosCore_UnitTest_OpenMPTarget
-
-	TEST_TARGETS += test-openmptarget
-
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_ViewOfClass.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_a.o TestOpenMPTarget_SubView_b.o
+    #The following subview tests need something like UVM:
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_c01.o TestOpenMPTarget_SubView_c02.o TestOpenMPTarget_SubView_c03.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_c04.o TestOpenMPTarget_SubView_c05.o TestOpenMPTarget_SubView_c06.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_c07.o TestOpenMPTarget_SubView_c08.o TestOpenMPTarget_SubView_c09.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_SubView_c10.o TestOpenMPTarget_SubView_c11.o TestOpenMPTarget_SubView_c12.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_Reductions.o # Need custom reductions
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_Reducers_a.o TestOpenMPTarget_Reducers_b.o TestOpenMPTarget_Reducers_c.o TestOpenMPTarget_Reducers_d.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_Scan.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_Complex.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_AtomicOperations_int.o TestOpenMPTarget_AtomicOperations_unsignedint.o TestOpenMPTarget_AtomicOperations_longint.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_AtomicOperations_unsignedlongint.o TestOpenMPTarget_AtomicOperations_longlongint.o TestOpenMPTarget_AtomicOperations_double.o TestOpenMPTarget_AtomicOperations_float.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_AtomicOperations_complexfloat.o TestOpenMPTarget_AtomicOperations_complexdouble.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_AtomicViews.o
+    OBJ_OPENMPTARGET += TestOpenMPTarget_Atomics.o # Commented Out Arbitrary Type Atomics
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_Team.o # There is still a static function in this
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_TeamScratch.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_TeamReductionScan.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_Other.o
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_MDRange_a.o TestOpenMPTarget_MDRange_b.o TestOpenMPTarget_MDRange_c.o TestOpenMPTarget_MDRange_d.o TestOpenMPTarget_MDRange_d.e
+    #OBJ_OPENMPTARGET += TestOpenMPTarget_Task.o
+
+    TARGETS += KokkosCore_UnitTest_OpenMPTarget
+
+    TEST_TARGETS += test-openmptarget
 endif
 
 ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1)
-	OBJ_QTHREADS = TestQthreads_Other.o TestQthreads_Reductions.o TestQthreads_Atomics.o TestQthreads_Team.o
-	OBJ_QTHREADS += TestQthreads_SubView_a.o TestQthreads_SubView_b.o
-	OBJ_QTHREADS += TestQthreads_SubView_c01.o TestQthreads_SubView_c02.o TestQthreads_SubView_c03.o
-	OBJ_QTHREADS += TestQthreads_SubView_c04.o TestQthreads_SubView_c05.o TestQthreads_SubView_c06.o
-	OBJ_QTHREADS += TestQthreads_SubView_c07.o TestQthreads_SubView_c08.o TestQthreads_SubView_c09.o
-	OBJ_QTHREADS += TestQthreads_SubView_c10.o TestQthreads_SubView_c11.o TestQthreads_SubView_c12.o
-	OBJ_QTHREADS += TestQthreads_ViewAPI_a.o TestQthreads_ViewAPI_b.o TestQthreads_ViewAPI_c.o TestQthreads_ViewAPI_d.o TestQthreads_ViewAPI_e.o UnitTestMain.o gtest-all.o
-	TARGETS += KokkosCore_UnitTest_Qthreads
-
-	OBJ_QTHREADS2 = UnitTestMainInit.o gtest-all.o
-	OBJ_QTHREADS2 += TestQthreads_Complex.o
-	TARGETS += KokkosCore_UnitTest_Qthreads2
-
-	TEST_TARGETS += test-qthreads
+    OBJ_QTHREADS = TestQthreads_Other.o TestQthreads_Reductions.o TestQthreads_Atomics.o TestQthreads_Team.o
+    OBJ_QTHREADS += TestQthreads_SubView_a.o TestQthreads_SubView_b.o
+    OBJ_QTHREADS += TestQthreads_SubView_c01.o TestQthreads_SubView_c02.o TestQthreads_SubView_c03.o
+    OBJ_QTHREADS += TestQthreads_SubView_c04.o TestQthreads_SubView_c05.o TestQthreads_SubView_c06.o
+    OBJ_QTHREADS += TestQthreads_SubView_c07.o TestQthreads_SubView_c08.o TestQthreads_SubView_c09.o
+    OBJ_QTHREADS += TestQthreads_SubView_c10.o TestQthreads_SubView_c11.o TestQthreads_SubView_c12.o
+    OBJ_QTHREADS += TestQthreads_ViewAPI_a.o TestQthreads_ViewAPI_b.o TestQthreads_ViewAPI_c.o TestQthreads_ViewAPI_d.o TestQthreads_ViewAPI_e.o UnitTestMain.o gtest-all.o
+    TARGETS += KokkosCore_UnitTest_Qthreads
+
+    OBJ_QTHREADS2 = UnitTestMainInit.o gtest-all.o
+    OBJ_QTHREADS2 += TestQthreads_Complex.o
+    TARGETS += KokkosCore_UnitTest_Qthreads2
+
+    TEST_TARGETS += test-qthreads
+endif
+
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+	OBJ_HPX = UnitTestMainInit.o gtest-all.o
+	OBJ_HPX += TestHPX_Init.o
+	OBJ_HPX += TestHPX_SharedAlloc.o
+	OBJ_HPX += TestHPX_RangePolicy.o
+	OBJ_HPX += TestHPX_View_64bit.o
+	OBJ_HPX += TestHPX_ViewAPI_a.o TestHPX_ViewAPI_b.o TestHPX_ViewAPI_c.o TestHPX_ViewAPI_d.o TestHPX_ViewAPI_e.o
+	OBJ_HPX += TestHPX_ViewMapping_a.o TestHPX_ViewMapping_b.o TestHPX_ViewMapping_subview.o
+	OBJ_HPX += TestHPX_ViewOfClass.o
+	OBJ_HPX += TestHPX_SubView_a.o TestHPX_SubView_b.o
+	OBJ_HPX += TestHPX_SubView_c01.o TestHPX_SubView_c02.o TestHPX_SubView_c03.o
+	OBJ_HPX += TestHPX_SubView_c04.o TestHPX_SubView_c05.o TestHPX_SubView_c06.o
+	OBJ_HPX += TestHPX_SubView_c07.o TestHPX_SubView_c08.o TestHPX_SubView_c09.o
+	OBJ_HPX += TestHPX_SubView_c10.o TestHPX_SubView_c11.o TestHPX_SubView_c12.o
+	OBJ_HPX += TestHPX_SubView_c13.o
+	OBJ_HPX += TestHPX_Reductions.o
+	OBJ_HPX += TestHPX_Scan.o
+	OBJ_HPX += TestHPX_Reducers_a.o TestHPX_Reducers_b.o TestHPX_Reducers_c.o TestHPX_Reducers_d.o
+	OBJ_HPX += TestHPX_Complex.o
+	OBJ_HPX += TestHPX_AtomicOperations_int.o TestHPX_AtomicOperations_unsignedint.o TestHPX_AtomicOperations_longint.o
+	OBJ_HPX += TestHPX_AtomicOperations_unsignedlongint.o TestHPX_AtomicOperations_longlongint.o TestHPX_AtomicOperations_double.o TestHPX_AtomicOperations_float.o
+	OBJ_HPX += TestHPX_AtomicViews.o TestHPX_Atomics.o
+	OBJ_HPX += TestHPX_Team.o
+	OBJ_HPX += TestHPX_TeamVectorRange.o
+	OBJ_HPX += TestHPX_TeamScratch.o
+	OBJ_HPX += TestHPX_TeamReductionScan.o
+	OBJ_HPX += TestHPX_Other.o
+	OBJ_HPX += TestHPX_MDRange_a.o TestHPX_MDRange_b.o TestHPX_MDRange_c.o TestHPX_MDRange_d.o TestHPX_MDRange_e.o
+	OBJ_HPX += TestHPX_Crs.o
+	OBJ_HPX += TestHPX_Task.o
+	OBJ_HPX += TestHPX_WorkGraph.o
+	OBJ_HPX += TestHPX_UniqueToken.o
+
+	TARGETS += KokkosCore_UnitTest_HPX
+  TARGETS += KokkosCore_UnitTest_HPXInterOp
+
+	TEST_TARGETS += test-hpx
 endif
 
 ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
-        OBJ_SERIAL = UnitTestMainInit.o gtest-all.o
-        OBJ_SERIAL += TestSerial_Init.o
-        OBJ_SERIAL += TestSerial_SharedAlloc.o
-        OBJ_SERIAL += TestSerial_RangePolicy.o
-        OBJ_SERIAL += TestSerial_View_64bit.o
-        OBJ_SERIAL += TestSerial_ViewAPI_a.o TestSerial_ViewAPI_b.o TestSerial_ViewAPI_c.o TestSerial_ViewAPI_d.o TestSerial_ViewAPI_e.o
-        OBJ_SERIAL += TestSerial_ViewMapping_a.o TestSerial_ViewMapping_b.o TestSerial_ViewMapping_subview.o TestSerial_ViewLayoutStrideAssignment.o
-        OBJ_SERIAL += TestSerial_ViewOfClass.o
-        OBJ_SERIAL += TestSerial_SubView_a.o TestSerial_SubView_b.o
-        OBJ_SERIAL += TestSerial_SubView_c01.o TestSerial_SubView_c02.o TestSerial_SubView_c03.o
-        OBJ_SERIAL += TestSerial_SubView_c04.o TestSerial_SubView_c05.o TestSerial_SubView_c06.o
-        OBJ_SERIAL += TestSerial_SubView_c07.o TestSerial_SubView_c08.o TestSerial_SubView_c09.o
-        OBJ_SERIAL += TestSerial_SubView_c10.o TestSerial_SubView_c11.o TestSerial_SubView_c12.o
-        OBJ_SERIAL += TestSerial_SubView_c13.o
-        OBJ_SERIAL += TestSerial_Reductions.o TestSerial_Scan.o
-	OBJ_SERIAL += TestSerial_Reductions_DeviceView.o
-    	OBJ_SERIAL += TestSerial_Reducers_a.o TestSerial_Reducers_b.o TestSerial_Reducers_c.o TestSerial_Reducers_d.o
-        OBJ_SERIAL += TestSerial_Complex.o
-	    OBJ_SERIAL += TestSerial_AtomicOperations_int.o TestSerial_AtomicOperations_unsignedint.o TestSerial_AtomicOperations_longint.o 
-	    OBJ_SERIAL += TestSerial_AtomicOperations_unsignedlongint.o TestSerial_AtomicOperations_longlongint.o TestSerial_AtomicOperations_double.o TestSerial_AtomicOperations_float.o
-	    OBJ_SERIAL += TestSerial_AtomicViews.o TestSerial_Atomics.o
-        OBJ_SERIAL += TestSerial_Team.o TestSerial_TeamScratch.o
-        OBJ_SERIAL += TestSerial_TeamReductionScan.o TestSerial_TeamTeamSize.o
-        OBJ_SERIAL += TestSerial_Other.o
-        #HCC_WORKAROUND
-        ifneq ($(KOKKOS_INTERNAL_COMPILER_HCC), 1)
+    OBJ_SERIAL = UnitTestMainInit.o gtest-all.o
+    OBJ_SERIAL += TestSerial_Init.o
+    OBJ_SERIAL += TestSerial_SharedAlloc.o
+    OBJ_SERIAL += TestSerial_RangePolicy.o
+    OBJ_SERIAL += TestSerial_View_64bit.o
+    OBJ_SERIAL += TestSerial_ViewAPI_a.o TestSerial_ViewAPI_b.o TestSerial_ViewAPI_c.o TestSerial_ViewAPI_d.o TestSerial_ViewAPI_e.o
+    OBJ_SERIAL += TestSerial_DeepCopyAlignment.o
+    OBJ_SERIAL += TestSerial_ViewMapping_a.o TestSerial_ViewMapping_b.o TestSerial_ViewMapping_subview.o TestSerial_ViewLayoutStrideAssignment.o
+    OBJ_SERIAL += TestSerial_ViewOfClass.o
+    OBJ_SERIAL += TestSerial_SubView_a.o TestSerial_SubView_b.o
+    OBJ_SERIAL += TestSerial_SubView_c01.o TestSerial_SubView_c02.o TestSerial_SubView_c03.o
+    OBJ_SERIAL += TestSerial_SubView_c04.o TestSerial_SubView_c05.o TestSerial_SubView_c06.o
+    OBJ_SERIAL += TestSerial_SubView_c07.o TestSerial_SubView_c08.o TestSerial_SubView_c09.o
+    OBJ_SERIAL += TestSerial_SubView_c10.o TestSerial_SubView_c11.o TestSerial_SubView_c12.o
+    OBJ_SERIAL += TestSerial_SubView_c13.o
+    OBJ_SERIAL += TestSerial_Reductions.o TestSerial_Scan.o
+    OBJ_SERIAL += TestSerial_Reductions_DeviceView.o
+    OBJ_SERIAL += TestSerial_Reducers_a.o TestSerial_Reducers_b.o TestSerial_Reducers_c.o TestSerial_Reducers_d.o
+    OBJ_SERIAL += TestSerial_Complex.o
+    OBJ_SERIAL += TestSerial_AtomicOperations_int.o TestSerial_AtomicOperations_unsignedint.o TestSerial_AtomicOperations_longint.o
+    OBJ_SERIAL += TestSerial_AtomicOperations_unsignedlongint.o TestSerial_AtomicOperations_longlongint.o TestSerial_AtomicOperations_double.o TestSerial_AtomicOperations_float.o
+    OBJ_SERIAL += TestSerial_AtomicOperations_complexfloat.o TestSerial_AtomicOperations_complexdouble.o
+    OBJ_SERIAL += TestSerial_AtomicViews.o TestSerial_Atomics.o
+    OBJ_SERIAL += TestSerial_Team.o TestSerial_TeamScratch.o
+    OBJ_SERIAL += TestSerial_TeamVectorRange.o
+    OBJ_SERIAL += TestSerial_TeamReductionScan.o TestSerial_TeamTeamSize.o
+    OBJ_SERIAL += TestSerial_Other.o
+    #HCC_WORKAROUND
+    ifneq ($(KOKKOS_INTERNAL_COMPILER_HCC), 1)
         OBJ_SERIAL += TestSerial_MDRange_a.o TestSerial_MDRange_b.o TestSerial_MDRange_c.o TestSerial_MDRange_d.o TestSerial_MDRange_e.o
-        endif
-        OBJ_SERIAL += TestSerial_Crs.o
-        OBJ_SERIAL += TestSerial_Task.o TestSerial_WorkGraph.o
-	
-	TARGETS += KokkosCore_UnitTest_Serial
+    endif
+    OBJ_SERIAL += TestSerial_Crs.o
+    OBJ_SERIAL += TestSerial_Task.o TestSerial_WorkGraph.o
+    OBJ_SERIAL += TestSerial_LocalDeepCopy.o
+
+    TARGETS += KokkosCore_UnitTest_Serial
 
-	TEST_TARGETS += test-serial
+    TEST_TARGETS += test-serial
 endif
 
 OBJ_HWLOC = TestHWLOC.o UnitTestMain.o gtest-all.o
@@ -298,10 +356,10 @@ TEST_TARGETS += test-host-barrier
 OBJ_DEFAULT = UnitTestMainInit.o gtest-all.o
 ifneq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
 ifneq ($(KOKKOS_INTERNAL_COMPILER_HCC), 1)
-  OBJ_DEFAULT += TestDefaultDeviceType.o 
-  OBJ_DEFAULT += TestDefaultDeviceType_a1.o TestDefaultDeviceType_b1.o TestDefaultDeviceType_c1.o 
-  OBJ_DEFAULT += TestDefaultDeviceType_a2.o TestDefaultDeviceType_b2.o TestDefaultDeviceType_c2.o 
-  OBJ_DEFAULT += TestDefaultDeviceType_a3.o TestDefaultDeviceType_b3.o TestDefaultDeviceType_c3.o 
+  OBJ_DEFAULT += TestDefaultDeviceType.o
+  OBJ_DEFAULT += TestDefaultDeviceType_a1.o TestDefaultDeviceType_b1.o TestDefaultDeviceType_c1.o
+  OBJ_DEFAULT += TestDefaultDeviceType_a2.o TestDefaultDeviceType_b2.o TestDefaultDeviceType_c2.o
+  OBJ_DEFAULT += TestDefaultDeviceType_a3.o TestDefaultDeviceType_b3.o TestDefaultDeviceType_c3.o
   OBJ_DEFAULT += TestDefaultDeviceType_d.o
 endif
 endif
@@ -325,9 +383,11 @@ TEST_TARGETS += ${INITTESTS_TEST_TARGETS}
 KokkosCore_UnitTest_Cuda: $(OBJ_CUDA) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_CUDA) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_Cuda
 	
-KokkosCore_UnitTest_CudaInterOp: UnitTestMain.o gtest-all.o TestCuda_InterOp.o
-	$(LINK) $(EXTRA_PATH) UnitTestMain.o gtest-all.o TestCuda_InterOp.o $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_CudaInterOp
-	
+KokkosCore_UnitTest_CudaInterOpInit: UnitTestMain.o gtest-all.o TestCuda_InterOp_Init.o $(KOKKOS_LINK_DEPENDS)
+	$(LINK) $(EXTRA_PATH) UnitTestMain.o gtest-all.o TestCuda_InterOp_Init.o $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_CudaInterOpInit
+KokkosCore_UnitTest_CudaInterOpStreams: UnitTestMain.o gtest-all.o TestCuda_InterOp_Streams.o $(KOKKOS_LINK_DEPENDS)
+	$(LINK) $(EXTRA_PATH) UnitTestMain.o gtest-all.o TestCuda_InterOp_Streams.o $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_CudaInterOpStreams
+
 KokkosCore_UnitTest_ROCm: $(OBJ_ROCM) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_ROCM) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_ROCm
 
@@ -337,7 +397,7 @@ KokkosCore_UnitTest_Threads: $(OBJ_THREADS) $(KOKKOS_LINK_DEPENDS)
 KokkosCore_UnitTest_OpenMP: $(OBJ_OPENMP) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_OPENMP) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_OpenMP
 
-KokkosCore_UnitTest_OpenMPInterOp: UnitTestMain.o gtest-all.o TestOpenMP_InterOp.o
+KokkosCore_UnitTest_OpenMPInterOp: UnitTestMain.o gtest-all.o TestOpenMP_InterOp.o $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) UnitTestMain.o gtest-all.o TestOpenMP_InterOp.o $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_OpenMPInterOp
 
 KokkosCore_UnitTest_OpenMPTarget: $(OBJ_OPENMPTARGET) $(KOKKOS_LINK_DEPENDS)
@@ -352,6 +412,12 @@ KokkosCore_UnitTest_Qthreads: $(OBJ_QTHREADS) $(KOKKOS_LINK_DEPENDS)
 KokkosCore_UnitTest_Qthreads2: $(OBJ_QTHREADS2) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_QTHREADS2) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_Qthreads2
 
+KokkosCore_UnitTest_HPX: $(OBJ_HPX) $(KOKKOS_LINK_DEPENDS)
+	$(LINK) $(EXTRA_PATH) $(OBJ_HPX) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_HPX
+
+KokkosCore_UnitTest_HPXInterOp: UnitTestMain.o gtest-all.o TestHPX_InterOp.o $(KOKKOS_LINK_DEPENDS)
+	$(LINK) $(EXTRA_PATH) UnitTestMain.o gtest-all.o TestHPX_InterOp.o $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_HPXInterOp
+
 KokkosCore_UnitTest_HWLOC: $(OBJ_HWLOC) $(KOKKOS_LINK_DEPENDS)
 	$(LINK) $(EXTRA_PATH) $(OBJ_HWLOC) $(KOKKOS_LIBS) $(LIB) $(KOKKOS_LDFLAGS) $(LDFLAGS) -o KokkosCore_UnitTest_HWLOC
 
@@ -376,7 +442,8 @@ ${INITTESTS_TARGETS}: KokkosCore_UnitTest_DefaultDeviceTypeInit_%: TestDefaultDe
 
 test-cuda: KokkosCore_UnitTest_Cuda
 	./KokkosCore_UnitTest_Cuda
-	./KokkosCore_UnitTest_CudaInterOp
+	./KokkosCore_UnitTest_CudaInterOpInit
+	./KokkosCore_UnitTest_CudaInterOpStreams
 
 test-rocm: KokkosCore_UnitTest_ROCm
 	./KokkosCore_UnitTest_ROCm
@@ -398,6 +465,10 @@ test-qthreads: KokkosCore_UnitTest_Qthreads KokkosCore_UnitTest_Qthreads2
 	./KokkosCore_UnitTest_Qthreads
 	./KokkosCore_UnitTest_Qthreads2
 
+test-hpx: KokkosCore_UnitTest_HPX
+	./KokkosCore_UnitTest_HPX
+	./KokkosCore_UnitTest_HPXInterOp
+
 test-hwloc: KokkosCore_UnitTest_HWLOC
 	./KokkosCore_UnitTest_HWLOC
 
diff --git a/packages/kokkos/core/unit_test/TestAtomic.hpp b/packages/kokkos/core/unit_test/TestAtomic.hpp
index 58b63251156eee869b2cb036620539fa4d7d4592..ee93d5347037b39b98957fcfc2d398bb6290aa8b 100644
--- a/packages/kokkos/core/unit_test/TestAtomic.hpp
+++ b/packages/kokkos/core/unit_test/TestAtomic.hpp
@@ -211,13 +211,13 @@ T AddLoop( int loop ) {
   f_zero.data = data;
 
   Kokkos::parallel_for( 1, f_zero );
-  execution_space::fence();
+  execution_space().fence();
 
   struct AddFunctor< T, execution_space > f_add;
 
   f_add.data = data;
   Kokkos::parallel_for( loop, f_add );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -226,7 +226,7 @@ T AddLoop( int loop ) {
   f_add_red.data = data;
   int dummy_result;
   Kokkos::parallel_reduce( loop, f_add_red , dummy_result );
-  execution_space::fence();
+  execution_space().fence();
 
   return val;
 }
@@ -298,12 +298,12 @@ T CASLoop( int loop ) {
 
   f_zero.data = data;
   Kokkos::parallel_for( 1, f_zero );
-  execution_space::fence();
+  execution_space().fence();
 
   struct CASFunctor< T, execution_space > f_cas;
   f_cas.data = data;
   Kokkos::parallel_for( loop, f_cas );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -312,7 +312,7 @@ T CASLoop( int loop ) {
   f_cas_red.data = data;
   int dummy_result;
   Kokkos::parallel_reduce( loop, f_cas_red , dummy_result );
-  execution_space::fence();
+  execution_space().fence();
 
   return val;
 }
@@ -381,20 +381,20 @@ T ExchLoop( int loop ) {
 
   f_zero.data = data;
   Kokkos::parallel_for( 1, f_zero );
-  execution_space::fence();
+  execution_space().fence();
 
   typename ZeroFunctor< T, execution_space >::type data2( "Data" );
   typename ZeroFunctor< T, execution_space >::h_type h_data2( "HData" );
 
   f_zero.data = data2;
   Kokkos::parallel_for( 1, f_zero );
-  execution_space::fence();
+  execution_space().fence();
 
   struct ExchFunctor< T, execution_space > f_exch;
   f_exch.data = data;
   f_exch.data2 = data2;
   Kokkos::parallel_for( loop, f_exch );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   Kokkos::deep_copy( h_data2, data2 );
@@ -405,7 +405,7 @@ T ExchLoop( int loop ) {
   f_exch_red.data2 = data2;
   int dummy_result;
   Kokkos::parallel_reduce( loop, f_exch_red , dummy_result );
-  execution_space::fence();
+  execution_space().fence();
 
   return val;
 }
diff --git a/packages/kokkos/core/unit_test/TestAtomicOperations.hpp b/packages/kokkos/core/unit_test/TestAtomicOperations.hpp
index d068c18d8710751dc572214a6df467799336c359..e043737e423809938c3e04efc38b12a009d9e8be 100644
--- a/packages/kokkos/core/unit_test/TestAtomicOperations.hpp
+++ b/packages/kokkos/core/unit_test/TestAtomicOperations.hpp
@@ -113,13 +113,13 @@ T MaxAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct MaxFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -191,13 +191,13 @@ T MinAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct MinFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -268,13 +268,13 @@ T IncAtomic( T i0 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct IncFunctor< T, execution_space > f( i0 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -345,13 +345,13 @@ T DecAtomic( T i0 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct DecFunctor< T, execution_space > f( i0 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -423,13 +423,13 @@ T MulAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct MulFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -501,13 +501,13 @@ T DivAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct DivFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -536,7 +536,9 @@ bool DivAtomicTest( T i0, T i1 )
 
   bool passed = true;
 
-  if ( (resSerial-res)*(resSerial-res) > 1e-10 ) {
+  using std::abs;
+  using Kokkos::abs;
+  if ( abs( (resSerial-res) * 1.) > 1e-5 ) {
     passed = false;
 
     std::cout << "Loop<"
@@ -579,13 +581,13 @@ T ModAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct ModFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -657,13 +659,13 @@ T AndAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct AndFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -735,13 +737,13 @@ T OrAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct OrFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -813,13 +815,13 @@ T XorAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct XorFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -891,13 +893,13 @@ T LShiftAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct LShiftFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
@@ -969,13 +971,13 @@ T RShiftAtomic( T i0, T i1 ) {
 
   f_init.data = data;
   Kokkos::parallel_for( 1, f_init );
-  execution_space::fence();
+  execution_space().fence();
 
   struct RShiftFunctor< T, execution_space > f( i0, i1 );
 
   f.data = data;
   Kokkos::parallel_for( 1, f );
-  execution_space::fence();
+  execution_space().fence();
 
   Kokkos::deep_copy( h_data, data );
   T val = h_data();
diff --git a/packages/kokkos/core/unit_test/TestAtomicOperations_complexdouble.hpp b/packages/kokkos/core/unit_test/TestAtomicOperations_complexdouble.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..a8474d895222e95b400655a5dc6f6a6314ce7c4a
--- /dev/null
+++ b/packages/kokkos/core/unit_test/TestAtomicOperations_complexdouble.hpp
@@ -0,0 +1,57 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<TestAtomicOperations.hpp>
+
+namespace Test {
+TEST_F( TEST_CATEGORY , atomic_operations_complexdouble )
+{
+  const int start = 1; // Avoid zero for division.
+  const int end = 11;
+  for ( int i = start; i < end; ++i )
+  {
+    ASSERT_TRUE( ( TestAtomicOperations::MulAtomicTest< Kokkos::complex<double>, TEST_EXECSPACE >( start , end - i) ) );
+    ASSERT_TRUE( ( TestAtomicOperations::DivAtomicTest< Kokkos::complex<double>, TEST_EXECSPACE >( start , end - i) ) );
+  }
+}
+}
diff --git a/packages/kokkos/core/unit_test/TestAtomicOperations_complexfloat.hpp b/packages/kokkos/core/unit_test/TestAtomicOperations_complexfloat.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..961418e675749064bae6c38a728e68937a0ed082
--- /dev/null
+++ b/packages/kokkos/core/unit_test/TestAtomicOperations_complexfloat.hpp
@@ -0,0 +1,57 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<TestAtomicOperations.hpp>
+
+namespace Test {
+TEST_F( TEST_CATEGORY , atomic_operations_complexfloat )
+{
+  const int start = 1; // Avoid zero for division.
+  const int end = 11;
+  for ( int i = start; i < end; ++i )
+  {
+    ASSERT_TRUE( ( TestAtomicOperations::MulAtomicTest< Kokkos::complex<float>, TEST_EXECSPACE >( start , end - i) ) );
+    ASSERT_TRUE( ( TestAtomicOperations::DivAtomicTest< Kokkos::complex<float>, TEST_EXECSPACE >( start , end - i) ) );
+  }
+}
+}
diff --git a/packages/kokkos/core/unit_test/TestCXX11.hpp b/packages/kokkos/core/unit_test/TestCXX11.hpp
index 8a158e2667e5fbd68a233e6e3502a1f8f8bf9c4a..542b4a1912f4701ca37ff8a47a641fe5c255fc34 100644
--- a/packages/kokkos/core/unit_test/TestCXX11.hpp
+++ b/packages/kokkos/core/unit_test/TestCXX11.hpp
@@ -235,6 +235,7 @@ double ReduceTestFunctor() {
   else {
     Kokkos::parallel_reduce( policy_type( 25, Kokkos::AUTO ), FunctorReduceTest< DeviceType >( a ), unmanaged_result( & result ) );
   }
+  Kokkos::fence();
 
   return result;
 }
@@ -281,6 +282,7 @@ double ReduceTestLambda() {
       }
     }, unmanaged_result( & result ) );
   }
+  Kokkos::fence();
 
   return result;
 }
diff --git a/packages/kokkos/core/unit_test/TestCompilerMacros.hpp b/packages/kokkos/core/unit_test/TestCompilerMacros.hpp
index e6b5c48d3d790084227a6abd66e9b3a7022d114c..07c332a9ae226d86b1e4bd084ebfb7c05934abd2 100644
--- a/packages/kokkos/core/unit_test/TestCompilerMacros.hpp
+++ b/packages/kokkos/core/unit_test/TestCompilerMacros.hpp
@@ -102,7 +102,7 @@ bool Test() {
 
   AddFunctor< DeviceType > f( a, b );
   Kokkos::parallel_for( 1024, f );
-  DeviceType::fence();
+  DeviceType().fence();
 
   return true;
 }
diff --git a/packages/kokkos/core/unit_test/TestDeepCopy.hpp b/packages/kokkos/core/unit_test/TestDeepCopy.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..aebf263290b78c7f08e4d9af72fa10b00221820a
--- /dev/null
+++ b/packages/kokkos/core/unit_test/TestDeepCopy.hpp
@@ -0,0 +1,167 @@
+#include<Kokkos_Core.hpp>
+
+namespace Test {
+
+namespace Impl {
+template<class MemorySpaceA, class MemorySpaceB>
+struct TestDeepCopy {
+
+  typedef Kokkos::View<double*, Kokkos::LayoutRight, MemorySpaceA> a_base_t;
+  typedef Kokkos::View<double*, Kokkos::LayoutRight, MemorySpaceB> b_base_t;
+  typedef Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceA> a_char_t;
+  typedef Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceB> b_char_t;
+
+  typedef Kokkos::RangePolicy<typename MemorySpaceA::execution_space> policyA_t;
+  typedef Kokkos::RangePolicy<typename MemorySpaceB::execution_space> policyB_t;
+
+  static void reset_a_copy_and_b(Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceA> a_char_copy, Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceB> b_char) {
+    const int N = b_char.extent(0);
+    Kokkos::parallel_for("TestDeepCopy: FillA_copy",policyA_t(0,N), KOKKOS_LAMBDA (const int& i) {
+      a_char_copy(i) = char(0);
+    });
+    Kokkos::parallel_for("TestDeepCopy: FillB",policyB_t(0,N), KOKKOS_LAMBDA (const int& i) {
+      b_char(i) = char(0);
+    });
+  }
+
+  static int compare_equal(Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceA> a_char_copy, Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceA> a_char) {
+    const int N = a_char.extent(0);
+    int errors;
+    Kokkos::parallel_reduce("TestDeepCopy: FillA_copy",policyA_t(0,N), KOKKOS_LAMBDA (const int& i, int& lsum) {
+      if(a_char_copy(i) != a_char(i)) lsum++;
+    },errors);
+    return errors;
+  }
+
+  static void run_test(int num_bytes) {
+    a_base_t a_base("test_space_to_space",(num_bytes+128)/8);
+    a_base_t a_base_copy("test_space_to_space",(num_bytes+128)/8);
+    Kokkos::View<double*, Kokkos::LayoutRight, MemorySpaceB> b_base("test_space_to_space",(num_bytes+128)/8);
+    
+    Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceA> a_char((char*) a_base.data(),a_base.extent(0)*8);
+    Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceA> a_char_copy((char*) a_base_copy.data(),a_base.extent(0)*8);
+    Kokkos::View<char*, Kokkos::LayoutRight, MemorySpaceB> b_char((char*) b_base.data(),b_base.extent(0)*8);
+
+    Kokkos::parallel_for("TestDeepCopy: FillA",policyA_t(0,a_char.extent(0)), KOKKOS_LAMBDA (const int& i) {
+      a_char(i) = static_cast<char>(i%97)+1;
+    });
+
+    reset_a_copy_and_b(a_char_copy, b_char);
+
+    {
+      int check = compare_equal(a_char_copy,a_char);
+      ASSERT_EQ( check, a_char.extent(0) );
+    }
+
+    // (a.data()%8, (a.data()+a.extent(0))%8, b.data()%8, (b.data()+b.extent(0))%8
+    // (0,0,0,0) 
+    {
+      int a_begin = 0;
+      int a_end   = 0;
+      int b_begin = 0;
+      int b_end   = 0;
+      auto a = Kokkos::subview(a_char,std::pair<int,int>(a_begin,a_char.extent(0)-a_end));
+      auto b = Kokkos::subview(b_char,std::pair<int,int>(b_begin,b_char.extent(0)-b_end));
+      auto a_copy = Kokkos::subview(a_char_copy,std::pair<int,int>(a_begin,a_char_copy.extent(0)-a_end));
+      Kokkos::deep_copy(b,a);
+      Kokkos::deep_copy(a_copy,b);
+      int check = compare_equal(a_copy,a);
+      ASSERT_EQ( check, 0 );
+    }
+
+    {
+      int a_begin = 0;
+      int a_end   = 5;
+      int b_begin = 0;
+      int b_end   = 5;
+      auto a = Kokkos::subview(a_char,std::pair<int,int>(a_begin,a_char.extent(0)-a_end));
+      auto b = Kokkos::subview(b_char,std::pair<int,int>(b_begin,b_char.extent(0)-b_end));
+      auto a_copy = Kokkos::subview(a_char_copy,std::pair<int,int>(a_begin,a_char_copy.extent(0)-a_end));
+      Kokkos::deep_copy(b,a);
+      Kokkos::deep_copy(a_copy,b);
+      int check = compare_equal(a_copy,a);
+      ASSERT_EQ( check, 0 );
+    }
+    
+    {
+      int a_begin = 3;
+      int a_end   = 0;
+      int b_begin = 3;
+      int b_end   = 0;
+      auto a = Kokkos::subview(a_char,std::pair<int,int>(a_begin,a_char.extent(0)-a_end));
+      auto b = Kokkos::subview(b_char,std::pair<int,int>(b_begin,b_char.extent(0)-b_end));
+      auto a_copy = Kokkos::subview(a_char_copy,std::pair<int,int>(a_begin,a_char_copy.extent(0)-a_end));
+      Kokkos::deep_copy(b,a);
+      Kokkos::deep_copy(a_copy,b);
+      int check = compare_equal(a_copy,a);
+      ASSERT_EQ( check, 0 );
+    }
+
+    {
+      int a_begin = 3;
+      int a_end   = 6;
+      int b_begin = 3;
+      int b_end   = 6;
+      auto a = Kokkos::subview(a_char,std::pair<int,int>(a_begin,a_char.extent(0)-a_end));
+      auto b = Kokkos::subview(b_char,std::pair<int,int>(b_begin,b_char.extent(0)-b_end));
+      auto a_copy = Kokkos::subview(a_char_copy,std::pair<int,int>(a_begin,a_char_copy.extent(0)-a_end));
+      Kokkos::deep_copy(b,a);
+      Kokkos::deep_copy(a_copy,b);
+      int check = compare_equal(a_copy,a);
+      ASSERT_EQ( check, 0 );
+    }
+
+    {
+      int a_begin = 5;
+      int a_end   = 4;
+      int b_begin = 3;
+      int b_end   = 6;
+      auto a = Kokkos::subview(a_char,std::pair<int,int>(a_begin,a_char.extent(0)-a_end));
+      auto b = Kokkos::subview(b_char,std::pair<int,int>(b_begin,b_char.extent(0)-b_end));
+      auto a_copy = Kokkos::subview(a_char_copy,std::pair<int,int>(a_begin,a_char_copy.extent(0)-a_end));
+      Kokkos::deep_copy(b,a);
+      Kokkos::deep_copy(a_copy,b);
+      int check = compare_equal(a_copy,a);
+      ASSERT_EQ( check, 0 );
+    }
+
+    {
+      int a_begin = 0;
+      int a_end   = 8;
+      int b_begin = 2;
+      int b_end   = 6;
+      auto a = Kokkos::subview(a_char,std::pair<int,int>(a_begin,a_char.extent(0)-a_end));
+      auto b = Kokkos::subview(b_char,std::pair<int,int>(b_begin,b_char.extent(0)-b_end));
+      auto a_copy = Kokkos::subview(a_char_copy,std::pair<int,int>(a_begin,a_char_copy.extent(0)-a_end));
+      Kokkos::deep_copy(b,a);
+      Kokkos::deep_copy(a_copy,b);
+      int check = compare_equal(a_copy,a);
+      ASSERT_EQ( check, 0 );
+    }
+     
+    {
+      int a_begin = 2;
+      int a_end   = 6;
+      int b_begin = 0;
+      int b_end   = 8;
+      auto a = Kokkos::subview(a_char,std::pair<int,int>(a_begin,a_char.extent(0)-a_end));
+      auto b = Kokkos::subview(b_char,std::pair<int,int>(b_begin,b_char.extent(0)-b_end));
+      auto a_copy = Kokkos::subview(a_char_copy,std::pair<int,int>(a_begin,a_char_copy.extent(0)-a_end));
+      Kokkos::deep_copy(b,a);
+      Kokkos::deep_copy(a_copy,b);
+      int check = compare_equal(a_copy,a);
+      ASSERT_EQ( check, 0 );
+    }
+
+  }
+};
+}
+
+TEST_F( TEST_CATEGORY, deep_copy_alignment )
+{
+  { Impl::TestDeepCopy< TEST_EXECSPACE::memory_space , TEST_EXECSPACE::memory_space >::run_test( 100000 ); }
+  { Impl::TestDeepCopy< Kokkos::HostSpace , TEST_EXECSPACE::memory_space >::run_test( 100000 ); }
+  { Impl::TestDeepCopy< TEST_EXECSPACE::memory_space , Kokkos::HostSpace >::run_test( 100000 ); }
+}
+
+}
diff --git a/packages/kokkos/core/unit_test/TestDefaultDeviceTypeInit.hpp b/packages/kokkos/core/unit_test/TestDefaultDeviceTypeInit.hpp
index 1e1418fcbfb0cd9c4d252a2ae9de47c2feb36e6f..1261948f87662b8146d4cc37c05c4fd58b194516 100644
--- a/packages/kokkos/core/unit_test/TestDefaultDeviceTypeInit.hpp
+++ b/packages/kokkos/core/unit_test/TestDefaultDeviceTypeInit.hpp
@@ -222,6 +222,14 @@ void check_correct_initialization( const Kokkos::InitArguments & argstruct ) {
       expected_nthreads = 1;
     }
 #endif
+
+#ifdef KOKKOS_ENABLE_HPX
+    // HPX uses all cores on machine by default. Skip this test.
+    if ( std::is_same< Kokkos::DefaultExecutionSpace, Kokkos::Experimental::HPX >::value ||
+         std::is_same< Kokkos::DefaultHostExecutionSpace, Kokkos::Experimental::HPX >::value ) {
+      return;
+    }
+#endif
   }
 
   int expected_numa = argstruct.num_numa;
diff --git a/packages/kokkos/core/unit_test/TestLocalDeepCopy.hpp b/packages/kokkos/core/unit_test/TestLocalDeepCopy.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..31bda530a5020c7a9b7c8a49aae369cbe485b2bb
--- /dev/null
+++ b/packages/kokkos/core/unit_test/TestLocalDeepCopy.hpp
@@ -0,0 +1,904 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <gtest/gtest.h>
+
+#include <stdexcept>
+#include <sstream>
+#include <iostream>
+#include <time.h>
+
+#include <Kokkos_Core.hpp>
+
+namespace Test {
+
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_teampolicy_rank_1 (const int N) {
+
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, 1, 1, 1, 1, Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    typedef Kokkos::TeamPolicy<ExecSpace>               team_policy;
+    typedef typename Kokkos::TeamPolicy<ExecSpace>::member_type  member_type;
+
+    //Deep Copy
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N
+      auto subSrc = Kokkos::subview(A, 1, 1, 1, 1, 1, 1, lid, Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, 1, 1, lid, Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N      
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, 1, 1, lid, Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N );  
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_teampolicy_rank_2 (const int N) {
+
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, 1, 1, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    typedef Kokkos::TeamPolicy<ExecSpace>               team_policy;
+    typedef typename Kokkos::TeamPolicy<ExecSpace>::member_type  member_type;
+
+    //Deep Copy
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N
+      auto subSrc = Kokkos::subview(A, 1, 1, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N      
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_teampolicy_rank_3 (const int N) {
+  
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, 1, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    typedef Kokkos::TeamPolicy<ExecSpace>               team_policy;
+    typedef typename Kokkos::TeamPolicy<ExecSpace>::member_type  member_type;
+
+    //Deep Copy
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N
+      auto subSrc = Kokkos::subview(A, 1, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N      
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_teampolicy_rank_4 (const int N) {
+  
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    typedef Kokkos::TeamPolicy<ExecSpace>               team_policy;
+    typedef typename Kokkos::TeamPolicy<ExecSpace>::member_type  member_type;
+
+    //Deep Copy
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N
+      auto subSrc = Kokkos::subview(A, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N      
+      auto subDst = Kokkos::subview(B, 1, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_teampolicy_rank_5 (const int N) {
+  
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    typedef Kokkos::TeamPolicy<ExecSpace>               team_policy;
+    typedef typename Kokkos::TeamPolicy<ExecSpace>::member_type  member_type;
+
+    //Deep Copy
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N
+      auto subSrc = Kokkos::subview(A, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N      
+      auto subDst = Kokkos::subview(B, 1, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_teampolicy_rank_6 (const int N) {
+  
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    typedef Kokkos::TeamPolicy<ExecSpace>               team_policy;
+    typedef typename Kokkos::TeamPolicy<ExecSpace>::member_type  member_type;
+
+    //Deep Copy
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N
+      auto subSrc = Kokkos::subview(A, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N      
+      auto subDst = Kokkos::subview(B, 1, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_teampolicy_rank_7 (const int N) {
+  
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    Kokkos::deep_copy( A, 10.0 );
+
+    typedef Kokkos::TeamPolicy<ExecSpace>               team_policy;
+    typedef typename Kokkos::TeamPolicy<ExecSpace>::member_type  member_type;
+
+    //Deep Copy
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N
+      auto subSrc = Kokkos::subview(A, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( team_policy( N, Kokkos::AUTO ), KOKKOS_LAMBDA ( const member_type &teamMember ) {
+      int lid = teamMember.league_rank();// returns a number between 0 and N      
+      auto subDst = Kokkos::subview(B, lid, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(teamMember,subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_rangepolicy_rank_1 (const int N) {
+  
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, 1, 1, 1, 1, Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    //Deep Copy
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subSrc = Kokkos::subview(A, 1, 1, 1, 1, 1, 1, i, Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, 1, 1, i, Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {      
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, 1, 1, i, Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N );  
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_rangepolicy_rank_2 (const int N) {
+
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, 1, 1, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    //Deep Copy
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subSrc = Kokkos::subview(A, 1, 1, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {      
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_rangepolicy_rank_3 (const int N) {
+ 
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, 1, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    //Deep Copy
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subSrc = Kokkos::subview(A, 1, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subDst = Kokkos::subview(B, 1, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_rangepolicy_rank_4 (const int N) {
+ 
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    //Deep Copy
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subSrc = Kokkos::subview(A, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subDst = Kokkos::subview(B, 1, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_rangepolicy_rank_5 (const int N) {
+ 
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    //Deep Copy
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subSrc = Kokkos::subview(A, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subDst = Kokkos::subview(B, 1, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_rangepolicy_rank_6 (const int N) {
+ 
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    auto subA = Kokkos::subview(A, 1, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+    Kokkos::deep_copy( subA, 10.0 );
+
+    //Deep Copy
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subSrc = Kokkos::subview(A, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subDst = Kokkos::subview(B, 1, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------
+  template<typename ExecSpace, typename ViewType>
+  void impl_test_local_deepcopy_rangepolicy_rank_7 (const int N) {
+ 
+    // Allocate matrices on device.
+    ViewType A( "A", N, N, N, N, N, N, N, N );
+    ViewType B( "B", N, N, N, N, N, N, N, N );
+
+    // Create host mirrors of device views.
+    typename ViewType::HostMirror h_A = Kokkos::create_mirror_view( A );
+    typename ViewType::HostMirror h_B = Kokkos::create_mirror_view( B );
+
+    // Initialize A matrix.
+    Kokkos::deep_copy( A, 10.0 );
+
+    //Deep Copy
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subSrc = Kokkos::subview(A, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      auto subDst = Kokkos::subview(B, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,subSrc);
+    });
+
+    Kokkos::deep_copy( h_A, A );
+    Kokkos::deep_copy( h_B, B );
+
+    bool test = true;
+    for(size_t i=0; i<A.span();i++){
+      if (h_A.data()[i]!=h_B.data()[i]) {test = false;break;}
+    }
+
+    ASSERT_EQ( test, true );
+
+    //Fill
+    Kokkos::deep_copy( B, 0.0 );
+
+    Kokkos::parallel_for( Kokkos::RangePolicy<ExecSpace>(0,N), KOKKOS_LAMBDA ( const int& i ) {
+      auto subDst = Kokkos::subview(B, i, Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL());
+      Kokkos::Experimental::local_deep_copy(subDst,20.0);
+    });
+
+    Kokkos::deep_copy( h_B, B );
+
+    double sum_all = 0.0;
+    for(size_t i=0; i<B.span();i++){
+      sum_all += h_B.data()[i];
+    }
+
+    ASSERT_EQ( sum_all, 20.0*N*N*N*N*N*N*N*N );
+  }
+//-------------------------------------------------------------------------------------------------------------  
+
+#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA )
+#if !defined(KOKKOS_ENABLE_CUDA) || ( 8000 <= CUDA_VERSION )
+TEST_F( TEST_CATEGORY , local_deepcopy_teampolicy_layoutleft )
+{
+  typedef TEST_EXECSPACE ExecSpace;
+  typedef Kokkos::View<double********,Kokkos::LayoutLeft,ExecSpace> ViewType;
+  
+  { //Rank-1
+    impl_test_local_deepcopy_teampolicy_rank_1<ExecSpace,ViewType>(8);
+  }
+  { //Rank-2
+    impl_test_local_deepcopy_teampolicy_rank_2<ExecSpace,ViewType>(8);
+  }
+  { //Rank-3
+    impl_test_local_deepcopy_teampolicy_rank_3<ExecSpace,ViewType>(8);
+  }
+  { //Rank-4
+    impl_test_local_deepcopy_teampolicy_rank_4<ExecSpace,ViewType>(8);
+  }
+  { //Rank-5
+    impl_test_local_deepcopy_teampolicy_rank_5<ExecSpace,ViewType>(8);
+  }
+  { //Rank-6
+    impl_test_local_deepcopy_teampolicy_rank_6<ExecSpace,ViewType>(8);
+  }
+  { //Rank-7
+    impl_test_local_deepcopy_teampolicy_rank_7<ExecSpace,ViewType>(8);
+  }
+}
+//-------------------------------------------------------------------------------------------------------------
+TEST_F( TEST_CATEGORY , local_deepcopy_rangepolicy_layoutleft )
+{
+  typedef TEST_EXECSPACE ExecSpace;
+  typedef Kokkos::View<double********,Kokkos::LayoutLeft,ExecSpace> ViewType;
+
+  { //Rank-1
+    impl_test_local_deepcopy_rangepolicy_rank_1<ExecSpace,ViewType>(8);
+  }
+  { //Rank-2
+    impl_test_local_deepcopy_rangepolicy_rank_2<ExecSpace,ViewType>(8);
+  }
+  { //Rank-3
+    impl_test_local_deepcopy_rangepolicy_rank_3<ExecSpace,ViewType>(8);
+  }
+  { //Rank-4
+    impl_test_local_deepcopy_rangepolicy_rank_4<ExecSpace,ViewType>(8);
+  }
+  { //Rank-5
+    impl_test_local_deepcopy_rangepolicy_rank_5<ExecSpace,ViewType>(8);
+  }
+  { //Rank-6
+    impl_test_local_deepcopy_rangepolicy_rank_6<ExecSpace,ViewType>(8);
+  }
+  { //Rank-7
+    impl_test_local_deepcopy_rangepolicy_rank_7<ExecSpace,ViewType>(8);
+  }
+}
+//-------------------------------------------------------------------------------------------------------------
+TEST_F( TEST_CATEGORY , local_deepcopy_teampolicy_layoutright )
+{
+  typedef TEST_EXECSPACE ExecSpace;
+  typedef Kokkos::View<double********,Kokkos::LayoutRight,ExecSpace> ViewType;
+
+  { //Rank-1
+    impl_test_local_deepcopy_teampolicy_rank_1<ExecSpace,ViewType>(8);
+  }
+  { //Rank-2
+    impl_test_local_deepcopy_teampolicy_rank_2<ExecSpace,ViewType>(8);
+  }
+  { //Rank-3
+    impl_test_local_deepcopy_teampolicy_rank_3<ExecSpace,ViewType>(8);
+  }
+  { //Rank-4
+    impl_test_local_deepcopy_teampolicy_rank_4<ExecSpace,ViewType>(8);
+  }
+  { //Rank-5
+    impl_test_local_deepcopy_teampolicy_rank_5<ExecSpace,ViewType>(8);
+  }
+  { //Rank-6
+    impl_test_local_deepcopy_teampolicy_rank_6<ExecSpace,ViewType>(8);
+  }
+  { //Rank-7
+    impl_test_local_deepcopy_teampolicy_rank_7<ExecSpace,ViewType>(8);
+  }
+}
+//-------------------------------------------------------------------------------------------------------------
+TEST_F( TEST_CATEGORY , local_deepcopy_rangepolicy_layoutright )
+{
+  typedef TEST_EXECSPACE ExecSpace;
+  typedef Kokkos::View<double********,Kokkos::LayoutRight,ExecSpace> ViewType;
+
+  { //Rank-1
+    impl_test_local_deepcopy_rangepolicy_rank_1<ExecSpace,ViewType>(8);
+  }
+  { //Rank-2
+    impl_test_local_deepcopy_rangepolicy_rank_2<ExecSpace,ViewType>(8);
+  }
+  { //Rank-3
+    impl_test_local_deepcopy_rangepolicy_rank_3<ExecSpace,ViewType>(8);
+  }
+  { //Rank-4
+    impl_test_local_deepcopy_rangepolicy_rank_4<ExecSpace,ViewType>(8);
+  }
+  { //Rank-5
+    impl_test_local_deepcopy_rangepolicy_rank_5<ExecSpace,ViewType>(8);
+  }
+  { //Rank-6
+    impl_test_local_deepcopy_rangepolicy_rank_6<ExecSpace,ViewType>(8);
+  }
+  { //Rank-7
+    impl_test_local_deepcopy_rangepolicy_rank_7<ExecSpace,ViewType>(8);
+  }
+}
+#endif
+#endif
+}
diff --git a/packages/kokkos/core/unit_test/TestMDRange.hpp b/packages/kokkos/core/unit_test/TestMDRange.hpp
index a382a207002bf4d252091931d4139fddeac5c726..cea89a487202fa65c6451863f3adac748c75a727 100644
--- a/packages/kokkos/core/unit_test/TestMDRange.hpp
+++ b/packages/kokkos/core/unit_test/TestMDRange.hpp
@@ -351,6 +351,7 @@ struct TestMDRange_2D {
       Kokkos::Sum< value_type > reducer_view( sum_view );
 
       parallel_reduce( range, functor, reducer_view);
+      Kokkos::fence();
       sum = sum_view();
 
       ASSERT_EQ( sum, 2 * N0 * N1 );
@@ -931,6 +932,7 @@ struct TestMDRange_3D {
       Kokkos::Sum< value_type > reducer_view( sum_view );
 
       parallel_reduce( range, functor, reducer_view);
+      Kokkos::fence();
       sum = sum_view();
 
       ASSERT_EQ( sum, 2 * N0 * N1 * N2 );
@@ -1502,6 +1504,7 @@ struct TestMDRange_4D {
       Kokkos::Sum< value_type > reducer_view( sum_view );
 
       parallel_reduce( range, functor, reducer_view);
+      Kokkos::fence();
       sum = sum_view();
 
       ASSERT_EQ( sum, 2 * N0 * N1 * N2 * N3 );
@@ -2089,6 +2092,7 @@ struct TestMDRange_5D {
       Kokkos::Sum< value_type > reducer_view( sum_view );
 
       parallel_reduce( range, functor, reducer_view);
+      Kokkos::fence();
       sum = sum_view();
 
       ASSERT_EQ( sum, 2 * N0 * N1 * N2 * N3 * N4 );
@@ -2607,6 +2611,7 @@ struct TestMDRange_6D {
       Kokkos::Sum< value_type > reducer_view( sum_view );
 
       parallel_reduce( range, functor, reducer_view);
+      Kokkos::fence();
       sum = sum_view();
 
       ASSERT_EQ( sum, 2 * N0 * N1 * N2 * N3 * N4 * N5 );
diff --git a/packages/kokkos/core/unit_test/TestPolicyConstruction.hpp b/packages/kokkos/core/unit_test/TestPolicyConstruction.hpp
index efbb32e387672944f657f911b38b000d13ec0c75..be744a77122a49843efdd4512bb21413b08f5cc2 100644
--- a/packages/kokkos/core/unit_test/TestPolicyConstruction.hpp
+++ b/packages/kokkos/core/unit_test/TestPolicyConstruction.hpp
@@ -476,6 +476,9 @@ private:
   void test_run_time_parameters_type() {
     int league_size = 131;
     int team_size = 4 < policy_t::execution_space::concurrency() ? 4 : policy_t::execution_space::concurrency();
+#ifdef KOKKOS_ENABLE_HPX
+    team_size = 1;
+#endif
     int chunk_size = 4;
     int per_team_scratch = 1024;
     int per_thread_scratch = 16;
diff --git a/packages/kokkos/core/unit_test/TestReduceCombinatorical.hpp b/packages/kokkos/core/unit_test/TestReduceCombinatorical.hpp
index fe947fe14e3d834853a86db0e2a527a4b29de2d7..293cc0ca594ba45895c3a0151b9598330e0dcfd5 100644
--- a/packages/kokkos/core/unit_test/TestReduceCombinatorical.hpp
+++ b/packages/kokkos/core/unit_test/TestReduceCombinatorical.hpp
@@ -453,15 +453,18 @@ struct TestReduceCombinatoricalInstantiation {
 
     result_view() = 0;
     CallParallelReduce( args..., result_view );
+    Kokkos::fence();
     ASSERT_EQ( expected_result, result_view() );
 
     value = 0;
     CallParallelReduce( args..., Kokkos::View< double, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged> >( &value ) );
+    Kokkos::fence();
     ASSERT_EQ( expected_result, value );
 
     result_view() = 0;
     const Kokkos::View< double, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged> > result_view_const_um = result_view;
     CallParallelReduce( args..., result_view_const_um );
+    Kokkos::fence();
     ASSERT_EQ( expected_result, result_view_const_um() );
 
     value = 0;
@@ -526,18 +529,21 @@ struct TestReduceCombinatoricalInstantiation {
     h_r() = 0;
     Kokkos::deep_copy( result_view, h_r );
     CallParallelReduce( args..., Test::ReduceCombinatorical::FunctorScalarFinal< ISTEAM >( result_view ) );
+    Kokkos::fence();
     Kokkos::deep_copy( h_r, result_view );
     ASSERT_EQ( expected_result, h_r() );
 
     h_r() = 0;
     Kokkos::deep_copy( result_view, h_r );
     CallParallelReduce( args..., Test::ReduceCombinatorical::FunctorScalarJoinFinal< ISTEAM >( result_view ) );
+    Kokkos::fence();
     Kokkos::deep_copy( h_r, result_view );
     ASSERT_EQ( expected_result, h_r() );
 
     h_r() = 0;
     Kokkos::deep_copy( result_view, h_r );
     CallParallelReduce( args..., Test::ReduceCombinatorical::FunctorScalarJoinFinalInit< ISTEAM >( result_view ) );
+    Kokkos::fence();
     Kokkos::deep_copy( h_r, result_view );
     ASSERT_EQ( expected_result, h_r() );
   }
diff --git a/packages/kokkos/core/unit_test/TestReduceDeviceView.hpp b/packages/kokkos/core/unit_test/TestReduceDeviceView.hpp
index 4f65166e373ce90e1c6d4e523b61a97215824291..d55c5449bcf1ff844dcb94bb2f6e39f068a63cee 100644
--- a/packages/kokkos/core/unit_test/TestReduceDeviceView.hpp
+++ b/packages/kokkos/core/unit_test/TestReduceDeviceView.hpp
@@ -30,7 +30,7 @@ void test_reduce_device_view(int64_t N, PolicyType policy, ReduceFunctor functor
        TestIsAsynchFunctor(atomic_test));
      double time0 = timer.seconds();
      timer.reset();
-     ExecSpace::execution_space::fence();
+     typename ExecSpace::execution_space().fence();
      double time_fence0 = timer.seconds(); 
      Kokkos::deep_copy(result,0);
      timer.reset();
@@ -42,7 +42,7 @@ void test_reduce_device_view(int64_t N, PolicyType policy, ReduceFunctor functor
      double time1 = timer.seconds();
      // Check whether it was asyncronous
      timer.reset();
-     ExecSpace::execution_space::fence();
+     typename ExecSpace::execution_space().fence();
      double time_fence1 = timer.seconds();    
      Kokkos::deep_copy(reducer_result,result);    
      Kokkos::deep_copy(result,0);
@@ -55,7 +55,7 @@ void test_reduce_device_view(int64_t N, PolicyType policy, ReduceFunctor functor
      double time2 = timer.seconds();
      // Check whether it was asyncronous
      timer.reset();
-     ExecSpace::execution_space::fence();
+     typename ExecSpace::execution_space().fence();
      double time_fence2 = timer.seconds();    
      Kokkos::deep_copy(view_result,result);    
      Kokkos::deep_copy(result,0);
@@ -69,7 +69,7 @@ void test_reduce_device_view(int64_t N, PolicyType policy, ReduceFunctor functor
 
      // Check whether it was asyncronous
      timer.reset();
-     ExecSpace::execution_space::fence();
+     typename ExecSpace::execution_space().fence();
      double time_fence3 = timer.seconds();
 
      ASSERT_EQ(N,scalar_result); 
diff --git a/packages/kokkos/core/unit_test/TestReducers.hpp b/packages/kokkos/core/unit_test/TestReducers.hpp
index 7270ea33754efc8259ad610f37c64b3e3ef67480..1d775744123e70f895d4598c733fae8fd6ca0450 100644
--- a/packages/kokkos/core/unit_test/TestReducers.hpp
+++ b/packages/kokkos/core/unit_test/TestReducers.hpp
@@ -319,6 +319,7 @@ struct TestReducers {
       sum_view() = init;
       Kokkos::Sum< Scalar > reducer_view( sum_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       Scalar sum_view_scalar = sum_view();
       ASSERT_EQ( sum_view_scalar, reference_sum );
@@ -365,6 +366,7 @@ struct TestReducers {
       prod_view() = init;
       Kokkos::Prod< Scalar > reducer_view( prod_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       Scalar prod_view_scalar = prod_view();
       ASSERT_EQ( prod_view_scalar, reference_prod );
@@ -412,6 +414,7 @@ struct TestReducers {
       min_view() = init;
       Kokkos::Min< Scalar > reducer_view( min_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       Scalar min_view_scalar = min_view();
       ASSERT_EQ( min_view_scalar, reference_min );
@@ -459,6 +462,7 @@ struct TestReducers {
       max_view() = init;
       Kokkos::Max< Scalar > reducer_view( max_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       Scalar max_view_scalar = max_view();
       ASSERT_EQ( max_view_scalar, reference_max );
@@ -517,6 +521,7 @@ struct TestReducers {
       Kokkos::View< value_type, Kokkos::HostSpace > min_view( "View" );
       Kokkos::MinLoc< Scalar, int > reducer_view( min_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       value_type min_view_scalar = min_view();
       ASSERT_EQ( min_view_scalar.val, reference_min );
@@ -577,6 +582,7 @@ struct TestReducers {
       Kokkos::View< value_type, Kokkos::HostSpace > max_view( "View" );
       Kokkos::MaxLoc< Scalar, int > reducer_view( max_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       value_type max_view_scalar = max_view();
       ASSERT_EQ( max_view_scalar.val, reference_max );
@@ -687,6 +693,7 @@ struct TestReducers {
        Kokkos::View< value_type, Kokkos::HostSpace > minmax_view( "View" );
        Kokkos::MinMaxLoc< Scalar, int > reducer_view( minmax_view );
        Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+       Kokkos::fence();
 
        value_type minmax_view_scalar = minmax_view();
        ASSERT_EQ( minmax_view_scalar.min_val, reference_min );
@@ -740,6 +747,7 @@ struct TestReducers {
       band_view() = init;
       Kokkos::BAnd< Scalar > reducer_view( band_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       Scalar band_view_scalar = band_view();
       ASSERT_EQ( band_view_scalar, reference_band );
@@ -786,6 +794,7 @@ struct TestReducers {
       bor_view() = init;
       Kokkos::BOr< Scalar > reducer_view( bor_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       Scalar bor_view_scalar = bor_view();
       ASSERT_EQ( bor_view_scalar, reference_bor );
@@ -832,6 +841,7 @@ struct TestReducers {
       land_view() = init;
       Kokkos::LAnd< Scalar > reducer_view( land_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       Scalar land_view_scalar = land_view();
       ASSERT_EQ( land_view_scalar, reference_land );
@@ -878,6 +888,7 @@ struct TestReducers {
       lor_view() = init;
       Kokkos::LOr< Scalar > reducer_view( lor_view );
       Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, N ), f, reducer_view );
+      Kokkos::fence();
 
       Scalar lor_view_scalar = lor_view();
       ASSERT_EQ( lor_view_scalar, reference_lor );
diff --git a/packages/kokkos/core/unit_test/TestScan.hpp b/packages/kokkos/core/unit_test/TestScan.hpp
index e021ed09f588dc870ea6c8ef76c832b52b7262f9..eaebb254a73036880aa182fd7d72e2a3df05d7a2 100644
--- a/packages/kokkos/core/unit_test/TestScan.hpp
+++ b/packages/kokkos/core/unit_test/TestScan.hpp
@@ -96,6 +96,7 @@ struct TestScan {
 
     long long int total = 0;
     Kokkos::parallel_scan( N, *this, total );
+
     run_check( size_t( ( N+1 )*N/2 ), size_t( total ) );
     check_error();
   }
@@ -109,6 +110,8 @@ struct TestScan {
     errors = errors_a;
     
     Kokkos::parallel_scan( exec_policy( Start , N ) , *this );
+    Kokkos::fence();
+
     check_error();
   }
 
@@ -138,7 +141,7 @@ TEST_F( TEST_CATEGORY, scan )
   TestScan< TEST_EXECSPACE >( 0 );
   TestScan< TEST_EXECSPACE >( 100000 );
   TestScan< TEST_EXECSPACE >( 10000000 );
-  TEST_EXECSPACE::fence();
+  TEST_EXECSPACE().fence();
 }
 
 
@@ -153,7 +156,7 @@ TEST_F( TEST_CATEGORY, scan )
   TestScanFunctor( 1000000 );
   TestScanFunctor( 10000000 );
 
-  TEST_EXECSPACE::fence();
+  TEST_EXECSPACE().fence();
 }*/
 
 
diff --git a/packages/kokkos/core/unit_test/TestSharedAlloc.hpp b/packages/kokkos/core/unit_test/TestSharedAlloc.hpp
index 1a942b89c8ef2bfa3db473f9f462b5ce00870628..c475fe55dc3291bdf7959b7673297ab6f7508fee 100644
--- a/packages/kokkos/core/unit_test/TestSharedAlloc.hpp
+++ b/packages/kokkos/core/unit_test/TestSharedAlloc.hpp
@@ -107,6 +107,8 @@ void test_shared_alloc()
       ASSERT_EQ( r[i], RecordMemS::get_record( r[i]->data() ) );
     });
 
+    Kokkos::fence();
+
 #ifdef KOKKOS_DEBUG
     // Sanity check for the whole set of allocation records to which this record belongs.
     RecordBase::is_sane( r[0] );
@@ -120,6 +122,8 @@ void test_shared_alloc()
 #endif
       }
     });
+
+    Kokkos::fence();
   }
 
   {
@@ -145,6 +149,8 @@ void test_shared_alloc()
       ASSERT_EQ( r[i], RecordMemS::get_record( r[i]->data() ) );
     });
 
+    Kokkos::fence();
+
 #ifdef KOKKOS_DEBUG
     RecordBase::is_sane( r[0] );
 #endif
@@ -157,6 +163,8 @@ void test_shared_alloc()
       }
     });
 
+    Kokkos::fence();
+
     ASSERT_EQ( destroy_count, int( N ) );
   }
 
@@ -196,12 +204,14 @@ void test_shared_alloc()
         ASSERT_EQ( track.use_count(), 1 );
       }
 
-      Kokkos::parallel_for( range, [=] ( size_t i ) {
+      Kokkos::parallel_for( range, [=] ( size_t ) {
         Tracker local_tracker;
         local_tracker.assign_allocated_record_to_uninitialized( rec );
         ASSERT_GT( rec->use_count(), 1 );
       });
 
+      Kokkos::fence();
+
       ASSERT_EQ( rec->use_count(), 1 );
       ASSERT_EQ( track.use_count(), 1 );
 
diff --git a/packages/kokkos/core/unit_test/TestTaskScheduler.hpp b/packages/kokkos/core/unit_test/TestTaskScheduler.hpp
index ac32a01fb8bb3e0e03681167203e0fc4e5b55c16..361e8da9e1501537f6766fc71c6e91d212721d97 100644
--- a/packages/kokkos/core/unit_test/TestTaskScheduler.hpp
+++ b/packages/kokkos/core/unit_test/TestTaskScheduler.hpp
@@ -47,11 +47,15 @@
 #include <Kokkos_Macros.hpp>
 #if defined( KOKKOS_ENABLE_TASKDAG )
 #include <Kokkos_Core.hpp>
+#include <impl/Kokkos_FixedBufferMemoryPool.hpp>
 #include <cstdio>
 #include <iostream>
 #include <cmath>
 
 
+//==============================================================================
+// <editor-fold desc="TestFib"> {{{1
+
 namespace TestTaskScheduler {
 
 namespace {
@@ -72,29 +76,30 @@ long eval_fib( long n )
 
 }
 
-template< typename Space >
+template< typename Scheduler >
 struct TestFib
 {
-  typedef Kokkos::TaskScheduler< Space >  sched_type;
-  typedef Kokkos::Future< long, Space >   future_type;
-  typedef long                            value_type;
+  using sched_type = Scheduler;
+  using future_type = Kokkos::BasicFuture< long, Scheduler >;
+  using value_type = long;
 
-  sched_type  sched;
   future_type fib_m1;
   future_type fib_m2;
   const value_type n;
 
   KOKKOS_INLINE_FUNCTION
-  TestFib( const sched_type & arg_sched, const value_type arg_n )
-    : sched( arg_sched ), fib_m1(), fib_m2(), n( arg_n ) {}
+  TestFib( const value_type arg_n )
+    : fib_m1(), fib_m2(), n( arg_n ) {}
 
   KOKKOS_INLINE_FUNCTION
-  void operator()( typename sched_type::member_type &, value_type & result )
+  void operator()( typename sched_type::member_type & member, value_type & result )
   {
 #if 0
     printf( "\nTestFib(%ld) %d %d\n", n, int( !fib_m1.is_null() ), int( !fib_m2.is_null() ) );
 #endif
 
+    auto& sched = member.scheduler();
+
     if ( n < 2 ) {
       result = n;
     }
@@ -107,13 +112,13 @@ struct TestFib
       // path to completion.
 
       fib_m2 = Kokkos::task_spawn( Kokkos::TaskSingle( sched, Kokkos::TaskPriority::High )
-                                 , TestFib( sched, n - 2 ) );
+                                 , TestFib( n - 2 ) );
 
       fib_m1 = Kokkos::task_spawn( Kokkos::TaskSingle( sched )
-                                 , TestFib( sched, n - 1 ) );
+                                 , TestFib( n - 1 ) );
 
-      Kokkos::Future< Space > dep[] = { fib_m1, fib_m2 };
-      Kokkos::Future< Space > fib_all = Kokkos::when_all( dep, 2 );
+      Kokkos::BasicFuture<void, Scheduler> dep[] = { fib_m1, fib_m2 };
+      Kokkos::BasicFuture<void, Scheduler> fib_all = sched.when_all( dep, 2 );
 
       if ( !fib_m2.is_null() && !fib_m1.is_null() && !fib_all.is_null() ) {
         // High priority to retire this branch.
@@ -123,9 +128,9 @@ struct TestFib
 #if 1
         printf( "TestFib(%ld) insufficient memory alloc_capacity(%d) task_max(%d) task_accum(%ld)\n"
                , n
-               , sched.allocation_capacity()
-               , sched.allocated_task_count_max()
-               , sched.allocated_task_count_accum()
+               , 0 //sched.allocation_capacity()
+               , 0 //sched.allocated_task_count_max()
+               , 0l //sched.allocated_task_count_accum()
                );
 #endif
 
@@ -149,12 +154,18 @@ struct TestFib
                          , std::min(size_t(MaxBlockSize),MemoryCapacity)
                          , std::min(size_t(SuperBlockSize),MemoryCapacity) );
 
-    future_type f = Kokkos::host_spawn( Kokkos::TaskSingle( root_sched )
-                                      , TestFib( root_sched, i ) );
+    {
+      future_type f = Kokkos::host_spawn( Kokkos::TaskSingle( root_sched )
+                                        , TestFib( i ) );
+
+      Kokkos::wait( root_sched );
+
+      ASSERT_EQ( eval_fib( i ), f.get() );
+    }
+
+    ASSERT_EQ(root_sched.queue().allocation_count(), 0);
 
-    Kokkos::wait( root_sched );
 
-    ASSERT_EQ( eval_fib( i ), f.get() );
 
 #if 0
     fprintf( stdout, "\nTestFib::run(%d) spawn_size(%d) when_all_size(%d) alloc_capacity(%d) task_max(%d) task_accum(%ld)\n"
@@ -172,32 +183,36 @@ struct TestFib
 
 } // namespace TestTaskScheduler
 
+// </editor-fold> end TestFib }}}1
+//==============================================================================
+
 //----------------------------------------------------------------------------
 
+//==============================================================================
+// <editor-fold desc="TestTaskDependence"> {{{1
+
 namespace TestTaskScheduler {
 
-template< class Space >
+template< class Scheduler >
 struct TestTaskDependence {
-  typedef Kokkos::TaskScheduler< Space >  sched_type;
-  typedef Kokkos::Future< Space >         future_type;
-  typedef Kokkos::View< long, Space >     accum_type;
+  typedef Scheduler  sched_type;
+  typedef Kokkos::BasicFuture< void, Scheduler > future_type;
+  typedef Kokkos::View< long, typename sched_type::execution_space >     accum_type;
   typedef void                            value_type;
 
-  sched_type  m_sched;
   accum_type  m_accum;
   long        m_count;
 
   KOKKOS_INLINE_FUNCTION
   TestTaskDependence( long n
-                    , const sched_type & arg_sched
                     , const accum_type & arg_accum )
-    : m_sched( arg_sched )
-    , m_accum( arg_accum )
+    : m_accum( arg_accum )
     , m_count( n ) {}
 
   KOKKOS_INLINE_FUNCTION
-  void operator()( typename sched_type::member_type & )
+  void operator()( typename sched_type::member_type & member )
   {
+    auto& sched = member.scheduler();
     enum { CHUNK = 8 };
     const int n = CHUNK < m_count ? CHUNK : m_count;
 
@@ -206,14 +221,14 @@ struct TestTaskDependence {
       const int increment = ( m_count + n - 1 ) / n;
 
       future_type f =
-        m_sched.when_all( n , [this,increment]( int i ) {
+        sched.when_all( n , [this,&member,increment]( int i ) {
           const long inc   = increment ;
           const long begin = i * inc ;
           const long count = begin + inc < m_count ? inc : m_count - begin ;
 
           return Kokkos::task_spawn
-            ( Kokkos::TaskSingle( m_sched )
-            , TestTaskDependence( count, m_sched, m_accum ) );
+            ( Kokkos::TaskSingle( member.scheduler() )
+            , TestTaskDependence( count, m_accum ) );
         });
 
       m_count = 0;
@@ -244,7 +259,7 @@ struct TestTaskDependence {
 
     typename accum_type::HostMirror host_accum = Kokkos::create_mirror_view( accum );
 
-    Kokkos::host_spawn( Kokkos::TaskSingle( sched ), TestTaskDependence( n, sched, accum ) );
+    Kokkos::host_spawn( Kokkos::TaskSingle( sched ), TestTaskDependence( n, accum ) );
 
     Kokkos::wait( sched );
 
@@ -256,22 +271,25 @@ struct TestTaskDependence {
 
 } // namespace TestTaskScheduler
 
+// </editor-fold> end TestTaskDependence }}}1
+//==============================================================================
+
 //----------------------------------------------------------------------------
 
 namespace TestTaskScheduler {
 
-template< class ExecSpace >
+template< class Scheduler >
 struct TestTaskTeam {
   //enum { SPAN = 8 };
   enum { SPAN = 33 };
   //enum { SPAN = 1 };
 
   typedef void                                value_type;
-  typedef Kokkos::TaskScheduler< ExecSpace >  sched_type;
-  typedef Kokkos::Future< ExecSpace >         future_type;
+  using sched_type = Scheduler;
+  using future_type = Kokkos::BasicFuture<void, sched_type>;
+  using ExecSpace = typename sched_type::execution_space;
   typedef Kokkos::View< long*, ExecSpace >    view_type;
 
-  sched_type   sched;
   future_type  future;
 
   view_type   parfor_result;
@@ -281,14 +299,12 @@ struct TestTaskTeam {
   const long  nvalue;
 
   KOKKOS_INLINE_FUNCTION
-  TestTaskTeam( const sched_type & arg_sched
-              , const view_type  & arg_parfor_result
+  TestTaskTeam( const view_type  & arg_parfor_result
               , const view_type  & arg_parreduce_check
               , const view_type  & arg_parscan_result
               , const view_type  & arg_parscan_check
               , const long         arg_nvalue )
-    : sched( arg_sched )
-    , future()
+    : future()
     , parfor_result( arg_parfor_result )
     , parreduce_check( arg_parreduce_check )
     , parscan_result( arg_parscan_result )
@@ -298,21 +314,22 @@ struct TestTaskTeam {
   KOKKOS_INLINE_FUNCTION
   void operator()( typename sched_type::member_type & member )
   {
+    auto& sched = member.scheduler();
     const long end   = nvalue + 1;
+    // begin = max(end - SPAN, 0);
     const long begin = 0 < end - SPAN ? end - SPAN : 0;
 
     if ( 0 < begin && future.is_null() ) {
       if ( member.team_rank() == 0 ) {
         future = Kokkos::task_spawn( Kokkos::TaskTeam( sched )
-                                   , TestTaskTeam( sched
-                                                 , parfor_result
+                                   , TestTaskTeam( parfor_result
                                                  , parreduce_check
                                                  , parscan_result
                                                  , parscan_check
                                                  , begin - 1 )
                                    );
 
-        #ifndef __HCC_ACCELERATOR__
+        #if !defined(__HCC_ACCELERATOR__) && !defined(__CUDA_ARCH__)
         assert( !future.is_null() );
         #endif
 
@@ -449,8 +466,7 @@ struct TestTaskTeam {
       host_parscan_check = Kokkos::create_mirror_view( root_parscan_check );
 
     future_type f = Kokkos::host_spawn( Kokkos::TaskTeam( root_sched )
-                                      , TestTaskTeam( root_sched
-                                                    , root_parfor_result
+                                      , TestTaskTeam( root_parfor_result
                                                     , root_parreduce_check
                                                     , root_parscan_result
                                                     , root_parscan_check
@@ -492,27 +508,25 @@ struct TestTaskTeam {
   }
 };
 
-template< class ExecSpace >
+template< class Scheduler >
 struct TestTaskTeamValue {
   enum { SPAN = 8 };
 
   typedef long                                     value_type;
-  typedef Kokkos::TaskScheduler< ExecSpace >       sched_type;
-  typedef Kokkos::Future< value_type, ExecSpace >  future_type;
+  using sched_type = Scheduler;
+  using future_type = Kokkos::BasicFuture< value_type, sched_type >;
+  using ExecSpace = typename sched_type::execution_space;
   typedef Kokkos::View< long*, ExecSpace >         view_type;
 
-  sched_type   sched;
   future_type  future;
 
   view_type   result;
   const long  nvalue;
 
   KOKKOS_INLINE_FUNCTION
-  TestTaskTeamValue( const sched_type & arg_sched
-                   , const view_type  & arg_result
+  TestTaskTeamValue( const view_type  & arg_result
                    , const long         arg_nvalue )
-    : sched( arg_sched )
-    , future()
+    : future()
     , result( arg_result )
     , nvalue( arg_nvalue ) {}
 
@@ -523,12 +537,16 @@ struct TestTaskTeamValue {
     const long end   = nvalue + 1;
     const long begin = 0 < end - SPAN ? end - SPAN : 0;
 
+    auto& sched = member.scheduler();
+
     if ( 0 < begin && future.is_null() ) {
       if ( member.team_rank() == 0 ) {
-        future = sched.task_spawn( TestTaskTeamValue( sched, result, begin - 1 )
+        future = sched.task_spawn( TestTaskTeamValue( result, begin - 1 )
                                  , Kokkos::TaskTeam );
 
+        #if !defined(__HCC_ACCELERATOR__) && !defined(__CUDA_ARCH__)
         assert( !future.is_null() );
+        #endif
 
         sched.respawn( this , future );
       }
@@ -565,7 +583,7 @@ struct TestTaskTeamValue {
 
     typename view_type::HostMirror host_result = Kokkos::create_mirror_view( root_result );
 
-    future_type fv = root_sched.host_spawn( TestTaskTeamValue( root_sched, root_result, n )
+    future_type fv = root_sched.host_spawn( TestTaskTeamValue( root_result, n )
                                           , Kokkos::TaskTeam );
 
     Kokkos::wait( root_sched );
@@ -594,31 +612,30 @@ struct TestTaskTeamValue {
 
 namespace TestTaskScheduler {
 
-template< class Space >
+template< class Scheduler >
 struct TestTaskSpawnWithPool {
-  typedef Kokkos::TaskScheduler< Space >  sched_type;
-  typedef Kokkos::Future< Space >         future_type;
+  using sched_type = Scheduler;
+  using future_type = Kokkos::BasicFuture<void, sched_type>;
   typedef void                            value_type;
+  using Space = typename sched_type::execution_space;
 
-  sched_type   m_sched ;
   int  m_count ;
   Kokkos::MemoryPool<Space> m_pool ;
 
   KOKKOS_INLINE_FUNCTION
-  TestTaskSpawnWithPool( const sched_type & arg_sched
-               , const int & arg_count
-               , const Kokkos::MemoryPool<Space> & arg_pool
-               )
-    : m_sched( arg_sched )
-    , m_count( arg_count )
+  TestTaskSpawnWithPool(
+    const int & arg_count,
+    const Kokkos::MemoryPool<Space> & arg_pool
+  )
+    : m_count( arg_count )
     , m_pool( arg_pool )
     {}
 
   KOKKOS_INLINE_FUNCTION
-  void operator()( typename sched_type::member_type & )
+  void operator()( typename sched_type::member_type & member )
   {
     if ( m_count ) {
-      Kokkos::task_spawn( Kokkos::TaskSingle( m_sched ) , TestTaskSpawnWithPool( m_sched , m_count - 1, m_pool ) );
+      Kokkos::task_spawn( Kokkos::TaskSingle( member.scheduler() ) , TestTaskSpawnWithPool( m_count - 1, m_pool ) );
     }
   }
 
@@ -639,7 +656,7 @@ struct TestTaskSpawnWithPool {
 
     using other_memory_space = typename Space::memory_space;
     Kokkos::MemoryPool<Space> pool(other_memory_space(), 10000, 100, 200, 1000);
-    auto f = Kokkos::host_spawn( Kokkos::TaskSingle( sched ), TestTaskSpawnWithPool( sched, 3, pool ) );
+    auto f = Kokkos::host_spawn( Kokkos::TaskSingle( sched ), TestTaskSpawnWithPool( 3, pool ) );
 
     Kokkos::wait( sched );
   }
@@ -647,36 +664,307 @@ struct TestTaskSpawnWithPool {
 
 }
 
-namespace Test {
+//----------------------------------------------------------------------------
 
-TEST_F( TEST_CATEGORY, task_fib )
-{
-  const int N = 27 ;
-  for ( int i = 0; i < N; ++i ) {
-    TestTaskScheduler::TestFib< TEST_EXECSPACE >::run( i , ( i + 1 ) * ( i + 1 ) * 2000 );
+namespace TestTaskScheduler {
+
+template< class Scheduler >
+struct TestTaskCtorsDevice {
+  using sched_type = Scheduler;
+  using future_type = Kokkos::BasicFuture<void, sched_type>;
+  using value_type = void;
+  using Space = typename sched_type::execution_space;
+
+  int m_count;
+
+  KOKKOS_INLINE_FUNCTION
+  TestTaskCtorsDevice(const int & arg_count) : m_count(arg_count) { }
+
+  KOKKOS_INLINE_FUNCTION
+  void operator()(typename sched_type::member_type& member )
+  {
+    // Note: Default construction on the device is not allowed
+    if(m_count == 4) {
+      Kokkos::task_spawn(
+        Kokkos::TaskSingle(member.scheduler()),
+        TestTaskCtorsDevice(m_count - 1)
+      );
+    }
+    else if(m_count == 3) {
+      sched_type s = member.scheduler(); // move construct
+      s = member.scheduler(); // move assignment
+      Kokkos::task_spawn(
+        Kokkos::TaskSingle(s),
+        TestTaskCtorsDevice(m_count - 1)
+      );
+    }
+    else if(m_count == 2) {
+      sched_type s3 = member.scheduler(); // move construct from member.scheduler();
+      Kokkos::task_spawn(
+        Kokkos::TaskSingle(s3),
+        TestTaskCtorsDevice(m_count - 1)
+      );
+    }
+    else if(m_count == 1) {
+      sched_type s = member.scheduler(); // move construct from member.scheduler();
+      sched_type s2 = s; // copy construct from s
+      Kokkos::task_spawn(
+        Kokkos::TaskSingle(s2),
+        TestTaskCtorsDevice(m_count - 1)
+      );
+    }
   }
-}
 
-TEST_F( TEST_CATEGORY, task_depend )
-{
-  for ( int i = 0; i < 25; ++i ) {
-    TestTaskScheduler::TestTaskDependence< TEST_EXECSPACE >::run( i );
+  static void run()
+  {
+    using memory_space = typename sched_type::memory_space;
+
+    enum { MemoryCapacity = 16000 };
+    enum { MinBlockSize   =   64 };
+    enum { MaxBlockSize   = 1024 };
+    enum { SuperBlockSize = 4096 };
+
+    sched_type sched(
+      memory_space(), MemoryCapacity, MinBlockSize, MaxBlockSize, SuperBlockSize
+    );
+
+    auto f = Kokkos::host_spawn(
+      Kokkos::TaskSingle(sched),
+      TestTaskCtorsDevice(4)
+    );
+
+    Kokkos::wait(sched);
+
+    // TODO assertions and sanity checks
+
   }
-}
+};
 
-TEST_F( TEST_CATEGORY, task_team )
-{
-  TestTaskScheduler::TestTaskTeam< TEST_EXECSPACE >::run( 1000 );
-  //TestTaskScheduler::TestTaskTeamValue< TEST_EXECSPACE >::run( 1000 ); // Put back after testing.
 }
 
-TEST_F( TEST_CATEGORY, task_with_mempool )
-{
-  TestTaskScheduler::TestTaskSpawnWithPool< TEST_EXECSPACE >::run();
-}
+//----------------------------------------------------------------------------
+
+
+namespace TestTaskScheduler {
+
+template<class Scheduler>
+struct TestMultipleDependence {
+
+  using sched_type = Scheduler;
+  using future_bool = Kokkos::BasicFuture<bool, sched_type>;
+  using future_int = Kokkos::BasicFuture<int, sched_type>;
+  using value_type = bool;
+  using execution_space = typename sched_type::execution_space;
+
+  enum : int { NPerDepth = 6 };
+  enum : int { NFanout = 3 };
+
+  // xlC doesn't like incomplete aggregate constructors, so we have do do this manually:
+  KOKKOS_INLINE_FUNCTION
+  TestMultipleDependence(int depth, int max_depth)
+    : m_depth(depth),
+      m_max_depth(max_depth),
+      m_dep()
+  { 
+    // gcc 4.8 has an internal compile error when I give the initializer in the class, so I have do do it here
+    for(int i = 0; i < NPerDepth; ++i) {
+      m_result_futures[i] = future_bool();
+    }
+  }
+
+  // xlC doesn't like incomplete aggregate constructors, so we have do do this manually:
+  KOKKOS_INLINE_FUNCTION
+  TestMultipleDependence(int depth, int max_depth, future_int dep)
+    : m_depth(depth),
+      m_max_depth(max_depth),
+      m_dep(dep)
+  { 
+    // gcc 4.8 has an internal compile error when I give the initializer in the class, so I have do do it here
+    for(int i = 0; i < NPerDepth; ++i) {
+      m_result_futures[i] = future_bool();
+    }
+  }
+
+  int m_depth;
+  int m_max_depth;
+  future_int m_dep;
+  future_bool m_result_futures[NPerDepth];
+
+
+  struct TestCheckReady {
+     future_int m_dep;
+     using value_type = bool;
+     KOKKOS_INLINE_FUNCTION
+     void operator()(typename Scheduler::member_type&, bool& value) {
+       // if it was "transiently" ready, this could be false even if we made it a dependence of this task
+       value = m_dep.is_ready();
+       return;
+     }
+  };
+     
+
+  struct TestComputeValue {
+    using value_type = int;
+    KOKKOS_INLINE_FUNCTION
+    void operator()(typename Scheduler::member_type&, int& result) {
+      double value = 0;
+      // keep this one busy for a while
+      for(int i = 0; i < 10000; ++i) {
+        value += i * i / 7.138 / value;
+      }
+      // Do something irrelevant
+      result = int(value) << 2;
+      return;
+    }
+  };
+
+
+  KOKKOS_INLINE_FUNCTION
+  void operator()(typename sched_type::member_type & member, bool& value)
+  {
+    if(m_result_futures[0].is_null()) {
+      if (m_depth == 0) {
+        // Spawn one expensive task at the root
+        m_dep = Kokkos::task_spawn(Kokkos::TaskSingle(member.scheduler()), TestComputeValue{});
+      }
+
+      // Then check for it to be ready in a whole bunch of other tasks that race
+      int n_checkers = NPerDepth;
+      if(m_depth < m_max_depth) {
+        n_checkers -= NFanout;
+        for(int i = n_checkers; i < NPerDepth; ++i) {
+          m_result_futures[i] = Kokkos::task_spawn(Kokkos::TaskSingle(member.scheduler()),
+            TestMultipleDependence<Scheduler>(m_depth + 1, m_max_depth, m_dep)
+          );
+        }
+      }
+
+      for(int i = 0; i < n_checkers; ++i) {
+        m_result_futures[i] = member.scheduler().spawn(Kokkos::TaskSingle(m_dep), TestCheckReady{m_dep});
+      }
+      auto done = member.scheduler().when_all(m_result_futures, NPerDepth);
+      Kokkos::respawn(this, done);
+
+      return;
+    }
+    else {
+      value = true;
+      for(int i = 0; i < NPerDepth; ++i) {
+        value = value && !m_result_futures[i].is_null();
+        if(value) {
+          value = value && m_result_futures[i].get();
+        }
+      }
+      return;
+    }
+  }
+
+  static void run(int depth)
+  {
+    typedef typename sched_type::memory_space memory_space;
+
+    enum { MemoryCapacity = 1 << 30 };
+    enum { MinBlockSize   =   64 };
+    enum { MaxBlockSize   = 1024 };
+    enum { SuperBlockSize = 4096 };
+
+    sched_type sched( memory_space()
+                    , MemoryCapacity
+                    , MinBlockSize
+                    , MaxBlockSize
+                    , SuperBlockSize );
+
+    auto f = Kokkos::host_spawn( Kokkos::TaskSingle( sched ), TestMultipleDependence<Scheduler>( 0, depth )  );
+
+    Kokkos::wait( sched );
+
+    ASSERT_TRUE( f.get() );
+
+  }
+};
 
 }
 
+//----------------------------------------------------------------------------
+
+#define KOKKOS_PP_CAT_IMPL(x, y) x ## y
+#define KOKKOS_TEST_WITH_SUFFIX(x, y) KOKKOS_PP_CAT_IMPL(x, y)
+
+#define TEST_SCHEDULER_SUFFIX _deprecated
+#define TEST_SCHEDULER Kokkos::DeprecatedTaskScheduler<TEST_EXECSPACE>
+#include "TestTaskScheduler_single.hpp"
+#undef TEST_SCHEDULER
+#undef TEST_SCHEDULER_SUFFIX
+
+#define TEST_SCHEDULER_SUFFIX _deprecated_multiple
+#define TEST_SCHEDULER Kokkos::DeprecatedTaskSchedulerMultiple<TEST_EXECSPACE>
+#include "TestTaskScheduler_single.hpp"
+#undef TEST_SCHEDULER
+#undef TEST_SCHEDULER_SUFFIX
+
+
+#define TEST_SCHEDULER_SUFFIX _single
+#define TEST_SCHEDULER Kokkos::TaskScheduler<TEST_EXECSPACE>
+#include "TestTaskScheduler_single.hpp"
+#undef TEST_SCHEDULER
+#undef TEST_SCHEDULER_SUFFIX
+
+#define TEST_SCHEDULER_SUFFIX _multiple
+#define TEST_SCHEDULER Kokkos::TaskSchedulerMultiple<TEST_EXECSPACE>
+#include "TestTaskScheduler_single.hpp"
+#undef TEST_SCHEDULER
+#undef TEST_SCHEDULER_SUFFIX
+
+
+#define TEST_SCHEDULER_SUFFIX _chase_lev
+#define TEST_SCHEDULER Kokkos::ChaseLevTaskScheduler<TEST_EXECSPACE>
+#include "TestTaskScheduler_single.hpp"
+#undef TEST_SCHEDULER
+#undef TEST_SCHEDULER_SUFFIX
+
+#if 0
+#define TEST_SCHEDULER_SUFFIX _fixed_mempool
+#define TEST_SCHEDULER \
+      Kokkos::SimpleTaskScheduler< \
+        TEST_EXECSPACE, \
+        Kokkos::Impl::SingleTaskQueue< \
+          TEST_EXECSPACE, \
+          Kokkos::Impl::default_tasking_memory_space_for_execution_space_t<TEST_EXECSPACE>, \
+          Kokkos::Impl::TaskQueueTraitsLockBased, \
+          Kokkos::Impl::FixedBlockSizeMemoryPool< \
+            Kokkos::Device<TEST_EXECSPACE, Kokkos::Impl::default_tasking_memory_space_for_execution_space_t<TEST_EXECSPACE>>, \
+            128, \
+            16 \
+          > \
+        > \
+      >
+#include "TestTaskScheduler_single.hpp"
+#undef TEST_SCHEDULER
+#undef TEST_SCHEDULER_SUFFIX
+
+#define TEST_SCHEDULER_SUFFIX _fixed_mempool_multiple
+#define TEST_SCHEDULER \
+      Kokkos::SimpleTaskScheduler< \
+        TEST_EXECSPACE, \
+        Kokkos::Impl::MultipleTaskQueue< \
+          TEST_EXECSPACE, \
+          Kokkos::Impl::default_tasking_memory_space_for_execution_space_t<TEST_EXECSPACE>, \
+          Kokkos::Impl::TaskQueueTraitsLockBased, \
+          Kokkos::Impl::FixedBlockSizeMemoryPool< \
+            Kokkos::Device<TEST_EXECSPACE, Kokkos::Impl::default_tasking_memory_space_for_execution_space_t<TEST_EXECSPACE>>, \
+            128, \
+            16 \
+          > \
+        > \
+      >
+#include "TestTaskScheduler_single.hpp"
+#undef TEST_SCHEDULER
+#undef TEST_SCHEDULER_SUFFIX
+#endif
+
+#undef KOKKOS_TEST_WITH_SUFFIX
+#undef KOKKOS_PP_CAT_IMPL
+
 #endif // #if defined( KOKKOS_ENABLE_TASKDAG )
 #endif // #ifndef KOKKOS_UNITTEST_TASKSCHEDULER_HPP
 
diff --git a/packages/kokkos/core/unit_test/TestTaskScheduler_single.hpp b/packages/kokkos/core/unit_test/TestTaskScheduler_single.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..6ac9a6d74038dba76007f9a6e6c1d62f177abf44
--- /dev/null
+++ b/packages/kokkos/core/unit_test/TestTaskScheduler_single.hpp
@@ -0,0 +1,92 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, KOKKOS_TEST_WITH_SUFFIX(task_fib, TEST_SCHEDULER_SUFFIX) )
+{
+  const int N = 27 ;
+  for ( int i = 0; i < N; ++i ) {
+    TestTaskScheduler::TestFib< TEST_SCHEDULER >::run( i , ( i + 1 ) * ( i + 1 ) * 64000 );
+  }
+}
+
+TEST_F( TEST_CATEGORY, KOKKOS_TEST_WITH_SUFFIX(task_depend, TEST_SCHEDULER_SUFFIX) )
+{
+  for ( int i = 0; i < 25; ++i ) {
+    TestTaskScheduler::TestTaskDependence< TEST_SCHEDULER >::run( i );
+  }
+}
+
+TEST_F( TEST_CATEGORY, KOKKOS_TEST_WITH_SUFFIX(task_team, TEST_SCHEDULER_SUFFIX) )
+{
+  TestTaskScheduler::TestTaskTeam< TEST_SCHEDULER >::run( 1000 );
+  //TestTaskScheduler::TestTaskTeamValue< TEST_EXECSPACE >::run( 1000 ); // Put back after testing.
+}
+
+TEST_F( TEST_CATEGORY, KOKKOS_TEST_WITH_SUFFIX(task_with_mempool, TEST_SCHEDULER_SUFFIX) )
+{
+  TestTaskScheduler::TestTaskSpawnWithPool<TEST_SCHEDULER>::run();
+}
+
+TEST_F( TEST_CATEGORY, KOKKOS_TEST_WITH_SUFFIX(task_multiple_depend, TEST_SCHEDULER_SUFFIX) )
+{
+  for ( int i = 2; i < 6; ++i ) {
+    TestTaskScheduler::TestMultipleDependence<TEST_SCHEDULER>::run( i );
+  }
+}
+
+TEST_F( TEST_CATEGORY, KOKKOS_TEST_WITH_SUFFIX(task_scheduler_ctors, TEST_SCHEDULER_SUFFIX) )
+{
+  TEST_SCHEDULER sched;
+  TEST_SCHEDULER sched2 = sched;
+  sched = sched2;
+}
+
+TEST_F( TEST_CATEGORY, KOKKOS_TEST_WITH_SUFFIX(task_scheduer_ctors_device, TEST_SCHEDULER_SUFFIX) )
+{
+  TestTaskScheduler::TestTaskCtorsDevice<TEST_SCHEDULER>::run();
+}
+
+
+} // end namespace Test
\ No newline at end of file
diff --git a/packages/kokkos/core/unit_test/TestTeam.hpp b/packages/kokkos/core/unit_test/TestTeam.hpp
index 487a4d581c9ab6c399a670da11d4df734a5c5e76..5f325eb905355b000625234b550a83be6ab3f20c 100644
--- a/packages/kokkos/core/unit_test/TestTeam.hpp
+++ b/packages/kokkos/core/unit_test/TestTeam.hpp
@@ -72,6 +72,7 @@ struct TestTeamPolicy {
     const int tid = member.team_rank() + member.team_size() * member.league_rank();
 
     m_flags( member.team_rank(), member.league_rank() ) = tid;
+    static_assert((std::is_same<typename team_member::execution_space,ExecSpace>::value),"TeamMember::execution_space is not the same as TeamPolicy<>::execution_space");
   }
 
   KOKKOS_INLINE_FUNCTION
@@ -265,7 +266,7 @@ public:
       Kokkos::parallel_reduce( team_exec, functor_type( nwork ), tmp );
     }
 
-    execution_space::fence();
+    execution_space().fence();
 
     for ( unsigned i = 0; i < Repeat; ++i ) {
       for ( unsigned j = 0; j < Count; ++j ) {
@@ -391,7 +392,7 @@ public:
       Kokkos::deep_copy( functor.accum, total );
 
       Kokkos::parallel_reduce( team_exec, functor, result_type( & error ) );
-      DeviceType::fence();
+      DeviceType().fence();
 
       Kokkos::deep_copy( accum, functor.accum );
       Kokkos::deep_copy( total, functor.total );
@@ -400,7 +401,7 @@ public:
       ASSERT_EQ( total, accum );
     }
 
-    execution_space::fence();
+    execution_space().fence();
   }
 };
 
@@ -495,6 +496,7 @@ struct TestSharedTeam {
     typename Functor::value_type error_count = 0;
 
     Kokkos::parallel_reduce( team_exec, Functor(), result_type( & error_count ) );
+    Kokkos::fence();
 
     ASSERT_EQ( error_count, 0 );
   }
@@ -569,6 +571,8 @@ struct TestLambdaSharedTeam {
       }
     }, result_type( & error_count ) );
 
+    Kokkos::fence();
+
     ASSERT_EQ( error_count, 0 );
   }
 };
@@ -679,6 +683,7 @@ struct TestScratchTeam {
     Kokkos::parallel_reduce( team_exec.set_scratch_size( 1, Kokkos::PerTeam( team_scratch_size ),
                                                          Kokkos::PerThread( thread_scratch_size ) ),
                              Functor(), result_type( & error_count ) );
+    Kokkos::fence();
     ASSERT_EQ( error_count, 0 );
   }
 };
@@ -822,7 +827,6 @@ struct ClassNoShmemSizeFunction {
       Kokkos::TeamPolicy< TagReduce, ExecSpace, ScheduleType > policy( 10, team_size, 16 );
 
       Kokkos::parallel_reduce( policy.set_scratch_size( 0, Kokkos::PerTeam( per_team0 ), Kokkos::PerThread( per_thread0 ) ).set_scratch_size( 1, Kokkos::PerTeam( per_team1 ), Kokkos::PerThread( per_thread1 ) ), *this, error );
-      Kokkos::fence();
 
       ASSERT_EQ( error, 0 );
     }
@@ -877,7 +881,6 @@ struct ClassWithShmemSizeFunction {
       Kokkos::parallel_reduce( policy.set_scratch_size( 1, Kokkos::PerTeam( per_team1 ),
                                                         Kokkos::PerThread( per_thread1 ) ),
                                *this, error );
-      Kokkos::fence();
 
       ASSERT_EQ( error, 0 );
     }
@@ -929,7 +932,6 @@ void test_team_mulit_level_scratch_test_lambda() {
     count += test_team_mulit_level_scratch_loop_body< ExecSpace >( team );
   }, error );
   ASSERT_EQ( error, 0 );
-  Kokkos::fence();
 #endif
 #endif
 }
diff --git a/packages/kokkos/core/unit_test/TestTeamVector.hpp b/packages/kokkos/core/unit_test/TestTeamVector.hpp
index 498d156db3935a8a135d81e0e9c4912b3ac22ef1..45433012f976da86b35a885e0911bc9f019367b3 100644
--- a/packages/kokkos/core/unit_test/TestTeamVector.hpp
+++ b/packages/kokkos/core/unit_test/TestTeamVector.hpp
@@ -290,17 +290,23 @@ struct functor_team_reduce {
   functor_team_reduce( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {}
 
   typedef typename ExecutionSpace::scratch_memory_space shmem_space;
-  typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_int;
-  unsigned team_shmem_size( int team_size ) const { return shared_int::shmem_size(team_size*13); }
+  typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_scalar_t;
+  unsigned team_shmem_size( int team_size ) const { return shared_scalar_t::shmem_size(team_size*13); }
 
   KOKKOS_INLINE_FUNCTION
   void operator()( typename policy_type::member_type team ) const {
     Scalar value = Scalar();
+    shared_scalar_t shared_value(team.team_scratch(0),1);
 
     Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i, Scalar & val )
     {
       val += i - team.league_rank() + team.league_size() + team.team_size();
     }, value );
+    
+    Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i, Scalar & val )
+    {
+      val += i - team.league_rank() + team.league_size() + team.team_size();
+    }, shared_value(0) );
 
     team.team_barrier();
 
@@ -314,11 +320,20 @@ struct functor_team_reduce {
 
       if ( test != value ) {
         if ( team.league_rank() == 0 ) {
-          printf( "FAILED team_parallel_reduce %i %i %f %f %lu\n",
+          printf( "FAILED team_parallel_reduce %i %i %lf %lf %lu\n",
                   team.league_rank(), team.team_rank(),
                   static_cast<double>( test ), static_cast<double>( value ), sizeof( Scalar ) );
         }
 
+        flag() = 1;
+      }
+      if ( test != shared_value(0) ) {
+        if ( team.league_rank() == 0 ) {
+          printf( "FAILED team_parallel_reduce with shared result %i %i %lf %lf %lu\n",
+                  team.league_rank(), team.team_rank(),
+                  static_cast<double>( test ), static_cast<double>( shared_value(0) ), sizeof( Scalar ) );
+        }
+
         flag() = 1;
       }
     });
@@ -335,12 +350,13 @@ struct functor_team_reduce_reducer {
   functor_team_reduce_reducer( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {}
 
   typedef typename ExecutionSpace::scratch_memory_space shmem_space;
-  typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_int;
-  unsigned team_shmem_size( int team_size ) const { return shared_int::shmem_size(team_size*13); }
+  typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_scalar_t;
+  unsigned team_shmem_size( int team_size ) const { return shared_scalar_t::shmem_size(team_size*13); }
 
   KOKKOS_INLINE_FUNCTION
   void operator()( typename policy_type::member_type team ) const {
     Scalar value = 0;
+    shared_scalar_t shared_value(team.team_scratch(0),1);
 
     Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i, Scalar & val )
     {
@@ -348,6 +364,13 @@ struct functor_team_reduce_reducer {
     },
       Kokkos::Sum<Scalar>(value)
     );
+    
+    Kokkos::parallel_reduce( Kokkos::TeamThreadRange( team, 131 ), [&] ( int i, Scalar & val )
+    {
+      val += i - team.league_rank() + team.league_size() + team.team_size();
+    },
+      Kokkos::Sum<Scalar>(shared_value(0))
+    );
 
     team.team_barrier();
 
@@ -360,12 +383,19 @@ struct functor_team_reduce_reducer {
       }
 
       if ( test != value ) {
-        printf( "FAILED team_vector_parallel_reduce_reducer %i %i %f %f\n",
+        printf( "FAILED team_vector_parallel_reduce_reducer %i %i %lf %lf\n",
                 team.league_rank(), team.team_rank(),
                 static_cast<double>( test ), static_cast<double>( value ) );
 
         flag() = 1;
       }
+      if ( test != shared_value(0) ) {
+        printf( "FAILED team_vector_parallel_reduce_reducer shared value %i %i %lf %lf\n",
+                team.league_rank(), team.team_rank(),
+                static_cast<double>( test ), static_cast<double>( shared_value(0) ) );
+
+        flag() = 1;
+      }
     });
   }
 };
@@ -823,7 +853,6 @@ namespace Test {
 // ( modified from kokkos-tutorials/GTC2016/Exercises/ThreeLevelPar )
 
 #if ( ! defined( KOKKOS_ENABLE_CUDA ) ) || (defined( KOKKOS_ENABLE_CUDA_LAMBDA ) && (8000 <= CUDA_VERSION))
-
 template< typename ScalarType, class DeviceType >
 class TestTripleNestedReduce
 {
@@ -843,6 +872,14 @@ public:
     if( team_size > size_type(DeviceType::execution_space::concurrency()))
       team_size = size_type(DeviceType::execution_space::concurrency());
 
+#ifdef KOKKOS_ENABLE_HPX
+    team_size = 1;
+    if (!std::is_same<execution_space, Kokkos::Experimental::HPX>::value)
+    {
+        team_size = 1;
+    }
+#endif
+
     //typedef Kokkos::LayoutLeft Layout;
     typedef Kokkos::LayoutRight Layout;
 
@@ -962,6 +999,8 @@ TEST_F( TEST_CATEGORY, triple_nested_parallelism )
   }
 #endif
   TestTripleNestedReduce< double, TEST_EXECSPACE >( 8192, 2048, 16, 16 );
+  TestTripleNestedReduce< double, TEST_EXECSPACE >( 8192, 2048, 16, 33 );
+  TestTripleNestedReduce< double, TEST_EXECSPACE >( 8192, 2048, 16, 19 );
 #ifdef KOKKOS_ENABLE_ROCM // ROCm doesn't support team sizes not powers of two
   if (!std::is_same<TEST_EXECSPACE, Kokkos::Experimental::ROCm>::value)
 #endif
diff --git a/packages/kokkos/core/unit_test/TestTeamVectorRange.hpp b/packages/kokkos/core/unit_test/TestTeamVectorRange.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..86c8dab3ff8120a1a4930a62bcf71e1000632264
--- /dev/null
+++ b/packages/kokkos/core/unit_test/TestTeamVectorRange.hpp
@@ -0,0 +1,464 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+
+#include <impl/Kokkos_Timer.hpp>
+#include <iostream>
+#include <cstdlib>
+#include <cstdint>
+#include <cinttypes>
+
+namespace TestTeamVectorRange {
+
+struct my_complex {
+  double re, im;
+  int dummy;
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex() {
+    re = 0.0;
+    im = 0.0;
+    dummy = 0;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex( const my_complex & src ) {
+    re = src.re;
+    im = src.im;
+    dummy = src.dummy;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex & operator=( const my_complex & src ) {
+    re = src.re;
+    im = src.im;
+    dummy = src.dummy;
+    return *this ;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex & operator=( const volatile my_complex & src ) {
+    re = src.re;
+    im = src.im;
+    dummy = src.dummy;
+    return *this ;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  volatile my_complex & operator=( const my_complex & src ) volatile {
+    re = src.re;
+    im = src.im;
+    dummy = src.dummy;
+    return *this ;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  volatile my_complex & operator=( const volatile my_complex & src ) volatile {
+    re = src.re;
+    im = src.im;
+    dummy = src.dummy;
+    return *this ;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex( const volatile my_complex & src ) {
+    re = src.re;
+    im = src.im;
+    dummy = src.dummy;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex( const double & val ) {
+    re = val;
+    im = 0.0;
+    dummy = 0;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex & operator+=( const my_complex & src ) {
+    re += src.re;
+    im += src.im;
+    dummy += src.dummy;
+    return *this;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void operator+=( const volatile my_complex & src ) volatile {
+    re += src.re;
+    im += src.im;
+    dummy += src.dummy;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex operator +( const my_complex & src ) {
+    my_complex tmp = *this;
+    tmp.re += src.re;
+    tmp.im += src.im;
+    tmp.dummy += src.dummy;
+    return tmp;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex operator+( const volatile my_complex & src ) volatile {
+    my_complex tmp = *this;
+    tmp.re += src.re;
+    tmp.im += src.im;
+    tmp.dummy += src.dummy;
+    return tmp;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex & operator*=( const my_complex & src ) {
+    double re_tmp = re * src.re - im * src.im;
+    double im_tmp = re * src.im + im * src.re;
+    re = re_tmp;
+    im = im_tmp;
+    dummy *= src.dummy;
+    return *this;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  void operator*=( const volatile my_complex & src ) volatile {
+    double re_tmp = re * src.re - im * src.im;
+    double im_tmp = re * src.im + im * src.re;
+    re = re_tmp;
+    im = im_tmp;
+    dummy *= src.dummy;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool operator==( const my_complex & src ) {
+    return ( re == src.re ) && ( im == src.im ) && ( dummy == src.dummy );
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool operator!=( const my_complex & src ) {
+    return ( re != src.re ) || ( im != src.im ) || ( dummy != src.dummy );
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  bool operator!=( const double & val ) {
+    return ( re != val ) || ( im != 0 ) || ( dummy != 0 );
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex & operator=( const int & val ) {
+    re = val;
+    im = 0.0;
+    dummy = 0;
+    return *this;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  my_complex & operator=( const double & val ) {
+    re = val;
+    im = 0.0;
+    dummy = 0;
+    return *this;
+  }
+
+  KOKKOS_INLINE_FUNCTION
+  operator double() {
+    return re;
+  }
+};
+}
+
+namespace Kokkos {
+template<>
+struct reduction_identity<TestTeamVectorRange::my_complex > {
+  typedef reduction_identity<double> t_red_ident;
+  KOKKOS_FORCEINLINE_FUNCTION static TestTeamVectorRange::my_complex sum()
+      {return TestTeamVectorRange::my_complex(t_red_ident::sum());}
+  KOKKOS_FORCEINLINE_FUNCTION static TestTeamVectorRange::my_complex prod()
+      {return TestTeamVectorRange::my_complex(t_red_ident::prod());}
+};
+}
+
+namespace TestTeamVectorRange {
+
+template< typename Scalar, class ExecutionSpace >
+struct functor_teamvector_for {
+  typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type;
+  typedef ExecutionSpace execution_space;
+
+  Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag;
+
+  functor_teamvector_for( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {}
+
+  typedef typename ExecutionSpace::scratch_memory_space shmem_space;
+  typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_int;
+  unsigned team_shmem_size( int team_size ) const { return shared_int::shmem_size(131); }
+
+  KOKKOS_INLINE_FUNCTION
+  void operator()( typename policy_type::member_type team ) const {
+    typedef typename shmem_space::size_type size_type;
+    const size_type shmemSize = 131;
+    shared_int values = shared_int( team.team_shmem(), shmemSize );
+
+    if ( values.data() == nullptr || values.extent(0) < shmemSize ) {
+      printf( "FAILED to allocate shared memory of size %u\n",
+              static_cast<unsigned int>( shmemSize ) );
+    }
+    else {
+      // Initialize shared memory.
+      Kokkos::parallel_for( Kokkos::TeamVectorRange( team, 131 ), [&] ( int i ) {
+        values( i ) = 0;
+      });
+      // Wait for all memory to be written.
+      team.team_barrier();
+
+      // Accumulate value into per thread shared memory.
+      // This is non blocking.
+      Kokkos::parallel_for( Kokkos::TeamVectorRange( team, 131 ), [&] ( int i )
+      {
+        values( i ) += i - team.league_rank() + team.league_size() + team.team_size();
+      });
+
+      // Wait for all memory to be written.
+      team.team_barrier();
+
+      // One thread per team executes the comparison.
+      Kokkos::single( Kokkos::PerTeam( team ), [&] ()
+      {
+        Scalar test = 0;
+        Scalar value = 0;
+
+        for ( int i = 0; i < 131; ++i ) {
+          test += i - team.league_rank() + team.league_size() + team.team_size();
+        }
+
+        for ( int i = 0; i < 131; ++i ) {
+          value += values( i );
+        }
+
+        if ( test != value ) {
+          printf ( "FAILED teamvector_parallel_for %i %i %f %f\n",
+                   team.league_rank(), team.team_rank(),
+                   static_cast<double>( test ), static_cast<double>( value ) );
+          flag() = 1;
+        }
+      });
+    }
+  }
+};
+
+template< typename Scalar, class ExecutionSpace >
+struct functor_teamvector_reduce {
+  typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type;
+  typedef ExecutionSpace execution_space;
+
+  Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag;
+
+  functor_teamvector_reduce( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {}
+
+  typedef typename ExecutionSpace::scratch_memory_space shmem_space;
+  typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_scalar_t;
+  unsigned team_shmem_size( int team_size ) const { return shared_scalar_t::shmem_size(team_size*13); }
+
+  KOKKOS_INLINE_FUNCTION
+  void operator()( typename policy_type::member_type team ) const {
+    Scalar value = Scalar();
+    shared_scalar_t shared_value(team.team_scratch(0),1);
+
+    Kokkos::parallel_reduce( Kokkos::TeamVectorRange( team, 131 ), [&] ( int i, Scalar & val )
+    {
+      val += i - team.league_rank() + team.league_size() + team.team_size();
+    }, shared_value(0) );
+
+    team.team_barrier();
+    Kokkos::parallel_reduce( Kokkos::TeamVectorRange( team, 131 ), [&] ( int i, Scalar & val )
+    {
+      val += i - team.league_rank() + team.league_size() + team.team_size();
+    }, value );
+    
+//    Kokkos::parallel_reduce( Kokkos::TeamVectorRange( team, 131 ), [&] ( int i, Scalar & val )
+//    {
+//      val += i - team.league_rank() + team.league_size() + team.team_size();
+//    }, shared_value(0) );
+
+    team.team_barrier();
+
+    Kokkos::single( Kokkos::PerTeam( team ), [&] ()
+    {
+      Scalar test = 0;
+
+      for ( int i = 0; i < 131; ++i ) {
+        test += i - team.league_rank() + team.league_size() + team.team_size();
+      }
+
+      if ( test != value ) {
+        if ( team.league_rank() == 0 ) {
+          printf( "FAILED teamvector_parallel_reduce %i %i %lf %lf %lu\n",
+                  team.league_rank(), team.team_rank(),
+                  static_cast<double>( test ), static_cast<double>( value ), sizeof( Scalar ) );
+        }
+
+        flag() = 1;
+      }
+      if ( test != shared_value(0) ) {
+        if ( team.league_rank() == 0 ) {
+          printf( "FAILED teamvector_parallel_reduce with shared result %i %i %lf %lf %lu\n",
+                  team.league_rank(), team.team_rank(),
+                  static_cast<double>( test ), static_cast<double>( shared_value(0) ), sizeof( Scalar ) );
+        }
+
+        flag() = 1;
+      }
+    });
+  }
+};
+
+template< typename Scalar, class ExecutionSpace >
+struct functor_teamvector_reduce_reducer {
+  typedef Kokkos::TeamPolicy< ExecutionSpace > policy_type;
+  typedef ExecutionSpace execution_space;
+
+  Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag;
+
+  functor_teamvector_reduce_reducer( Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > flag_ ) : flag( flag_ ) {}
+
+  typedef typename ExecutionSpace::scratch_memory_space shmem_space;
+  typedef Kokkos::View< Scalar*, shmem_space, Kokkos::MemoryUnmanaged > shared_scalar_t;
+  unsigned team_shmem_size( int team_size ) const { return shared_scalar_t::shmem_size(team_size*13); }
+
+  KOKKOS_INLINE_FUNCTION
+  void operator()( typename policy_type::member_type team ) const {
+    Scalar value = 0;
+    shared_scalar_t shared_value(team.team_scratch(0),1);
+
+    Kokkos::parallel_reduce( Kokkos::TeamVectorRange( team, 131 ), [&] ( int i, Scalar & val )
+    {
+      val += i - team.league_rank() + team.league_size() + team.team_size();
+    },
+      Kokkos::Sum<Scalar>(value)
+    );
+    
+    Kokkos::parallel_reduce( Kokkos::TeamVectorRange( team, 131 ), [&] ( int i, Scalar & val )
+    {
+      val += i - team.league_rank() + team.league_size() + team.team_size();
+    },
+      Kokkos::Sum<Scalar>(shared_value(0))
+    );
+
+    team.team_barrier();
+
+    Kokkos::single( Kokkos::PerTeam( team ), [&] ()
+    {
+      Scalar test = 0;
+
+      for ( int i = 0; i < 131; ++i ) {
+        test += i - team.league_rank() + team.league_size() + team.team_size();
+      }
+
+      if ( test != value ) {
+        printf( "FAILED teamvector_parallel_reduce_reducer %i %i %lf %lf\n",
+                team.league_rank(), team.team_rank(),
+                static_cast<double>( test ), static_cast<double>( value ) );
+
+        flag() = 1;
+      }
+      if ( test != shared_value(0) ) {
+        printf( "FAILED teamvector_parallel_reduce_reducer shared value %i %i %lf %lf\n",
+                team.league_rank(), team.team_rank(),
+                static_cast<double>( test ), static_cast<double>( shared_value(0) ) );
+
+        flag() = 1;
+      }
+    });
+  }
+};
+
+template< typename Scalar, class ExecutionSpace >
+bool test_scalar( int nteams, int team_size, int test ) {
+  Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace > d_flag( "flag" );
+  typename Kokkos::View< int, Kokkos::LayoutLeft, ExecutionSpace >::HostMirror h_flag( "h_flag" );
+  h_flag() = 0;
+  Kokkos::deep_copy( d_flag, h_flag );
+
+  if ( test == 0 ) {
+    Kokkos::parallel_for( "Test::TeamVectorFor", Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ),
+                          functor_teamvector_for< Scalar, ExecutionSpace >( d_flag ) );
+  }
+  else if ( test == 1 ) {
+    Kokkos::parallel_for( "Test::TeamVectorReduce", Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ),
+                          functor_teamvector_reduce< Scalar, ExecutionSpace >( d_flag ) );
+  }
+  else if ( test == 2 ) {
+    Kokkos::parallel_for( "Test::TeamVectorReduceReducer", Kokkos::TeamPolicy< ExecutionSpace >( nteams, team_size, 8 ),
+                          functor_teamvector_reduce_reducer< Scalar, ExecutionSpace >( d_flag ) );
+  }
+
+  Kokkos::deep_copy( h_flag, d_flag );
+
+  return ( h_flag() == 0 );
+}
+
+template< class ExecutionSpace >
+bool Test( int test ) {
+  bool passed = true;
+
+  int team_size = 33;
+  if( team_size > int(ExecutionSpace::concurrency()))
+    team_size = int(ExecutionSpace::concurrency());
+  passed = passed && test_scalar< int, ExecutionSpace >( 317, team_size, test );
+  passed = passed && test_scalar< long long int, ExecutionSpace >( 317, team_size, test );
+  passed = passed && test_scalar< float, ExecutionSpace >( 317, team_size, test );
+  passed = passed && test_scalar< double, ExecutionSpace >( 317, team_size, test );
+  passed = passed && test_scalar< my_complex, ExecutionSpace >( 317, team_size, test );
+
+  return passed;
+}
+
+} // namespace TestTeamVectorRange
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, team_teamvector_range )
+{
+  ASSERT_TRUE( ( TestTeamVectorRange::Test< TEST_EXECSPACE >( 0 ) ) );
+  ASSERT_TRUE( ( TestTeamVectorRange::Test< TEST_EXECSPACE >( 1 ) ) );
+  ASSERT_TRUE( ( TestTeamVectorRange::Test< TEST_EXECSPACE >( 2 ) ) );
+}
+}
diff --git a/packages/kokkos/core/unit_test/TestTile.hpp b/packages/kokkos/core/unit_test/TestTile.hpp
index 704c7f994090144f034a1c435d0bd85af80f8ec6..a58755dc9bb1c7c05f9d6d8c83af395a8cd5d7ae 100644
--- a/packages/kokkos/core/unit_test/TestTile.hpp
+++ b/packages/kokkos/core/unit_test/TestTile.hpp
@@ -42,6 +42,9 @@
 #ifndef TEST_TILE_HPP
 #define TEST_TILE_HPP
 
+//========================================================================
+#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
+
 #include <Kokkos_Core.hpp>
 #include <impl/Kokkos_ViewTile.hpp>
 
@@ -166,4 +169,8 @@ TEST_F( TEST_CATEGORY, tile_layout )
 }
 
 }
+
+#endif // KOKKOS_ENABLE_DEPRECATED_CODE
+//=====================================================================
+
 #endif //TEST_TILE_HPP
diff --git a/packages/kokkos/core/unit_test/TestViewAPI.hpp b/packages/kokkos/core/unit_test/TestViewAPI.hpp
index 2ebd48cd61451ad9bfddaee32c822f89e37dc1f9..e332bebff082e7169104c6e48e9fa068a9cd617f 100644
--- a/packages/kokkos/core/unit_test/TestViewAPI.hpp
+++ b/packages/kokkos/core/unit_test/TestViewAPI.hpp
@@ -827,6 +827,48 @@ struct TestViewMirror
     ASSERT_EQ( a_org(5), a_h3(5) );
   }
 
+  template< class MemoryTraits, class Space >
+  struct CopyUnInit {
+    typedef typename Kokkos::Impl::MirrorViewType<Space, double*, Layout, Kokkos::HostSpace, MemoryTraits>::view_type mirror_view_type;
+
+    mirror_view_type a_d;
+
+    KOKKOS_INLINE_FUNCTION
+    CopyUnInit( mirror_view_type & a_d_ ) : a_d(a_d_) {
+    }
+
+    KOKKOS_INLINE_FUNCTION
+    void operator() (const typename Space::size_type i) const {
+       a_d(i) = (double)(10-i);
+    }
+    
+  };
+
+  template< class MemoryTraits >
+  void static test_mirror_no_initialize() {
+    Kokkos::View< double*, Layout, Kokkos::HostSpace > a_org( "A", 10 );
+    Kokkos::View< double*, Layout, Kokkos::HostSpace, MemoryTraits > a_h = a_org;
+
+    for (int i = 0; i < 10; i++)
+    {
+       a_h(i) = (double)i;   
+    }
+    auto a_d = Kokkos::create_mirror_view( DeviceType(), a_h, Kokkos::WithoutInitializing );
+    
+    int equal_ptr_h_d = (a_h.data() == a_d.data()) ? 1 : 0;
+    constexpr int is_same_memspace = std::is_same< Kokkos::HostSpace, typename DeviceType::memory_space >::value ? 1 : 0;
+    
+    ASSERT_EQ( equal_ptr_h_d, is_same_memspace);
+
+    Kokkos::parallel_for( Kokkos::RangePolicy< typename DeviceType::execution_space >( 0, int(10)), CopyUnInit< MemoryTraits, DeviceType >(a_d));
+
+    Kokkos::deep_copy( a_h, a_d );
+
+    for (int i = 0; i < 10; i++)
+    {
+       ASSERT_EQ(a_h(i), (double)(10-i));
+    }
+  }
 
   void static testit() {
     test_mirror< Kokkos::MemoryTraits<0> >();
@@ -835,6 +877,8 @@ struct TestViewMirror
     test_mirror_view< Kokkos::MemoryTraits<Kokkos::Unmanaged> >();
     test_mirror_copy< Kokkos::MemoryTraits<0> >();
     test_mirror_copy< Kokkos::MemoryTraits<Kokkos::Unmanaged> >();
+    test_mirror_no_initialize< Kokkos::MemoryTraits<0> >();
+    test_mirror_no_initialize< Kokkos::MemoryTraits<Kokkos::Unmanaged> >();
   }
 };
 
@@ -865,7 +909,7 @@ public:
   }
 
   static void run_test_view_operator_a() {
-    {TestViewOperator< T, device > f; Kokkos::parallel_for(int(N0),f);}
+    {TestViewOperator< T, device > f; Kokkos::parallel_for(int(N0),f); Kokkos::fence();}
 #ifndef KOKKOS_ENABLE_OPENMPTARGET
     TestViewOperator_LeftAndRight< int[2][3][4][2][3][4], device >f6; f6.testit();
     TestViewOperator_LeftAndRight< int[2][3][4][2][3], device >f5; f5.testit();
diff --git a/packages/kokkos/core/unit_test/TestViewAPI_e.hpp b/packages/kokkos/core/unit_test/TestViewAPI_e.hpp
index efb34a64cc06967d228839e3f709e84a0b5d95e3..76815dc11243a8d4793b11ebc3b5325c41c8f0e7 100644
--- a/packages/kokkos/core/unit_test/TestViewAPI_e.hpp
+++ b/packages/kokkos/core/unit_test/TestViewAPI_e.hpp
@@ -194,6 +194,7 @@ inline void test_anonymous_space() {
       d_anon_dyn_view(j) += 42;
     }
   });
+  Kokkos::fence();
 #endif
 }
 
@@ -201,4 +202,45 @@ TEST_F( TEST_CATEGORY, anonymous_space )
 {
   test_anonymous_space();
 }
+
+template<class ExecSpace>
+struct TestViewOverloadResolution {
+  // Overload based on value_type and rank
+  static int foo(Kokkos::View<const double**,ExecSpace> a) {
+    return 1;
+  }
+  static int foo(Kokkos::View<const int**,ExecSpace> a) {
+    return 2;
+  }
+  static int foo(Kokkos::View<const double***,ExecSpace> a) {
+    return 3;
+  }
+
+  // Overload based on compile time dimensions
+  static int bar(Kokkos::View<double*[3],ExecSpace> a) {
+    return 4;
+  }
+  static int bar(Kokkos::View<double*[4],ExecSpace> a) {
+    return 5;
+  }
+
+  static void test_function_overload() {
+    Kokkos::View<double**, typename ExecSpace::execution_space::array_layout, ExecSpace> a("A",10,3);
+    int data_type_1 = foo(a);
+    int data_type_3 = foo(Kokkos::View<const double**, typename ExecSpace::execution_space::array_layout, ExecSpace>(a));
+    Kokkos::View<double***, typename ExecSpace::execution_space::array_layout, ExecSpace> b("B",10,3,4);
+    int data_type_2 = foo(b);
+    Kokkos::View<double*[3], typename ExecSpace::execution_space::array_layout, ExecSpace> c(a);
+    int static_extent = bar(c);
+    ASSERT_EQ(1,data_type_1);
+    ASSERT_EQ(3,data_type_2);
+    ASSERT_EQ(1,data_type_3);
+    ASSERT_EQ(4,static_extent);
+  }
+};
+
+TEST_F( TEST_CATEGORY, view_overload_resolution )
+{
+  TestViewOverloadResolution<TEST_EXECSPACE>::test_function_overload();
+}
 }
diff --git a/packages/kokkos/core/unit_test/TestViewMapping_a.hpp b/packages/kokkos/core/unit_test/TestViewMapping_a.hpp
index 03d5e501b9dad43e4882539fc1b8b2d6ab6a4fd4..69247902cd092db8c354998194c7bcc82799c04f 100644
--- a/packages/kokkos/core/unit_test/TestViewMapping_a.hpp
+++ b/packages/kokkos/core/unit_test/TestViewMapping_a.hpp
@@ -1012,12 +1012,14 @@ void test_view_mapping()
     ASSERT_EQ( a.use_count(), 1 );
     ASSERT_EQ( b.use_count(), 0 );
 
-#if !defined( KOKKOS_ENABLE_CUDA_LAMBDA ) && !defined( KOKKOS_ENABLE_ROCM )
+// TODO: a.use_count() and x.use_count() are 0 with the asynchronous HPX backend. Why?
+#if !defined( KOKKOS_ENABLE_CUDA_LAMBDA ) && !defined( KOKKOS_ENABLE_ROCM ) && \
+    !(defined( KOKKOS_ENABLE_HPX ) && defined( KOKKOS_ENABLE_HPX_ASYNC_DISPATCH ))
     // Cannot launch host lambda when CUDA lambda is enabled.
 
     typedef typename Kokkos::Impl::HostMirror< Space >::Space::execution_space host_exec_space;
 
-    Kokkos::parallel_for( Kokkos::RangePolicy< host_exec_space >( 0, 10 ), KOKKOS_LAMBDA ( int i ) {
+    Kokkos::parallel_for( Kokkos::RangePolicy< host_exec_space >( 0, 10 ), KOKKOS_LAMBDA ( int ) {
       // 'a' is captured by copy, and the capture mechanism converts 'a' to an
       // unmanaged copy.  When the parallel dispatch accepts a move for the
       // lambda, this count should become 1.
diff --git a/packages/kokkos/core/unit_test/TestViewMapping_b.hpp b/packages/kokkos/core/unit_test/TestViewMapping_b.hpp
index 7c7807f60d5dccf30b0eb90e79015a2a42eccaab..36fc0461a4fb837ae1f988799e463ac4efbb1749 100644
--- a/packages/kokkos/core/unit_test/TestViewMapping_b.hpp
+++ b/packages/kokkos/core/unit_test/TestViewMapping_b.hpp
@@ -173,12 +173,12 @@ void test_view_mapping_class_value()
 {
   typedef typename Space::execution_space ExecSpace;
 
-  ExecSpace::fence();
+  ExecSpace().fence();
   {
     Kokkos::View< MappingClassValueType, ExecSpace > a( "a" );
-    ExecSpace::fence();
+    ExecSpace().fence();
   }
-  ExecSpace::fence();
+  ExecSpace().fence();
 }
 
 TEST_F( TEST_CATEGORY , view_mapping_class_value )
diff --git a/packages/kokkos/core/unit_test/TestViewMapping_subview.hpp b/packages/kokkos/core/unit_test/TestViewMapping_subview.hpp
index 0c2d22e013717a11975a87be6c2dbecb1b16c7f6..62bd582871a71bd26277c183873843767724e16f 100644
--- a/packages/kokkos/core/unit_test/TestViewMapping_subview.hpp
+++ b/packages/kokkos/core/unit_test/TestViewMapping_subview.hpp
@@ -201,6 +201,7 @@ struct TestViewMappingSubview
 
     long error_count = -1;
     Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >( 0, 1 ), *this, error_count );
+
     ASSERT_EQ( error_count, 0 );
   }
 };
diff --git a/packages/kokkos/core/unit_test/TestViewSubview.hpp b/packages/kokkos/core/unit_test/TestViewSubview.hpp
index 207fbb148d14ba720d3f77d4d9d6718b424a355b..bffc77181f14ff0f272950628f1154ae8edb88f0 100644
--- a/packages/kokkos/core/unit_test/TestViewSubview.hpp
+++ b/packages/kokkos/core/unit_test/TestViewSubview.hpp
@@ -48,6 +48,86 @@
 #include <stdexcept>
 #include <sstream>
 #include <iostream>
+#include <type_traits>
+
+// TODO @refactoring move this to somewhere common
+
+//------------------------------------------------------------------------------
+
+template <class...>
+struct _kokkos____________________static_test_failure_____;
+
+template <class...>
+struct static_predicate_message {};
+
+//------------------------------------------------------------------------------
+
+template <class, template <class...> class, class...>
+struct static_assert_predicate_true_impl;
+
+template <template <class...> class predicate, class... message, class... args>
+struct static_assert_predicate_true_impl<
+  typename std::enable_if<predicate<args...>::type::value>::type,
+  predicate,
+  static_predicate_message<message...>,
+  args...
+> {
+  using type = int;
+};
+
+template <template <class...> class predicate, class... message, class... args>
+struct static_assert_predicate_true_impl<
+  typename std::enable_if<!predicate<args...>::type::value>::type,
+  predicate,
+  static_predicate_message<message...>,
+  args...
+>
+{
+  using type = typename _kokkos____________________static_test_failure_____<message...>::type;
+};
+
+template <template <class...> class predicate, class... args>
+struct static_assert_predicate_true
+  : static_assert_predicate_true_impl<void,
+      predicate, static_predicate_message<>,
+      args...
+    >
+{ };
+
+template <template <class...> class predicate, class... message, class... args>
+struct static_assert_predicate_true<
+  predicate, static_predicate_message<message...>,
+  args...
+>
+  : static_assert_predicate_true_impl<void,
+      predicate, static_predicate_message<message...>,
+      args...
+    >
+{ };
+
+//------------------------------------------------------------------------------
+
+// error "messages"
+struct _kokkos__________types_should_be_the_same_____expected_type__ {};
+struct _kokkos__________actual_type_was__ {};
+template <class Expected, class Actual>
+struct static_expect_same
+{
+  using type =
+    typename static_assert_predicate_true<
+      std::is_same,
+      static_predicate_message<
+        _kokkos__________types_should_be_the_same_____expected_type__,
+        Expected,
+        _kokkos__________actual_type_was__,
+        Actual
+      >,
+      Expected, Actual
+    >::type;
+};
+
+//------------------------------------------------------------------------------
+
 
 namespace TestViewSubview {
 
@@ -1220,6 +1300,7 @@ void test_layoutleft_to_layoutleft() {
     check.offset_0 = 16;
     check.offset_2 = 0;
     Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check );
+    Kokkos::fence();
   }
 
   {
@@ -1236,6 +1317,7 @@ void test_layoutleft_to_layoutleft() {
     check.offset_0 = 16;
     check.offset_2 = 1;
     Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check );
+    Kokkos::fence();
   }
 
   {
@@ -1253,6 +1335,7 @@ void test_layoutleft_to_layoutleft() {
     check.offset_2 = 1;
     check.index = 1;
     Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check );
+    Kokkos::fence();
   }
 }
 
@@ -1274,6 +1357,7 @@ void test_layoutright_to_layoutright() {
     check.offset_0 = 16;
     check.offset_2 = 0;
     Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check );
+    Kokkos::fence();
   }
 
   {
@@ -1291,6 +1375,7 @@ void test_layoutright_to_layoutright() {
     check.offset_2 = 0;
     check.index = 1;
     Kokkos::parallel_for( Kokkos::RangePolicy< typename Space::execution_space >( 0, b.extent( 0 ) * b.extent( 1 ) * b.extent( 2 ) ), check );
+    Kokkos::fence();
   }
 }
 
@@ -1328,6 +1413,125 @@ void test_unmanaged_subview_reset()
     );
 }
 
+//----------------------------------------------------------------------------
+
+template <class T>
+struct get_view_type;
+
+template <class T, class... Args>
+struct get_view_type<
+  Kokkos::View<T, Args...>
+> {
+  using type = T;
+};
+
+template <class T>
+struct ___________________________________TYPE_DISPLAY________________________________________;
+#define TYPE_DISPLAY(...) typename ___________________________________TYPE_DISPLAY________________________________________<__VA_ARGS__>::type notdefined;
+
+template <class Space, class Layout>
+struct TestSubviewStaticSizes
+{
+  Kokkos::View<int*[10][5][2], Layout, Space> a;
+
+  KOKKOS_INLINE_FUNCTION
+  int operator()() const noexcept
+  {
+    /* Doesn't actually do anything; just static assertions */
+
+    auto sub_a = Kokkos::subview(a, 0, Kokkos::ALL, Kokkos::ALL, Kokkos::ALL);
+    typename static_expect_same<
+      /* expected */ int[10][5][2],
+      /*  actual  */ typename get_view_type<decltype(sub_a)>::type
+    >::type test_1 = 0;
+
+    auto sub_a_2 = Kokkos::subview(a, 0, 0, Kokkos::ALL, Kokkos::ALL);
+    typename static_expect_same<
+      /* expected */ int[5][2],
+      /*  actual  */ typename get_view_type<decltype(sub_a_2)>::type
+    >::type test_2 = 0;
+
+    auto sub_a_3 = Kokkos::subview(a, 0, 0, Kokkos::ALL, 0);
+    typename static_expect_same<
+      /* expected */ int[5],
+      /*  actual  */ typename get_view_type<decltype(sub_a_3)>::type
+    >::type test_3 = 0;
+
+    auto sub_a_4 = Kokkos::subview(a, Kokkos::ALL, 0, Kokkos::ALL, Kokkos::ALL);
+    typename static_expect_same<
+      /* expected */ int*[5][2],
+      /*  actual  */ typename get_view_type<decltype(sub_a_4)>::type
+    >::type test_4 = 0;
+
+    // TODO we'll need to update this test once we allow interleaving of static and dynamic
+    auto sub_a_5 = Kokkos::subview(a, Kokkos::ALL, 0, Kokkos::ALL, Kokkos::make_pair(0, 1));
+    typename static_expect_same<
+      /* expected */ int***,
+      /*  actual  */ typename get_view_type<decltype(sub_a_5)>::type
+    >::type test_5 = 0;
+
+    auto sub_a_sub = Kokkos::subview(sub_a_5, 0, Kokkos::ALL, 0);
+    typename static_expect_same<
+      /* expected */ int*,
+      /*  actual  */ typename get_view_type<decltype(sub_a_sub)>::type
+    >::type test_sub = 0;
+
+    auto sub_a_7 = Kokkos::subview(a, Kokkos::ALL, 0, Kokkos::make_pair(0, 1), Kokkos::ALL);
+    typename static_expect_same<
+      /* expected */ int**[2],
+      /*  actual  */ typename get_view_type<decltype(sub_a_7)>::type
+    >::type test_7 = 0;
+
+
+    return test_1 + test_2 + test_3 + test_4 + test_5 + test_sub + test_7;
+  }
+
+  TestSubviewStaticSizes()
+    : a( Kokkos::view_alloc() , 20 )
+  {}
+};
+
+
+template <class Space>
+struct TestExtentsStaticTests {
+
+  using test1 = typename
+    static_expect_same<
+      /* expected */
+      Kokkos::Experimental::Extents<
+        Kokkos::Experimental::dynamic_extent,
+        Kokkos::Experimental::dynamic_extent,
+        1, 2, 3
+      >,
+      /* actual */
+      typename Kokkos::Impl::ParseViewExtents<double**[1][2][3]>::type
+    >::type;
+
+  using test2 = typename
+    static_expect_same<
+      /* expected */
+      Kokkos::Experimental::Extents<1, 2, 3>,
+      /* actual */
+      typename Kokkos::Impl::ParseViewExtents<double[1][2][3]>::type
+    >::type;
+
+  using test3 = typename
+    static_expect_same<
+      /* expected */
+      Kokkos::Experimental::Extents<3>,
+      /* actual */
+      typename Kokkos::Impl::ParseViewExtents<double[3]>::type
+    >::type;
+
+  using test4 = typename
+    static_expect_same<
+      /* expected */
+      Kokkos::Experimental::Extents<>,
+      /* actual */
+      typename Kokkos::Impl::ParseViewExtents<double>::type
+    >::type;
+};
+
 } // namespace TestViewSubview
 
 #endif
diff --git a/packages/kokkos/core/unit_test/TestWorkGraph.hpp b/packages/kokkos/core/unit_test/TestWorkGraph.hpp
index b7bbb2759fa9c77bf80d9548e2fe4cb7b0e98386..248733420b104a7d67a73c46ecc113e8d461fbda 100644
--- a/packages/kokkos/core/unit_test/TestWorkGraph.hpp
+++ b/packages/kokkos/core/unit_test/TestWorkGraph.hpp
@@ -148,6 +148,7 @@ struct TestWorkGraph {
 
   void test_for() {
     Kokkos::parallel_for(Policy(m_graph), *this);
+    Kokkos::fence();
     auto h_values = Kokkos::create_mirror_view(m_values);
     Kokkos::deep_copy(h_values, m_values);
     ASSERT_EQ( h_values(0), full_fibonacci(m_input) );
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_AtomicOperations_complexdouble.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_AtomicOperations_complexdouble.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6fb9ad0628428e059f761706db372efb786e4578
--- /dev/null
+++ b/packages/kokkos/core/unit_test/cuda/TestCuda_AtomicOperations_complexdouble.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<cuda/TestCuda_Category.hpp>
+#include<TestAtomicOperations_complexdouble.hpp>
+
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_AtomicOperations_complexfloat.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_AtomicOperations_complexfloat.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3170bbc5307a15b27a6cb0fba4ca0c0692e244f4
--- /dev/null
+++ b/packages/kokkos/core/unit_test/cuda/TestCuda_AtomicOperations_complexfloat.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<cuda/TestCuda_Category.hpp>
+#include<TestAtomicOperations_complexfloat.hpp>
+
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_DeepCopyAlignment.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_DeepCopyAlignment.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f28a6fcbe9e618eed1be4169fcc217d5b25bcca3
--- /dev/null
+++ b/packages/kokkos/core/unit_test/cuda/TestCuda_DeepCopyAlignment.cpp
@@ -0,0 +1,48 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <cuda/TestCuda_Category.hpp>
+#if defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA) 
+#include <TestDeepCopy.hpp>
+#endif
+
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_InterOp.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_InterOp_Init.cpp
similarity index 100%
rename from packages/kokkos/core/unit_test/cuda/TestCuda_InterOp.cpp
rename to packages/kokkos/core/unit_test/cuda/TestCuda_InterOp_Init.cpp
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_InterOp_Streams.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_InterOp_Streams.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4969e27040ccfafde5a7c0ececbb8d51b25a705e
--- /dev/null
+++ b/packages/kokkos/core/unit_test/cuda/TestCuda_InterOp_Streams.cpp
@@ -0,0 +1,180 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <cuda/TestCuda_Category.hpp>
+
+namespace Test {
+
+__global__ void offset_streams(int* p) {
+  int idx = blockIdx.x*blockDim.x + threadIdx.x;
+  if(idx<100) {
+    p[idx]+=idx;
+  }
+}
+
+namespace {
+  struct FunctorRange {
+    Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a;
+    FunctorRange(Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a_):a(a_) {}
+
+    KOKKOS_INLINE_FUNCTION
+    void operator() (const int i) const {
+      a(i)+=1;
+    }
+  };
+  struct FunctorRangeReduce {
+    Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a;
+    FunctorRangeReduce(Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a_):a(a_) {}
+
+    KOKKOS_INLINE_FUNCTION
+    void operator() (const int i, int& lsum) const {
+      lsum += a(i);
+    }
+  };
+  struct FunctorMDRange {
+    Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a;
+    FunctorMDRange(Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a_):a(a_) {}
+
+    KOKKOS_INLINE_FUNCTION
+    void operator() (const int i, const int j) const {
+      a(i*10+j)+=1;
+    }
+  };
+  struct FunctorMDRangeReduce {
+    Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a;
+    FunctorMDRangeReduce(Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a_):a(a_) {}
+
+    KOKKOS_INLINE_FUNCTION
+    void operator() (const int i, const int j, int& lsum) const {
+      lsum += a(i*10+j);
+    }
+  };
+  struct FunctorTeam {
+    Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a;
+    FunctorTeam(Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a_):a(a_) {}
+
+    KOKKOS_INLINE_FUNCTION
+    void operator() (const Kokkos::TeamPolicy<Kokkos::Cuda>::member_type& team) const {
+      int i = team.league_rank();
+      Kokkos::parallel_for(Kokkos::TeamThreadRange(team,10),[&](const int j){
+        a(i*10+j)+=1;
+      });
+    }
+  };
+
+  struct FunctorTeamReduce {
+    Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a;
+    FunctorTeamReduce(Kokkos::View<int*,Kokkos::CudaSpace,Kokkos::MemoryTraits<Kokkos::Unmanaged>> a_):a(a_) {}
+
+    KOKKOS_INLINE_FUNCTION
+    void operator() (const Kokkos::TeamPolicy<Kokkos::Cuda>::member_type& team, int& lsum) const {
+      int i = team.league_rank();
+      int team_sum;
+      Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,10),[&](const int j, int& tsum){
+        tsum += a(i*10+j);
+      },team_sum);
+      Kokkos::single(Kokkos::PerTeam(team),[&]() {
+        lsum += team_sum;
+      });
+    }
+  };
+}
+
+// Test Interoperability with Cuda Streams
+TEST_F( cuda, raw_cuda_streams )
+{
+  cudaStream_t stream;
+  cudaStreamCreate(&stream);
+  Kokkos::InitArguments arguments{-1,-1,-1, false};
+  Kokkos::initialize(arguments);
+  int* p;
+  cudaMalloc(&p,sizeof(int)*100);
+
+  {
+  Kokkos::Cuda cuda0(stream);
+  Kokkos::View<int*,Kokkos::CudaSpace>
+    v(p,100);
+  Kokkos::deep_copy(cuda0,v,5);
+  int sum;
+
+  Kokkos::parallel_for("Test::cuda::raw_cuda_stream::Range",
+      Kokkos::RangePolicy<Kokkos::Cuda>(cuda0,0,100),FunctorRange(v));
+  Kokkos::parallel_reduce("Test::cuda::raw_cuda_stream::RangeReduce",
+      Kokkos::RangePolicy<Kokkos::Cuda,Kokkos::LaunchBounds<128,2>>(cuda0,0,100),FunctorRangeReduce(v),sum);
+  cuda0.fence();
+  ASSERT_EQ(600,sum);
+
+  Kokkos::parallel_for("Test::cuda::raw_cuda_stream::MDRange",
+      Kokkos::MDRangePolicy<Kokkos::Cuda,Kokkos::Rank<2>>(cuda0,{0,0},{10,10}),FunctorMDRange(v));
+  Kokkos::parallel_reduce("Test::cuda::raw_cuda_stream::MDRangeReduce",
+      Kokkos::MDRangePolicy<Kokkos::Cuda,Kokkos::Rank<2>,Kokkos::LaunchBounds<128,2>>(cuda0,{0,0},{10,10}),FunctorMDRangeReduce(v),sum);
+  cuda0.fence();
+  ASSERT_EQ(700,sum);
+
+  Kokkos::parallel_for("Test::cuda::raw_cuda_stream::Team",
+      Kokkos::TeamPolicy<Kokkos::Cuda>(cuda0,10,10),FunctorTeam(v));
+  Kokkos::parallel_reduce("Test::cuda::raw_cuda_stream::Team",
+      Kokkos::TeamPolicy<Kokkos::Cuda,Kokkos::LaunchBounds<128,2>>(cuda0,10,10),FunctorTeamReduce(v),sum);
+  cuda0.fence();
+  ASSERT_EQ(800,sum);
+
+  }
+  Kokkos::finalize();
+  offset_streams<<<100,64,0,stream>>>(p);
+  CUDA_SAFE_CALL( cudaDeviceSynchronize());
+  cudaStreamDestroy(stream);
+
+  int* h_p = new int[100];
+  cudaMemcpy( h_p , p , sizeof(int)*100 , cudaMemcpyDefault );
+  CUDA_SAFE_CALL( cudaDeviceSynchronize());
+  int64_t sum = 0;
+  int64_t sum_expect = 0;
+  for(int i=0; i<100; i++) {
+    sum += h_p[i];
+    sum_expect += 8+i;
+  }
+
+  ASSERT_EQ(sum,sum_expect);
+}
+}
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_LocalDeepCopy.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_LocalDeepCopy.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1a9940ed70cfd5b9ce1841567884f69dc971d5ef
--- /dev/null
+++ b/packages/kokkos/core/unit_test/cuda/TestCuda_LocalDeepCopy.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <cuda/TestCuda_Category.hpp>
+#include <TestLocalDeepCopy.hpp>
+
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_Spaces.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_Spaces.cpp
index e871b3c0c063f472d0cb87b0f2eb313e72600e27..afe18bdad4b0155eed54d5dc0723d2ef0a6640cb 100644
--- a/packages/kokkos/core/unit_test/cuda/TestCuda_Spaces.cpp
+++ b/packages/kokkos/core/unit_test/cuda/TestCuda_Spaces.cpp
@@ -218,9 +218,9 @@ TEST_F( cuda, uvm )
 
     *uvm_ptr = 42;
 
-    Kokkos::Cuda::fence();
+    Kokkos::Cuda().fence();
     test_cuda_spaces_int_value<<< 1, 1 >>>( uvm_ptr );
-    Kokkos::Cuda::fence();
+    Kokkos::Cuda().fence();
 
     EXPECT_EQ( *uvm_ptr, int( 2 * 42 ) );
 
@@ -320,7 +320,7 @@ struct TestViewCudaAccessible {
   {
     TestViewCudaAccessible self;
     Kokkos::parallel_for( Kokkos::RangePolicy< typename MemSpace::execution_space, TagInit >( 0, N ), self );
-    MemSpace::execution_space::fence();
+    typename MemSpace::execution_space().fence();
 
     // Next access is a different execution space, must complete prior kernel.
     long error_count = -1;
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_SubView_a.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_SubView_a.cpp
index 805da988c6261f693da4fbb3277d41f98e9e3deb..81f83c105cec81d43943bfb2f19f07d6d8f0a2be 100644
--- a/packages/kokkos/core/unit_test/cuda/TestCuda_SubView_a.cpp
+++ b/packages/kokkos/core/unit_test/cuda/TestCuda_SubView_a.cpp
@@ -101,4 +101,11 @@ TEST_F( TEST_CATEGORY, view_subview_right_3 )
   TestViewSubview::test_right_3< TEST_EXECSPACE >();
 }
 
+TEST_F(TEST_CATEGORY, view_static_tests)
+{
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutLeft>()();
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutRight>()();
+  TestViewSubview::TestExtentsStaticTests<TEST_EXECSPACE>();
+}
+
 } // namespace Test
diff --git a/packages/kokkos/core/unit_test/cuda/TestCuda_TeamVectorRange.cpp b/packages/kokkos/core/unit_test/cuda/TestCuda_TeamVectorRange.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..af6ef9cfd126b14f1118dcf9b381657e5752abf9
--- /dev/null
+++ b/packages/kokkos/core/unit_test/cuda/TestCuda_TeamVectorRange.cpp
@@ -0,0 +1,48 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<cuda/TestCuda_Category.hpp>
+#include<TestTeamVectorRange.hpp>
+
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_double.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_double.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6f4d5de5c1d8fb672171b07c8238955871194eff
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_double.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestAtomicOperations_double.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_float.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_float.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5b859989cb0128015e78436203b90297aa512f9b
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_float.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestAtomicOperations_float.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_int.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_int.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1e7b098322a32f4006ac36b00d474597774d21e1
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_int.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestAtomicOperations_int.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_longint.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_longint.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a6d76339f1f7a01138f667d569e669a8f4a1cc68
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_longint.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestAtomicOperations_longint.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_longlongint.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_longlongint.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e8907bb6484c89e39293f78a047b4efdf85addd3
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_longlongint.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestAtomicOperations_longlongint.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_unsignedint.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_unsignedint.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ce54e31f96f2129d34d8a299671d5d9c5c7c2de7
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_unsignedint.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestAtomicOperations_unsignedint.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_unsignedlongint.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_unsignedlongint.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cb8193c9e82c81e822b3888c9626683abffbbef7
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicOperations_unsignedlongint.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestAtomicOperations_unsignedlongint.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicViews.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicViews.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..59f4b05d5fc90f5b07bef9c689b5cfc4a855d545
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_AtomicViews.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestAtomicViews.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Atomics.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Atomics.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c9301446b9694a601fb53619179acab8b49a9d90
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Atomics.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestAtomic.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Category.hpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Category.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..358b42d1aaaef441d40c957c06f4e92e2abbaffb
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Category.hpp
@@ -0,0 +1,65 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_TEST_HPX_HPP
+#define KOKKOS_TEST_HPX_HPP
+
+#include <gtest/gtest.h>
+
+namespace Test {
+
+class hpx : public ::testing::Test {
+protected:
+  static void SetUpTestCase() {
+  }
+
+  static void TearDownTestCase() {
+  }
+};
+
+} // namespace Test
+
+#define TEST_CATEGORY hpx
+#define TEST_EXECSPACE Kokkos::Experimental::HPX
+
+#endif
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Complex.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Complex.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6edcda6c68202dec187af9b18381aa894cc7ba76
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Complex.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestComplex.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Crs.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Crs.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..33f4262b83fb0dd405eb4e9baa05a4532a04ec09
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Crs.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestCrs.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Init.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Init.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f7cf44128c489f6cfdb030a307726d0c900c2bdb
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Init.cpp
@@ -0,0 +1,50 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestInit.hpp>
+#include<TestCompilerMacros.hpp>
+#include<TestPolicyConstruction.hpp>
+
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_InterOp.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_InterOp.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..72e440c19e0ed5454b10cf4e08eea0b971a13cf6
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_InterOp.cpp
@@ -0,0 +1,56 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <hpx/TestHPX_Category.hpp>
+
+namespace Test {
+
+// Test whether allocations survive Kokkos initialize/finalize if done via Raw Cuda.
+TEST_F( hpx, raw_hpx_interop )
+{
+  Kokkos::InitArguments arguments{-1,-1,-1, false};
+  Kokkos::initialize(arguments);
+  Kokkos::finalize();
+}
+}
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_a.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_a.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5410402e1dcf3b23271b6b8d8ea83a37bcaeb8d5
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_a.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestMDRange_a.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_b.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_b.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..be15ba1b8c5fb13e654dfefa1c6e3557de658aca
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_b.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestMDRange_b.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_c.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_c.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e0afafab75f0cc9aea9526a1b69529aeba0b3187
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_c.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestMDRange_c.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_d.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_d.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f9e0a0c8843d29191a9fff64ce006c18dacb6e82
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_d.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestMDRange_d.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_e.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_e.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9fbbfb623813b2e070069d5d0efc6ac0c7817090
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_MDRange_e.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestMDRange_e.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Other.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Other.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3f74ceb7e6e32d651433cc00cacbb8b9e03a0309
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Other.cpp
@@ -0,0 +1,43 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_RangePolicy.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_RangePolicy.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ee1124ec8a2c93bada2f28a4af71ac9518e62997
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_RangePolicy.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestRange.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_a.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_a.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5fbe0ff9992da91588ce9edf0ede08f133f96d91
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_a.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestReducers_a.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_b.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_b.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d4ed60f1ac0b0440d8222ae79548bf9db6454caa
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_b.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestReducers_b.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_c.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_c.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..87704c4404688701123627831149095779d8c49a
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_c.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestReducers_c.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_d.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_d.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..86895358fb94293e0b6d546f529e3529c479206c
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Reducers_d.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestReducers_d.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Reductions.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Reductions.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d8cf6f3da2d67f7f35e548523738f164b041881a
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Reductions.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestReduce.hpp>
+#include <TestCXX11Deduction.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Scan.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Scan.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..526cd990ce483ec015f3f5965a263fa3fb31cbee
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Scan.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestScan.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SharedAlloc.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SharedAlloc.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..417fd0ee5759939c87a763b1c71240290058a287
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SharedAlloc.cpp
@@ -0,0 +1,55 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestSharedAlloc.hpp>
+
+namespace Test {
+
+
+TEST_F( TEST_CATEGORY, impl_shared_alloc )
+{
+  test_shared_alloc< Kokkos::HostSpace, TEST_EXECSPACE >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_a.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_a.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8e2443b5a4debbf1871627d5dc6411141ade4a99
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_a.cpp
@@ -0,0 +1,104 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_auto_1d_left )
+{
+  TestViewSubview::test_auto_1d< Kokkos::LayoutLeft, TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_auto_1d_right )
+{
+  TestViewSubview::test_auto_1d< Kokkos::LayoutRight, TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_auto_1d_stride )
+{
+  TestViewSubview::test_auto_1d< Kokkos::LayoutStride, TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_assign_strided )
+{
+  TestViewSubview::test_1d_strided_assignment< TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_left_0 )
+{
+  TestViewSubview::test_left_0< TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_left_1 )
+{
+  TestViewSubview::test_left_1< TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_left_2 )
+{
+  TestViewSubview::test_left_2< TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_left_3 )
+{
+  TestViewSubview::test_left_3< TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_right_0 )
+{
+  TestViewSubview::test_right_0< TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_right_1 )
+{
+  TestViewSubview::test_right_1< TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_right_3 )
+{
+  TestViewSubview::test_right_3< TEST_EXECSPACE >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_b.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_b.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5d25fcc2571b98822ac0c6ed55b088cef9e0b268
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_b.cpp
@@ -0,0 +1,63 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_layoutleft_to_layoutleft )
+{
+  TestViewSubview::test_layoutleft_to_layoutleft< TEST_EXECSPACE >();
+  TestViewSubview::test_layoutleft_to_layoutleft< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::Atomic> >();
+  TestViewSubview::test_layoutleft_to_layoutleft< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::RandomAccess> >();
+}
+
+TEST_F( TEST_CATEGORY, view_subview_layoutright_to_layoutright )
+{
+  TestViewSubview::test_layoutright_to_layoutright< TEST_EXECSPACE >();
+  TestViewSubview::test_layoutright_to_layoutright< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::Atomic> >();
+  TestViewSubview::test_layoutright_to_layoutright< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::RandomAccess> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c01.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c01.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..36d2ab1bdbfd2b6a63015843d847bde1c36058fb
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c01.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_1d_assign )
+{
+  TestViewSubview::test_1d_assign< TEST_EXECSPACE >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c02.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c02.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..19e70fbfbac5ce40639bbe83fea4eabd4d730d82
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c02.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_1d_assign_atomic )
+{
+  TestViewSubview::test_1d_assign< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::Atomic> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c03.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c03.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..45b07e43b02e54b62c35d37dec708000ae805bc8
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c03.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_1d_assign_randomaccess )
+{
+  TestViewSubview::test_1d_assign< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::RandomAccess> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c04.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c04.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..484b02560823c50837af5664cc9973e2db25bf47
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c04.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_2d_from_3d )
+{
+  TestViewSubview::test_2d_subview_3d< TEST_EXECSPACE >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c05.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c05.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cbfa024553b2c4cd4ea4883ac47fb1ba840c4e62
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c05.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( hpx, view_subview_2d_from_3d_atomic )
+{
+  TestViewSubview::test_2d_subview_3d< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::Atomic> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c06.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c06.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ba2f8e5693531af4aedd58c19cf495101870f66e
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c06.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_2d_from_3d_randomaccess )
+{
+  TestViewSubview::test_2d_subview_3d< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::RandomAccess> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c07.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c07.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3cabfebc617055335ac57ba098e6c28741b3a8c4
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c07.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_3d_from_5d_left )
+{
+  TestViewSubview::test_3d_subview_5d_left< TEST_EXECSPACE >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c08.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c08.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bc78ba83ebcb329ec66f07eb51e2ace136b1585d
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c08.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_3d_from_5d_left_atomic )
+{
+  TestViewSubview::test_3d_subview_5d_left< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::Atomic> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c09.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c09.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bb3381a9e827f7c8f5e110b805359875bc6ae8df
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c09.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_3d_from_5d_left_randomaccess )
+{
+  TestViewSubview::test_3d_subview_5d_left< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::RandomAccess> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c10.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c10.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..58ae45a7a0b8a6a8e300a4289f2d7eb84806cf7b
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c10.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_3d_from_5d_right )
+{
+  TestViewSubview::test_3d_subview_5d_right< TEST_EXECSPACE >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c11.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c11.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..19649fbd5667e07cdb4738d02596d10a38285e5e
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c11.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_3d_from_5d_right_atomic )
+{
+  TestViewSubview::test_3d_subview_5d_right< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::Atomic> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c12.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c12.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dc354dc21eb96320f9685b093ebb7961f69ad5d8
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c12.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_subview_3d_from_5d_right_randomaccess )
+{
+  TestViewSubview::test_3d_subview_5d_right< TEST_EXECSPACE, Kokkos::MemoryTraits<Kokkos::RandomAccess> >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c13.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c13.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8b4955c4c7c7e60d478b062250be5bd554106a9d
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c13.cpp
@@ -0,0 +1,54 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewSubview.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, view_test_unmanaged_subview_reset )
+{
+  TestViewSubview::test_unmanaged_subview_reset< TEST_EXECSPACE >();
+}
+
+} // namespace Test
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c_all.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c_all.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1103870febcad6b5eaeb7e114f2aee360ba83f0f
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_SubView_c_all.cpp
@@ -0,0 +1,13 @@
+#include <hpx/TestHPX_SubView_c01.cpp>
+#include <hpx/TestHPX_SubView_c02.cpp>
+#include <hpx/TestHPX_SubView_c03.cpp>
+#include <hpx/TestHPX_SubView_c04.cpp>
+#include <hpx/TestHPX_SubView_c05.cpp>
+#include <hpx/TestHPX_SubView_c06.cpp>
+#include <hpx/TestHPX_SubView_c07.cpp>
+#include <hpx/TestHPX_SubView_c08.cpp>
+#include <hpx/TestHPX_SubView_c09.cpp>
+#include <hpx/TestHPX_SubView_c10.cpp>
+#include <hpx/TestHPX_SubView_c11.cpp>
+#include <hpx/TestHPX_SubView_c12.cpp>
+#include <hpx/TestHPX_SubView_c13.cpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Task.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Task.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..754e059c57ac2d9f17fcc1f275a1a09367b3af08
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Task.cpp
@@ -0,0 +1,47 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestTaskScheduler.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_Team.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_Team.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9851133d0396202623630f83cb7a6ec1d33e961e
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_Team.cpp
@@ -0,0 +1,75 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestTeam.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, team_for )
+{
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >::test_for( 0 );
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >::test_for( 0 );
+
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >::test_for( 2 );
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >::test_for( 2 );
+
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >::test_for( 1000 );
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >::test_for( 1000 );
+}
+
+
+TEST_F( TEST_CATEGORY, team_reduce )
+{
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >::test_reduce( 0 );
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >::test_reduce( 0 );
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >::test_reduce( 2 );
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >::test_reduce( 2 );
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >::test_reduce( 1000 );
+  TestTeamPolicy< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >::test_reduce( 1000 );
+}
+}
+
+#include <TestTeamVector.hpp>
+
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_TeamReductionScan.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_TeamReductionScan.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ea9e9087bab4df90029dc18a1e62851f5a965b8a
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_TeamReductionScan.cpp
@@ -0,0 +1,81 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestTeam.hpp>
+
+namespace Test {
+
+
+TEST_F( TEST_CATEGORY, team_scan )
+{
+  TestScanTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 0 );
+  TestScanTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 0 );
+  TestScanTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 10 );
+  TestScanTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 10 );
+  TestScanTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 10000 );
+  TestScanTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 10000 );
+}
+
+TEST_F( TEST_CATEGORY, team_long_reduce )
+{
+  TestReduceTeam< long, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 0 );
+  TestReduceTeam< long, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 0 );
+  TestReduceTeam< long, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 3 );
+  TestReduceTeam< long, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 3 );
+  TestReduceTeam< long, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 100000 );
+  TestReduceTeam< long, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 100000 );
+}
+
+TEST_F( TEST_CATEGORY, team_double_reduce )
+{
+  TestReduceTeam< double, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 0 );
+  TestReduceTeam< double, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 0 );
+  TestReduceTeam< double, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 3 );
+  TestReduceTeam< double, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 3 );
+  TestReduceTeam< double, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >( 100000 );
+  TestReduceTeam< double, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >( 100000 );
+}
+
+} // namespace Test
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_TeamScratch.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_TeamScratch.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d51d3804136c533e1c6041e276a2f99ae4f1b313
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_TeamScratch.cpp
@@ -0,0 +1,83 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestTeam.hpp>
+
+namespace Test {
+
+TEST_F( TEST_CATEGORY, team_shared_request )
+{
+  TestSharedTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >();
+  TestSharedTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >();
+}
+
+TEST_F( TEST_CATEGORY, team_scratch_request )
+{
+  TestScratchTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >();
+  TestScratchTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >();
+}
+
+#if defined( KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA )
+#if !defined(KOKKOS_ENABLE_CUDA) || ( 8000 <= CUDA_VERSION )
+TEST_F( TEST_CATEGORY, team_lambda_shared_request )
+{
+  TestLambdaSharedTeam< Kokkos::HostSpace, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >();
+  TestLambdaSharedTeam< Kokkos::HostSpace, TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >();
+}
+#endif
+#endif
+
+TEST_F( TEST_CATEGORY, shmem_size )
+{
+  TestShmemSize< TEST_EXECSPACE >();
+}
+
+TEST_F( TEST_CATEGORY, multi_level_scratch )
+{
+  TestMultiLevelScratchTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Static> >();
+  TestMultiLevelScratchTeam< TEST_EXECSPACE, Kokkos::Schedule<Kokkos::Dynamic> >();
+}
+
+} // namespace Test
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_TeamVectorRange.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_TeamVectorRange.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..21f448f20a43c41f6ca1181454b18dd26bdd0f62
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_TeamVectorRange.cpp
@@ -0,0 +1,48 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestTeamVectorRange.hpp>
+
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_UniqueToken.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_UniqueToken.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4f25782237851d12e1d2e2fff3dd38975c70e376
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_UniqueToken.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestUniqueToken.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_a.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_a.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..198aaba0f7bcecce236295529bc2356279842e12
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_a.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewAPI_a.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_b.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_b.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bafc735664b8b76c4643d85d84b8f148ae6cebbb
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_b.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewAPI_b.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_c.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_c.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0397558645b9ad847c6a000edf3636bec8512004
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_c.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewAPI_c.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_d.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_d.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..aec887189c35e4237aaec8cc21061c7ef188adfd
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_d.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewAPI_d.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_e.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_e.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3cc3f0cddd3f9062da19c637769253cdd5a637d3
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewAPI_e.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewAPI_e.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_a.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_a.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..15b069f1123ed1198e0044a28b726406b932d96f
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_a.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewMapping_a.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_b.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_b.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c1ffc79db2d57bc36a2971f1c1db76917613acb9
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_b.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewMapping_b.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_subview.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_subview.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1e6dd240ff6dc5b466d21dd04228508dd09c5f04
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewMapping_subview.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewMapping_subview.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_ViewOfClass.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewOfClass.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..525fa09bf387839dca5d12f5894f880f30174b66
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_ViewOfClass.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestViewOfClass.hpp>
+
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_View_64bit.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_View_64bit.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..18d08cedaa6462acac6ab70a8f6ae75281e196ac
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_View_64bit.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <hpx/TestHPX_Category.hpp>
+#include <TestView_64bit.hpp>
diff --git a/packages/kokkos/core/unit_test/hpx/TestHPX_WorkGraph.cpp b/packages/kokkos/core/unit_test/hpx/TestHPX_WorkGraph.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ca980b8a74732b2e5c2af175ab89b9852142f814
--- /dev/null
+++ b/packages/kokkos/core/unit_test/hpx/TestHPX_WorkGraph.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<hpx/TestHPX_Category.hpp>
+#include<TestWorkGraph.hpp>
diff --git a/packages/kokkos/core/unit_test/openmp/TestOpenMP_AtomicOperations_complexdouble.cpp b/packages/kokkos/core/unit_test/openmp/TestOpenMP_AtomicOperations_complexdouble.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8d38e398ca31cc18cbe57d5d8d7075f4cf798847
--- /dev/null
+++ b/packages/kokkos/core/unit_test/openmp/TestOpenMP_AtomicOperations_complexdouble.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<openmp/TestOpenMP_Category.hpp>
+#include<TestAtomicOperations_complexdouble.hpp>
+
diff --git a/packages/kokkos/core/unit_test/openmp/TestOpenMP_AtomicOperations_complexfloat.cpp b/packages/kokkos/core/unit_test/openmp/TestOpenMP_AtomicOperations_complexfloat.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cbaf47683a9800356fbe86879ef8efe7c715ded5
--- /dev/null
+++ b/packages/kokkos/core/unit_test/openmp/TestOpenMP_AtomicOperations_complexfloat.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<openmp/TestOpenMP_Category.hpp>
+#include<TestAtomicOperations_complexfloat.hpp>
+
diff --git a/packages/kokkos/core/unit_test/openmp/TestOpenMP_DeepCopyAlignment.cpp b/packages/kokkos/core/unit_test/openmp/TestOpenMP_DeepCopyAlignment.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bd628e6958b4ffdf0fcda6aa3716894330b4cbc0
--- /dev/null
+++ b/packages/kokkos/core/unit_test/openmp/TestOpenMP_DeepCopyAlignment.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <openmp/TestOpenMP_Category.hpp>
+#include <TestDeepCopy.hpp>
diff --git a/packages/kokkos/core/unit_test/openmp/TestOpenMP_LocalDeepCopy.cpp b/packages/kokkos/core/unit_test/openmp/TestOpenMP_LocalDeepCopy.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8b135ad4a1edc1aa44707a59db5229ea5a750033
--- /dev/null
+++ b/packages/kokkos/core/unit_test/openmp/TestOpenMP_LocalDeepCopy.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <openmp/TestOpenMP_Category.hpp>
+#include <TestLocalDeepCopy.hpp>
+
diff --git a/packages/kokkos/core/unit_test/openmp/TestOpenMP_SubView_a.cpp b/packages/kokkos/core/unit_test/openmp/TestOpenMP_SubView_a.cpp
index 524836d20b70f39192b84977ae5c8687a2d1aeb7..8cea3a76cfbf36ad5467a333dde00b554c735278 100644
--- a/packages/kokkos/core/unit_test/openmp/TestOpenMP_SubView_a.cpp
+++ b/packages/kokkos/core/unit_test/openmp/TestOpenMP_SubView_a.cpp
@@ -101,4 +101,11 @@ TEST_F( TEST_CATEGORY, view_subview_right_3 )
   TestViewSubview::test_right_3< TEST_EXECSPACE >();
 }
 
+TEST_F(TEST_CATEGORY, view_static_tests)
+{
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutLeft>()();
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutRight>()();
+  TestViewSubview::TestExtentsStaticTests<TEST_EXECSPACE>();
+}
+
 } // namespace Test
diff --git a/packages/kokkos/core/unit_test/openmp/TestOpenMP_TeamVectorRange.cpp b/packages/kokkos/core/unit_test/openmp/TestOpenMP_TeamVectorRange.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..eff8c731822d1354992dde830c105bbd667042e7
--- /dev/null
+++ b/packages/kokkos/core/unit_test/openmp/TestOpenMP_TeamVectorRange.cpp
@@ -0,0 +1,48 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<openmp/TestOpenMP_Category.hpp>
+#include<TestTeamVectorRange.hpp>
+
+
diff --git a/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_AtomicOperations_complexdouble.cpp b/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_AtomicOperations_complexdouble.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b2096073d018b6e635bedd53cc370cf67d4c31e9
--- /dev/null
+++ b/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_AtomicOperations_complexdouble.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<openmptarget/TestOpenMPTarget_Category.hpp>
+#include<TestAtomicOperations_complexdouble.hpp>
+
diff --git a/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_AtomicOperations_complexfloat.cpp b/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_AtomicOperations_complexfloat.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..da4d5d3c7701c90e1c54566e4149220bc95f6651
--- /dev/null
+++ b/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_AtomicOperations_complexfloat.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<openmptarget/TestOpenMPTarget_Category.hpp>
+#include<TestAtomicOperations_complexfloat.hpp>
+
diff --git a/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_DeepCopyAlignment.cpp b/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_DeepCopyAlignment.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..62af98a7312ad33fce0a4b57a06edc610b0b088f
--- /dev/null
+++ b/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_DeepCopyAlignment.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <openmptarget/TestOpenMPTarget_Category.hpp>
+#include <TestDeepCopy.hpp>
diff --git a/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_a.cpp b/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_a.cpp
index df809ae2a911508cc7e1a22a18850cc1ca6b424f..7a273446a52bcd6f63ea88f307e2ca7836966313 100644
--- a/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_a.cpp
+++ b/packages/kokkos/core/unit_test/openmptarget/TestOpenMPTarget_SubView_a.cpp
@@ -101,4 +101,11 @@ TEST_F( TEST_CATEGORY, view_subview_right_3 )
   TestViewSubview::test_right_3< TEST_EXECSPACE >();
 }
 
+TEST_F(TEST_CATEGORY, view_static_tests)
+{
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutLeft>()();
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutRight>()();
+  TestViewSubview::TestExtentsStaticTests<TEST_EXECSPACE>();
+}
+
 } // namespace Test
diff --git a/packages/kokkos/core/unit_test/qthreads/TestQqthreads_AtomicOperations_complexdouble.cpp b/packages/kokkos/core/unit_test/qthreads/TestQqthreads_AtomicOperations_complexdouble.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f579ff2e5a322bd464cc20b7489bc0c86626df96
--- /dev/null
+++ b/packages/kokkos/core/unit_test/qthreads/TestQqthreads_AtomicOperations_complexdouble.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<qthreads/TestQqthreads_Category.hpp>
+#include<TestAtomicOperations_complexdouble.hpp>
+
diff --git a/packages/kokkos/core/unit_test/qthreads/TestQqthreads_AtomicOperations_complexfloat.cpp b/packages/kokkos/core/unit_test/qthreads/TestQqthreads_AtomicOperations_complexfloat.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c5d1ab922c7a196f00d58cff7ec97da2c6d6306f
--- /dev/null
+++ b/packages/kokkos/core/unit_test/qthreads/TestQqthreads_AtomicOperations_complexfloat.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<qthreads/TestQqthreads_Category.hpp>
+#include<TestAtomicOperations_complexfloat.hpp>
+
diff --git a/packages/kokkos/core/unit_test/qthreads/TestQthreads_DeepCopyAlignment.cpp b/packages/kokkos/core/unit_test/qthreads/TestQthreads_DeepCopyAlignment.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..22d9dbb2f10cfd823023ed52561cc44885812ba5
--- /dev/null
+++ b/packages/kokkos/core/unit_test/qthreads/TestQthreads_DeepCopyAlignment.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <qthreads/TestQthreads_Category.hpp>
+#include <TestDeepCopy.hpp>
diff --git a/packages/kokkos/core/unit_test/qthreads/TestQthreads_Reductions.cpp b/packages/kokkos/core/unit_test/qthreads/TestQthreads_Reductions.cpp
index f2e2c2339de91f31067dc807a16f76f0975b892a..6b8e001720880a215bd3470e3287f1e7bfd0e2e8 100644
--- a/packages/kokkos/core/unit_test/qthreads/TestQthreads_Reductions.cpp
+++ b/packages/kokkos/core/unit_test/qthreads/TestQthreads_Reductions.cpp
@@ -102,7 +102,7 @@ TEST_F( qthreads, scan )
   TestScan< Kokkos::Qthreads >( 0 );
   TestScan< Kokkos::Qthreads >( 100000 );
   TestScan< Kokkos::Qthreads >( 10000000 );
-  Kokkos::Qthreads::fence();
+  Kokkos::Qthreads().fence();
 #endif
 }
 
@@ -118,7 +118,7 @@ TEST_F( qthreads, scan_small )
   TestScanFunctor( 1000000 );
   TestScanFunctor( 10000000 );
 
-  Kokkos::Qthreads::fence();
+  Kokkos::Qthreads().fence();
 #endif
 }
 
diff --git a/packages/kokkos/core/unit_test/rocm/TestROCm_DeepCopyAlignment.cpp b/packages/kokkos/core/unit_test/rocm/TestROCm_DeepCopyAlignment.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..85fd89fb2650dee720c855cfd1db5ce05910d57c
--- /dev/null
+++ b/packages/kokkos/core/unit_test/rocm/TestROCm_DeepCopyAlignment.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <rocm/TestROCm_Category.hpp>
+#include <TestDeepCopy.hpp>
diff --git a/packages/kokkos/core/unit_test/rocm/TestROCm_Spaces.cpp b/packages/kokkos/core/unit_test/rocm/TestROCm_Spaces.cpp
index 04a7378ec9376f78ae4d77e4fd395b43fb2b50a3..637cdd9a7f40257a0a30983a34ad3fccde9cef9c 100644
--- a/packages/kokkos/core/unit_test/rocm/TestROCm_Spaces.cpp
+++ b/packages/kokkos/core/unit_test/rocm/TestROCm_Spaces.cpp
@@ -176,7 +176,7 @@ struct TestViewROCmAccessible {
   {
     TestViewROCmAccessible self;
     Kokkos::parallel_for( Kokkos::RangePolicy< typename MemSpace::execution_space, TagInit >( 0, N ), self );
-    MemSpace::execution_space::fence();
+    typename MemSpace::execution_space().fence();
 
     // Next access is a different execution space, must complete prior kernel.
     long error_count = -1;
diff --git a/packages/kokkos/core/unit_test/rocm/TestROCm_SubView_a.cpp b/packages/kokkos/core/unit_test/rocm/TestROCm_SubView_a.cpp
index dd88d3d5ec9bdd15c5fa2807478a4278ceafcef9..4d7e1a8ef2a8b319e15f0a3dd88497a001f2af38 100644
--- a/packages/kokkos/core/unit_test/rocm/TestROCm_SubView_a.cpp
+++ b/packages/kokkos/core/unit_test/rocm/TestROCm_SubView_a.cpp
@@ -101,4 +101,11 @@ TEST_F( TEST_CATEGORY, view_subview_right_3 )
   TestViewSubview::test_right_3< TEST_EXECSPACE >();
 }
 
+TEST_F(TEST_CATEGORY, view_static_tests)
+{
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutLeft>()();
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutRight>()();
+  TestViewSubview::TestExtentsStaticTests<TEST_EXECSPACE>();
+}
+
 } // namespace Test
diff --git a/packages/kokkos/core/unit_test/serial/TestSerial_AtomicOperations_complexdouble.cpp b/packages/kokkos/core/unit_test/serial/TestSerial_AtomicOperations_complexdouble.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e7354cb1165bde4267791d1f41ed494bcfb25e25
--- /dev/null
+++ b/packages/kokkos/core/unit_test/serial/TestSerial_AtomicOperations_complexdouble.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<serial/TestSerial_Category.hpp>
+#include<TestAtomicOperations_complexdouble.hpp>
+
diff --git a/packages/kokkos/core/unit_test/serial/TestSerial_AtomicOperations_complexfloat.cpp b/packages/kokkos/core/unit_test/serial/TestSerial_AtomicOperations_complexfloat.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..50227db29fdd648ec3cdf43708e66982b62893b1
--- /dev/null
+++ b/packages/kokkos/core/unit_test/serial/TestSerial_AtomicOperations_complexfloat.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<serial/TestSerial_Category.hpp>
+#include<TestAtomicOperations_complexfloat.hpp>
+
diff --git a/packages/kokkos/core/unit_test/serial/TestSerial_DeepCopyAlignment.cpp b/packages/kokkos/core/unit_test/serial/TestSerial_DeepCopyAlignment.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8280b49fe225f001ea98edbf60f100a075c2b35e
--- /dev/null
+++ b/packages/kokkos/core/unit_test/serial/TestSerial_DeepCopyAlignment.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <serial/TestSerial_Category.hpp>
+#include <TestDeepCopy.hpp>
diff --git a/packages/kokkos/core/unit_test/serial/TestSerial_LocalDeepCopy.cpp b/packages/kokkos/core/unit_test/serial/TestSerial_LocalDeepCopy.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a7cbcc171e44ca729390b7c1e10e88d02c1a8b91
--- /dev/null
+++ b/packages/kokkos/core/unit_test/serial/TestSerial_LocalDeepCopy.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <serial/TestSerial_Category.hpp>
+#include <TestLocalDeepCopy.hpp>
+
diff --git a/packages/kokkos/core/unit_test/serial/TestSerial_SubView_a.cpp b/packages/kokkos/core/unit_test/serial/TestSerial_SubView_a.cpp
index b9041ae44123b0ca17935f708ae8415204a08088..6ca6b92f05e2875698e9b51414b42e7087adfd5a 100644
--- a/packages/kokkos/core/unit_test/serial/TestSerial_SubView_a.cpp
+++ b/packages/kokkos/core/unit_test/serial/TestSerial_SubView_a.cpp
@@ -101,4 +101,11 @@ TEST_F( TEST_CATEGORY, view_subview_right_3 )
   TestViewSubview::test_right_3< TEST_EXECSPACE >();
 }
 
+TEST_F(TEST_CATEGORY, view_static_tests)
+{
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutLeft>()();
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutRight>()();
+  TestViewSubview::TestExtentsStaticTests<TEST_EXECSPACE>();
+}
+
 } // namespace Test
diff --git a/packages/kokkos/core/unit_test/serial/TestSerial_TeamVectorRange.cpp b/packages/kokkos/core/unit_test/serial/TestSerial_TeamVectorRange.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f8d8328f780d3e85eb49462b2e02a28f36d1586e
--- /dev/null
+++ b/packages/kokkos/core/unit_test/serial/TestSerial_TeamVectorRange.cpp
@@ -0,0 +1,48 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<serial/TestSerial_Category.hpp>
+#include<TestTeamVectorRange.hpp>
+
+
diff --git a/packages/kokkos/core/unit_test/standalone/UnitTestMainInit.cpp b/packages/kokkos/core/unit_test/standalone/UnitTestMainInit.cpp
index 2db51658cd6bd9f7d3e514a6666a59968806863c..6de5fc7736eca83e808071a289f076a6e5e3c215 100644
--- a/packages/kokkos/core/unit_test/standalone/UnitTestMainInit.cpp
+++ b/packages/kokkos/core/unit_test/standalone/UnitTestMainInit.cpp
@@ -58,8 +58,15 @@
 #ifdef KOKKOS_ENABLE_THREADS
 #include <threads/TestThreads_Category.hpp>
 #endif
-
-#include <TestMemoryPool.hpp>
+#ifdef KOKKOS_ENABLE_HPX
+#include <hpx/TestHPX_Category.hpp>
+#endif
+#ifndef TEST_EXECSPACE
+#ifdef KOKKOS_ENABLE_SERIAL
+#include <serial/TestSerial_Category.hpp>
+#endif
+#endif 
+#include <TestReduceDeviceView.hpp>
 
 int main( int argc, char *argv[] ) {
   Kokkos::initialize(argc,argv);
diff --git a/packages/kokkos/core/unit_test/threads/TestThreads_AtomicOperations_complexdouble.cpp b/packages/kokkos/core/unit_test/threads/TestThreads_AtomicOperations_complexdouble.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5201cbdbdbae9812571affe71efea48fc9eefd55
--- /dev/null
+++ b/packages/kokkos/core/unit_test/threads/TestThreads_AtomicOperations_complexdouble.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<threads/TestThreads_Category.hpp>
+#include<TestAtomicOperations_complexdouble.hpp>
+
diff --git a/packages/kokkos/core/unit_test/threads/TestThreads_AtomicOperations_complexfloat.cpp b/packages/kokkos/core/unit_test/threads/TestThreads_AtomicOperations_complexfloat.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bede254243a513bcc459787199774744cfd75a5f
--- /dev/null
+++ b/packages/kokkos/core/unit_test/threads/TestThreads_AtomicOperations_complexfloat.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<threads/TestThreads_Category.hpp>
+#include<TestAtomicOperations_complexfloat.hpp>
+
diff --git a/packages/kokkos/core/unit_test/threads/TestThreads_DeepCopyAlignment.cpp b/packages/kokkos/core/unit_test/threads/TestThreads_DeepCopyAlignment.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e0f76af4e9bd930fb09caac200b4dc357d1b2d0a
--- /dev/null
+++ b/packages/kokkos/core/unit_test/threads/TestThreads_DeepCopyAlignment.cpp
@@ -0,0 +1,45 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <threads/TestThreads_Category.hpp>
+#include <TestDeepCopy.hpp>
diff --git a/packages/kokkos/core/unit_test/threads/TestThreads_LocalDeepCopy.cpp b/packages/kokkos/core/unit_test/threads/TestThreads_LocalDeepCopy.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cd0aad7f2e9db3dbc2f7012e2efed917fed5a1a5
--- /dev/null
+++ b/packages/kokkos/core/unit_test/threads/TestThreads_LocalDeepCopy.cpp
@@ -0,0 +1,46 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <threads/TestThreads_Category.hpp>
+#include <TestLocalDeepCopy.hpp>
+
diff --git a/packages/kokkos/core/unit_test/threads/TestThreads_SubView_a.cpp b/packages/kokkos/core/unit_test/threads/TestThreads_SubView_a.cpp
index cccf334fc4fafd7b66588ac627f334716a3572d9..983a6ddb668d7e484b7ea5304581aa8234d32024 100644
--- a/packages/kokkos/core/unit_test/threads/TestThreads_SubView_a.cpp
+++ b/packages/kokkos/core/unit_test/threads/TestThreads_SubView_a.cpp
@@ -101,4 +101,11 @@ TEST_F( TEST_CATEGORY, view_subview_right_3 )
   TestViewSubview::test_right_3< TEST_EXECSPACE >();
 }
 
+TEST_F(TEST_CATEGORY, view_static_tests)
+{
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutLeft>()();
+  TestViewSubview::TestSubviewStaticSizes<TEST_EXECSPACE, Kokkos::LayoutRight>()();
+  TestViewSubview::TestExtentsStaticTests<TEST_EXECSPACE>();
+}
+
 } // namespace Test
diff --git a/packages/kokkos/core/unit_test/threads/TestThreads_TeamVectorRange.cpp b/packages/kokkos/core/unit_test/threads/TestThreads_TeamVectorRange.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..62b0d666cec1c878cbb5cbee4a9d6cc3df57101d
--- /dev/null
+++ b/packages/kokkos/core/unit_test/threads/TestThreads_TeamVectorRange.cpp
@@ -0,0 +1,48 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<threads/TestThreads_Category.hpp>
+#include<TestTeamVectorRange.hpp>
+
+
diff --git a/packages/kokkos/doc/kokkos-promotion.txt b/packages/kokkos/doc/kokkos-promotion.txt
index 0aede5f328fe824cea5e61bd213fbe97b523b5a0..3ed8aa0040ce06318de07c0f37f066f11fc3b372 100644
--- a/packages/kokkos/doc/kokkos-promotion.txt
+++ b/packages/kokkos/doc/kokkos-promotion.txt
@@ -1,18 +1,18 @@
 Summary:
 
-- Step 1: Testing Kokkos itself using test_all_sandia
+- Step 1: Testing Kokkos + KokkosKernels using test_all_sandia
 
-- Step 2: Testing of Kokkos integrated into Trilinos (scripts/trilinos-integration/*.sh)
+- Step 2: Testing of Kokkos + KokkosKernels integrated into Trilinos (scripts/trilinos-integration/*.sh)
 
 - Step 3: Close all issues labeled "InDevelop"
 
 - Step 4: Locally update CHANGELOG, merge into master, edit scripts/master_history.txt
 
-- Step 5: Locally snapshot new master into corresponding Trilinos branch (develop or temporary), push with checking-test-sems.sh
+- Step 5: Locally snapshot new master of kokkos and kokkos-kernels into corresponding Trilinos branch (develop or temporary), issue PR to Trilinos
 
-- Step 6: Push local Kokkos master to GitHub (need Owner approval)
+- Step 6: Push local Kokkos master to GitHub (need Owner approval). Push local KokkosKernels master to GitHub (need Owner approval)
 
-Steps 1, 2, and 4 include testing that may fail. These failures must be fixed either by pull requests to Kokkos develop, or by creating a new Trilinos branch for parts of Trilinos that must be updated. This is what usually takes the most time.
+Steps 1, 2, and 4 include testing that may fail. These failures must be fixed either by pull requests to Kokkos and/or KokkosKernels develop, or by creating a new Trilinos branch for parts of Trilinos that must be updated. This is what usually takes the most time.
 
 
 // -------------------------------------------------------------------------------- //
@@ -22,7 +22,10 @@ Step 1: The following should be repeated on enough machines to cover all
 supported compilers. Those machines are:
 
     kokkos-dev
-    ??? <- TODO: identify other machines
+    blake
+    white
+    bowman
+    waterman
 
   1.1. Clone kokkos develop branch (or just switch to it)
 
@@ -39,16 +42,56 @@ supported compilers. Those machines are:
          nohup ../scripts/test_all_sandia &
          tail -f nohup.out                   # to watch progress
 
+         NOTE: To kill jobs not running in the background (hopefully prevent ghost processes):
+
+             control+z
+             kill -9 %1
+
+  1.4. Clone kokkos-kernels develop branch (or just switch to it)
+
+         git clone -b develop git@github.com:kokkos/kokkos-kernels.git
+         cd kokkos-kernels
+
+  1.4. Create a testing directory
+
+         mkdir testing
+         cd testing
+
+  1.5. Run the test_all_sandia script with no options to test all compilers
+
+         nohup ../scripts/test_all_sandia &
+         tail -f nohup.out                   # to watch progress
+
+         NOTE: To kill jobs not running in the background (hopefully prevent ghost processes):
+
+             control+z
+             kill -9 %1
+
 // -------------------------------------------------------------------------------- //
 
 Step 2:
-  2.1. Build and test Trilinos with 4 different configurations; Run scripts for white and shepard that are provided in kokkos/scripts/trilinos-integration. These scripts load their own modules/environment, so don't require preparation. You can run all four at the same time, use separate directories for each.
+  2.1. Build and test Trilinos with the following configurations: 
+       a) serial, openmp, and cuda via the testing scripts in kokkos-kernels/scripts/trilinos-integration (automates the process)
+       b) various ATDM-supported builds via Trilinos configuration scripts located in kokkos{-kernels}/scripts/trilinos-integration/ATDM_configurations (not yet automated)
+       
+       Run scripts for white (openmp and cuda) and blake (seral) that are provided in kokkos{-kernels}/scripts/trilinos-integration. 
+       These scripts load their own modules/environment, so don't require preparation. You can run all four at the same time, use separate directories for each.
 
          mkdir serial
          cd serial
-         nohup KOKKOS_PATH/scripts/trilinos-integration/shepard_jenkins_run_script_serial_intel &
+         nohup KOKKOSKERNELS_PATH/scripts/trilinos-integration/blake_jenkins_run_script_serial_intel &
 
-  2.2. Compare the compile errors and test failures between updated and pristine versions. There may be compile failures that happen in both, tests that fail in both, and there may be tests that only fail some times (thus, rerun tests manually as needed).
+       Use scripts to configure Trilinos for waterman (cuda, cuda-debug, cuda-rdc) that are provided in kokkos-kernels/scripts/trilinos-integration/ATDM_configurations. 
+
+       These scripts load their own modules/environment, so don't require preparation of the system environment. You can run all them all at the same time, use separate directories for each. Instructions for compute node allocation, building, and testing are included in the scripts.
+
+       The Trilinos configuration scripts include an override of the kokkos and kokkos-kernels packages; this requires that a symbolic link for each be created in the Trilinos base directory:
+
+         cd Trilinos
+         ln -s <PATH_TO_YOUR_KOKKOS> kokkos
+         ln -s <PATH_TO_YOUR_KOKKOSKERNELS> kokkos-kernels
+
+  2.2. Compare the compile errors and test failures between updated and pristine versions; the ATDM configurations scripts should have 0 build errors and 100% passing tests. There may be compile failures that happen in both, tests that fail in both, and there may be tests that only fail some times (thus, rerun tests manually as needed).
 
 // -------------------------------------------------------------------------------- //
 
@@ -57,6 +100,9 @@ Step 3: Close all issues labeled "InDevelop"
        Use the GitHub web interface: https://github.com/kokkos/kokkos/issues?q=is%3Aopen+is%3Aissue+label%3AInDevelop
        Select all with checkbox in upper left, "Mark as closed" 
 
+       Use the GitHub web interface: https://github.com/kokkos/kokkos-kernels/issues?q=is%3Aopen+is%3Aissue+label%3AInDevelop
+       Select all with checkbox in upper left, "Mark as closed" 
+
 // -------------------------------------------------------------------------------- //
 
 Step 4: This step should be run on kokkos-dev
@@ -65,10 +111,10 @@ Step 4: This step should be run on kokkos-dev
 
        https://github.com/settings/tokens
 
-  4.2. Get a clean copy of the Kokkos develop branch
+  4.2. Get a clean copy of the kokkos and kokkos-kernels develop branches
 
        git clone -b develop git@github.com:kokkos/kokkos.git
-       cd kokkos
+       git clone -b develop git@github.com:kokkos/kokkos-kernels.git
 
   4.3. If you haven't already, install Ruby and the "github_changelog_generator" "gem"
        The github_changelog_generator is here: https://github.com/skywinder/github-changelog-generator
@@ -77,16 +123,19 @@ Step 4: This step should be run on kokkos-dev
        Follow the usual configure,make,make install process: https://www.ruby-lang.org/en/documentation/installation/#building-from-source
        Note that you will likely have to install to a non-default location with "./configure --prefix=/path"
 
-  4.4. Generate the initial changelog. Use the most recent tag as OLDTAG (`git tag -l` can show you all tags). The NEWTAG is the new version number, e.g. "2.04.00". RUN THIS OUTSIDE THE KOKKOS SOURCE TREE!
+  4.4. Generate the initial changelog. Use the most recent tag as OLDTAG (`git tag -l` can show you all tags). The NEWTAG is the new version number, e.g. "2.04.00".
+       RUN THIS OUTSIDE THE KOKKOS SOURCE TREE!
 
-       github_changelog_generator kokkos/kokkos --token TOKEN --no-pull-requests --include-labels 'InDevelop' --exclude-labels 'question,DevelopOnly' --enhancement-labels 'enhancement,Feature Request' --future-release 'NEWTAG' --between-tags 'NEWTAG,OLDTAG'
-       cat CHANGELOG.md
+       NOTE: You likely need to set an HTTPS proxy in order for this script to work:
 
-       Note: you may need to set an HTTPS proxy in order for this script to work:
        export https_proxy=http://wwwproxy.sandia.gov:80
 
+       github_changelog_generator kokkos/kokkos --token TOKEN --no-pull-requests --include-labels 'InDevelop' --exclude-labels 'question,DevelopOnly' --enhancement-labels 'enhancement,Feature Request' --future-release 'NEWTAG' --between-tags 'NEWTAG,OLDTAG'
+
+       github_changelog_generator kokkos/kokkos-kernels --token TOKEN --no-pull-requests --include-labels 'InDevelop' --exclude-labels 'question,DevelopOnly' --enhancement-labels 'enhancement,Feature Request' --future-release 'NEWTAG' --between-tags 'NEWTAG,OLDTAG'
+
   4.5. Manually cleanup and commit the change log.
-       (Copy the new section from the generated CHANGELOG.md to KOKKOS_PATH/CHANGELOG.md)
+       (Copy the new section from the generated CHANGELOG.md to the corresponding KOKKOS_PATH/CHANGELOG.md or KOKKOSKERNELS_PATH/CHANGELOG.md)
        (Make desired changes to CHANGELOG.md to enhance clarity (remove issues not noteworthy))
        (Commit the CHANGELOG.md locally to develop)
 
@@ -109,7 +158,17 @@ Step 4: This step should be run on kokkos-dev
 
           Part of Kokkos C++ Performance Portability Programming EcoSystem A.B
 
-  4.7. Update the tag in kokkos/scripts/master_history.txt
+       (From kokkos-kernels directory):
+       git checkout master
+       git merge --no-ff develop
+
+       The merge commit message should be:
+
+          Merge branch 'develop' for A.B.CD
+
+          Part of Kokkos C++ Performance Portability Programming EcoSystem A.B
+
+  4.7. Update the tag in kokkos/master_history.txt, then update the tag in kokkos-kernels/master_history.txt
 
        Tag description: MajorNumber.MinorNumber.WeeksSinceMinorNumberUpdate
        Tag field widths: #.#.##
@@ -127,7 +186,7 @@ Step 4: This step should be run on kokkos-dev
 
        Keep the merge commit as described in 4.6
 
-  4.8. Create the new tag:
+  4.8. Create the new tag (repeat for kokkos and kokkos-kernels):
 
        git tag -a #.#.##
 
@@ -142,11 +201,11 @@ Step 4: This step should be run on kokkos-dev
 
 // -------------------------------------------------------------------------------- //
 
-Step 5: This step can be done on any SEMS machine (e.g. kokkos-dev). Actually, the checkin step requires lots of disk space and RAM. Use ceerws1113 if you have access to it.
+Step 5: This step can be done on any SEMS machine (e.g. kokkos-dev).
 
   5.1. Clone the Trilinos corresponding branch (or just switch to it)
 
-        git clone -b kokkos-develop git@github.com:trilinos/Trilinos.git
+        git clone -b kokkos-promotion git@github.com:trilinos/Trilinos.git
         TRILINOS_PATH=$PWD/Trilinos
 
   5.2. Snapshot Kokkos into Trilinos - this requires python/2.7.9 and that both Trilinos and Kokkos be clean - no untracked or modified files. Run the following outside of the Kokkos and Trilinos source trees. 
@@ -155,17 +214,18 @@ Step 5: This step can be done on any SEMS machine (e.g. kokkos-dev). Actually, t
 
         module load sems-python/2.7.9
         python $KOKKOS_PATH/scripts/snapshot.py $KOKKOS_PATH $TRILINOS_PATH/packages
+        python $KOKKOS_PATH/scripts/snapshot.py $KOKKOSKERNELS_PATH $TRILINOS_PATH/packages
 
        If snapshotting kokkos-kernels, use the snapshot.py in kokkos.
 
   5.3. Push this Trilinos branch to GitHub, open a pull request for it.
-       The pull request title should be
+       The pull request title should be:
 
-       Kokkos + KokkosKernels Promotion To Version X.X.XX
+         Kokkos + KokkosKernels Promotion To X.X.XX
 
-       Mention @trilinos/kokkos and @trilinos/kokkos-kernels
+       In the message body, mention @trilinos/kokkos and @trilinos/kokkos-kernels,
 
-       Add a short description of the most significant features and bug fixes.
+       Add a short description of the most significant features and bug fixes,
 
        Then add:
 
@@ -177,20 +237,29 @@ Step 5: This step can be done on any SEMS machine (e.g. kokkos-dev). Actually, t
 
   5.4. Wait for Trilinos Autotester results
 
-  5.5. If there are failures, fix and backtrack. Otherwise, go to next step
+  5.5. If there are failures, fix and backtrack. Otherwise, merge into Trilinos' develop branch and go to next step
 
 // -------------------------------------------------------------------------------- //
 
-Step 6: Push Kokkos master and develop to GitHub (requires Owner permission).
+Step 6: Push Kokkos + KokkosKernels master and develop branches to respective GitHub repos (requires Owner permission).
       
   6.1. Master branch:
        cd KOKKOS_PATH
        git checkout master
        git push --follow-tags origin master 
 
+       cd KOKKOSKERNELS_PATH
+       git checkout master
+       git push --follow-tags origin master 
+
   6.2. Develop branch: First merge (--no-ff) master back into develop
        cd KOKKOS_PATH
        git checkout develop
-       git merge --no-ff maseter
+       git merge --no-ff master
+       git push origin develop 
+
+       cd KOKKOSKERNELS_PATH
+       git checkout develop
+       git merge --no-ff master
        git push origin develop 
 
diff --git a/packages/kokkos/example/cmake/Dependencies.cmake b/packages/kokkos/example/cmake/Dependencies.cmake
index ed1ec4c7259ef88fbbc28b9fcbde6d81ae8adf1f..741db6a0c426bb8290c28275794fc19fe9d96ffc 100644
--- a/packages/kokkos/example/cmake/Dependencies.cmake
+++ b/packages/kokkos/example/cmake/Dependencies.cmake
@@ -1,3 +1,3 @@
 TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
-  TEST_OPTIONAL_TPLS CUSPARSE MKL
+  TEST_OPTIONAL_TPLS CUSPARSE MKL HPX
   )
diff --git a/packages/kokkos/example/common/VectorImport.hpp b/packages/kokkos/example/common/VectorImport.hpp
index 566f03a2931e02574a0c064bdc60adb3eef4c33d..dd35bd568712f7b3b44cda6c47cf5e4cd027d6d5 100644
--- a/packages/kokkos/example/common/VectorImport.hpp
+++ b/packages/kokkos/example/common/VectorImport.hpp
@@ -110,10 +110,10 @@ class VectorImport {
 private:
 
   // rank == 1 or array_layout == LayoutRight
-  enum { OK = Kokkos::Impl::StaticAssert<
-           ( VectorType::rank == 1 ) ||
-           std::is_same< typename VectorType::array_layout , Kokkos::LayoutRight >::value
-         >::value };
+  static_assert(
+             ( VectorType::rank == 1 ) ||
+             std::is_same< typename VectorType::array_layout , Kokkos::LayoutRight >::value,
+             "Kokkos::Example::VectorImport Assert Fail: rank != 1 or array_layout != LayoutRight" );
 
   typedef typename VectorType::HostMirror HostVectorType ;
 
@@ -153,7 +153,7 @@ public:
       , buffer( arg_buffer )
     {
       Kokkos::parallel_for( index.dimension_0() , *this );
-      execution_space::fence();
+      execution_space().fence();
     }
   };
 
diff --git a/packages/kokkos/example/feint/Makefile b/packages/kokkos/example/feint/Makefile
index 12e09123df3ca79f315feb15ef4ca40d7dd3e4fc..61ddb3e2764b59082ec027d43f0a7d634b27e2a5 100644
--- a/packages/kokkos/example/feint/Makefile
+++ b/packages/kokkos/example/feint/Makefile
@@ -47,6 +47,10 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
   OBJ_EXAMPLE_FEINT += feint_openmp.o
 endif
 
+ifeq ($(KOKKOS_INTERNAL_USE_HPX), 1)
+  OBJ_EXAMPLE_FEINT += feint_hpx.o
+endif
+
 TARGETS = $(EXE_EXAMPLE_FEINT)
 
 #TEST_TARGETS =
diff --git a/packages/kokkos/example/feint/feint_hpx.cpp b/packages/kokkos/example/feint/feint_hpx.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..12e1a5af4e5ae237309cca85f181af180be3bf60
--- /dev/null
+++ b/packages/kokkos/example/feint/feint_hpx.cpp
@@ -0,0 +1,67 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+
+#if defined(KOKKOS_ENABLE_HPX)
+
+#include <feint.hpp>
+
+namespace Kokkos {
+namespace Example {
+
+template void feint<Kokkos::Experimental::HPX, false>(
+  const unsigned global_elem_nx ,
+  const unsigned global_elem_ny ,
+  const unsigned global_elem_nz );
+
+template void feint<Kokkos::Experimental::HPX, true>(
+  const unsigned global_elem_nx ,
+  const unsigned global_elem_ny ,
+  const unsigned global_elem_nz );
+
+} /* namespace Example */
+} /* namespace Kokkos */
+
+#endif /* #if defined( KOKKOS_ENABLE_HPX ) */
+
diff --git a/packages/kokkos/example/fenl/CGSolve.hpp b/packages/kokkos/example/fenl/CGSolve.hpp
index 4723ed8ce10c7660c69edb84fe8d3d633ec5f550..276c18e4d7f14aa8f55715e6e5ea8599e4a572eb 100644
--- a/packages/kokkos/example/fenl/CGSolve.hpp
+++ b/packages/kokkos/example/fenl/CGSolve.hpp
@@ -259,7 +259,7 @@ void cgsolve( const ImportType & import
     timer.reset();
     /* import p    */  import( pAll );
     /* Ap = A * p  */  multiply( count_owned , Ap , A , pAll );
-    Space::fence();
+    Space().fence();
     matvec_time += timer.seconds();
 
     const double pAp_dot = Kokkos::Example::all_reduce( dot( count_owned , p , Ap ) , import.comm );
@@ -278,7 +278,7 @@ void cgsolve( const ImportType & import
     ++iteration ;
   }
 
-  Space::fence();
+  Space().fence();
   iter_time = wall_clock.seconds();
 
   if ( 0 != result ) {
diff --git a/packages/kokkos/example/fenl/fenl.cpp b/packages/kokkos/example/fenl/fenl.cpp
index 11894a774d8fbb1b3b9f886d86e52dd80e65fcc6..77c51ab55107ef77d4e5c7a459620790f404e2fa 100644
--- a/packages/kokkos/example/fenl/fenl.cpp
+++ b/packages/kokkos/example/fenl/fenl.cpp
@@ -89,6 +89,28 @@ Perf fenl< Kokkos::OpenMP , Kokkos::Example::BoxElemPart::ElemQuadratic >(
 
 #endif
 
+
+#if defined (KOKKOS_ENABLE_HPX)
+
+template
+Perf fenl< Kokkos::Experimental::HPX , Kokkos::Example::BoxElemPart::ElemLinear >(
+  MPI_Comm comm ,
+  const int use_print ,
+  const int use_trials ,
+  const int use_atomic ,
+  const int global_elems[] );
+
+
+template
+Perf fenl< Kokkos::Experimental::HPX , Kokkos::Example::BoxElemPart::ElemQuadratic >(
+  MPI_Comm comm ,
+  const int use_print ,
+  const int use_trials ,
+  const int use_atomic ,
+  const int global_elems[] );
+
+#endif
+
 #if defined (KOKKOS_ENABLE_SERIAL)
 
 template
diff --git a/packages/kokkos/example/fenl/fenl_functors.hpp b/packages/kokkos/example/fenl/fenl_functors.hpp
index d0b484b5fb8fc31bec626cf8e1a943f0dd2deac5..96c89de29be5eb93ae13125b7df850699b700055 100644
--- a/packages/kokkos/example/fenl/fenl_functors.hpp
+++ b/packages/kokkos/example/fenl/fenl_functors.hpp
@@ -162,7 +162,7 @@ public:
 
       } while ( failed_insert_count );
 
-      execution_space::fence();
+      execution_space().fence();
       results.ratio = (double)node_node_set.size() / (double)node_node_set.capacity();
       results.fill_node_set = wall_clock.seconds();
       //--------------------------------
@@ -189,14 +189,14 @@ public:
       //--------------------------------
       // Fill graph's entries from the (node,node) set.
 
-      execution_space::fence();
+      execution_space().fence();
       results.scan_node_count = wall_clock.seconds();
 
       wall_clock.reset();
       phase = FILL_GRAPH_ENTRIES ;
       Kokkos::parallel_for( node_node_set.capacity() , *this );
 
-      execution_space::fence();
+      execution_space().fence();
       results.fill_graph_entries = wall_clock.seconds();
 
       //--------------------------------
@@ -213,7 +213,7 @@ public:
 
       Kokkos::parallel_for( node_count , *this );
 
-      execution_space::fence();
+      execution_space().fence();
       results.sort_graph_entries = wall_clock.seconds();
 
       //--------------------------------
@@ -223,7 +223,7 @@ public:
       elem_graph = ElemGraphType("elem_graph", elem_node_id.extent(0) );
       Kokkos::parallel_for( elem_node_id.extent(0) , *this );
 
-      execution_space::fence();
+      execution_space().fence();
       results.fill_element_graph = wall_clock.seconds();
     }
 
@@ -529,7 +529,7 @@ public:
       Kokkos::deep_copy( row_count , 0u );
       Kokkos::parallel_for( elem_node_id.extent(0) , *this );
 
-      execution_space::fence();
+      execution_space().fence();
 
       //--------------------------------
       // Done with the temporary sets and arrays
@@ -543,7 +543,7 @@ public:
       phase = SORT_GRAPH_ENTRIES ;
       Kokkos::parallel_for( residual.extent(0) , *this );
 
-      execution_space::fence();
+      execution_space().fence();
 
       phase = GATHER_FILL ;
     }
diff --git a/packages/kokkos/example/fenl/fenl_impl.hpp b/packages/kokkos/example/fenl/fenl_impl.hpp
index 1996a79729a72004a5ea0d3d7b04d9d3e9d5243d..4f756435c14b7ad56d616d539bd19fc32073d2d0 100644
--- a/packages/kokkos/example/fenl/fenl_impl.hpp
+++ b/packages/kokkos/example/fenl/fenl_impl.hpp
@@ -345,7 +345,7 @@ Perf fenl(
 
     SparseMatrixType jacobian( mesh_to_graph.graph );
 
-    Space::fence();
+    Space().fence();
 
     perf.create_sparse_matrix = maximum( comm , wall_clock.seconds() );
 
@@ -440,7 +440,7 @@ Perf fenl(
         gatherfill.apply();
       }
 
-      Space::fence();
+      Space().fence();
       perf.fill_time = maximum( comm , wall_clock.seconds() );
 
       //--------------------------------
@@ -450,7 +450,7 @@ Perf fenl(
 
       dirichlet.apply();
 
-      Space::fence();
+      Space().fence();
       perf.bc_time = maximum( comm , wall_clock.seconds() );
 
       //--------------------------------
diff --git a/packages/kokkos/example/fenl/main.cpp b/packages/kokkos/example/fenl/main.cpp
index 73f93a4a98df71dbc18030c19d3d25d28500e838..bd65e7683a8a11b7bf7013d3a575e488fc6c47d4 100644
--- a/packages/kokkos/example/fenl/main.cpp
+++ b/packages/kokkos/example/fenl/main.cpp
@@ -69,6 +69,7 @@ enum { CMD_USE_THREADS = 0
      , CMD_USE_CUDA
      , CMD_USE_ROCM
      , CMD_USE_OPENMP
+     , CMD_USE_HPX
      , CMD_USE_CUDA_DEV
      , CMD_USE_FIXTURE_X
      , CMD_USE_FIXTURE_Y
@@ -98,6 +99,10 @@ void print_cmdline( std::ostream & s , const int cmd[] )
       << ") CORE_PER_NUMA(" << cmd[ CMD_USE_CORE_PER_NUMA ]
       << ")" ;
   }
+  if ( cmd[ CMD_USE_HPX ] ) {
+    s << " HPX(" << cmd[ CMD_USE_HPX ]
+      << ")" ;
+  }
   if ( cmd[ CMD_USE_FIXTURE_X ] ) {
     s << " Fixture(" << cmd[ CMD_USE_FIXTURE_X ]
       << "x" << cmd[ CMD_USE_FIXTURE_Y ]
@@ -170,6 +175,7 @@ void run( MPI_Comm comm , const int cmd[] )
   if ( 0 == comm_rank ) {
     if ( cmd[ CMD_USE_THREADS ] ) { std::cout << "THREADS , " << cmd[ CMD_USE_THREADS ] ; }
     else if ( cmd[ CMD_USE_OPENMP ] ) { std::cout << "OPENMP , " << cmd[ CMD_USE_OPENMP ] ; }
+    else if ( cmd[ CMD_USE_HPX ] ) { std::cout << "HPX , " << cmd[ CMD_USE_HPX ] ; }
     else if ( cmd[ CMD_USE_CUDA ] ) { std::cout << "CUDA" ; }
     else if ( cmd[ CMD_USE_ROCM ] ) { std::cout << "ROCM" ; }
 
@@ -331,8 +337,10 @@ int main( int argc , char ** argv )
         << " -target-pid " << my_os_pid << " &";
     if (p_rank == 0)
       std::cout << cmd.str() << std::endl;
-    system(cmd.str().c_str());
-    system("sleep 10");
+    int error = system(cmd.str().c_str());
+    if(error) printf("System Call Result: %i\n",error);
+    error = system("sleep 10");
+    if(error) printf("System Call Result: %i\n",error);
   }
 
   if ( ! cmdline[ CMD_ERROR ] && ! cmdline[ CMD_ECHO ] ) {
diff --git a/packages/kokkos/example/md_skeleton/force.cpp b/packages/kokkos/example/md_skeleton/force.cpp
index 53a48f3fef28871d6c8b3697b0c702e8cc813ea7..beb2dc8929d5e5d426156617cfcac7d7be88c070 100644
--- a/packages/kokkos/example/md_skeleton/force.cpp
+++ b/packages/kokkos/example/md_skeleton/force.cpp
@@ -178,7 +178,7 @@ double2 force(System &s,int evflag) {
   else
     Kokkos::parallel_reduce(s.nlocal,f,ev);
 
-  execution_space::fence();
+  execution_space().fence();
   return ev;
 }
 
diff --git a/packages/kokkos/example/md_skeleton/neighbor.cpp b/packages/kokkos/example/md_skeleton/neighbor.cpp
index 25cabb33026342da73eddceee5413c3b34662fb2..60e33d31f79fae49f683432556867191d010d43a 100644
--- a/packages/kokkos/example/md_skeleton/neighbor.cpp
+++ b/packages/kokkos/example/md_skeleton/neighbor.cpp
@@ -388,11 +388,11 @@ void neigh_build(System &s) {
     MemsetZeroFunctor f_zero;
     f_zero.ptr = (void*) s.bincount.ptr_on_device();
     Kokkos::parallel_for(s.mbins, f_zero);
-    execution_space::fence();
+    execution_space().fence();
 
     BinningFunctor f(s);
     Kokkos::parallel_for(s.natoms, f);
-    execution_space::fence();
+    execution_space().fence();
 
     /* Check if bins was large enough, if nor reallocated and rerun */
 
@@ -416,7 +416,7 @@ void neigh_build(System &s) {
     BuildFunctor f(s);
     Kokkos::parallel_for(s.nlocal, f);
 
-    execution_space::fence();
+    execution_space().fence();
 
     /* Check if neighbors was large enough, if nor reallocated and rerun */
 
diff --git a/packages/kokkos/example/multi_fem/Explicit.hpp b/packages/kokkos/example/multi_fem/Explicit.hpp
index 723cab861adb74b6c0d318bac457421530ed650d..d3a7f159c0894a3dd8a28fff1fb847037864e5d7 100644
--- a/packages/kokkos/example/multi_fem/Explicit.hpp
+++ b/packages/kokkos/example/multi_fem/Explicit.hpp
@@ -230,7 +230,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
                  mesh.parallel_data_map.count_owned ,
                  mesh.parallel_data_map.count_receive );
 
-      execution_space::fence();
+      execution_space().fence();
     }
 #endif
 
@@ -261,7 +261,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
                                                    user_dt ,
                                                    current_state );
 
-    execution_space::fence();
+    execution_space().fence();
 
     perf_data.internal_force_time +=
       comm::max( machine , wall_clock.seconds() );
@@ -276,7 +276,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
                                                x_bc ,
                                                current_state,
                                                next_state );
-    execution_space::fence();
+    execution_space().fence();
 
     perf_data.central_diff +=
       comm::max( machine , wall_clock.seconds() );
diff --git a/packages/kokkos/example/multi_fem/ExplicitFunctors.hpp b/packages/kokkos/example/multi_fem/ExplicitFunctors.hpp
index 43d21c6022d516ced0b0b2ce3c809e7be7eb1b60..764dca38dcff02b91282e262a6f6de24297270ca 100644
--- a/packages/kokkos/example/multi_fem/ExplicitFunctors.hpp
+++ b/packages/kokkos/example/multi_fem/ExplicitFunctors.hpp
@@ -526,7 +526,7 @@ struct grad
     const int X = 0 ;
     const int Y = 1 ;
     const int Z = 2 ;
-    const Scalar dt_scale = -0.5 * *dt;
+    const Scalar dt_scale = -0.5 * dt();
 
     //  declare and reuse local data for frequently accessed data to
     //  reduce global memory reads and writes.
@@ -674,7 +674,7 @@ struct decomp_rotate
   KOKKOS_INLINE_FUNCTION
   void polar_decomp(int ielem, Scalar * v_gr, Scalar * str_ten, Scalar * str, Scalar * vort, Scalar * rot_old, Scalar * rot_new)const
   {
-    const Scalar dt = *dt_value;
+    const Scalar dt = dt_value();
     const Scalar dt_half = 0.5 * dt;
 
     //  Skew Symmetric part
@@ -958,8 +958,8 @@ struct internal_force
   KOKKOS_INLINE_FUNCTION
   void final( value_type & result ) const
   {
-    *prev_dt = *dt ;
-    *dt = result ;
+    prev_dt() = dt() ;
+    dt() = result ;
   };
 
   //--------------------------------------------------------------------------
@@ -1121,13 +1121,13 @@ struct internal_force
 
       const Scalar e = (rot_stretch(ielem,kxx)+rot_stretch(ielem,kyy)+rot_stretch(ielem,kzz))/3.0;
 
-      s_n[kxx] = stress_new(ielem,kxx) += *dt * (two_mu * (rot_stretch(ielem,kxx)-e)+3*bulk_modulus*e);
-      s_n[kyy] = stress_new(ielem,kyy) += *dt * (two_mu * (rot_stretch(ielem,kyy)-e)+3*bulk_modulus*e);
-      s_n[kzz] = stress_new(ielem,kzz) += *dt * (two_mu * (rot_stretch(ielem,kzz)-e)+3*bulk_modulus*e);
+      s_n[kxx] = stress_new(ielem,kxx) += dt() * (two_mu * (rot_stretch(ielem,kxx)-e)+3*bulk_modulus*e);
+      s_n[kyy] = stress_new(ielem,kyy) += dt() * (two_mu * (rot_stretch(ielem,kyy)-e)+3*bulk_modulus*e);
+      s_n[kzz] = stress_new(ielem,kzz) += dt() * (two_mu * (rot_stretch(ielem,kzz)-e)+3*bulk_modulus*e);
 
-      s_n[kxy] = stress_new(ielem,kxy) += *dt * two_mu * rot_stretch(ielem,kxy);
-      s_n[kyz] = stress_new(ielem,kyz) += *dt * two_mu * rot_stretch(ielem,kyz);
-      s_n[kzx] = stress_new(ielem,kzx) += *dt * two_mu * rot_stretch(ielem,kzx);
+      s_n[kxy] = stress_new(ielem,kxy) += dt() * two_mu * rot_stretch(ielem,kxy);
+      s_n[kyz] = stress_new(ielem,kyz) += dt() * two_mu * rot_stretch(ielem,kyz);
+      s_n[kzx] = stress_new(ielem,kzx) += dt() * two_mu * rot_stretch(ielem,kzx);
     }
 
   //----------------------------------------------------------------------------
@@ -1325,8 +1325,8 @@ struct nodal_step
 
       // Central difference time integration:
 
-      const Scalar dt_disp = *dt ;
-      const Scalar dt_vel = ( *dt + *prev_dt ) / 2.0 ;
+      const Scalar dt_disp = dt() ;
+      const Scalar dt_vel = ( dt() + prev_dt() ) / 2.0 ;
 
       velocity(inode,0,next_state) = v_new[0] =
         velocity(inode,0,current_state) + dt_vel * a_current[0];
diff --git a/packages/kokkos/example/multi_fem/Implicit.hpp b/packages/kokkos/example/multi_fem/Implicit.hpp
index bc8659942e2f969f4a63c9a2b718ba1aea984ca4..f129c595469e6b7423578ce5d70c500cff52a10a 100644
--- a/packages/kokkos/example/multi_fem/Implicit.hpp
+++ b/packages/kokkos/example/multi_fem/Implicit.hpp
@@ -161,7 +161,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
 
   graph_factory::create( mesh , linsys_matrix.graph , element_map );
 
-  execution_space::fence();
+  execution_space().fence();
   perf_data.graph_time = comm::max( machine , wall_clock.seconds() );
 
   //------------------------------------
@@ -196,7 +196,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
                            elem_matrices , elem_vectors ,
                            elem_coeff_K , elem_load_Q );
 
-    execution_space::fence();
+    execution_space().fence();
     perf_data.elem_time = comm::max( machine , wall_clock.seconds() );
 
     //------------------------------------
@@ -207,7 +207,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
     GatherFillFunctor::apply( linsys_matrix , linsys_rhs ,
                mesh , element_map , elem_matrices , elem_vectors );
 
-    execution_space::fence();
+    execution_space().fence();
     perf_data.matrix_gather_fill_time = comm::max( machine , wall_clock.seconds() );
 
     // Apply boundary conditions:
@@ -217,7 +217,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
     BoundaryFunctor::apply( linsys_matrix , linsys_rhs , mesh ,
                             0 , global_max_z , 0 , global_max_z );
 
-    execution_space::fence();
+    execution_space().fence();
     perf_data.matrix_boundary_condition_time = comm::max( machine , wall_clock.seconds() );
   }
 
diff --git a/packages/kokkos/example/multi_fem/LinAlgBLAS.hpp b/packages/kokkos/example/multi_fem/LinAlgBLAS.hpp
index fa03e200800fdf3eceb5147aab55d6a1d5b8a17b..5e2292b32af4ba8ea35f5e9c51b431f1c2a6a974 100644
--- a/packages/kokkos/example/multi_fem/LinAlgBLAS.hpp
+++ b/packages/kokkos/example/multi_fem/LinAlgBLAS.hpp
@@ -103,17 +103,17 @@ namespace Kokkos {
 
 template< typename ScalarX /* Allow mix of const and non-const */ ,
           typename ScalarY /* Allow mix of const and non-const */ ,
-          class L , class D ,
-          class MX /* Allow any management type */ ,
-          class MY /* Allow any management type */ >
+          class D>
 inline
 double dot( const size_t n ,
-            const View< ScalarX * , L , D , MX > & x ,
-            const View< ScalarY * , L , D , MY > & y ,
+            const View< ScalarX * , D > & x ,
+            const View< ScalarY * , D > & y ,
             comm::Machine machine )
 {
   double global_result = 0 ;
   double local_result = 0 ;
+  using x_type = View<ScalarX*, D>;
+  using L = typename x_type::array_layout;
 
   Impl::Dot< ScalarX , L , D >( n , x , y , local_result );
 
@@ -127,16 +127,16 @@ double dot( const size_t n ,
 
 template< typename ScalarX /* Allow mix of const and non-const */ ,
           typename ScalarY /* Allow mix of const and non-const */ ,
-          class L , class D ,
-          class MX /* Allow any management type */ ,
-          class MY /* Allow any management type */ >
+          class D >
 inline
 double dot( const size_t n ,
-            const View< ScalarX * , L , D , MX > & x ,
-            const View< ScalarY * , L , D , MY > & y ,
+            const View< ScalarX * , D > & x ,
+            const View< ScalarY * , D > & y ,
             comm::Machine )
 {
   double global_result = 0 ;
+  using x_type = View<ScalarX*, D>;
+  using L = typename x_type::array_layout;
 
   Impl::Dot< ScalarX , L , D >( n , x , y , global_result );
 
@@ -171,14 +171,15 @@ double dot( const size_t n ,
 #else
 
 template< typename ScalarX /* Allow mix of const and non-const */ ,
-          class L , class D ,
-          class MX /* Allow any management type */ >
+          class D>
 inline
 double dot( const size_t n ,
-            const View< ScalarX * , L , D , MX > & x ,
+            const View< ScalarX * , D> & x ,
             comm::Machine )
 {
   double global_result = 0 ;
+  using x_type = View<ScalarX*, D>;
+  using L = typename x_type::array_layout;
 
   Impl::Dot1< ScalarX , L , D >( n , x , global_result );
 
@@ -190,11 +191,10 @@ double dot( const size_t n ,
 //----------------------------------------------------------------------------
 
 template< typename ScalarX /* Allow mix of const and non-const */ ,
-          class L , class D ,
-          class MX /* Allow any management type */ >
+          class D >
 inline
 double norm2( const size_t n ,
-              const View< ScalarX * , L , D , MX > & x ,
+              const View< ScalarX * , D > & x ,
               comm::Machine machine )
 {
   return std::sqrt( dot( n , x , machine ) );
@@ -216,13 +216,13 @@ void scale( const size_t n ,
 
 template< typename ScalarA ,
           typename ScalarX ,
-          class L ,
-          class D ,
-          class MX >
+          class D >
 void fill( const size_t n ,
            const ScalarA & alpha ,
-           const View< ScalarX * , L , D , MX > & x )
+           const View< ScalarX * , D > & x )
 {
+  using x_type = View<ScalarX*, D>;
+  using L = typename x_type::array_layout;
   Impl::Fill< ScalarA , ScalarX , L , D >( n , alpha , x );
 }
 
@@ -231,15 +231,14 @@ void fill( const size_t n ,
 template< typename ScalarA ,
           typename ScalarX ,
           typename ScalarY ,
-          class L ,
-          class D ,
-          class MX ,
-          class MY >
+          class D >
 void axpy( const size_t n ,
            const ScalarA & alpha ,
-           const View< ScalarX *, L , D , MX > & x ,
-           const View< ScalarY *, L , D , MY > & y )
+           const View< ScalarX *, D > & x ,
+           const View< ScalarY *, D > & y )
 {
+  using x_type = View<ScalarX*, D>;
+  using L = typename x_type::array_layout;
   Impl::AXPY< ScalarA, ScalarX, ScalarY , L , D >( n, alpha, x, y );
 }
 
@@ -248,15 +247,14 @@ void axpy( const size_t n ,
 template< typename ScalarX ,
           typename ScalarB ,
           typename ScalarY ,
-          class L ,
-          class D ,
-          class MX ,
-          class MY >
+          class D >
 void xpby( const size_t n ,
-           const View< ScalarX *, L , D , MX > & x ,
+           const View< ScalarX *, D > & x ,
            const ScalarB & beta ,
-           const View< ScalarY *, L , D , MY > & y )
+           const View< ScalarY *, D > & y )
 {
+  using x_type = View<ScalarX*, D>;
+  using L = typename x_type::array_layout;
   Impl::XPBY< ScalarX, ScalarB, ScalarY , L , D >( n, x, beta, y );
 }
 
@@ -268,15 +266,17 @@ template< typename ScalarA ,
           typename ScalarB ,
           typename ScalarY ,
           typename ScalarW ,
-          class L , class D ,
-          class MX , class MY , class MW >
+          class D
+          >
 void waxpby( const size_t n ,
              const ScalarA & alpha ,
-             const View< ScalarX * , L , D , MX > & x ,
+             const View< ScalarX * , D > & x ,
              const ScalarB & beta ,
-             const View< ScalarY * , L , D , MY > & y ,
-             const View< ScalarW * , L , D , MW > & w )
+             const View< ScalarY * , D > & y ,
+             const View< ScalarW * , D > & w )
 {
+  using x_type = typename std::decay<decltype(x)>::type;
+  using L = typename x_type::array_layout;
   Impl::WAXPBY<ScalarA,ScalarX,ScalarB,ScalarY,ScalarW,L,D>
     ( n , alpha , x , beta , y , w );
 }
diff --git a/packages/kokkos/example/multi_fem/Nonlinear.hpp b/packages/kokkos/example/multi_fem/Nonlinear.hpp
index 7e91529e1c53b92e912a0a6597aa784952ecd8ba..b9585c75825a626a75a5edcb92e3f99353907fd1 100644
--- a/packages/kokkos/example/multi_fem/Nonlinear.hpp
+++ b/packages/kokkos/example/multi_fem/Nonlinear.hpp
@@ -252,7 +252,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
 
   graph_factory::create( mesh , jacobian.graph , element_map );
 
-  execution_space::fence();
+  execution_space().fence();
 
   perf_data.graph_time = comm::max( machine , wall_clock.seconds() );
 
@@ -338,7 +338,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
                     nodal_solution ,
                     exact_solution.K );
 
-    execution_space::fence();
+    execution_space().fence();
     perf_data.elem_time += comm::max( machine , wall_clock.seconds() );
 
     //------------------------------------
@@ -356,7 +356,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
                               elem_matrices ,
                               elem_vectors );
 
-    execution_space::fence();
+    execution_space().fence();
     perf_data.matrix_gather_fill_time += comm::max( machine , wall_clock.seconds() );
 
     // Apply boundary conditions:
@@ -369,7 +369,7 @@ PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
                                      exact_solution.zmin ,
                                      exact_solution.zmax );
 
-    execution_space::fence();
+    execution_space().fence();
     perf_data.matrix_boundary_condition_time +=
       comm::max( machine , wall_clock.seconds() );
 
diff --git a/packages/kokkos/example/multi_fem/TestCuda.cpp b/packages/kokkos/example/multi_fem/TestCuda.cpp
index 4b6b739050a2394c84577f52967413c69595b7ca..d0e53283f36a3f85ed2721bc4d5d33c9fc668649 100644
--- a/packages/kokkos/example/multi_fem/TestCuda.cpp
+++ b/packages/kokkos/example/multi_fem/TestCuda.cpp
@@ -86,12 +86,12 @@ void test_cuda_fixture( comm::Machine machine ,
     dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
   const size_t gang_count = 0 ;
 
-  Kokkos::HostSpace::execution_space::initialize();
-  Kokkos::Cuda::SelectDevice select_device( dev_rank );
-  Kokkos::Cuda::initialize( select_device );
+  Kokkos::InitArguments args;
+  args.device_id = dev_rank;
+  Kokkos::initialize(args);
+
   test_box_fixture<Kokkos::Cuda>( machine , gang_count , nx , ny , nz );
-  Kokkos::Cuda::finalize();
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 //----------------------------------------------------------------------------
@@ -108,12 +108,11 @@ void test_cuda_implicit( comm::Machine machine ,
     dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
   const size_t gang_count = 0 ;
 
-  Kokkos::HostSpace::execution_space::initialize();
-  Kokkos::Cuda::SelectDevice select_device( dev_rank );
-  Kokkos::Cuda::initialize( select_device );
+  Kokkos::InitArguments args;
+  args.device_id = dev_rank;
+  Kokkos::initialize(args);
   HybridFEM::Implicit::driver<double,Kokkos::Cuda>( "Cuda" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
-  Kokkos::Cuda::finalize();
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 //----------------------------------------------------------------------------
@@ -130,12 +129,11 @@ void test_cuda_explicit( comm::Machine machine ,
     dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
   const size_t gang_count = 0 ;
 
-  Kokkos::HostSpace::execution_space::initialize();
-  Kokkos::Cuda::SelectDevice select_device( dev_rank );
-  Kokkos::Cuda::initialize( select_device );
+  Kokkos::InitArguments args;
+  args.device_id = dev_rank;
+  Kokkos::initialize(args);
   Explicit::driver<double,Kokkos::Cuda>( "Cuda" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
-  Kokkos::Cuda::finalize();
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 //----------------------------------------------------------------------------
@@ -152,15 +150,14 @@ void test_cuda_nonlinear( comm::Machine machine ,
     dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
   const size_t gang_count = 0 ;
 
-  Kokkos::HostSpace::execution_space::initialize();
-  Kokkos::Cuda::SelectDevice select_device( dev_rank );
-  Kokkos::Cuda::initialize( select_device );
+  Kokkos::InitArguments args;
+  args.device_id = dev_rank;
+  Kokkos::initialize(args);
 
   typedef Kokkos::Cuda device ;
   typedef FixtureElementHex8 hex8 ;
   HybridFEM::Nonlinear::driver<double,device,hex8>( "Cuda" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
-  Kokkos::Cuda::finalize();
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 void test_cuda_nonlinear_quadratic( comm::Machine machine , 
@@ -175,15 +172,14 @@ void test_cuda_nonlinear_quadratic( comm::Machine machine ,
     dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
   const size_t gang_count = 0 ;
 
-  Kokkos::HostSpace::execution_space::initialize();
-  Kokkos::Cuda::SelectDevice select_device( dev_rank );
-  Kokkos::Cuda::initialize( select_device );
+  Kokkos::InitArguments args;
+  args.device_id = dev_rank;
+  Kokkos::initialize(args);
 
   typedef Kokkos::Cuda device ;
   typedef FixtureElementHex27 hex27 ;
   HybridFEM::Nonlinear::driver<double,device,hex27>( "Cuda" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
-  Kokkos::Cuda::finalize();
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 //----------------------------------------------------------------------------
diff --git a/packages/kokkos/example/multi_fem/TestHost.cpp b/packages/kokkos/example/multi_fem/TestHost.cpp
index d12ac837ca79b29e09f7fbb4d2ff3b1c70de9a80..f0f0844812df1fabd32f27df26c67c315a957ee4 100644
--- a/packages/kokkos/example/multi_fem/TestHost.cpp
+++ b/packages/kokkos/example/multi_fem/TestHost.cpp
@@ -68,9 +68,10 @@ void test_host_fixture( comm::Machine machine ,
                         size_t gang_worker_count ,
                         size_t nx , size_t ny , size_t nz )
 {
-  Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+  Kokkos::InitArguments args(gang_count * gang_worker_count);
+  Kokkos::initialize( args );
   test_box_fixture<Kokkos::HostSpace::execution_space>( machine , gang_count , nx , ny , nz );
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 //----------------------------------------------------------------------------
@@ -82,9 +83,10 @@ void test_host_implicit( comm::Machine machine ,
                          size_t elem_count_end ,
                          size_t count_run )
 {
-  Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+  Kokkos::InitArguments args(gang_count * gang_worker_count);
+  Kokkos::initialize( args );
   HybridFEM::Implicit::driver<double,Kokkos::HostSpace::execution_space>( "Threads" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 //----------------------------------------------------------------------------
@@ -96,9 +98,10 @@ void test_host_explicit( comm::Machine machine ,
                          size_t elem_count_end ,
                          size_t count_run )
 {
-  Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+  Kokkos::InitArguments args(gang_count * gang_worker_count);
+  Kokkos::initialize( args );
   Explicit::driver<double,Kokkos::HostSpace::execution_space>( "Threads" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 //----------------------------------------------------------------------------
@@ -111,11 +114,12 @@ void test_host_nonlinear( comm::Machine machine ,
                           size_t elem_count_end ,
                           size_t count_run )
 {
-  Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+  Kokkos::InitArguments args(gang_count * gang_worker_count);
+  Kokkos::initialize( args );
   typedef FixtureElementHex8 hex8 ;
   typedef Kokkos::HostSpace::execution_space             device ;
   HybridFEM::Nonlinear::driver<double,device,hex8>( "Threads" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 void test_host_nonlinear_quadratic( comm::Machine machine ,
@@ -125,11 +129,12 @@ void test_host_nonlinear_quadratic( comm::Machine machine ,
                                     size_t elem_count_end ,
                                     size_t count_run )
 {
-  Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+  Kokkos::InitArguments args(gang_count * gang_worker_count);
+  Kokkos::initialize( args );
   typedef FixtureElementHex27 hex27 ;
   typedef Kokkos::HostSpace::execution_space              device ;
   HybridFEM::Nonlinear::driver<double,device,hex27>( "Threads" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
-  Kokkos::HostSpace::execution_space::finalize();
+  Kokkos::finalize();
 }
 
 //----------------------------------------------------------------------------
diff --git a/packages/kokkos/example/tutorial/Advanced_Views/03_subviews/subviews.cpp b/packages/kokkos/example/tutorial/Advanced_Views/03_subviews/subviews.cpp
index 0d1e428e2449a88aa2f7759b647d9a246ab60fb9..d2472a1910c68ac098027dd97737b527b878636d 100644
--- a/packages/kokkos/example/tutorial/Advanced_Views/03_subviews/subviews.cpp
+++ b/packages/kokkos/example/tutorial/Advanced_Views/03_subviews/subviews.cpp
@@ -185,6 +185,7 @@ int main (int narg, char* arg[]) {
     // This simulates one timestep with dt = 0.1.
     parallel_for (Ai.extent(0), update<mesh_type> (A, 0.1));
 
+    Kokkos::fence();
     printf ("Done\n");
   }
   Kokkos::finalize ();
diff --git a/packages/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/overlapping_deepcopy.cpp b/packages/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/overlapping_deepcopy.cpp
index ad1503642bf348a8447dd6320e56ea26b11ed016..e115dcbabd7a0836568a574d5813ac5d9f2eb590 100644
--- a/packages/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/overlapping_deepcopy.cpp
+++ b/packages/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/overlapping_deepcopy.cpp
@@ -129,7 +129,7 @@ int main(int argc, char * argv[]) {
     h_a(i) = 0.0;
   });
   Kokkos::parallel_for(Kokkos::RangePolicy<Kokkos::OpenMP>(0,size),ComputeAHost(h_a,h_b));
-  Kokkos::OpenMP::fence();
+  Kokkos::OpenMP().fence();
   if(synch==1)
     Kokkos::deep_copy(Kokkos::OpenMP(), d_tmp,h_a);
   if(synch==2)
diff --git a/packages/kokkos/generate_makefile.bash b/packages/kokkos/generate_makefile.bash
index f3c4f16238c9c9efbbead7cc8f1ae8525922ca11..d401998a7de63203463a039f3149314297e6b8f4 100755
--- a/packages/kokkos/generate_makefile.bash
+++ b/packages/kokkos/generate_makefile.bash
@@ -15,12 +15,15 @@ do
     --qthreads-path*)
       QTHREADS_PATH="${key#*=}"
       ;;
+    --hpx-path*)
+      HPX_PATH="${key#*=}"
+      ;;
     --prefix*)
       PREFIX="${key#*=}"
       ;;
     --with-cuda)
       KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda"
-      CUDA_PATH_NVCC=`which nvcc`
+      CUDA_PATH_NVCC=$(command -v nvcc)
       CUDA_PATH=${CUDA_PATH_NVCC%/bin/nvcc}
       ;;
     # Catch this before '--with-cuda*'
@@ -49,6 +52,15 @@ do
         QTHREADS_PATH="${key#*=}"
       fi
       ;;
+    --with-hpx-options*)
+      KOKKOS_HPX_OPT="${key#*=}"
+      ;;
+    --with-hpx*)
+      KOKKOS_DEVICES="${KOKKOS_DEVICES},HPX"
+      if [ -z "$HPX_PATH" ]; then
+        HPX_PATH="${key#*=}"
+      fi
+      ;;
     --with-devices*)
       DEVICES="${key#*=}"
       KOKKOS_DEVICES="${KOKKOS_DEVICES},${DEVICES}"
@@ -86,7 +98,7 @@ do
       ;;
     --compiler*)
       COMPILER="${key#*=}"
-      CNUM=`which ${COMPILER} 2>&1 >/dev/null | grep "no ${COMPILER}" | wc -l`
+      CNUM=$(command -v ${COMPILER} 2>&1 >/dev/null | grep "no ${COMPILER}" | wc -l)
       if [ ${CNUM} -gt 0 ]; then
         echo "Invalid compiler by --compiler command: '${COMPILER}'"
         exit
@@ -95,15 +107,15 @@ do
         echo "Empty compiler specified by --compiler command."
         exit
       fi
-      CNUM=`which ${COMPILER} | grep ${COMPILER} | wc -l`
+      CNUM=$(command -v ${COMPILER} | grep ${COMPILER} | wc -l)
       if [ ${CNUM} -eq 0 ]; then
         echo "Invalid compiler by --compiler command: '${COMPILER}'"
         exit
       fi
       # ... valid compiler, ensure absolute path set 
-      WCOMPATH=`which $COMPILER`
-      COMPDIR=`dirname $WCOMPATH`
-      COMPNAME=`basename $WCOMPATH`
+      WCOMPATH=$(command -v $COMPILER)
+      COMPDIR=$(dirname $WCOMPATH)
+      COMPNAME=$(basename $WCOMPATH)
       COMPILER=${COMPDIR}/${COMPNAME}
       ;;
     --with-options*)
@@ -186,6 +198,8 @@ do
       echo "                                "
       echo "--with-cuda-options=[OPT]:    Additional options to CUDA:"
       echo "                                force_uvm, use_ldg, enable_lambda, rdc"
+      echo "--with-hpx-options=[OPT]:     Additional options to HPX:"
+      echo "                                enable_async_dispatch"
       echo "--gcc-toolchain=/Path/To/GccRoot:  Set the gcc toolchain to use with clang (e.g. /usr)" 
       echo "--make-j=[NUM]:               DEPRECATED: call make with appropriate"
       echo "                                -j flag"
@@ -282,6 +296,10 @@ if [ ${#QTHREADS_PATH} -gt 0 ]; then
   KOKKOS_SETTINGS="${KOKKOS_SETTINGS} QTHREADS_PATH=${QTHREADS_PATH}"
 fi
 
+if [ ${#HPX_PATH} -gt 0 ]; then
+    KOKKOS_SETTINGS="${KOKKOS_SETTINGS} HPX_PATH=${HPX_PATH}"
+fi
+
 if [ ${#KOKKOS_OPT} -gt 0 ]; then
   KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_OPTIONS=${KOKKOS_OPT}"
 fi
@@ -290,6 +308,10 @@ if [ ${#KOKKOS_CUDA_OPT} -gt 0 ]; then
   KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_CUDA_OPTIONS=${KOKKOS_CUDA_OPT}"
 fi
 
+if [ ${#KOKKOS_HPX_OPT} -gt 0 ]; then
+    KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_HPX_OPTIONS=${KOKKOS_HPX_OPT}"
+fi
+
 if [ ${#KOKKOS_GCC_TOOLCHAIN} -gt 0 ]; then
   KOKKOS_SETTINGS="${KOKKOS_SETTINGS} KOKKOS_INTERNAL_GCC_TOOLCHAIN=${KOKKOS_GCC_TOOLCHAIN}"
 fi
@@ -485,6 +507,7 @@ echo -e "\t\$(MAKE) -C containers/unit_tests" >> Makefile
 echo -e "\t\$(MAKE) -C containers/performance_tests" >> Makefile
 echo -e "\t\$(MAKE) -C algorithms/unit_tests" >> Makefile
 if [ ${KOKKOS_DO_EXAMPLES} -gt 0 ]; then
+$()
 echo -e "\t\$(MAKE) -C example/fixture" >> Makefile
 echo -e "\t\$(MAKE) -C example/feint" >> Makefile
 echo -e "\t\$(MAKE) -C example/fenl" >> Makefile
diff --git a/packages/kokkos/master_history.txt b/packages/kokkos/master_history.txt
index 777f080c498fce8e8fbb9144eeb3c9e73952e905..3ec4306a9fe841b4751a1c35bb19fc3baf6a460e 100644
--- a/packages/kokkos/master_history.txt
+++ b/packages/kokkos/master_history.txt
@@ -16,3 +16,4 @@ tag:  2.6.00     date: 03:07:2018    master: 62e760fa    develop: d1ba7d71
 tag:  2.7.00     date: 05:24:2018    master: e01945d0    develop: 2d13f608
 tag:  2.7.24     date: 11:04:2018    master: d3a94192    develop: 7a06fc81
 tag:  2.8.00     date: 02:05:2019    master: 34931a36    develop: d1659d1d
+tag:  2.9.00     date: 06:24:2019    master: 5d6e7fb3    develop: 4c6cb80a
diff --git a/packages/kokkos/scripts/docker/Dockerfile.clang b/packages/kokkos/scripts/docker/Dockerfile.clang
new file mode 100644
index 0000000000000000000000000000000000000000..a79c60fc905c69d62fd47178c639ad106e0fe449
--- /dev/null
+++ b/packages/kokkos/scripts/docker/Dockerfile.clang
@@ -0,0 +1,27 @@
+FROM nvidia/cuda:9.2-devel
+
+RUN apt-get update && apt-get install -y \
+        bc \
+        git \
+        wget \
+        ccache \
+        && \
+    apt-get clean && \
+    rm -rf /var/lib/apt/lists/*
+
+ENV LLVM_DIR=/opt/llvm
+RUN LLVM_VERSION=8.0.0 && \
+    LLVM_KEY=345AD05D && \
+    LLVM_URL=http://releases.llvm.org/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-16.04.tar.xz && \
+    LLVM_ARCHIVE=llvm-${LLVM_VERSION}.tar.xz && \
+    SCRATCH_DIR=/scratch && mkdir -p ${SCRATCH_DIR} && cd ${SCRATCH_DIR} && \
+    wget --quiet ${LLVM_URL} --output-document=${LLVM_ARCHIVE} && \
+    wget --quiet ${LLVM_URL}.sig --output-document=${LLVM_ARCHIVE}.sig && \
+    gpg --keyserver pool.sks-keyservers.net --recv-keys ${LLVM_KEY} && \
+    gpg --verify ${LLVM_ARCHIVE}.sig ${LLVM_ARCHIVE} && \
+    mkdir -p ${LLVM_DIR} && \
+    tar -xvf ${LLVM_ARCHIVE} -C ${LLVM_DIR} --strip-components=1 && \
+    echo "${LLVM_DIR}/lib" > /etc/ld.so.conf.d/llvm.conf && ldconfig && \
+    rm -rf /root/.gnupg && \
+    rm -rf ${SCRATCH_DIR}
+ENV PATH=${LLVM_DIR}/bin:$PATH
diff --git a/packages/kokkos/scripts/docker/Dockerfile.nvcc b/packages/kokkos/scripts/docker/Dockerfile.nvcc
new file mode 100644
index 0000000000000000000000000000000000000000..3c8de70445060bf950c6111f0ac8c5ba5821294e
--- /dev/null
+++ b/packages/kokkos/scripts/docker/Dockerfile.nvcc
@@ -0,0 +1,9 @@
+ARG BASE=nvidia/cuda:9.2-devel
+FROM $BASE
+
+RUN apt-get update && apt-get install -y \
+        bc \
+        ccache \
+        && \
+    apt-get clean && \
+    rm -rf /var/lib/apt/lists/*
diff --git a/packages/kokkos/scripts/eti/generate_view_copy_cpp_files b/packages/kokkos/scripts/eti/generate_view_copy_cpp_files
index 554034ed21ebff1c6dd83b62affe13a23cc04600..1a5d2cbfe2f35cf9381f785df1de7cde41d90848 100755
--- a/packages/kokkos/scripts/eti/generate_view_copy_cpp_files
+++ b/packages/kokkos/scripts/eti/generate_view_copy_cpp_files
@@ -9,4 +9,5 @@ ${SCRIPT_PATH}/generate_view_copy_cpp_files_iterate OpenMP OpenMP
 ${SCRIPT_PATH}/generate_view_copy_cpp_files_iterate Threads Threads
 ${SCRIPT_PATH}/generate_view_copy_cpp_files_iterate Cuda Cuda
 ${SCRIPT_PATH}/generate_view_copy_cpp_files_iterate "Experimental::ROCm" ROCm
+${SCRIPT_PATH}/generate_view_copy_cpp_files_iterate "Experimental::HPX" HPX
 
diff --git a/packages/kokkos/scripts/testing_scripts/TestEXEC_TEST.cpp b/packages/kokkos/scripts/testing_scripts/TestEXEC_TEST.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c297220f437acb1d005df7c3041c65063f3c382b
--- /dev/null
+++ b/packages/kokkos/scripts/testing_scripts/TestEXEC_TEST.cpp
@@ -0,0 +1,48 @@
+
+/*
+//@HEADER
+// ************************************************************************
+//
+//                        Kokkos v. 2.0
+//              Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include<exec/TestEXEC_Category.hpp>
+#include<TestTEST.hpp>
+
+
diff --git a/packages/kokkos/scripts/testing_scripts/cpy_test b/packages/kokkos/scripts/testing_scripts/cpy_test
new file mode 100755
index 0000000000000000000000000000000000000000..e9a74a243417c063945ffc6f1744c1074e65b0be
--- /dev/null
+++ b/packages/kokkos/scripts/testing_scripts/cpy_test
@@ -0,0 +1,9 @@
+exec=$1
+EXEC=$2
+TEST=$3
+
+cp ../../scripts/testing_scripts/TestEXEC_TEST.cpp ${exec}/Test${EXEC}_${TEST}.cpp
+sed -i 's|exec|'${exec}'|g' ${exec}/Test${EXEC}_${TEST}.cpp
+sed -i 's|EXEC|'${EXEC}'|g' ${exec}/Test${EXEC}_${TEST}.cpp
+sed -i 's|TEST|'${TEST}'|g' ${exec}/Test${EXEC}_${TEST}.cpp
+
diff --git a/packages/kokkos/scripts/testing_scripts/test_all_sandia b/packages/kokkos/scripts/testing_scripts/test_all_sandia
index d34d04b7ce951eb9c093a2b389e997066f8ae4b2..55b860ea7b072b1a9ab05fff95fbf69816028d9d 100755
--- a/packages/kokkos/scripts/testing_scripts/test_all_sandia
+++ b/packages/kokkos/scripts/testing_scripts/test_all_sandia
@@ -29,17 +29,25 @@ fi
 
 if [[ "$HOSTNAME" == apollo\.* ]]; then
   MACHINE=apollo
-  module load git
+fi
+
+if [[ "$HOSTNAME" == kokkos-dev-2* ]]; then
+  MACHINE=kokkos-dev-2
 fi
 
 if [[ "$HOSTNAME" == mayer\.* ]]; then
   MACHINE=mayer
 #  module load git
 fi
+
 if [[ "$HOSTNAME" == cn* ]]; then # Warning: very generic name
   MACHINE=mayer
 fi
 
+if [[ "$HOSTNAME" == kokkos-dev\.sandia\.gov* ]]; then
+  MACHINE=kokkos-dev
+fi
+
 if [ ! -z "$SEMS_MODULEFILES_ROOT" ]; then
   if [[ "$MACHINE" = "" ]]; then
     MACHINE=sems
@@ -191,6 +199,47 @@ echo ""
 if [ "$MACHINE" = "sems" ]; then
   source /projects/sems/modulefiles/utils/sems-modules-init.sh
 
+  # On unnamed sems machines, assume more restricted rhel7 environment
+  # On rhel7 sems machines gcc/7.3.0, clang/4.0.1, and intel/16.0.3 are missing
+  # Remove kokkkos-env module use
+
+  BASE_MODULE_LIST="sems-env,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
+  CUDA9_MODULE_LIST="sems-env,sems-<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/7.2.0"
+  SKIP_HWLOC=True
+  # No sems hwloc module
+
+  if [ -z "$ARCH_FLAG" ]; then
+    ARCH_FLAG=""
+  fi
+
+  if [ "$SPOT_CHECK" = "True" ]; then
+    # Format: (compiler module-list build-list exe-name warning-flag)
+    COMPILERS=("gcc/5.3.0 $BASE_MODULE_LIST "OpenMP" g++ $GCC_WARNING_FLAGS"
+               "gcc/7.2.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS"
+               "intel/17.0.1 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS"
+               "clang/3.9.0 $BASE_MODULE_LIST "Pthread_Serial" clang++ $CLANG_WARNING_FLAGS"
+               "cuda/9.2 $CUDA9_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
+    )
+  else
+    # Format: (compiler module-list build-list exe-name warning-flag)
+    COMPILERS=("gcc/4.8.4 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "gcc/4.9.3 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "gcc/5.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "gcc/6.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "gcc/7.2.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "intel/15.0.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+               "intel/16.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+               "intel/17.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+               "clang/3.6.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+               "clang/3.7.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+               "clang/3.8.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+               "clang/3.9.0 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+               "cuda/9.2 $CUDA9_MODULE_LIST $CUDA_BUILD_LIST $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
+    )
+  fi
+elif [ "$MACHINE" = "kokkos-dev" ]; then
+  source /projects/sems/modulefiles/utils/sems-modules-init.sh
+
   BASE_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
   CUDA_MODULE_LIST="sems-env,kokkos-env,kokkos-<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/4.8.4,kokkos-hwloc/1.10.1/base"
   CUDA8_MODULE_LIST="sems-env,kokkos-env,kokkos-<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base"
@@ -288,8 +337,8 @@ elif [ "$MACHINE" = "mayer" ]; then
   ARM_MODULE_LIST="<COMPILER_NAME>/compilers/<COMPILER_VERSION>"
 
   # Format: (compiler module-list build-list exe-name warning-flag)
-  COMPILERS=("gcc/7.2.0 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
-             "arm/18.4.0 $ARM_MODULE_LIST $ARM_GCC_BUILD_LIST armclang++ $CLANG_WARNING_FLAGS")
+  COMPILERS=("gnu/7.2.0 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+             "arm/19.0.0 $ARM_MODULE_LIST $ARM_GCC_BUILD_LIST armclang++ $CLANG_WARNING_FLAGS")
 
   if [ -z "$ARCH_FLAG" ]; then
     ARCH_FLAG="--arch=ARMv8-TX2"
@@ -334,17 +383,19 @@ elif [ "$MACHINE" = "apollo" ]; then
   module load sems-tex
   module load sems-cmake/3.5.2
   module load sems-gdb
+  module load binutils
 
   SKIP_HWLOC=True
 
-  BASE_MODULE_LIST="sems-env,kokkos-env,sems-<COMPILER_NAME>/<COMPILER_VERSION>,kokkos-hwloc/1.10.1/base"
+  BASE_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
   CUDA_MODULE_LIST="sems-env,kokkos-env,kokkos-<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/4.8.4,kokkos-hwloc/1.10.1/base"
   CUDA8_MODULE_LIST="sems-env,kokkos-env,kokkos-<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base"
   CUDA10_MODULE_LIST="sems-env,kokkos-env,<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/5.3.0,kokkos-hwloc/1.10.1/base"
 
-  CLANG_MODULE_LIST="sems-env,kokkos-env,sems-git,sems-cmake/3.5.2,<COMPILER_NAME>/<COMPILER_VERSION>,cuda/9.0.69"
-  CLANG7_MODULE_LIST="sems-env,kokkos-env,sems-git,sems-cmake/3.5.2,<COMPILER_NAME>/<COMPILER_VERSION>,cuda/9.1"
-  NVCC_MODULE_LIST="sems-env,kokkos-env,sems-git,sems-cmake/3.5.2,<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/5.3.0"
+  CLANG_MODULE_LIST="sems-env,kokkos-env,<COMPILER_NAME>/<COMPILER_VERSION>,cuda/9.0.69"
+  CLANG7_MODULE_LIST="sems-env,kokkos-env,<COMPILER_NAME>/<COMPILER_VERSION>,cuda/9.1"
+  NVCC_MODULE_LIST="sems-env,kokkos-env,<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/5.3.0"
+  HPX_MODULE_LIST="sems-env,kokkos-env,hpx/1.2.1,sems-gcc/6.1.0,binutils"
 
   BUILD_LIST_CUDA_NVCC="Cuda_Serial,Cuda_OpenMP"
   BUILD_LIST_CUDA_CLANG="Cuda_Serial,Cuda_Pthread"
@@ -358,6 +409,7 @@ elif [ "$MACHINE" = "apollo" ]; then
                "clang/3.9.0 $BASE_MODULE_LIST "Pthread_Serial" clang++ $CLANG_WARNING_FLAGS"
                "clang/6.0 $CLANG_MODULE_LIST "Cuda_Pthread,OpenMP" clang++ $CUDA_WARNING_FLAGS"
                "cuda/9.1 $CUDA_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
+               "hpx/1.2.1 $HPX_MODULE_LIST "HPX" g++ $PGI_WARNING_FLAGS"
     )
   else
     # Format: (compiler module-list build-list exe-name warning-flag)
@@ -382,6 +434,64 @@ elif [ "$MACHINE" = "apollo" ]; then
     ARCH_FLAG="--arch=SNB,Volta70"
   fi
 
+elif [ "$MACHINE" = "kokkos-dev-2" ]; then
+  source /projects/sems/modulefiles/utils/sems-modules-init.sh
+  module use /home/projects/x86-64/modulefiles/local
+  module purge
+  module load sems-env
+  module load kokkos-env
+
+  module load sems-git
+  module load sems-tex
+  module load sems-cmake/3.12.2
+  module load sems-gdb
+
+  SKIP_HWLOC=True
+
+  BASE_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,sems-<COMPILER_NAME>/<COMPILER_VERSION>"
+  GCC91_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,<COMPILER_NAME>/<COMPILER_VERSION>"
+  NVCC_MODULE_LIST="sems-env,kokkos-env,kokkos-hwloc/1.10.1/base,<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/7.3.0"
+
+  CLANG_MODULE_LIST="sems-env,kokkos-env,sems-<COMPILER_NAME>/<COMPILER_VERSION>,sems-gcc/6.1.0"
+  CLANG8_MODULE_LIST="sems-env,kokkos-env,<COMPILER_NAME>/<COMPILER_VERSION>,cuda/10.0"
+
+  BUILD_LIST_CUDA_NVCC="Cuda_Serial,Cuda_Pthread"
+  BUILD_LIST_CUDA_CLANG="Cuda_Serial,Cuda_OpenMP"
+  BUILD_LIST_CLANG="Serial,Pthread,OpenMP"
+
+  if [ "$SPOT_CHECK" = "True" ]; then
+    # Format: (compiler module-list build-list exe-name warning-flag)
+    COMPILERS=("gcc/7.3.0 $BASE_MODULE_LIST "OpenMP,Pthread" g++ $GCC_WARNING_FLAGS"
+               "gcc/9.1 $GCC91_MODULE_LIST "OpenMP,Serial" g++ $GCC_WARNING_FLAGS"
+               "intel/18.0.5 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS"
+               "clang/8.0 $CLANG8_MODULE_LIST "Cuda_OpenMP,Pthread_Serial" clang++ $CLANG_WARNING_FLAGS"
+               "cuda/10.1 $NVCC_MODULE_LIST "Cuda_OpenMP" $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
+    )
+  else
+    # Format: (compiler module-list build-list exe-name warning-flag)
+    COMPILERS=("cuda/10.0 $CUDA_MODULE_LIST $BUILD_LIST_CUDA_NVCC $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
+               "cuda/10.1 $CUDA_MODULE_LIST $BUILD_LIST_CUDA_NVCC $KOKKOS_PATH/bin/nvcc_wrapper $CUDA_WARNING_FLAGS"
+               "clang/8.0 $CLANG_MODULE_LIST $BUILD_LIST_CUDA_CLANG clang++ $CUDA_WARNING_FLAGS"
+               "clang/8.0 $CLANG_MODULE_LIST $BUILD_LIST_CLANG clang++ $CLANG_WARNING_FLAGS"
+               "gcc/4.8.4 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "gcc/4.9.3 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "gcc/5.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "gcc/6.1.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "gcc/7.3.0 $BASE_MODULE_LIST $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+               "intel/15.0.2 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+               "intel/16.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+               "intel/17.0.1 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+               "intel/18.0.5 $BASE_MODULE_LIST $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+               "clang/3.5.2 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+               "clang/5.0.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+               "clang/7.0.1 $BASE_MODULE_LIST $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+    )
+  fi
+
+  if [ -z "$ARCH_FLAG" ]; then
+    ARCH_FLAG="--arch=SNB,Volta70"
+  fi
+
 else
   echo "Unhandled machine $MACHINE" >&2
   exit 1
diff --git a/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff-dbg.sh b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff-dbg.sh
new file mode 100755
index 0000000000000000000000000000000000000000..375b7f8712f27f2f303b40e628381394f47fb4eb
--- /dev/null
+++ b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff-dbg.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+export TRILINOS_DIR=${PWD}/../..
+
+# Load modules
+module purge
+source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh cuda-9.2-dbg
+
+# Packages
+PACKAGE1=Tpetra
+PACKAGE2=Sacado
+PACKAGE3=Stokhos
+PACKAGE4=MueLu
+PACKAGE5=Intrepid2
+PACKAGE6=Ifpack2
+PACKAGE7=Panzer
+PACKAGE8=Phalanx
+PACKAGE9=Stratimikos
+PACKAGE10=Belos
+
+# Configure
+cmake \
+ -GNinja \
+ -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake \
+ -DTrilinos_ENABLE_TESTS=ON \
+  -DTrilinos_ENABLE_${PACKAGE1}=ON \
+  -DTrilinos_ENABLE_${PACKAGE2}=ON \
+  -DTrilinos_ENABLE_${PACKAGE3}=ON \
+  -DTrilinos_ENABLE_${PACKAGE4}=ON \
+  -DTrilinos_ENABLE_${PACKAGE5}=ON \
+  -DTrilinos_ENABLE_${PACKAGE6}=ON \
+  -DTrilinos_ENABLE_${PACKAGE7}=ON \
+  -DTrilinos_ENABLE_${PACKAGE8}=ON \
+  -DTrilinos_ENABLE_${PACKAGE9}=ON \
+  -DTrilinos_ENABLE_${PACKAGE10}=ON \
+  -DKOKKOS_ENABLE_DEPRECATED_CODE=OFF \
+  -DKokkos_SOURCE_DIR_OVERRIDE:STRING=kokkos \
+  -DKokkosKernels_SOURCE_DIR_OVERRIDE:STRING=kokkos-kernels \
+  -DTpetra_ENABLE_DEBUG=ON \
+$TRILINOS_DIR
+
+# Notes: 
+# Compile using ninja
+# make NP=32
+
+# Allocate node:
+# bsub -J TestCompare-DepOffdbg -W 06:00 -Is -n 16 -q rhel7W bash
+
+# Run tests
+# ctest -j8
+
+# Submit tests as job
+# bsub -x -Is -q rhel7W -n 16 ctest -j8
diff --git a/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff-rdc.sh b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff-rdc.sh
new file mode 100755
index 0000000000000000000000000000000000000000..5e0e107a41ba7d1e1df59d7f6d3ac352d785ac18
--- /dev/null
+++ b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff-rdc.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+echo "SOURCE this script!!"
+
+#export TRILINOS_DIR=${HOME}/trilinos/Trilinos
+export TRILINOS_DIR=${PWD}/../..
+
+# Load modules
+module purge
+source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh cuda-9.2-rdc-opt
+#module swap cmake/3.6.2 cmake/3.12.3
+#source $TRILINOS_DIR/cmake/std/atdm/load-env.sh cuda-9.2-debug-Kepler37
+
+# Packages
+PACKAGE1=Tpetra
+PACKAGE2=Sacado
+PACKAGE3=Stokhos
+PACKAGE4=MueLu
+PACKAGE5=Intrepid2
+PACKAGE6=Ifpack2
+PACKAGE7=Panzer
+PACKAGE8=Phalanx
+PACKAGE9=Stratimikos
+PACKAGE10=Belos
+
+
+rm -rf CMake*
+
+# Configure
+cmake \
+ -GNinja \
+ -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake \
+ -DTrilinos_ENABLE_TESTS=ON \
+  -DTrilinos_ENABLE_${PACKAGE1}=ON \
+  -DTrilinos_ENABLE_${PACKAGE2}=ON \
+  -DTrilinos_ENABLE_${PACKAGE3}=ON \
+  -DTrilinos_ENABLE_${PACKAGE4}=ON \
+  -DTrilinos_ENABLE_${PACKAGE5}=ON \
+  -DTrilinos_ENABLE_${PACKAGE6}=ON \
+  -DTrilinos_ENABLE_${PACKAGE7}=ON \
+  -DTrilinos_ENABLE_${PACKAGE8}=ON \
+  -DTrilinos_ENABLE_${PACKAGE9}=ON \
+  -DTrilinos_ENABLE_${PACKAGE10}=ON \
+  -DKokkos_ENABLE_Cuda_Relocatable_Device_Code=ON \
+  -DKOKKOS_ENABLE_DEPRECATED_CODE=OFF \
+  -DKokkos_SOURCE_DIR_OVERRIDE:STRING=kokkos \
+  -DKokkosKernels_SOURCE_DIR_OVERRIDE:STRING=kokkos-kernels \
+$TRILINOS_DIR
+
+# -DTrilinos_ENABLE_TESTS=ON -DTrilinos_ENABLE_${PACKAGE1}=ON \
+#  -DKOKKOS_ENABLE_RELOCATABLE_DEVICE_CODE=ON \
+
+# Notes: Compile using ninja
+# make NP=32
+
+# Allocate node:
+# bsub -J TestKokkos-DepCodeOn -W 07:00 -Is -n 16 -q rhel7W bash
+
+# Run tests
+# ctest -j16
+
+# Submit tests as job
+# bsub -x -Is -q rhel7W -n 16 ctest -j16
diff --git a/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff.sh b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9f35eeed3f2c3eea99b8b8c7bae1b9643463bbab
--- /dev/null
+++ b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depoff.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+echo "SOURCE this script!!"
+
+export TRILINOS_DIR=${PWD}/../..
+
+# Load modules
+module purge
+source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh cuda-9.2-opt
+
+# Packages
+PACKAGE1=Tpetra
+PACKAGE2=Sacado
+PACKAGE3=Stokhos
+PACKAGE4=MueLu
+PACKAGE5=Intrepid2
+PACKAGE6=Ifpack2
+PACKAGE7=Panzer
+PACKAGE8=Phalanx
+PACKAGE9=Stratimikos
+PACKAGE10=Belos
+
+
+rm -rf CMake*
+
+# Configure
+cmake \
+ -GNinja \
+ -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake \
+ -DTrilinos_ENABLE_TESTS=ON \
+  -DTrilinos_ENABLE_${PACKAGE1}=ON \
+  -DTrilinos_ENABLE_${PACKAGE2}=ON \
+  -DTrilinos_ENABLE_${PACKAGE3}=ON \
+  -DTrilinos_ENABLE_${PACKAGE4}=ON \
+  -DTrilinos_ENABLE_${PACKAGE5}=ON \
+  -DTrilinos_ENABLE_${PACKAGE6}=ON \
+  -DTrilinos_ENABLE_${PACKAGE7}=ON \
+  -DTrilinos_ENABLE_${PACKAGE8}=ON \
+  -DTrilinos_ENABLE_${PACKAGE9}=ON \
+  -DTrilinos_ENABLE_${PACKAGE10}=ON \
+  -DKOKKOS_ENABLE_DEPRECATED_CODE=OFF \
+  -DKokkos_SOURCE_DIR_OVERRIDE:STRING=kokkos \
+  -DKokkosKernels_SOURCE_DIR_OVERRIDE:STRING=kokkos-kernels \
+$TRILINOS_DIR
+
+
+# Notes: 
+# Compile using ninja
+# make NP=32
+
+# Allocate node:
+# bsub -J TestCompare-DepCodeOFF -W 06:00 -Is -n 16 -q rhel7W bash
+
+# Run tests
+# ctest -j8
+
+# Or submit tests as job
+# bsub -x -Is -q rhel7W -n 16 ctest -j8
diff --git a/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon-dbg.sh b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon-dbg.sh
new file mode 100755
index 0000000000000000000000000000000000000000..41160c938ce0538cc00774951149169c4677729f
--- /dev/null
+++ b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon-dbg.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+export TRILINOS_DIR=${PWD}/../..
+
+# Load modules
+module purge
+source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh cuda-9.2-dbg
+
+# Packages
+PACKAGE1=Tpetra
+PACKAGE2=Sacado
+PACKAGE3=Stokhos
+PACKAGE4=MueLu
+PACKAGE5=Intrepid2
+PACKAGE6=Ifpack2
+PACKAGE7=Panzer
+PACKAGE8=Phalanx
+PACKAGE9=Stratimikos
+PACKAGE10=Belos
+
+# Configure
+cmake \
+ -GNinja \
+ -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake \
+ -DTrilinos_ENABLE_TESTS=ON \
+  -DTrilinos_ENABLE_${PACKAGE1}=ON \
+  -DTrilinos_ENABLE_${PACKAGE2}=ON \
+  -DTrilinos_ENABLE_${PACKAGE3}=ON \
+  -DTrilinos_ENABLE_${PACKAGE4}=ON \
+  -DTrilinos_ENABLE_${PACKAGE5}=ON \
+  -DTrilinos_ENABLE_${PACKAGE6}=ON \
+  -DTrilinos_ENABLE_${PACKAGE7}=ON \
+  -DTrilinos_ENABLE_${PACKAGE8}=ON \
+  -DTrilinos_ENABLE_${PACKAGE9}=ON \
+  -DTrilinos_ENABLE_${PACKAGE10}=ON \
+  -DKOKKOS_ENABLE_DEPRECATED_CODE=ON \
+  -DKokkos_SOURCE_DIR_OVERRIDE:STRING=kokkos \
+  -DKokkosKernels_SOURCE_DIR_OVERRIDE:STRING=kokkos-kernels \
+  -DTpetra_ENABLE_DEBUG=ON \
+$TRILINOS_DIR
+
+
+# Notes: 
+# Compile using ninja
+# make NP=32
+
+# Allocate node:
+# bsub -J TestCompare-DepOndbg -W 06:00 -Is -n 16 -q rhel7W bash
+
+# Run tests
+# ctest -j8
+
+# Submit tests as job
+# bsub -x -Is -q rhel7W -n 16 ctest -j8
diff --git a/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon-rdc-dbg.sh b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon-rdc-dbg.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d910ea658f6ca5670b134c08a35f1b2a85b985d8
--- /dev/null
+++ b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon-rdc-dbg.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+echo "SOURCE this script!!"
+
+export TRILINOS_DIR=${PWD}/../..
+
+# Load modules
+module purge
+source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh cuda-9.2-rdc-debug
+
+# Packages
+PACKAGE1=Tpetra
+PACKAGE2=Sacado
+PACKAGE3=Stokhos
+PACKAGE4=MueLu
+PACKAGE5=Intrepid2
+PACKAGE6=Ifpack2
+PACKAGE7=Panzer
+PACKAGE8=Phalanx
+PACKAGE9=Stratimikos
+PACKAGE10=Belos
+
+
+rm -rf CMake*
+
+# Configure
+cmake \
+ -GNinja \
+ -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake \
+ -DTrilinos_ENABLE_TESTS=ON \
+  -DTrilinos_ENABLE_${PACKAGE1}=ON \
+  -DTrilinos_ENABLE_${PACKAGE2}=ON \
+  -DTrilinos_ENABLE_${PACKAGE3}=ON \
+  -DTrilinos_ENABLE_${PACKAGE4}=ON \
+  -DTrilinos_ENABLE_${PACKAGE5}=ON \
+  -DTrilinos_ENABLE_${PACKAGE6}=ON \
+  -DTrilinos_ENABLE_${PACKAGE7}=ON \
+  -DTrilinos_ENABLE_${PACKAGE8}=ON \
+  -DTrilinos_ENABLE_${PACKAGE9}=ON \
+  -DTrilinos_ENABLE_${PACKAGE10}=ON \
+  -DKOKKOS_ENABLE_DEPRECATED_CODE=ON \
+  -DKokkos_SOURCE_DIR_OVERRIDE:STRING=kokkos \
+  -DKokkosKernels_SOURCE_DIR_OVERRIDE:STRING=kokkos-kernels \
+  -DKokkos_ENABLE_Cuda_Relocatable_Device_Code=ON \
+$TRILINOS_DIR
+
+
+# Notes: 
+# Compile using ninja
+# make NP=32
+
+# Allocate node:
+# bsub -J TestKokkos-DepCodeOn -W 07:00 -Is -n 16 -q rhel7W bash
+
+# Run tests
+# ctest -j8
+
+# Submit tests as job
+# bsub -x -Is -q rhel7W -n 16 ctest -j8
diff --git a/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon.sh b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon.sh
new file mode 100755
index 0000000000000000000000000000000000000000..955821005fdad7e349ee98688bf4836ed55cd18b
--- /dev/null
+++ b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-cuda-depon.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+echo "SOURCE this script!!"
+
+export TRILINOS_DIR=${PWD}/../..
+
+# Load modules
+module purge
+source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh cuda-9.2-opt
+
+# Packages
+PACKAGE1=Tpetra
+PACKAGE2=Sacado
+PACKAGE3=Stokhos
+PACKAGE4=MueLu
+PACKAGE5=Intrepid2
+PACKAGE6=Ifpack2
+PACKAGE7=Panzer
+PACKAGE8=Phalanx
+PACKAGE9=Stratimikos
+PACKAGE10=Belos
+
+
+rm -rf CMake*
+
+# Configure
+cmake \
+ -GNinja \
+ -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake \
+ -DTrilinos_ENABLE_TESTS=ON \
+  -DTrilinos_ENABLE_${PACKAGE1}=ON \
+  -DTrilinos_ENABLE_${PACKAGE2}=ON \
+  -DTrilinos_ENABLE_${PACKAGE3}=ON \
+  -DTrilinos_ENABLE_${PACKAGE4}=ON \
+  -DTrilinos_ENABLE_${PACKAGE5}=ON \
+  -DTrilinos_ENABLE_${PACKAGE6}=ON \
+  -DTrilinos_ENABLE_${PACKAGE7}=ON \
+  -DTrilinos_ENABLE_${PACKAGE8}=ON \
+  -DTrilinos_ENABLE_${PACKAGE9}=ON \
+  -DTrilinos_ENABLE_${PACKAGE10}=ON \
+  -DKOKKOS_ENABLE_DEPRECATED_CODE=ON \
+  -DKokkos_SOURCE_DIR_OVERRIDE:STRING=kokkos \
+  -DKokkosKernels_SOURCE_DIR_OVERRIDE:STRING=kokkos-kernels \
+$TRILINOS_DIR
+
+# Notes: 
+# Compile using ninja
+# make NP=32
+
+# Allocate node:
+# bsub -J TestKokkos-DepCodeOn -W 07:00 -Is -n 16 -q rhel7W bash
+
+# Run tests
+# ctest -j8
+
+# Submit tests as job
+# bsub -x -Is -q rhel7W -n 16 ctest -j8
diff --git a/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-env.sh b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-env.sh
new file mode 100755
index 0000000000000000000000000000000000000000..76e039191249b9c6abb1f6a4f1d5560a2fe125f0
--- /dev/null
+++ b/packages/kokkos/scripts/trilinos-integration/ATDM_configurations/configure-atdm-env.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+echo "SOURCE this script!!"
+
+export TRILINOS_DIR=${PWD}/../..
+
+# Load modules
+module purge
+source ${TRILINOS_DIR}/cmake/std/atdm/load-env.sh Trilinos-atdm-waterman-cuda-9.2-rdc-release-debug-pt
+
+# Packages
+PACKAGE1=Tpetra
+PACKAGE2=Sacado
+PACKAGE3=Stokhos
+PACKAGE4=MueLu
+PACKAGE5=Intrepid2
+PACKAGE6=Ifpack2
+PACKAGE7=Panzer
+PACKAGE8=Phalanx
+PACKAGE9=Stratimikos
+PACKAGE10=Belos
+
+
+rm -rf CMake*
+
+# Configure
+cmake \
+ -GNinja \
+ -DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnv.cmake \
+ -DTrilinos_ENABLE_TESTS=ON \
+  -DTrilinos_ENABLE_${PACKAGE1}=ON \
+  -DTrilinos_ENABLE_${PACKAGE2}=ON \
+  -DTrilinos_ENABLE_${PACKAGE3}=ON \
+  -DTrilinos_ENABLE_${PACKAGE4}=ON \
+  -DTrilinos_ENABLE_${PACKAGE5}=ON \
+  -DTrilinos_ENABLE_${PACKAGE6}=ON \
+  -DTrilinos_ENABLE_${PACKAGE7}=ON \
+  -DTrilinos_ENABLE_${PACKAGE8}=ON \
+  -DTrilinos_ENABLE_${PACKAGE9}=ON \
+  -DTrilinos_ENABLE_${PACKAGE10}=ON \
+  -DKOKKOS_ENABLE_DEPRECATED_CODE=ON \
+  -DKokkos_SOURCE_DIR_OVERRIDE:STRING=kokkos \
+  -DKokkosKernels_SOURCE_DIR_OVERRIDE:STRING=kokkos-kernels \
+$TRILINOS_DIR
+
+
+# Notes: 
+# Compile using ninja
+# make NP=32
+
+# Allocate node:
+# bsub -J TestKokkos-DepCodeOn -W 07:00 -Is -n 16 -q rhel7W bash
+
+# Run tests
+# ctest -j8
+
+# Submit tests as job
+# bsub -x -Is -q rhel7W -n 16 ctest -j8
diff --git a/packages/kokkos/scripts/trilinos-integration/white_run_jenkins_script_cuda b/packages/kokkos/scripts/trilinos-integration/white_run_jenkins_script_cuda
index 98900c3c9b9edf87737570c91f2d7f0c4345cb08..bf8bedef7ce0f3d374ca5100f10a7980742e3c4f 100755
--- a/packages/kokkos/scripts/trilinos-integration/white_run_jenkins_script_cuda
+++ b/packages/kokkos/scripts/trilinos-integration/white_run_jenkins_script_cuda
@@ -42,7 +42,7 @@ export JENKINS_DO_EXAMPLES=ON
 
 export QUEUE=rhel7F
 
-module load python
+module load python/2.7.12
 
 export KOKKOS_PATH=${PWD}/kokkos
 
diff --git a/packages/kokkos/scripts/trilinos-integration/white_run_jenkins_script_omp b/packages/kokkos/scripts/trilinos-integration/white_run_jenkins_script_omp
index 9c5244cd353a35c95ffcaeab805b39eb1ed7788b..fc7e47bc2923e4c1e31cb215540930673d646624 100755
--- a/packages/kokkos/scripts/trilinos-integration/white_run_jenkins_script_omp
+++ b/packages/kokkos/scripts/trilinos-integration/white_run_jenkins_script_omp
@@ -42,7 +42,7 @@ export JENKINS_DO_EXAMPLES=ON
 
 export QUEUE=rhel7F
 
-module load python
+module load python/2.7.12
 
 export KOKKOS_PATH=${PWD}/kokkos