core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
kokkos_teardown.hpp File Reference
#include <nanobind/nanobind.h>
#include <functional>
#include <Kokkos_Core.hpp>
#include <set>
#include <type_traits>
#include <vector>
#include "peclet/core/common/cpu_budget.hpp"

Go to the source code of this file.

Classes

class  peclet::core::python::Releasable
 Base of everything on the binding side that owns Kokkos Views on Python's behalf. More...
 

Namespaces

namespace  peclet
 
namespace  peclet::core
 
namespace  peclet::core::python
 

Functions

std::vector< std::function< void()> > & peclet::core::python::release_hooks ()
 Extra release callbacks (e.g. a C++ class's own releaseAll), run after the registry.
 
void peclet::core::python::add_release_hook (std::function< void()> f)
 
void peclet::core::python::release_all () noexcept
 Drop every Kokkos View owned on Python's behalf in this module (registry + hooks).
 
void peclet::core::python::shutdown () noexcept
 release_all() and then Kokkos::finalize().
 
template<class T >
void peclet::core::python::destruct_bound_instance (T *self) noexcept
 Release a bound wrapper by destroying its C++ instance in place (for types whose Kokkos state cannot be dropped member by member).
 
void peclet::core::python::install (nb::module_ &m)
 Module setup: initialize Kokkos (once per module — each module carries its own static Kokkos), register the atexit shutdown, expose finalize() and execution_space.