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

Function PrepareForInitialization

catboost/libs/data/util.h:37–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36 template <class T>
37 void PrepareForInitialization(
38 size_t size,
39 size_t prevTailSize,
40 TVector<T>* data
41 ) {
42 if (prevTailSize) {
43 CB_ENSURE(prevTailSize <= size, "Data remainder is too large");
44 CB_ENSURE(prevTailSize <= data->size(), "Data remainder is too large");
45 std::move(data->end() - prevTailSize, data->end(), data->begin());
46 }
47 data->yresize(size);
48 }
49
50
51 template <class T>

Callers 5

StartMethod · 0.85
StartMethod · 0.85
StartMethod · 0.85

Calls 7

NothingFunction · 0.85
yresizeMethod · 0.80
moveFunction · 0.50
sizeMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected