docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
docc::analysis::SDFGHolder Class Reference

This a wrapper around 1 SDFG (may include historic versions of the same SDFG in the future). More...

#include <docc/analysis/sdfg_registry.h>

Public Member Functions

 SDFGHolder (std::unique_ptr< sdfg::StructuredSDFG > &sdfg)
std::tuple< std::unique_lock< std::shared_mutex >, sdfg::StructuredSDFG * > get_for_modify ()
std::tuple< std::shared_lock< std::shared_mutex >, const sdfg::StructuredSDFG * > get_for_read ()

Friends

class SDFGRegistry

Detailed Description

This a wrapper around 1 SDFG (may include historic versions of the same SDFG in the future).

It is to ensure uncorrupted access to the SDFG without removing its reference from the index (as before, with unique pointers only). If you cannot handle the lock-guard around the SDFG reference itself, reference the holder instead

Allows multiple read-accesses in parallel, only modification requires an exclusive lock Reads cannot guarantee you'll see a specific version, but you will see a consistent snapshot of its latest, complete version

Constructor & Destructor Documentation

◆ SDFGHolder()

docc::analysis::SDFGHolder::SDFGHolder ( std::unique_ptr< sdfg::StructuredSDFG > & sdfg)
explicit

Member Function Documentation

◆ get_for_modify()

std::tuple< std::unique_lock< std::shared_mutex >, sdfg::StructuredSDFG * > docc::analysis::SDFGHolder::get_for_modify ( )

◆ get_for_read()

std::tuple< std::shared_lock< std::shared_mutex >, const sdfg::StructuredSDFG * > docc::analysis::SDFGHolder::get_for_read ( )

◆ SDFGRegistry

friend class SDFGRegistry
friend

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