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

Function TEST

tensorflow/core/platform/port_test.cc:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace port {
27
28TEST(Port, AlignedMalloc) {
29 for (size_t alignment = 1; alignment <= 1 << 20; alignment <<= 1) {
30 void* p = AlignedMalloc(1, alignment);
31 ASSERT_TRUE(p != nullptr) << "AlignedMalloc(1, " << alignment << ")";
32 uintptr_t pval = reinterpret_cast<uintptr_t>(p);
33 EXPECT_EQ(pval % alignment, 0);
34 AlignedFree(p);
35 }
36}
37
38TEST(Port, GetCurrentCPU) {
39 const int cpu = GetCurrentCPU();

Callers

nothing calls this directly

Calls 15

WaitForMillisecondsFunction · 0.85
DefaultFunction · 0.85
ConditionClass · 0.85
TestCPUFeatureFunction · 0.85
notify_allMethod · 0.80
AwaitWithDeadlineMethod · 0.80
AlignedMallocFunction · 0.50
AlignedFreeFunction · 0.50
GetCurrentCPUFunction · 0.50
NumTotalCPUsFunction · 0.50
ScheduleMethod · 0.45
SleepForMicrosecondsMethod · 0.45

Tested by

no test coverage detected