Skip to content

Commit

Permalink
Add a setter for the data field.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhitchurch committed Dec 12, 2023
1 parent 7a6cfed commit 3f0d824
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sst/core/interfaces/stdMem.h
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ class StandardMem : public SubComponent

class CustomReq : public Request
{
CustomData* data; /* Custom class that holds data for this event */
public:
CustomReq(CustomData* data, flags_t flags = 0, Addr iPtr = 0, uint32_t tid = 0) :
Request(flags),
Expand All @@ -915,14 +916,15 @@ class StandardMem : public SubComponent
}

CustomData* getData() { return data; }
void setData(CustomData* d) { data = d; }

CustomData* data; /* Custom class that holds data for this event */
Addr iPtr; /* Instruction pointer */
uint32_t tid; /* Thread ID */
};

class CustomResp : public Request
{
CustomData* data; /* Custom class that holds data for this event */
public:
CustomResp(id_t id, CustomData* data, flags_t flags = 0, Addr iPtr = 0, uint32_t tid = 0) :
Request(id, flags),
Expand All @@ -932,7 +934,7 @@ class StandardMem : public SubComponent
{}
CustomResp(CustomReq* req) :
Request(req->getID(), req->getAllFlags()),
data(req->data->makeResponse()),
data(req->getData()->makeResponse()),
iPtr(req->iPtr),
tid(req->tid)
{}
Expand All @@ -955,8 +957,8 @@ class StandardMem : public SubComponent
}

CustomData* getData() { return data; }
void setData(CustomData* d) { data = d; }

CustomData* data; /* Custom class that holds data for this event */
Addr iPtr; /* Instruction pointer */
uint32_t tid; /* Thread ID */
};
Expand Down

0 comments on commit 3f0d824

Please sign in to comment.