Skip to content

Modify communicator reiceve to write directly into user owned buffers - #58

Merged
jacobmerson merged 2 commits into
SCOREC:mainfrom
hgangwar:separate_comm
Aug 10, 2026
Merged

Modify communicator reiceve to write directly into user owned buffers#58
jacobmerson merged 2 commits into
SCOREC:mainfrom
hgangwar:separate_comm

Conversation

@hgangwar

@hgangwar hgangwar commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Adds a receive API that writes directly into user-provided storage, avoiding an intermediate allocation and copy for global communication.

The existing vector-returning Recv() API remains available for backward compatibility.

Usage

std::vector<double> values(size);

comm.Recv( values.data(), values.size(),
  redev::Mode::Synchronous);

Changes

  • Added Recv(T* destination, std::size_t size, Mode).
  • Added forwarding support in BidirectionalComm.
  • Updated test_global_comm testcase.

Comment thread redev_comm.h
@jacobmerson
jacobmerson merged commit 1e4c876 into SCOREC:main Aug 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants