Interfaces

template< typename tPrimitive >
void BSPLib::Get( uint32_t pid, tPrimitive &src, tPrimitive &dst )      // (1) References

template<>
void BSPLib::Get( uint32_t pid, std::string &src, std::string &dst )    // (2) std::string

template< typename tPrimitive >
void BSPLib::Get( uint32_t pid, tPrimitive &var )                       // (3) Reference

This operation get the registered primitive of another processor and copies the memory into its own memory. It gets the primitive stored in src that is located in the processor with ID pid and stores it at the location of dst. Internally, it calculates the size in bytes that is required for the primitive, and calls to BSPLib::Classic::Get().

  1. Gets the value from src in the processor with ID pid and stores it in dst, using references.
  2. Overload for std::string.
  3. Get the value from var in the processor with ID pid and stores it in var, the same reference.

Tip

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

Warnings

  • In case of (2), the destination std::string must be at least as big as the source std::string. Make sure it is correctly resized, either by deciding on a fixed size, or communicating the size beforehand.

Parameters

Pre-Conditions

Post-Conditions

Examples

(1) References

(2) std::string

(3) Reference