P4 to Git Change 1385583 by gandryey@gera-w8 on 2017/03/14 16:43:09

SWDEV-79445 - OCL generic changes and code clean-up
	- replace NULL with nullptr in the ROCm backend

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocappprofile.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.cpp#16 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.hpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompilerlib.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#44 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.hpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprintf.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprintf.hpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#59 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#20 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.hpp#9 edit


[ROCm/clr commit: 34fc049ad5]
This commit is contained in:
foreman
2017-03-14 16:47:51 -04:00
parent a5aa5566a7
commit 9b7e6d6ffb
18 changed files with 284 additions and 284 deletions
@@ -18,7 +18,7 @@
namespace roc {
PrintfDbg::PrintfDbg(Device& device, FILE* file)
: dbgBuffer_(NULL),
: dbgBuffer_(nullptr),
dbgBuffer_size_(0),
dbgFile_(file),
gpuDevice_(device) {}
@@ -26,7 +26,7 @@ PrintfDbg::PrintfDbg(Device& device, FILE* file)
PrintfDbg::~PrintfDbg() { dev().hostFree(dbgBuffer_, dbgBuffer_size_); }
bool PrintfDbg::allocate(bool realloc) {
if (NULL == dbgBuffer_) {
if (nullptr == dbgBuffer_) {
dbgBuffer_size_ = dev().info().printfBufferSize_;
dbgBuffer_ = reinterpret_cast<address>(
dev().hostAlloc(dbgBuffer_size_, sizeof(void*)));
@@ -38,7 +38,7 @@ bool PrintfDbg::allocate(bool realloc) {
dbgBuffer_ = reinterpret_cast<address>(dbgBuffer_size_, sizeof(void*));
}
return (NULL != dbgBuffer_) ? true : false;
return (nullptr != dbgBuffer_) ? true : false;
}
bool PrintfDbg::checkFloat(const std::string& fmt) const {
@@ -142,7 +142,7 @@ size_t PrintfDbg::outputArgument(const std::string& fmt, bool printFloat,
// Print the argument(except for string ), using standard PrintfDbg()
else {
bool hlModifier = (strstr(fmt.c_str(), "hl") != NULL);
bool hlModifier = (strstr(fmt.c_str(), "hl") != nullptr);
std::string hlFmt;
if (hlModifier) {
hlFmt = fmt;
@@ -190,7 +190,7 @@ size_t PrintfDbg::outputArgument(const std::string& fmt, bool printFloat,
amd::Os::printf(fmt.data(), fArg);
}
} else {
bool hhModifier = (strstr(fmt.c_str(), "hh") != NULL);
bool hhModifier = (strstr(fmt.c_str(), "hh") != nullptr);
if (hhModifier) {
// current implementation of printf in gcc 4.5.2 runtime libraries,
// doesn`t recognize "hh" modifier ==>
@@ -419,7 +419,7 @@ bool PrintfDbg::output(VirtualGPU& gpu, bool printfEnabled,
// Get memory pointer to the staged buffer
uint32_t* dbgBufferPtr = reinterpret_cast<uint32_t*>(dbgBuffer_);
if (NULL == dbgBufferPtr) {
if (nullptr == dbgBufferPtr) {
return false;
}
@@ -432,7 +432,7 @@ bool PrintfDbg::output(VirtualGPU& gpu, bool printfEnabled,
// Get a pointer to the buffer data
dbgBufferPtr =
reinterpret_cast<uint32_t*>(dbgBuffer_ + 2 * sizeof(uint32_t));
if (NULL == dbgBufferPtr) {
if (nullptr == dbgBufferPtr) {
return false;
}