core 1.8.1
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::python::ViewCapsule< V > Struct Template Referencefinal

The payload of a zero-copy capsule: a reference to the exported View, registered as a Releasable so the module's shutdown can drop it before Kokkos::finalize. More...

#include <ndarray_interop.hpp>

Inheritance diagram for peclet::core::python::ViewCapsule< V >:
peclet::core::python::Releasable

Public Member Functions

 ViewCapsule (const V &v)
void release () noexcept override
Public Member Functions inherited from peclet::core::python::Releasable
 Releasable () noexcept
 Releasable (const Releasable &) noexcept
 Releasable (Releasable &&) noexcept
Releasable & operator= (const Releasable &) noexcept
Releasable & operator= (Releasable &&) noexcept
virtual ~Releasable ()

Public Attributes

V view

Additional Inherited Members

Static Public Member Functions inherited from peclet::core::python::Releasable
static std::set< Releasable * > & registry ()
 This module's live registry.

Detailed Description

template<class V>
struct peclet::core::python::ViewCapsule< V >

The payload of a zero-copy capsule: a reference to the exported View, registered as a Releasable so the module's shutdown can drop it before Kokkos::finalize.

The capsule deleter (run whenever Python frees the array — possibly after finalize, at interpreter teardown) then only destroys an empty View, which makes no Kokkos call.

Definition at line 77 of file ndarray_interop.hpp.

Constructor & Destructor Documentation

◆ ViewCapsule()

template<class V>
peclet::core::python::ViewCapsule< V >::ViewCapsule ( const V & v)
inlineexplicit

Definition at line 79 of file ndarray_interop.hpp.

References view.

Member Function Documentation

◆ release()

template<class V>
void peclet::core::python::ViewCapsule< V >::release ( )
inlineoverridevirtualnoexcept

Implements peclet::core::python::Releasable.

Definition at line 80 of file ndarray_interop.hpp.

References view.

Member Data Documentation

◆ view

template<class V>
V peclet::core::python::ViewCapsule< V >::view

Definition at line 78 of file ndarray_interop.hpp.

Referenced by release(), and ViewCapsule().


The documentation for this struct was generated from the following file: