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
92f10ad9
Kaydet (Commit)
92f10ad9
authored
Nis 22, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Various loplugin warnings in opencl/
Change-Id: Ia6254777bc7972e2272dba542e315a8d3bd0fdf0
üst
334e2dc9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
opencl_device.hxx
opencl/inc/opencl_device.hxx
+1
-1
opencl_device_selection.h
opencl/inc/opencl_device_selection.h
+2
-2
opencl_device.cxx
opencl/source/opencl_device.cxx
+7
-9
No files found.
opencl/inc/opencl_device.hxx
Dosyayı görüntüle @
92f10ad9
...
...
@@ -14,7 +14,7 @@
namespace
opencl
{
ds_device
getDeviceSelection
(
OUString
pFileName
,
bool
bForceSelection
=
false
);
ds_device
getDeviceSelection
(
OUString
const
&
pFileName
,
bool
bForceSelection
=
false
);
}
...
...
opencl/inc/opencl_device_selection.h
Dosyayı görüntüle @
92f10ad9
...
...
@@ -402,7 +402,7 @@ inline ds_status writeProfile(const OUString& rStreamName, std::unique_ptr<ds_pr
XmlWriter
aXmlWriter
(
pStream
.
get
());
if
(
aXmlWriter
.
startDocument
()
==
false
)
if
(
!
aXmlWriter
.
startDocument
()
)
return
DS_FILE_ERROR
;
aXmlWriter
.
startElement
(
"profile"
);
...
...
@@ -440,7 +440,7 @@ inline ds_status writeProfile(const OUString& rStreamName, std::unique_ptr<ds_pr
}
aXmlWriter
.
startElement
(
"time"
);
if
(
r
Device
.
fTime
==
DBL_MAX
)
if
(
r
tl
::
math
::
approxEqual
(
rDevice
.
fTime
,
DBL_MAX
)
)
aXmlWriter
.
content
(
"max"
);
else
aXmlWriter
.
content
(
OString
::
number
(
rDevice
.
fTime
));
...
...
opencl/source/opencl_device.cxx
Dosyayı görüntüle @
92f10ad9
...
...
@@ -381,7 +381,8 @@ ds_status pickBestDevice(std::unique_ptr<ds_profile>& profile, int& rBestDeviceI
rBestDeviceIndex
=
-
1
;
for
(
unsigned
int
d
=
0
;
d
<
profile
->
devices
.
size
();
d
++
)
for
(
std
::
vector
<
ds_device
>::
size_type
d
=
0
;
d
<
profile
->
devices
.
size
();
d
++
)
{
ds_device
&
device
=
profile
->
devices
[
d
];
...
...
@@ -410,7 +411,8 @@ ds_status pickBestDevice(std::unique_ptr<ds_profile>& profile, int& rBestDeviceI
}
double
fScore
=
DBL_MAX
;
if
(
device
.
fTime
>=
0.0
||
device
.
fTime
==
DBL_MAX
)
if
(
device
.
fTime
>=
0.0
||
rtl
::
math
::
approxEqual
(
device
.
fTime
,
DBL_MAX
))
{
fScore
=
device
.
fTime
;
}
...
...
@@ -481,11 +483,6 @@ public:
maStream
.
WriteChar
(
'\n'
);
}
void
log
(
const
OString
&
rKey
,
const
OUString
&
rValue
)
{
log
(
rKey
,
OUStringToOString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
}
void
log
(
const
OString
&
rKey
,
int
rValue
)
{
log
(
rKey
,
OString
::
number
(
rValue
));
...
...
@@ -536,7 +533,8 @@ void writeDevicesLog(std::unique_ptr<ds_profile>& rProfile, OUString sProfilePat
}
// end anonymous namespace
ds_device
getDeviceSelection
(
OUString
sProfilePath
,
bool
bForceSelection
)
ds_device
getDeviceSelection
(
OUString
const
&
sProfilePath
,
bool
bForceSelection
)
{
/* Run only if device is not yet selected */
if
(
!
bIsDeviceSelected
||
bForceSelection
)
...
...
@@ -554,7 +552,7 @@ ds_device getDeviceSelection(OUString sProfilePath, bool bForceSelection)
}
/* Try reading scores from file */
OUString
sFilePath
=
sProfilePath
+
OUString
(
"opencl_profile.xml"
)
;
OUString
sFilePath
=
sProfilePath
+
"opencl_profile.xml"
;
if
(
!
bForceSelection
)
{
...
...
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