MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / BytesOffset

Function BytesOffset

oneflow/core/embedding/persistent_table.cpp:63–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62template<typename T>
63T* BytesOffset(T* ptr, size_t bytes) {
64 return reinterpret_cast<T*>(
65 const_cast<unsigned char*>((reinterpret_cast<const unsigned char*>(ptr) + bytes)));
66}
67
68void MemcpyOffset(void* dst, size_t dst_off, const void* src, size_t src_off, size_t n) {
69 std::memcpy(BytesOffset(dst, dst_off), BytesOffset(src, src_off), n);

Callers 3

MemcpyOffsetFunction · 0.85
GetBlocksMethod · 0.85
PutBlocksMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected