| 466 | |
| 467 | template<typename T> |
| 468 | inline T* getPtrWithOffset(const std::string& key, size_t index) const |
| 469 | { |
| 470 | FT_CHECK_WITH_INFO(isExist(key), |
| 471 | fmtstr("Cannot find a tensor of name %s in the tensor map (keys: %s)", |
| 472 | key.c_str(), |
| 473 | vec2str(keys()).c_str())); |
| 474 | return tensor_map_.at(key).getPtrWithOffset<T>(index); |
| 475 | } |
| 476 | |
| 477 | template<typename T> |
| 478 | inline T* getPtrWithOffset(const std::string& key, size_t index, T* default_ptr) const |