void BSPLib::Pop( const void *ident ) // (1) Modern void BSPLib::Pop() // (2) Padding template< typename tPrimitive > void BSPLib::Pop( tPrimitive &identRef ) // (3) Reference template<> void BSPLib::Pop( std::string &stringRef ) // (4) std::string template< typename tPrimitive > void BSPLib::PopPtrs( tPrimitive *begin ) // (5) Primitive pointer template < typename tIterator> void BSPLib::PopIterator( tIterator beginIt ) // (6) Iterator template< typename tPrimitive, size_t tSize > void BSPLib::PopCArray( tPrimitive( &cArray )[tSize] ) // (7) C-Array template< typename tContainer > void BSPLib::PopContainer( tContainer &container ) // (8) Container void BSPLib::Classic::Pop( const void *ident ) // (9) Classic void bsp_popreg( const void *ident ) // (10) BSP
Pops a register and makes it unavailable in the next superstep.
BSPLib can have communication with any
contiguous data type. To ensure this requirement, the library needs to know what
addresses are available for communication. To recognise addresses of other
processors, the order of registration and deregistration
needs to be the same in each processor. When one processor does not need to register
an address, a
nullptrcan be pushed, or the specialised function (2) can be used.
Each push should be accompanied by a pop, or is assumed to be popped at the end of
the BSP program.
- Modern interface of the classic BSP function.
- Removes padding added by
- Pops the register belonging to a primitive.
- Template specialisation for
- Pops the address of
- Pops the address of
- Pops the addresses of the C-Array.
- Pops the addresses of the container.
- Classic BSP function, this is the interface one should prefer to use over the old BSP interface.
- Legacy BSP function, this interface is included for backwards compatibility with other BSP libraries.
- In case of (4), the
std::stringmust not have been resized.
- In case of (6) and (8), make sure the iterators describe cotiguous memory, and have not been invalidated (due to resizes).
BSPLib::Push()is called after
BSPLib::Pop(), the register that has been popped will not be replaced by the new register, as the naming might suggest.
In the current implementation, the pointer to the top of the registration stack is never lowered. In the programs we tested until now, this has not been a problem. We might change this behaviour in the future. In case we do, no changes will be needed in existing BSP programs. The stack is always cleared when a new BSP program is initialised.
identThe address to deregister.
identRefReference to the variable to deregister.
stringRefReference to the string to deregiser.
beginBegin of the address space to deregister.
beginItIterator describing the begin of the address space to deregister.
cArrayC-Array of which we deregister all addresses.
containerContainer of which we deregister all addresses.
BSPLib::Classic::Begin()has been called.
- Pop request has been queued.
- In the next superstep, this register will be unavailable for