SWDEV-465085 - replace asserts inside API calls
This change replaces some asserts, that were only available in debug
mode, with standard error handling.
Signed-off-by: Sebastian Luzynski <Sebastian.Luzynski@amd.com>
Change-Id: I112f9e56f921abd72daf0d11e4ecdcb7b1a9f9e6
[ROCm/clr commit: 019abdc3bd]
Este cometimento está contido em:
1 ascendente
ae5bebeb5f
cometimento
f421f02546
6 ficheiros modificados
+22
-13
Não existem ficheiros que correspondam à sua pesquisa
@@ -2191,9 +2191,10 @@ hipError_t ihipMemcpyAtoAValidate(hipArray_t srcArray, hipArray_t dstArray, amd:
|
||||
|
||||
// HIP assumes the width is in bytes, but OCL assumes it's in pixels.
|
||||
// Note that src and dst should have the same element size.
|
||||
assert(srcImage->getImageFormat().getElementSize() ==
|
||||
dstImage->getImageFormat().getElementSize());
|
||||
const size_t elementSize = srcImage->getImageFormat().getElementSize();
|
||||
if (elementSize != dstImage->getImageFormat().getElementSize()) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
static_cast<size_t*>(srcOrigin)[0] /= elementSize;
|
||||
static_cast<size_t*>(dstOrigin)[0] /= elementSize;
|
||||
static_cast<size_t*>(copyRegion)[0] /= elementSize;
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador