MCPcopy Create free account
hub / github.com/catboost/catboost / CopyConstruct

Function CopyConstruct

util/memory/blob.cpp:173–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171
172template <class TCounter>
173static inline TBlob CopyConstruct(const void* data, size_t len) {
174 using Base = TDynamicBlobBase<TCounter>;
175 THolder<Base> base(new (len) Base);
176
177 Y_ASSERT(base->Length() == len);
178
179 memcpy(base->Data(), data, len);
180
181 TBlob ret(base->Data(), len, base.Get());
182 Y_UNUSED(base.Release());
183
184 return ret;
185}
186
187TBlob TBlob::CopySingleThreaded(const void* data, size_t length) {
188 return CopyConstruct<TSimpleCounter>(data, length);

Callers

nothing calls this directly

Calls 5

Y_UNUSEDFunction · 0.85
LengthMethod · 0.45
DataMethod · 0.45
GetMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected