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

Method getPtrWithOffset

src/fastertransformer/utils/Tensor.h:468–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

fmtstrFunction · 0.85
vec2strFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected