From fb19b58840cbde9acf232aa8df726c48bc8978f4 Mon Sep 17 00:00:00 2001 From: alex-t Date: Thu, 14 Apr 2016 13:48:58 +0300 Subject: [PATCH] Fixed incorrect kernel paramlist replacement length & hipGetDeviceProperties mapping --- hipamd/clang-hipify/src/Cuda2Hip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hipamd/clang-hipify/src/Cuda2Hip.cpp b/hipamd/clang-hipify/src/Cuda2Hip.cpp index 65c051ec04..1e29c65010 100644 --- a/hipamd/clang-hipify/src/Cuda2Hip.cpp +++ b/hipamd/clang-hipify/src/Cuda2Hip.cpp @@ -215,7 +215,7 @@ struct cuda2hipMap { // Device cuda2hipRename["cudaDeviceProp"] = {"hipDeviceProp_t", CONV_DEV}; - cuda2hipRename["cudaGetDeviceProperties"] = {"hipDeviceGetProperties", + cuda2hipRename["cudaGetDeviceProperties"] = {"hipGetDeviceProperties", CONV_DEV}; // Cache config @@ -492,7 +492,7 @@ public: SourceLocation kernelArgListEnd(pvdLast->getLocEnd()); SourceLocation stop = clang::Lexer::getLocForEndOfToken( kernelArgListEnd, 0, *SM, DefaultLangOptions); - size_t replacementLength = + replacementLength += SM->getCharacterData(stop) - SM->getCharacterData(kernelArgListStart); initialParamList = StringRef(SM->getCharacterData(kernelArgListStart), replacementLength);