MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / BatchAllocate

Method BatchAllocate

tensorflow/core/framework/ev_allocator.h:449–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447 }
448
449 size_t BatchAllocate(size_t num, void **ret) {
450 if (list_.size() >= num) {
451 for (int i = 0; i < num; i++) {
452 ret[i] = list_.back();
453 list_.pop_back();
454 }
455 return num;
456 }
457
458 return arena_->BatchAllocate(num, t_bin_size_, ret);
459 }
460
461 void Deallocate(void *ptr) {
462 list_.push_front(ptr);

Callers

nothing calls this directly

Calls 4

pop_backMethod · 0.80
sizeMethod · 0.45
backMethod · 0.45
BatchAllocateMethod · 0.45

Tested by

no test coverage detected