Refactor to isolate staging buffer code.
이 커밋은 다음에 포함됨:
1 부모
28ee7aff71
커밋
e7586adb33
5 파일이 변경됨
+61
-47
검색과 일치하는 파일 없음
@@ -2,14 +2,13 @@
|
||||
|
||||
#include "hsa.h"
|
||||
|
||||
struct ihipDevice_t;
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
struct StagingBuffer {
|
||||
|
||||
static const int _max_buffers = 4;
|
||||
|
||||
StagingBuffer(ihipDevice_t *device, size_t bufferSize, int numBuffers) ;
|
||||
StagingBuffer(hc::accelerator &acc, size_t bufferSize, int numBuffers) ;
|
||||
~StagingBuffer();
|
||||
|
||||
void CopyHostToDevice(void* dst, const void* src, size_t sizeBytes, hsa_signal_t *waitFor);
|
||||
@@ -20,7 +19,8 @@ struct StagingBuffer {
|
||||
|
||||
|
||||
private:
|
||||
ihipDevice_t *_device;
|
||||
hc::accelerator &_acc;
|
||||
hsa_agent_t _hsa_agent;
|
||||
size_t _bufferSize; // Size of the buffers.
|
||||
int _numBuffers;
|
||||
|
||||
|
||||
@@ -153,6 +153,8 @@ typedef enum hipError_t {
|
||||
,hipErrorNoDevice ///< Call to hipGetDeviceCount returned 0 devices
|
||||
,hipErrorNotReady ///< Indicates that asynchronous operations enqueued earlier are not ready. This is not actually an error, but is used to distinguish from hipSuccess (which indicates completion). APIs that return this error include hipEventQuery and hipStreamQuery.
|
||||
,hipErrorUnknown ///< Unknown error.
|
||||
,hipErrorRuntimeMemory ///< HSA runtime memory call returned error. Typically not seen in production systems.
|
||||
,hipErrorRuntimeOther ///< HSA runtime call other than memory returned error. Typically not seen in production systems.
|
||||
,hipErrorTbd ///< Marker that more error codes are needed.
|
||||
} hipError_t;
|
||||
|
||||
|
||||
새 이슈에서 참조
사용자 차단