MCPcopy Create free account
hub / github.com/bytedance/bolt / get

Method get

bolt/vector/VectorPool.cpp:66–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64} // namespace
65
66VectorPtr VectorPool::get(const TypePtr& type, vector_size_t size) {
67 auto cacheIndex = toCacheIndex(type);
68 if (cacheIndex >= 0 && size <= kMaxRecycleSize) {
69 return vectors_[cacheIndex].pop(type, size, *pool_);
70 }
71 return BaseVector::create(type, size, pool_);
72}
73
74bool VectorPool::release(VectorPtr& vector) {
75 if (FOLLY_UNLIKELY(vector == nullptr)) {

Callers 15

loadedVectorMethod · 0.45
BaseVectorMethod · 0.45
addSequenceFunction · 0.45
addConstantFunction · 0.45
ensureWritableMethod · 0.45
setInternalStateMethod · 0.45
getBufferWithSpaceMethod · 0.45
getVectorSerdeFunction · 0.45
getNamedVectorSerdeFunction · 0.45
IOBufToRowVectorFunction · 0.45
toCacheIndexFunction · 0.45

Calls 3

toCacheIndexFunction · 0.85
createFunction · 0.70
popMethod · 0.45

Tested by 15

testConstantMethod · 0.36
exportToArrowMethod · 0.36
exportToArrowMethod · 0.36
testFlatVectorMethod · 0.36
testArrayVectorMethod · 0.36
testConstantMethod · 0.36
testConstantVectorMethod · 0.36
makeBufferMethod · 0.36
exportToArrowMethod · 0.36
TEST_FFunction · 0.36
fillArrowArrayMethod · 0.36
testArrowImportMethod · 0.36