Interfaces

template< typename tPrimitive >
void BSPLib::GetPtrs( uint32_t pid, tPrimitive *srcBegin, size_t offset,
              tPrimitive *resultBegin, size_t count )           // (1) Begin-Offset-Count

template< typename tPrimitive >
void BSPLib::GetPtrs( uint32_t pid, tPrimitive *srcBegin, tPrimitive *srcCursor, 
              tPrimitive *resultBegin, tPrimitive *resultEnd )  // (2) Begin-End-Cursor

template< typename tPrimitive >
void BSPLib::GetPtrs( uint32_t pid, tPrimitive *begin,
                      tPrimitive *cursor, tPrimitive *end ) // (3) Same Begin-End-Cursor

template< typename tPrimitive >
void BSPLib::GetPtrs( uint32_t pid, tPrimitive *begin, 
                      tPrimitive *end )                     // (4) Same Begin-End

template< typename tPrimitive >
void BSPLib::GetPtrs( uint32_t pid, tPrimitive *begin,
                      size_t offset, size_t count )         // (5) Same Begin-Offset-Count

template< typename tPrimitive >
void BSPLib::GetPtrs( uint32_t pid, tPrimitive *begin,
                      size_t count )                        // (6) Same Begin-Count

This operation get the registered memory of another processor and copies the memory into its own memory. Gets a buffer of size count primitives from source pointer srcBegin that is located in the processor with identifier pid at offset offset primitives from source pointer src and stores it at the location of dstBegin.

  1. Gets a buffer of size count primitives from source pointer srcBegin that is located in the processor with ID pid at offset offset primitives from source pointer src and stores it at the location of dstBegin.
  2. Uses resultBegin and resultEnd pointers to calculate the number of primitives count, and uses srcCursor instead of offset to determine the offset it needs to start reading from.
  3. The same as (1), but now, it uses begin as srcBegin, cursor as both srcCursor and resultBegin, and end as resultEnd. It stores the values in the same location as they were located in the other processor.
  4. The same as (3), but now begin is used as both begin and cursor. It copies the entire range from begin to end from the processor with ID pid to the same location in the current processor.
  5. The same as (3), with the behaviour: cursor = begin + offset and end = begin + offset + count.
  6. The same as (5), with the behaviour: offset = 0.

Tip

There are also other specialisations available. See Containers, Primitives and Pointers.

Warnings

  • std::string is not assumed to be a primitive in this case, although it was in BSPLib::Get().

Parameters

Pre-Conditions

Post-Conditions

Examples

(1) Begin-Offset-Count

(2) Begin-End-Cursor

(3) Same Begin-End-Cursor

(4) Same Begin-End

(5) Same Begin-Offset-Count

(6) Same Begin-Count