Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove direct accesses to CustomData #2288

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sst/elements/memHierarchy/standardInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ Event* StandardInterface::MemEventConverter::convert(StandardMem::MoveData* req)
return move;
}
Event* StandardInterface::MemEventConverter::convert(StandardMem::CustomReq* req) {
CustomMemEvent* creq = new CustomMemEvent(iface->getName(), Command::CustomReq, req->data);
CustomMemEvent* creq = new CustomMemEvent(iface->getName(), Command::CustomReq, req->releaseData());
if (!req->needsResponse())
creq->setFlag(MemEventBase::F_NORESPONSE);

Expand Down Expand Up @@ -620,7 +620,7 @@ StandardMem::Request* StandardInterface::convertResponseCustomResp(StandardMem::
StandardMem::Request* resp = req->needsResponse() ? req->makeResponse() : nullptr;
StandardMem::CustomResp* cresp = static_cast<StandardMem::CustomResp*>(resp);
if (cresp) {
cresp->data = static_cast<CustomMemEvent*>(meb)->getCustomData();
cresp->setData(static_cast<CustomMemEvent*>(meb)->getCustomData());
}
return cresp;
}
Expand Down
2 changes: 1 addition & 1 deletion src/sst/elements/miranda/mirandaCPU.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void RequestGenCPU::StdMemHandler::handle(Interfaces::StandardMem::CustomResp* r
cpu->requestsPending[CUSTOM]--;
// The CustomResp destructor does not delete the data
// Do not need to delete the cpuReq data as the memory system should take care of that
delete rsp->data;
delete rsp->releaseData();
}

void RequestGenCPU::issueCustomRequest(CustomOpRequest* req) {
Expand Down
2 changes: 1 addition & 1 deletion src/sst/elements/osseous/Makefile.am
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::exchange is C++14 feature used by CustomResp/Req::set/releaseData(). I'm not sure how long ago PinCRT started supporting new features, but it seems C++17 is on the table since at least 3.26

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
#
INCLUDE = -I$(top_srcdir)/src/sst/elements/osseous/eras_datatypes/ -I$(top_srcdir)/src/sst/elements/ariel/
FLAGS = -fpermissive -std=c++11
FLAGS = -fpermissive -std=c++17


AM_CPPFLAGS += \
Expand Down