From 4bedc40789fbfb4e82e0e22536a4c11e4fc8f2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Tue, 25 Jul 2023 18:10:20 +0200 Subject: [PATCH] Add initialization example --- docs/source/API/core/Initialize-and-Finalize.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/API/core/Initialize-and-Finalize.rst b/docs/source/API/core/Initialize-and-Finalize.rst index 8a08f4aa8..9494e6d33 100644 --- a/docs/source/API/core/Initialize-and-Finalize.rst +++ b/docs/source/API/core/Initialize-and-Finalize.rst @@ -35,6 +35,11 @@ ScopeGuard aids in the following common mistake which is allowing Kokkos objects // my_view destructor called after Kokkos::finalize ! } + +.. raw:: html + + + Switching to ``Kokkos::ScopeGuard`` fixes it: .. code-block:: cpp