P4 to Git Change 1590896 by vsytchen@vsytchen-win10 on 2018/08/08 14:49:41
SWDEV-79445 - OCL generic changes and code clean-up
1. std::auto_ptr is deprecated in c++11 and removed in c++17. Use unique_ptr instead.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/15576/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcompiler.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#65 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#21 edit
[ROCm/clr commit: ac9ebe294b]
Bu işleme şunda yer alıyor:
@@ -182,7 +182,7 @@ static void checkLLVM_BIN() {
|
||||
}
|
||||
#endif // defined(ATI_OS_LINUX)
|
||||
|
||||
std::auto_ptr<amd::opencl_driver::Compiler> LightningProgram::newCompilerInstance() {
|
||||
std::unique_ptr<amd::opencl_driver::Compiler> LightningProgram::newCompilerInstance() {
|
||||
#if defined(ATI_OS_WIN)
|
||||
static INIT_ONCE initOnce;
|
||||
InitOnceExecuteOnce(&initOnce, checkLLVM_BIN, NULL, NULL);
|
||||
@@ -199,7 +199,7 @@ std::auto_ptr<amd::opencl_driver::Compiler> LightningProgram::newCompilerInstanc
|
||||
}
|
||||
#endif // defined(DEBUG)
|
||||
|
||||
return std::auto_ptr<amd::opencl_driver::Compiler>(
|
||||
return std::unique_ptr<amd::opencl_driver::Compiler>(
|
||||
amd::opencl_driver::CompilerFactory().CreateAMDGPUCompiler(llvmBin_));
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ bool LightningProgram::compileImpl(const std::string& sourceCode,
|
||||
const std::vector<const std::string*>& headers,
|
||||
const char** headerIncludeNames, amd::option::Options* options) {
|
||||
using namespace amd::opencl_driver;
|
||||
std::auto_ptr<Compiler> C(newCompilerInstance());
|
||||
std::unique_ptr<Compiler> C(newCompilerInstance());
|
||||
std::vector<Data*> inputs;
|
||||
|
||||
Data* input = C->NewBufferReference(DT_CL, sourceCode.c_str(), sourceCode.length());
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle