kfdtest: Style cleanup

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
This commit is contained in:
Kent Russell
2018-08-13 09:03:31 -04:00
parent 3f7b6356fd
commit dffac0a97e
33 changed files with 371 additions and 328 deletions
+6 -4
View File
@@ -26,6 +26,7 @@
#include <string>
#include "KFDTestFlags.hpp"
#include "hsakmt.h"
#ifndef __OS__WRAPPER__H__
#define __OS__WRAPPER__H__
@@ -82,19 +83,20 @@ void *VirtualAllocMemory(void *address, unsigned int size, int memProtection = M
// @brief replacement for windows FreeVirtual func
bool VirtualFreeMemory(void *address, unsigned int size);
// @brief retrieve the last error number
unsigned long GetLastErrorNo();
HSAuint64 GetLastErrorNo();
long AtomicInc(volatile long* pValue);
HSAint64 AtomicInc(volatile HSAint64* pValue);
void MemoryBarrier();
// @brief: runs the selected test case number of times required, each in a separate process
// @params testToRun : can be a specific test testcase like TestCase.TestName or if you want to run all tests in a test case: TestCase.* and so on
// @params testToRun : can be a specific test testcase like TestCase.TestName or if you want
// to run all tests in a test case: TestCase.* and so on
// @params numOfProcesses : how many processes to run in parallel
// @params runsPerProcess : how many iteration a test should do per process, must be a positive number
bool MultiProcessTest(const char *testToRun, int numOfProcesses, int runsPerProcess = 1);
unsigned long long GetSystemTickCountInMicroSec();
HSAuint64 GetSystemTickCountInMicroSec();
/**Put the system to S3/S4 power state and bring it back to S0.
@return 'true' on success, 'false' on failure.