21 #ifndef STAGING_BUFFER_H
22 #define STAGING_BUFFER_H
42 static const int _max_buffers = 4;
44 StagingBuffer(hsa_agent_t hsaAgent, hsa_region_t systemRegion,
size_t bufferSize,
int numBuffers) ;
47 void CopyHostToDevice(
void* dst,
const void* src,
size_t sizeBytes, hsa_signal_t *waitFor);
48 void CopyHostToDevicePinInPlace(
void* dst,
const void* src,
size_t sizeBytes, hsa_signal_t *waitFor);
50 void CopyDeviceToHost (
void* dst,
const void* src,
size_t sizeBytes, hsa_signal_t *waitFor);
51 void CopyDeviceToHostPinInPlace(
void* dst,
const void* src,
size_t sizeBytes, hsa_signal_t *waitFor);
55 hsa_agent_t _hsa_agent;
59 char *_pinnedStagingBuffer[_max_buffers];
60 hsa_signal_t _completion_signal[_max_buffers];
61 std::mutex _copy_lock;
Definition: staging_buffer.h:40