54 int main(
int argc,
char **argv)
63 const char *headers[] = {
64 "TIME",
"BLOCK_WR",
"BLOCK_RD",
"BLOCK_OK",
"BLOCK_ERROR",
"SPD_CURRENT",
"SPD_AVR",
77 pTable->
CreateTable(headers,
sizeof(headers)/
sizeof(headers[0]), 0);
93 pTest[testCnt++]=pTestOut;
99 pTest[testCnt++]=pTestIn;
102 #if 0 // parallel executing prepare functions 103 for(
int ii=0; ; ii++)
106 for(
int jj=0; jj<testCnt; jj++)
108 flagExit &=pTest[jj]->
Prepare(ii);
113 #else // sequence executing prepare functions 116 for(
int jj=0; jj<testCnt; jj++)
119 for(
int ii=0; ; ii++)
121 flagExit=pTest[jj]->
Prepare(ii);
131 for(
int jj=0; jj<testCnt; jj++ )
138 #if defined(IS_STEP_MAIN_THREAD) 139 IPC_TIMEVAL start_time;
140 IPC_TIMEVAL curr_time;
148 #if defined(IS_STEP_MAIN_THREAD) 149 IPC_getTime(&start_time);
152 for(
int jj=0; jj<testCnt; jj++ )
156 IPC_getTime(&curr_time);
157 if(IPC_getDiffTime(&start_time, &curr_time) > 100) {
169 if( (currentTime - testStartTime) >= timeMode*1000 )
175 for(
int jj=0; jj<testCnt; jj++ )
182 for(
int jj=0; jj<testCnt; jj++ )
193 for(
int jj=0; jj<testCnt; jj++ )
214 for(
int jj=0; jj<testCnt; jj++ )
219 for(
int jj=0; jj<testCnt; jj++ )
221 delete pTest[jj]; pTest[jj]=NULL;
225 printf(
"\n\n\n\n \n%s\n", err.
info.c_str());
227 printf(
"Unknown error in application!\n");
virtual void Start()=0
Start of test.
virtual int Prepare(int cnt)=0
Prepare test.
virtual void StepMainThread()
Don't use. Reserve for future.
virtual void GetConsolePos(int &X, int &Y)=0
virtual void Stop()
Stop of test.
int main(int argc, char **argv)
Start point for host application.
Base class for testing device.
virtual void GetResult()
Show result of test.
static volatile int exit_flag
int GetFromCommnadLine(int argc, char **argv, const char *name, int defValue)
Get integer value from command line.
check data transfer from host to device
virtual void StepTable()
Show table.
virtual int CreateTable(const char *pColumnName[], unsigned nCount, unsigned isTStudio)=0
virtual void SetConsolePos(int X, int Y)=0
common data for OpenCL device
void signal_handler(int signo)
check data transfer from device to host
virtual int isComplete()
Return 1 when test is complete.