Interfaces

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

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

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

Puts the primitive stored in src that is located in the current processor and stores it at the location of dst that is located in the processor with identifier pid. Internally, it calculates the size in bytes that is required for the primitive, and calls to BSPLib::Classic::Put().

  1. Puts the value from src and stores it in dst in the processor with identifier pid, using references.
  2. Overload for std::string.
  3. Put the value from var and stores it in varin the processor with identifier pid, 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