Clean up the KFDTest style via CPPLint. Some warnings remain regarding
volatile variables being cast to void*. This is the command used:
cpplint.py --linelength=120
--filter=-readability/multiline_string,-readability/todo,-build/include,-runtime/references

multiline_string is due to using ISA code
todo is to avoid errors that we don't have TODO(username) instead of TODO
include is about including the folder in the header includes
references is regarding non-const references '&' being const or using
pointers. That can be addressed later

Change-Id: I3c6622da0a13dd33ab29b2bfff48be25e763b750


[ROCm/ROCR-Runtime commit: dffac0a97e]
Αυτή η υποβολή περιλαμβάνεται σε:
Kent Russell
2018-08-13 09:03:31 -04:00
γονέας 76f3da6bd0
υποβολή 19788ae516
33 αρχεία άλλαξαν με 371 προσθήκες και 328 διαγραφές
@@ -316,7 +316,7 @@ TEST_F(KFDLocalMemoryTest, Fragmentation) {
break;
}
void *bufferEnd = (void *)((unsigned long)pages[order].pointers[p]
void *bufferEnd = reinterpret_cast<void *>(reinterpret_cast<unsigned long>(pages[order].pointers[p])
+ size - sizeof(unsigned));
sysBuffer.As<unsigned *>()[0] = ++value;
@@ -340,7 +340,7 @@ TEST_F(KFDLocalMemoryTest, Fragmentation) {
Dispatch dispatch3(isaBuffer);
dispatch3.SetArgs(bufferEnd,
(void *)&(sysBuffer.As<unsigned*>()[1]));
reinterpret_cast<void *>(&(sysBuffer.As<unsigned*>()[1])));
dispatch3.Submit(queue);
dispatch3.Sync(g_TestTimeOut);
EXPECT_EQ(value, sysBuffer.As<unsigned *>()[1]);
@@ -349,7 +349,7 @@ TEST_F(KFDLocalMemoryTest, Fragmentation) {
}
LOG() << " Got " << pages[order].nPages
<< ", end of last block addr: "
<< (void *)((unsigned long)pages[order].pointers[p-1] + size - 1)
<< reinterpret_cast<void *>(reinterpret_cast<unsigned long>(pages[order].pointers[p-1]) + size - 1)
<< std::endl;
// Now free half the memory