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

Function TEST

tensorflow/core/framework/ev_allocator_test.cc:53–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53TEST(EVAllocator, TestSmallAllocation) {
54 auto allocator = ev_allocator();
55 constexpr int size = 10;
56 void** ptrs = new void*[size];
57 for (int i = 0; i < size; ++i) {
58 ptrs[i] = allocator->AllocateRaw(4, 4);
59 }
60
61 for (int i = 0; i < size; ++i) {
62 allocator->DeallocateRaw(ptrs[i]);
63 }
64}
65
66TEST(EVAllocator, TestBatchSmallAllocation) {
67 auto allocator = ev_allocator();

Callers

nothing calls this directly

Calls 11

ev_allocatorFunction · 0.85
DefaultFunction · 0.85
ThreadOptionsClass · 0.85
getResidentFunction · 0.70
AllocateRawMethod · 0.45
DeallocateRawMethod · 0.45
BatchAllocateRawMethod · 0.45
NowMicrosMethod · 0.45
resetMethod · 0.45
StartThreadMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected