check transfer
0.1
Check data transfer for SDAccell OpenCL application
|
Base class for application with thread. More...
#include <tf_testthread.h>
Public Member Functions | |
virtual void | CleanupInThread ()=0 |
Free any resource. More... | |
void * | Execute () |
virtual void | GetResult () |
Show result of test. More... | |
virtual void | GetResultInThread ()=0 |
Show result. More... | |
virtual int | isComplete () |
Return 1 when test is complete. More... | |
virtual int | Prepare (int cnt) |
Prepare test. More... | |
virtual void | PrepareInThread ()=0 |
Prepare test. More... | |
virtual void | Run ()=0 |
Main body of user test. More... | |
virtual void | Start () |
Start of test. More... | |
virtual void | StepTable ()=0 |
Show status information into test table. More... | |
virtual void | Stop () |
Stop of test. More... | |
TF_TestThread (TableEngine *pTable, int argc, char **argv) | |
virtual | ~TF_TestThread () |
Public Member Functions inherited from TF_Test | |
virtual void | StepMainThread () |
Don't use. Reserve for future. More... | |
TF_Test (TableEngine *pTable) | |
Static Public Member Functions | |
static void * | ThreadFunc (void *lpvThreadParm) |
Public Attributes | |
pthread_attr_t | m_attrThread |
int | m_CycleCnt |
pthread_t | m_hThread |
int | m_isComplete |
int | m_isException |
int | m_isPrepareComplete |
int | m_isTerminate |
pthread_mutex_t | m_ResultCompleteMutex |
pthread_mutex_t | m_ResultStartMutex |
pthread_mutex_t | m_StartMutex |
pthread_mutex_t | m_ThreadExitMutex |
Public Attributes inherited from TF_Test | |
TableEngine * | m_pTemplateEngine |
Base class for application with thread.
Class creates additional thread.
Definition at line 23 of file tf_testthread.h.
TF_TestThread::TF_TestThread | ( | TableEngine * | pTable, |
int | argc, | ||
char ** | argv | ||
) |
Definition at line 21 of file tf_testthread.cpp.
References m_CycleCnt, m_isComplete, m_isException, m_isPrepareComplete, m_isTerminate, m_ResultCompleteMutex, m_ResultStartMutex, m_StartMutex, and m_ThreadExitMutex.
|
virtual |
|
pure virtual |
Free any resource.
Implemented in TF_CheckTransferIn, and TF_CheckTransferOut.
Referenced by Execute().
void * TF_TestThread::Execute | ( | ) |
Definition at line 102 of file tf_testthread.cpp.
References CleanupInThread(), GetResultInThread(), _except_info_t::info, m_isComplete, m_isException, m_isPrepareComplete, m_ResultCompleteMutex, m_ResultStartMutex, m_StartMutex, m_ThreadExitMutex, PrepareInThread(), and Run().
Referenced by ThreadFunc().
|
virtual |
Show result of test.
Reimplemented from TF_Test.
Definition at line 188 of file tf_testthread.cpp.
References m_ResultCompleteMutex, and m_ResultStartMutex.
|
pure virtual |
|
virtual |
Return 1 when test is complete.
Reimplemented from TF_Test.
Definition at line 178 of file tf_testthread.cpp.
References m_isComplete.
|
virtual |
Prepare test.
cnt | number of call function |
Function is called during test preparation. Preparation of the test can be very long. When preparation is complete function must be return 1.
Preparation of the all tests is complete when all tests return 1
Implements TF_Test.
Definition at line 56 of file tf_testthread.cpp.
References except_info(), m_attrThread, m_hThread, m_isException, m_isPrepareComplete, and ThreadFunc().
|
pure virtual |
|
pure virtual |
Main body of user test.
Implemented in TF_CheckTransferIn, and TF_CheckTransferOut.
Referenced by Execute().
|
virtual |
Start of test.
Implements TF_Test.
Definition at line 161 of file tf_testthread.cpp.
References m_StartMutex.
|
pure virtual |
Show status information into test table.
Reimplemented from TF_Test.
Implemented in TF_CheckTransferIn, and TF_CheckTransferOut.
|
virtual |
Stop of test.
Reimplemented from TF_Test.
Definition at line 170 of file tf_testthread.cpp.
References m_isTerminate.
|
static |
pthread_attr_t TF_TestThread::m_attrThread |
Definition at line 67 of file tf_testthread.h.
Referenced by Prepare().
int TF_TestThread::m_CycleCnt |
Definition at line 58 of file tf_testthread.h.
Referenced by TF_TestThread().
pthread_t TF_TestThread::m_hThread |
Definition at line 66 of file tf_testthread.h.
Referenced by Prepare().
int TF_TestThread::m_isComplete |
Definition at line 56 of file tf_testthread.h.
Referenced by Execute(), isComplete(), and TF_TestThread().
int TF_TestThread::m_isException |
Definition at line 59 of file tf_testthread.h.
Referenced by Execute(), Prepare(), and TF_TestThread().
int TF_TestThread::m_isPrepareComplete |
Definition at line 55 of file tf_testthread.h.
Referenced by Execute(), Prepare(), and TF_TestThread().
int TF_TestThread::m_isTerminate |
Definition at line 57 of file tf_testthread.h.
Referenced by TF_CheckTransferIn::Run(), TF_CheckTransferOut::Run(), Stop(), and TF_TestThread().
pthread_mutex_t TF_TestThread::m_ResultCompleteMutex |
Definition at line 62 of file tf_testthread.h.
Referenced by Execute(), GetResult(), and TF_TestThread().
pthread_mutex_t TF_TestThread::m_ResultStartMutex |
Definition at line 61 of file tf_testthread.h.
Referenced by Execute(), GetResult(), and TF_TestThread().
pthread_mutex_t TF_TestThread::m_StartMutex |
Definition at line 63 of file tf_testthread.h.
Referenced by Execute(), Start(), and TF_TestThread().
pthread_mutex_t TF_TestThread::m_ThreadExitMutex |
Definition at line 64 of file tf_testthread.h.
Referenced by Execute(), TF_TestThread(), and ~TF_TestThread().