Improve copy testing

[ROCm/hip commit: 1bfd3cdbd0]
This commit is contained in:
Ben Sander
2016-02-12 18:23:55 -06:00
parent 83eb66eb8e
commit a835134f8e
2 changed files with 47 additions and 20 deletions
+2 -2
View File
@@ -1641,8 +1641,8 @@ void ihipAsyncCopy(ihipDevice_t *device, void* dst, const void* src, size_t size
// Resolve default to a specific Kind, since we use different algorithms:
if (kind == hipMemcpyDefault) {
bool dstIsHost = (dstNotTracked || dstPtrInfo._isInDeviceMem);
bool srcIsHost = (srcNotTracked || srcPtrInfo._isInDeviceMem);
bool dstIsHost = (dstNotTracked || !dstPtrInfo._isInDeviceMem);
bool srcIsHost = (srcNotTracked || !srcPtrInfo._isInDeviceMem);
if (srcIsHost && !dstIsHost) {
kind = hipMemcpyHostToDevice;
} else if (!srcIsHost && dstIsHost) {