---
name: "sc_MsgMemoryGrp"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_MsgMemoryGrp"
---

# sc\_MsgMemoryGrp(3)

A MsgMemoryGrp that initializes its data using a messagegrp.

## NAME

sc::MsgMemoryGrp - A **MsgMemoryGrp** that initializes its data using a messagegrp.

## SYNOPSIS

`#include <memmsg.h>`

Inherits **sc::MemoryGrp**.

Inherited by **sc::ActiveMsgMemoryGrp**, **sc::RDMAMemoryGrp**, and **sc::ShmMemoryGrp**.

### Public Member Functions

**MsgMemoryGrp** (const **Ref**\< **MessageGrp** \> &msg)\
 **MsgMemoryGrp** (const **Ref**\< **KeyVal** \> &keyval)\
 void **set\_localsize** (size\_t **localsize**)\
 Set the size of locally held memory.  void **sync** ()\
 Synchronizes all the nodes.

### Protected Attributes

**Ref**\< **MessageGrp** \> **msg\_**\

### Additional Inherited Members

## Detailed Description

A **MsgMemoryGrp** that initializes its data using a messagegrp.

## Member Function Documentation

### void sc::MsgMemoryGrp::set\_localsize (size\_t)` [virtual]`

Set the size of locally held memory. When memory is accessed using a global offset counting starts at node 0 and proceeds up to node **n()** - 1.

Implements **sc::MemoryGrp**.

Reimplemented in **sc::RDMAMemoryGrp**, and **sc::ShmMemoryGrp**.

### void sc::MsgMemoryGrp::sync ()` [virtual]`

Synchronizes all the nodes. This is useful after remote memory writes to be certain that all of the writes have completed and the data can be accessed locally, for example.

Implements **sc::MemoryGrp**.

Reimplemented in **sc::MTMPIMemoryGrp**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
