20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SOLUTIONCHECKKERNELSHELPERS_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SOLUTIONCHECKKERNELSHELPERS_HPP
28 class ElementsReporterBuffer;
50 using ElementCount = int32_t;
83 template<
typename CollectorAtomicPolicy >
87 if( !m_elementsCounter.empty() )
89 ElementCount
const outputStart = RAJA::atomicInc< CollectorAtomicPolicy >( &m_elementsCounter[0] );
91 if( outputStart < m_elementsBuffer.size() )
93 m_elementsBuffer[outputStart].m_id = m_localToGlobalId[report.
m_id];
94 m_elementsBuffer[outputStart].m_value = report.
m_value;
127 m_elementsCounter( elementsCounter ),
128 m_elementsBuffer( elementsBuffer ),
129 m_localToGlobalId( localToGlobalId )
#define GEOS_HOST_DEVICE
Marks a host-device function.
A buffer to count and store element ids during kernel execution. This facilitates the reporting mecha...
Collects and reports elements ids and data using an atomic counter. This class provides functionality...
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 a...
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
double real64
64-bit floating point type.
globalIndex m_id
the global id of the reported element