Skip to content

Commit

Permalink
add copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
zetwhite committed Jul 29, 2024
1 parent ca52249 commit fd091e3
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions runtime/onert/core/include/backend/train/ExtraTensorRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,18 @@ class ExtraTensorRequest
ExtraTensorLifeTime lifetime;
backend::train::ExtraTensor **address;

/*
// w/o this copy constructor, it fails in android build
// with this err msg :
// note: in implicit copy assignment operator for 'onert::ir::OperandInfo' first required here
ExtraTensorRequest operator=(const ExtraTensorRequest &o)
{
ExtraTensorRequest r = {
.info = o.info,
.layout = o.layout,
.lifetime = o.lifetime,
.address = o.address,
};
return r;
return ExtraTensorRequest(o.info, o.lifetime, o.address);
}

ExtraTensorRequest(const ExtraTensorRequest& o)
{
info = o.info;
layout = o.layout;
lifetime = o.lifetime;
address = o.address;
}*/
public:
ir::OperandInfo info;
ExtraTensorLifeTime lifetime;
backend::train::ExtraTensor **address;
};

using ExtraTensorRequests = std::vector<ExtraTensorRequest>;
Expand Down

0 comments on commit fd091e3

Please sign in to comment.