This patch fixes the bug when setting npumgr param.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
request_id_ = Request::global_request_id_.fetch_add (1);
}
+/** @brief destructor of request class */
+Request::~Request () {
+ if (npumgr_param_ != nullptr)
+ delete npumgr_param_;
+}
+
/** @brief destructor of scheduler class */
Scheduler::~Scheduler () {
/** wait until all callbacks are called */
class Request {
public:
Request (npu_input_opmode opmode);
+ ~Request ();
void setModel (const Model *model) { model_ = model; }
const Model *getModel () { return model_; }
npu_infer_mode getInferMode () { return infer_mode_; }
void setNpumgrParam (const npumgr_param ¶m) {
+ if (npumgr_param_ == nullptr)
+ npumgr_param_ = new npumgr_param;
memcpy (npumgr_param_, ¶m, sizeof (npumgr_param));
}
const npumgr_param *getNpumgrParam () { return npumgr_param_; }