check transfer
0.1
Check data transfer for SDAccell OpenCL application
|
check data transfer from device to host More...
#include <tf_checktransferout.h>
Public Member Functions | |
void | CheckBuffer (cl_uint *ptr) |
check data in the buffer More... | |
virtual void | CleanupInThread () |
Free any resource. More... | |
virtual void | GetResultInThread () |
Show results of test. More... | |
void | GetStatus (void) |
Read status information from device. More... | |
virtual void | PrepareInThread () |
Prepare test. More... | |
virtual void | Run () |
Main body of test. More... | |
void | SetBuffer (cl_uint *ptr) |
set test data in buffer buffer More... | |
void | StartCalculateBuf (cl::Buffer *pDevice, cl::Event &event) |
Start kernel for buffer. More... | |
void | StartWriteBuf (cl::Buffer *pDevice, cl_uint *pHost, cl::Event &event) |
Start data transfer. More... | |
virtual void | StepTable () |
Show table during test executing. More... | |
TF_CheckTransferOut (TableEngine *pTable, TF_Device *pDevice, int argc, char **argv) | |
Constructor. More... | |
void | WaitForCalculateComplete (cl::Event &event) |
Wait for complete calculate. More... | |
void | WaitForTransferBufComplete (cl::Event &event) |
Wait for complete data transfer. More... | |
~TF_CheckTransferOut () | |
Destructor. More... | |
Public Member Functions inherited from TF_TestThread | |
void * | Execute () |
virtual void | GetResult () |
Show result of test. More... | |
virtual int | isComplete () |
Return 1 when test is complete. More... | |
virtual int | Prepare (int cnt) |
Prepare test. More... | |
virtual void | Start () |
Start of test. 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) | |
Public Attributes | |
TF_CheckTransferOut_task_data * | td |
< Internal data for TF_CheckTransferOut More... | |
Public Attributes inherited from TF_TestThread | |
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 |
Additional Inherited Members | |
Static Public Member Functions inherited from TF_TestThread | |
static void * | ThreadFunc (void *lpvThreadParm) |
check data transfer from device to host
Definition at line 19 of file tf_checktransferout.h.
TF_CheckTransferOut::TF_CheckTransferOut | ( | TableEngine * | pTable, |
TF_Device * | pDevice, | ||
int | argc, | ||
char ** | argv | ||
) |
Constructor.
argc | Number of arguments argv Pointer of argumnts |
arguments of command line:
-size <n> : size block of kilobytes, default 64 -metric <n> : 0 - binary: 1MB=2^10=1024*1024=1048576 bytes, 1 - decimal: 1MB=10^6=1000*1000=1000000 bytes, default 0
Definition at line 132 of file tf_checktransferout.cpp.
References GetFromCommnadLine(), TF_CheckTransferOut_task_data::mbSize, TF_CheckTransferOut_task_data::metricMode, TF_CheckTransferOut_task_data::pDevice, TF_CheckTransferOut_task_data::sizeBlock, and td.
TF_CheckTransferOut::~TF_CheckTransferOut | ( | ) |
Destructor.
Definition at line 149 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::dpStatus, TF_CheckTransferOut_task_data::pBuffer, TF_CheckTransferOut_task_data::pBufOut, TF_CheckTransferOut_task_data::pStatus, and td.
void TF_CheckTransferOut::CheckBuffer | ( | cl_uint * | ptr | ) |
check data in the buffer
Definition at line 619 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::BlockError, TF_CheckTransferOut_task_data::BlockOk, TF_CheckTransferOut_task_data::dataExpect, TF_CheckTransferOut_task_data::sizeBlock, and td.
|
virtual |
Free any resource.
Implements TF_TestThread.
Definition at line 324 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::q0, TF_CheckTransferOut_task_data::q1, and td.
|
virtual |
Show results of test.
Implements TF_TestThread.
Definition at line 335 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::BlockError, TF_CheckTransferOut_task_data::BlockOk, TF_CheckTransferOut_task_data::BlockRd, TF_CheckTransferOut_task_data::BlockWr, TF_CheckTransferOut_task_data::metricMode, TF_CheckTransferOut_task_data::Sig, TF_CheckTransferOut_task_data::sizeBlock, td, TF_CheckTransferOut_task_data::testTime, TF_CheckTransferOut_task_data::VelocityAverage, TF_CheckTransferOut_task_data::VelocityCurMax, and TF_CheckTransferOut_task_data::VelocityCurMin.
void TF_CheckTransferOut::GetStatus | ( | void | ) |
Read status information from device.
Definition at line 645 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::BlockError, TF_CheckTransferOut_task_data::BlockOk, TF_CheckTransferOut_task_data::BlockRd, TF_CheckTransferOut_task_data::dpStatus, TF_CheckTransferOut_task_data::pStatus, TF_CheckTransferOut_task_data::q0, TF_CheckTransferOut_task_data::Sig, and td.
Referenced by Run().
|
virtual |
Prepare test.
This function executed before main body of test.
Implements TF_TestThread.
Definition at line 171 of file tf_checktransferout.cpp.
References TF_Device::context, TF_CheckTransferOut_task_data::dataOut, TF_Device::device, TF_CheckTransferOut_task_data::dpStatus, except_info(), TF_CheckTransferOut_task_data::krnl_calculate, TF_CheckTransferOut_task_data::krnl_read, TF_CheckTransferOut_task_data::pBuffer, TF_CheckTransferOut_task_data::pBufOut, TF_CheckTransferOut_task_data::pDevice, TF_Device::program, TF_CheckTransferOut_task_data::pStatus, TF_CheckTransferOut_task_data::q0, TF_CheckTransferOut_task_data::q1, TF_CheckTransferOut_task_data::sizeBlock, TF_CheckTransferOut_task_data::sizeOfuint16, and td.
|
virtual |
Main body of test.
Implements TF_TestThread.
Definition at line 470 of file tf_checktransferout.cpp.
References TableEngine::AddRowTable(), TF_CheckTransferOut_task_data::BlockWr, TF_CheckTransferOut_task_data::flagGetStatus, GetStatus(), TF_CheckTransferOut_task_data::lastBlock, TF_CheckTransferOut_task_data::lastTime, TF_TestThread::m_isTerminate, TF_Test::m_pTemplateEngine, TF_CheckTransferOut_task_data::mbSize, TF_CheckTransferOut_task_data::pBuffer, TF_CheckTransferOut_task_data::pBufOut, TF_CheckTransferOut_task_data::RowNumber, SetBuffer(), TF_CheckTransferOut_task_data::sizeBlock, StartCalculateBuf(), TF_CheckTransferOut_task_data::startTime, StartWriteBuf(), td, TF_CheckTransferOut_task_data::testTime, TF_CheckTransferOut_task_data::VelocityAverage, TF_CheckTransferOut_task_data::VelocityCurMax, TF_CheckTransferOut_task_data::VelocityCurMin, TF_CheckTransferOut_task_data::VelocityCurrent, WaitForCalculateComplete(), and WaitForTransferBufComplete().
void TF_CheckTransferOut::SetBuffer | ( | cl_uint * | ptr | ) |
set test data in buffer buffer
set test data in buffer
Definition at line 591 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::dataOut, TF_CheckTransferOut_task_data::sizeBlock, and td.
Referenced by Run().
void TF_CheckTransferOut::StartCalculateBuf | ( | cl::Buffer * | pDevice, |
cl::Event & | event | ||
) |
Start kernel for buffer.
Definition at line 427 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::dpStatus, TF_CheckTransferOut_task_data::krnl_calculate, TF_CheckTransferOut_task_data::krnl_read, TF_CheckTransferOut_task_data::q1, TF_CheckTransferOut_task_data::sizeOfuint16, and td.
Referenced by Run().
void TF_CheckTransferOut::StartWriteBuf | ( | cl::Buffer * | pDevice, |
cl_uint * | pHost, | ||
cl::Event & | event | ||
) |
Start data transfer.
Definition at line 411 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::BlockWr, TF_CheckTransferOut_task_data::q0, TF_CheckTransferOut_task_data::sizeBlock, and td.
Referenced by Run().
|
virtual |
Show table during test executing.
Implements TF_TestThread.
Definition at line 387 of file tf_checktransferout.cpp.
References TF_CheckTransferOut_task_data::BlockError, TF_CheckTransferOut_task_data::BlockOk, TF_CheckTransferOut_task_data::BlockRd, TF_CheckTransferOut_task_data::BlockWr, TF_CheckTransferOut_task_data::flagGetStatus, TF_Test::m_pTemplateEngine, TF_CheckTransferOut_task_data::RowNumber, TableEngine::SetValueTable(), td, TF_CheckTransferOut_task_data::testTime, TF_CheckTransferOut_task_data::VelocityAverage, and TF_CheckTransferOut_task_data::VelocityCurrent.
void TF_CheckTransferOut::WaitForCalculateComplete | ( | cl::Event & | event | ) |
Wait for complete calculate.
Definition at line 463 of file tf_checktransferout.cpp.
Referenced by Run().
void TF_CheckTransferOut::WaitForTransferBufComplete | ( | cl::Event & | event | ) |
Wait for complete data transfer.
Definition at line 405 of file tf_checktransferout.cpp.
Referenced by Run().
TF_CheckTransferOut_task_data* TF_CheckTransferOut::td |
< Internal data for TF_CheckTransferOut
Definition at line 24 of file tf_checktransferout.h.
Referenced by CheckBuffer(), CleanupInThread(), GetResultInThread(), GetStatus(), PrepareInThread(), Run(), SetBuffer(), StartCalculateBuf(), StartWriteBuf(), StepTable(), TF_CheckTransferOut(), and ~TF_CheckTransferOut().