summaryrefslogtreecommitdiff
path: root/opencl/source/openclwrapper.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2015-06-15 17:58:15 +0900
committerCaolán McNamara <caolanm@redhat.com>2015-06-17 15:50:45 +0000
commit09800956191c90035872cbc18cd304fee043c710 (patch)
tree9d255ad7629fedc181e8b5cf965a3075a328caaf /opencl/source/openclwrapper.cxx
parent9cc52266bd1a4d01552675f151ce2da8c5210f84 (diff)
Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'opencl/source/openclwrapper.cxx')
-rw-r--r--opencl/source/openclwrapper.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index 1fc7597b7263..7b7d1562f416 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -22,7 +22,7 @@
#include <sal/config.h>
#include <sal/log.hxx>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include <unicode/regex.h>
#include <stdio.h>
@@ -149,7 +149,7 @@ std::vector<boost::shared_ptr<osl::File> > binaryGenerated( const char * clFileN
return aGeneratedFiles;
// grab the handles to all of the devices in the context.
- boost::scoped_array<cl_device_id> pArryDevsID(new cl_device_id[numDevices]);
+ std::unique_ptr<cl_device_id[]> pArryDevsID(new cl_device_id[numDevices]);
clStatus = clGetContextInfo( context, CL_CONTEXT_DEVICES,
sizeof( cl_device_id ) * numDevices, pArryDevsID.get(), NULL );
@@ -220,7 +220,7 @@ bool generatBinFromKernelSource( cl_program program, const char * clFileName )
CHECK_OPENCL( clStatus, "clGetProgramInfo" );
/* copy over all of the generated binaries. */
- boost::scoped_array<char*> binaries(new char*[numDevices]);
+ std::unique_ptr<char*[]> binaries(new char*[numDevices]);
for ( size_t i = 0; i < numDevices; i++ )
{
@@ -354,7 +354,7 @@ bool buildProgram(const char* buildOption, GPUEnv* gpuInfo, int idx)
return false;
}
- boost::scoped_array<char> buildLog(new char[length]);
+ std::unique_ptr<char[]> buildLog(new char[length]);
if ( !gpuInfo->mnIsUserCreated )
{
clStatus = clGetProgramBuildInfo( gpuInfo->mpArryPrograms[idx], gpuInfo->mpArryDevsID[0],
@@ -402,8 +402,8 @@ bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuInfo, const char
if (aGeneratedFiles.size() == numDevices)
{
- boost::scoped_array<size_t> length(new size_t[numDevices]);
- boost::scoped_array<unsigned char*> pBinary(new unsigned char*[numDevices]);
+ std::unique_ptr<size_t[]> length(new size_t[numDevices]);
+ std::unique_ptr<unsigned char*[]> pBinary(new unsigned char*[numDevices]);
for(size_t i = 0; i < numDevices; ++i)
{
sal_uInt64 nSize;
@@ -420,7 +420,7 @@ bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuInfo, const char
}
// grab the handles to all of the devices in the context.
- boost::scoped_array<cl_device_id> pArryDevsID(new cl_device_id[numDevices]);
+ std::unique_ptr<cl_device_id[]> pArryDevsID(new cl_device_id[numDevices]);
clStatus = clGetContextInfo( gpuInfo->mpContext, CL_CONTEXT_DEVICES,
sizeof( cl_device_id ) * numDevices, pArryDevsID.get(), NULL );
@@ -471,7 +471,7 @@ void checkDeviceForDoubleSupport(cl_device_id deviceId, bool& bKhrFp64, bool& bA
if( clStatus != CL_SUCCESS )
return;
- boost::scoped_array<char> pExtInfo(new char[aDevExtInfoSize]);
+ std::unique_ptr<char[]> pExtInfo(new char[aDevExtInfoSize]);
clStatus = clGetDeviceInfo( deviceId, CL_DEVICE_EXTENSIONS,
sizeof(char) * aDevExtInfoSize, pExtInfo.get(), NULL);