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

Method getPtrWithOffset

src/fastertransformer/utils/Tensor.h:175–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173 }
174
175 inline void* getPtrWithOffset(size_t offset) const
176 {
177 FT_LOG_DEBUG("%s start", __PRETTY_FUNCTION__);
178 if (data == nullptr) {
179 return (void*)data;
180 }
181 else {
182 FT_CHECK_WITH_INFO(offset < size(), "offset is larger than buffer size");
183 return (void*)((char*)data + offset * Tensor::getTypeSize(type));
184 }
185 }
186
187 template<typename T>
188 inline T* getPtrWithOffset(size_t offset) const

Callers 9

sliceMethod · 0.95
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45

Calls 1

fmtstrFunction · 0.85

Tested by

no test coverage detected