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

Method getPtr

src/fastertransformer/utils/Tensor.h:164–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163 template<typename T>
164 inline T* getPtr() const
165 {
166 FT_LOG_DEBUG("%s start", __PRETTY_FUNCTION__);
167 if (getTensorType<T>() != type) {
168 FT_LOG_DEBUG("getPtr with type %s, but data type is: %s",
169 getNumpyTypeDesc(getTensorType<T>()).c_str(),
170 getNumpyTypeDesc(type).c_str());
171 }
172 return (T*)data;
173 }
174
175 inline void* getPtrWithOffset(size_t offset) const
176 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected