Commit 7bf76b63 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

Adding addParameter to Function


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent ecb5a189
......@@ -153,6 +153,10 @@ public:
XACCError("DWKernel does not contain runtime parameters.");
}
virtual void addParameter(InstructionParameter instParam) {
XACCError("DWKernel does not contain runtime parameters.");
}
virtual bool isParameterized() {
return false;
}
......
......@@ -156,6 +156,10 @@ public:
parameters[idx] = p;
}
virtual void addParameter(InstructionParameter instParam) {
parameters.push_back(instParam);
}
virtual std::vector<InstructionParameter> getParameters() {
return parameters;
}
......
......@@ -146,7 +146,10 @@ public:
if (isValidBuffer(varid)) {
return allocatedBuffers[varid];
} else {
XACCError("Could not find AcceleratorBuffer with id " + varid);
auto tmpBuffer = createBuffer(varid, 100);
XACCInfo("Could not find AcceleratorBuffer with id " + varid + ", creating one with 100 bits.");
storeBuffer(varid, tmpBuffer);
return tmpBuffer;
}
}
......
......@@ -83,6 +83,8 @@ public:
*/
virtual void addInstruction(InstPtr instruction) = 0;
virtual void addParameter(InstructionParameter instParam) = 0;
/**
* Return true always to indicate that the
* Function is composite.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment