AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agx::GlobalResult::Transaction Class Reference

Transactions are used to reserve exclusive memory areas in which the threads can write their data. More...

#include <GlobalResult.h>

Public Member Functions

bool commit ()
 Same as above but without deterministic sorting.
 
bool commit (Index sortIndex)
 Commit the transaction after copying data to global buffer(s)
 
BufferSet * getBufferSet ()
 
GlobalResult * getTarget ()
 
const IndexRange & range () const
 

Detailed Description

Transactions are used to reserve exclusive memory areas in which the threads can write their data.

Definition at line 72 of file GlobalResult.h.

Member Function Documentation

◆ commit() [1/2]

bool agx::GlobalResult::Transaction::commit ( )

Same as above but without deterministic sorting.

Definition at line 361 of file GlobalResult.h.

References agxAssertN, agx::GlobalResult::BufferSet(), agx::GlobalResult::ORDER, and agx::GlobalResult::SORT.

◆ commit() [2/2]

bool agx::GlobalResult::Transaction::commit ( Index  sortIndex)

Commit the transaction after copying data to global buffer(s)

Parameters
sortIndexA sort index used to build a deterministic ordering of the result data
Returns
false If the transaction failed, if so it must be restarted until commit returns true. NOTE: Do not create a new transaction if the current one fails, just re-write the data using the existing transaction.

Definition at line 339 of file GlobalResult.h.

References agxAssert, agx::GlobalResult::m_sortedRanges, and agx::Container::size().

◆ getBufferSet()

GlobalResult::BufferSet * agx::GlobalResult::Transaction::getBufferSet ( )
Returns
The active buffer set for the transaction.

Definition at line 335 of file GlobalResult.h.

◆ getTarget()

GlobalResult * agx::GlobalResult::Transaction::getTarget ( )
Returns
The target global result.

Definition at line 336 of file GlobalResult.h.

◆ range()

const IndexRange & agx::GlobalResult::Transaction::range ( ) const
Returns
The allocated range for this transaction.

Definition at line 334 of file GlobalResult.h.


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