check transfer  0.1
Check data transfer for SDAccell OpenCL application
tf_checktransferout.h
Go to the documentation of this file.
1 #ifndef TF_CHECKTRANSFEROUT_H
2 #define TF_CHECKTRANSFEROUT_H
3 
4 
5 #include "xcl2.hpp"
6 
7 #include "tf_testthread.h"
8 
9 
10 class TF_Device;
11 
13 
14 /**
15  * \brief check data transfer from device to host
16  *
17  *
18  */
20 {
21 public:
22 
23  //!< Internal data for TF_CheckTransferOut
25 
26  TF_CheckTransferOut( TableEngine *pTable, TF_Device *pDevice, int argc, char** argv );
27 
29 
30  virtual void PrepareInThread();
31  virtual void CleanupInThread();
32  virtual void GetResultInThread();
33  virtual void StepTable();
34  virtual void Run();
35 
36 
37  //! set test data in buffer buffer
38  void SetBuffer( cl_uint *ptr );
39 
40  //! check data in the buffer
41  void CheckBuffer( cl_uint *ptr );
42 
43  //! Read status information from device
44  void GetStatus( void );
45 
46  //! Wait for complete data transfer
47  void WaitForTransferBufComplete( cl::Event &event );
48 
49  //! Start data transfer
50  void StartWriteBuf( cl::Buffer *pDevice, cl_uint *pHost, cl::Event &event );
51 
52  //! Start kernel for buffer
53  void StartCalculateBuf( cl::Buffer *pDevice, cl::Event &event );
54 
55  //! Wait for complete calculate
56  void WaitForCalculateComplete( cl::Event &event );
57 
58 
59 };
60 
61 #endif // TF_CHECKTRANSFEROUT_H
virtual void PrepareInThread()
Prepare test.
virtual void CleanupInThread()
Free any resource.
virtual void StepTable()
Show table during test executing.
~TF_CheckTransferOut()
Destructor.
void CheckBuffer(cl_uint *ptr)
check data in the buffer
Base class for application with thread.
Definition: tf_testthread.h:23
virtual void Run()
Main body of test.
virtual void GetResultInThread()
Show results of test.
void GetStatus(void)
Read status information from device.
common data for OpenCL device
Definition: tf_device.h:17
TF_CheckTransferOut_task_data * td
< Internal data for TF_CheckTransferOut
void SetBuffer(cl_uint *ptr)
set test data in buffer buffer
check data transfer from device to host
TF_CheckTransferOut(TableEngine *pTable, TF_Device *pDevice, int argc, char **argv)
Constructor.
void WaitForCalculateComplete(cl::Event &event)
Wait for complete calculate.
< Internal data for TF_CheckTransferOut
void WaitForTransferBufComplete(cl::Event &event)
Wait for complete data transfer.
void StartWriteBuf(cl::Buffer *pDevice, cl_uint *pHost, cl::Event &event)
Start data transfer.
void StartCalculateBuf(cl::Buffer *pDevice, cl::Event &event)
Start kernel for buffer.