- Fix non-const variables to const variables since their value is never changed in actual practice
- Use const auto & to avoid object copy
Resolves:
```
non-const type variable, but its value is never changed.
auto_causes_copy
```
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Change-Id: Ib54e1a4406438c64c43eb2ab8768e8a47556f7d2
Signed-off-by: skykongkong8 <ss.kong@samsung.com>
const std::vector<TensorDim> &dims, const std::string &name,
const TensorLifespan &lifespan, bool is_grad_clip,
Tensor::Initializer initializer) {
- auto const exec_order = weight_pool.getExecutionOrder(name);
std::vector<Tensor *> ret;
ret.reserve(dims.size());
#endif
for (auto &req : wgrad_requests) {
for (unsigned int idx = 0; idx < wgrad_sorted_req.size(); idx++) {
- auto const sr = wgrad_sorted_req[idx];
+ const auto &sr = wgrad_sorted_req[idx];
bool merge = true;
if (sr.mem_req->size >= req.size) {
for (auto &interval : sr.start_end) {