Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
72d94418
Kaydet (Commit)
72d94418
authored
Kas 10, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:nullptr (automatic rewrite)
Change-Id: I60189077f872dd5da3633b15b67b7b7729a75d0d
üst
8d12f43b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
opencl_device.cxx
opencl/source/opencl_device.cxx
+10
-10
openclwrapper.cxx
opencl/source/openclwrapper.cxx
+0
-0
platforminfo.cxx
opencl/source/platforminfo.cxx
+2
-2
No files found.
opencl/source/opencl_device.cxx
Dosyayı görüntüle @
72d94418
...
...
@@ -216,7 +216,7 @@ ds_status deserializeScore(ds_device* device, const unsigned char* serializedSco
/* Releases memory held by score */
ds_status
releaseScore
(
void
*
score
)
{
if
(
NULL
!=
score
)
if
(
nullptr
!=
score
)
{
delete
static_cast
<
LibreOfficeDeviceScore
*>
(
score
);
}
...
...
@@ -233,15 +233,15 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
cl_int
clStatus
;
/* Check for 64-bit float extensions */
size_t
aDevExtInfoSize
=
0
;
clStatus
=
clGetDeviceInfo
(
device
->
oclDeviceID
,
CL_DEVICE_EXTENSIONS
,
0
,
NULL
,
&
aDevExtInfoSize
);
clStatus
=
clGetDeviceInfo
(
device
->
oclDeviceID
,
CL_DEVICE_EXTENSIONS
,
0
,
nullptr
,
&
aDevExtInfoSize
);
DS_CHECK_STATUS
(
clStatus
,
"evaluateScoreForDevice::clGetDeviceInfo"
);
char
*
aExtInfo
=
new
char
[
aDevExtInfoSize
];
clStatus
=
clGetDeviceInfo
(
device
->
oclDeviceID
,
CL_DEVICE_EXTENSIONS
,
sizeof
(
char
)
*
aDevExtInfoSize
,
aExtInfo
,
NULL
);
clStatus
=
clGetDeviceInfo
(
device
->
oclDeviceID
,
CL_DEVICE_EXTENSIONS
,
sizeof
(
char
)
*
aDevExtInfoSize
,
aExtInfo
,
nullptr
);
DS_CHECK_STATUS
(
clStatus
,
"evaluateScoreForDevice::clGetDeviceInfo"
);
bool
bKhrFp64Flag
=
false
;
bool
bAmdFp64Flag
=
false
;
const
char
*
buildOption
=
NULL
;
const
char
*
buildOption
=
nullptr
;
std
::
string
tmpStr
(
"-Dfp_t=double -Dfp_t4=double4 -Dfp_t16=double16 -DINPUTSIZE="
);
std
::
ostringstream
tmpOStrStr
;
tmpOStrStr
<<
std
::
dec
<<
INPUTSIZE
;
...
...
@@ -278,7 +278,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
/* 64-bit float support present */
/* Create context and command queue */
cl_context
clContext
=
clCreateContext
(
NULL
,
1
,
&
device
->
oclDeviceID
,
NULL
,
NULL
,
&
clStatus
);
cl_context
clContext
=
clCreateContext
(
nullptr
,
1
,
&
device
->
oclDeviceID
,
nullptr
,
nullptr
,
&
clStatus
);
DS_CHECK_STATUS
(
clStatus
,
"evaluateScoreForDevice::clCreateContext"
);
cl_command_queue
clQueue
=
clCreateCommandQueue
(
clContext
,
device
->
oclDeviceID
,
0
,
&
clStatus
);
DS_CHECK_STATUS
(
clStatus
,
"evaluateScoreForDevice::clCreateCommandQueue"
);
...
...
@@ -286,14 +286,14 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
/* Build program */
cl_program
clProgram
=
clCreateProgramWithSource
(
clContext
,
1
,
&
source
,
sourceSize
,
&
clStatus
);
DS_CHECK_STATUS
(
clStatus
,
"evaluateScoreForDevice::clCreateProgramWithSource"
);
clStatus
=
clBuildProgram
(
clProgram
,
1
,
&
device
->
oclDeviceID
,
buildOption
,
NULL
,
NULL
);
clStatus
=
clBuildProgram
(
clProgram
,
1
,
&
device
->
oclDeviceID
,
buildOption
,
nullptr
,
nullptr
);
DS_CHECK_STATUS
(
clStatus
,
"evaluateScoreForDevice::clBuildProgram"
);
if
(
CL_SUCCESS
!=
clStatus
)
{
/* Build program failed */
size_t
length
;
char
*
buildLog
;
clStatus
=
clGetProgramBuildInfo
(
clProgram
,
device
->
oclDeviceID
,
CL_PROGRAM_BUILD_LOG
,
0
,
NULL
,
&
length
);
clStatus
=
clGetProgramBuildInfo
(
clProgram
,
device
->
oclDeviceID
,
CL_PROGRAM_BUILD_LOG
,
0
,
nullptr
,
&
length
);
buildLog
=
static_cast
<
char
*>
(
malloc
(
length
));
clGetProgramBuildInfo
(
clProgram
,
device
->
oclDeviceID
,
CL_PROGRAM_BUILD_LOG
,
length
,
buildLog
,
&
length
);
SAL_INFO
(
"opencl.device"
,
"Build Errors:
\n
"
<<
buildLog
);
...
...
@@ -335,7 +335,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
DS_CHECK_STATUS
(
clStatus
,
"evaluateScoreForDevice::clSetKernelArg::clInput3"
);
size_t
globalWS
[
1
]
=
{
testData
->
outputSize
};
size_t
localSize
[
1
]
=
{
64
};
clStatus
=
clEnqueueNDRangeKernel
(
clQueue
,
clKernel
,
1
,
0
,
globalWS
,
localSize
,
0
,
NULL
,
NULL
);
clStatus
=
clEnqueueNDRangeKernel
(
clQueue
,
clKernel
,
1
,
nullptr
,
globalWS
,
localSize
,
0
,
nullptr
,
nullptr
);
DS_CHECK_STATUS
(
clStatus
,
"evaluateScoreForDevice::clEnqueueNDRangeKernel"
);
clFinish
(
clQueue
);
clReleaseMemObject
(
clInput3
);
...
...
@@ -485,7 +485,7 @@ ds_device getDeviceSelection(const char* sProfilePath, bool bForceSelection)
if
(
!
bIsDeviceSelected
||
bForceSelection
)
{
/* Setup */
ds_profile
*
profile
=
NULL
;
ds_profile
*
profile
=
nullptr
;
initDSProfile
(
&
profile
,
"LibreOffice v0.1"
);
if
(
!
profile
)
...
...
@@ -559,7 +559,7 @@ ds_device getDeviceSelection(const char* sProfilePath, bool bForceSelection)
/* Override if necessary */
char
*
overrideDeviceStr
=
getenv
(
"SC_OPENCL_DEVICE_OVERRIDE"
);
if
(
NULL
!=
overrideDeviceStr
)
if
(
nullptr
!=
overrideDeviceStr
)
{
int
overrideDeviceIdx
=
matchDevice
(
profile
,
overrideDeviceStr
);
if
(
-
1
!=
overrideDeviceIdx
)
...
...
opencl/source/openclwrapper.cxx
Dosyayı görüntüle @
72d94418
This diff is collapsed.
Click to expand it.
opencl/source/platforminfo.cxx
Dosyayı görüntüle @
72d94418
...
...
@@ -12,7 +12,7 @@
#include <opencl/platforminfo.hxx>
OpenCLDeviceInfo
::
OpenCLDeviceInfo
()
:
device
(
0
)
:
device
(
nullptr
)
,
mnMemory
(
0
)
,
mnComputeUnits
(
0
)
,
mnFrequency
(
0
)
...
...
@@ -20,7 +20,7 @@ OpenCLDeviceInfo::OpenCLDeviceInfo()
}
OpenCLPlatformInfo
::
OpenCLPlatformInfo
()
:
platform
(
NULL
)
:
platform
(
nullptr
)
{
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment