GEOS
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
geos::ElementsReporterCollector Class Reference

Collects and reports elements ids and data using an atomic counter. This class provides functionality to collect data from multiple threads safely by incrementing through an atomic counter for each reported element's ID. The collected IDs are stored in a size limited buffer, which can be used later for reporting or analysis purposes. More...

#include <SolutionCheckKernelsHelpers.hpp>

Public Types

using ElementCount = int32_t
 

Public Member Functions

template<typename CollectorAtomicPolicy >
GEOS_HOST_DEVICE void collectElement (CollectorAtomicPolicy, ElementReport const &report) const
 Collects a single element report and adds its ID to the output buffer if not disabled and there are available slots in the buffer. More...
 

Static Public Member Functions

static ElementsReporterCollector disabled ()
 

Friends

class ElementsReporterBuffer
 

Detailed Description

Collects and reports elements ids and data using an atomic counter. This class provides functionality to collect data from multiple threads safely by incrementing through an atomic counter for each reported element's ID. The collected IDs are stored in a size limited buffer, which can be used later for reporting or analysis purposes.

Definition at line 45 of file SolutionCheckKernelsHelpers.hpp.

Member Function Documentation

◆ collectElement()

template<typename CollectorAtomicPolicy >
GEOS_HOST_DEVICE void geos::ElementsReporterCollector::collectElement ( CollectorAtomicPolicy  ,
ElementReport const &  report 
) const
inline

Collects a single element report and adds its ID to the output buffer if not disabled and there are available slots in the buffer.

Template Parameters
CollectorAtomicPolicyThe atomic increment operation to use for thread-safe counter increments.
Parameters
reportA constant reference to an ElementReport object containing data from a single element

Definition at line 85 of file SolutionCheckKernelsHelpers.hpp.


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