| 447 | |
| 448 | template<typename T> |
| 449 | inline T* getPtr(const std::string& key) const |
| 450 | { |
| 451 | FT_CHECK_WITH_INFO(isExist(key), |
| 452 | fmtstr("Cannot find a tensor of name %s in the tensor map (keys: %s)", |
| 453 | key.c_str(), |
| 454 | vec2str(keys()).c_str())); |
| 455 | return tensor_map_.at(key).getPtr<T>(); |
| 456 | } |
| 457 | |
| 458 | template<typename T> |
| 459 | inline T* getPtr(const std::string& key, T* default_ptr) const |