| 51 | } |
| 52 | |
| 53 | const ITensor *ITensorPack::get_const_tensor(int id) const |
| 54 | { |
| 55 | auto it = _pack.find(id); |
| 56 | if (it != _pack.end()) |
| 57 | { |
| 58 | return it->second.ctensor != nullptr ? it->second.ctensor : it->second.tensor; |
| 59 | } |
| 60 | return nullptr; |
| 61 | } |
| 62 | |
| 63 | ITensor *ITensorPack::get_tensor(int id) |
| 64 | { |