MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / getPtr

Method getPtr

src/fastertransformer/utils/Tensor.h:449–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

fmtstrFunction · 0.85
vec2strFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected