check transfer  0.1
Check data transfer for SDAccell OpenCL application
tf_checktransferin.h
Go to the documentation of this file.
1 #ifndef TF_CHECKTRANSFERIN_H
2 #define TF_CHECKTRANSFERIN_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 host to device
16  *
17  *
18  */
20 {
21 public:
22 
23  //!< Internal data for TF_CheckTransferIn
25 
26  TF_CheckTransferIn( 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 StartReadBuf( 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_CHECKTRANSFERIN_H
< Internal data for TF_CheckTransferIn
void StartCalculateBuf(cl::Buffer *pDevice, cl::Event &event)
Start kernel for buffer.
virtual void PrepareInThread()
Prepare test.
void SetBuffer(cl_uint *ptr)
set test data in buffer buffer
TF_CheckTransferIn_task_data * td
< Internal data for TF_CheckTransferIn
virtual void Run()
Main body of test.
~TF_CheckTransferIn()
Destructor.
void CheckBuffer(cl_uint *ptr)
check data in the buffer
void GetStatus(void)
Read status information from device.
Base class for application with thread.
Definition: tf_testthread.h:23
virtual void GetResultInThread()
Show results of test.
void WaitForCalculateComplete(cl::Event &event)
Wait for complete calculate.
virtual void StepTable()
Show table during test executing.
void StartReadBuf(cl::Buffer *pDevice, cl_uint *pHost, cl::Event &event)
Start data transfer.
virtual void CleanupInThread()
Free any resource.
check data transfer from host to device
common data for OpenCL device
Definition: tf_device.h:17
TF_CheckTransferIn(TableEngine *pTable, TF_Device *pDevice, int argc, char **argv)
Constructor.
void WaitForTransferBufComplete(cl::Event &event)
Wait for complete data transfer.