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
55947853
Kaydet (Commit)
55947853
authored
Kas 12, 2014
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Keep also the platform vendor in ds_device
Change-Id: Id195cf9d079b24108b1fb9abeb1f0bf1529d2f72
üst
372bef89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
opencl_device_selection.h
sc/source/core/opencl/opencl_device_selection.h
+7
-0
No files found.
sc/source/core/opencl/opencl_device_selection.h
Dosyayı görüntüle @
55947853
...
...
@@ -49,6 +49,7 @@ struct ds_device
{
ds_device_type
type
;
cl_device_id
oclDeviceID
;
char
*
oclPlatformVendor
;
char
*
oclDeviceName
;
char
*
oclDriverVersion
;
void
*
score
;
// a pointer to the score data, the content/format is application defined
...
...
@@ -73,6 +74,7 @@ inline ds_status releaseDSProfile(ds_profile* profile, ds_score_release sr)
unsigned
int
i
;
for
(
i
=
0
;
i
<
profile
->
numDevices
;
i
++
)
{
free
(
profile
->
devices
[
i
].
oclPlatformVendor
);
free
(
profile
->
devices
[
i
].
oclDeviceName
);
free
(
profile
->
devices
[
i
].
oclDriverVersion
);
status
=
sr
(
profile
->
devices
[
i
].
score
);
...
...
@@ -148,6 +150,9 @@ inline ds_status initDSProfile(ds_profile** p, const char* version)
{
cl_uint
num
;
unsigned
j
;
char
vendor
[
256
];
if
(
clGetPlatformInfo
(
platforms
[
i
],
CL_PLATFORM_VENDOR
,
sizeof
(
vendor
),
vendor
,
NULL
)
!=
CL_SUCCESS
)
vendor
[
0
]
=
'\0'
;
clGetDeviceIDs
(
platforms
[
i
],
CL_DEVICE_TYPE_ALL
,
numDevices
,
devices
,
&
num
);
for
(
j
=
0
;
j
<
num
;
j
++
,
next
++
)
{
...
...
@@ -157,6 +162,8 @@ inline ds_status initDSProfile(ds_profile** p, const char* version)
profile
->
devices
[
next
].
type
=
DS_DEVICE_OPENCL_DEVICE
;
profile
->
devices
[
next
].
oclDeviceID
=
devices
[
j
];
profile
->
devices
[
next
].
oclPlatformVendor
=
strdup
(
vendor
);
clGetDeviceInfo
(
profile
->
devices
[
next
].
oclDeviceID
,
CL_DEVICE_NAME
,
DS_DEVICE_NAME_LENGTH
,
&
buffer
,
NULL
);
length
=
strlen
(
buffer
);
...
...
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