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
c24eba06
Kaydet (Commit)
c24eba06
authored
Kas 20, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
C++ style struct / enum declarations without typedef.
Change-Id: Idf9e7ddaf4b28c00222470460478631c37c79a6b
üst
e3ece4b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
opencl_device.cxx
sc/source/core/opencl/opencl_device.cxx
+4
-4
opencl_device_selection.h
sc/source/core/opencl/opencl_device_selection.h
+12
-8
No files found.
sc/source/core/opencl/opencl_device.cxx
Dosyayı görüntüle @
c24eba06
...
...
@@ -42,11 +42,11 @@ bool bIsInited = false;
bool
bIsDeviceSelected
=
false
;
ds_device
selectedDevice
;
typedef
struct
LibreOfficeDeviceScore
struct
LibreOfficeDeviceScore
{
double
fTime
;
// small time means faster device
bool
bNoCLErrors
;
// were there any opencl errors
}
LibreOfficeDeviceScore
;
};
struct
LibreOfficeDeviceEvaluationIO
{
...
...
@@ -59,14 +59,14 @@ struct LibreOfficeDeviceEvaluationIO
unsigned
long
outputSize
;
};
typedef
struct
timer
struct
timer
{
#ifdef _WIN32
LARGE_INTEGER
start
,
stop
,
frequency
;
#else
long
long
start
,
stop
,
frequency
;
#endif
}
timer
;
};
const
char
*
source
=
STRINGIFY
(
\
n
#
if
defined
(
KHR_DP_EXTENSION
)
...
...
sc/source/core/opencl/opencl_device_selection.h
Dosyayı görüntüle @
c24eba06
...
...
@@ -22,7 +22,8 @@
#define DS_DEVICE_NAME_LENGTH 256
typedef
enum
{
enum
ds_status
{
DS_SUCCESS
=
0
,
DS_INVALID_PROFILE
=
1000
,
DS_MEMORY_ERROR
...
...
@@ -34,28 +35,31 @@ typedef enum {
,
DS_PROFILE_FILE_ERROR
,
DS_SCORE_SERIALIZER_ERROR
,
DS_SCORE_DESERIALIZER_ERROR
}
ds_status
;
};
// device type
typedef
enum
{
enum
ds_device_type
{
DS_DEVICE_NATIVE_CPU
=
0
,
DS_DEVICE_OPENCL_DEVICE
}
ds_device_type
;
};
typedef
struct
{
struct
ds_device
{
ds_device_type
type
;
cl_device_id
oclDeviceID
;
char
*
oclDeviceName
;
char
*
oclDriverVersion
;
void
*
score
;
// a pointer to the score data, the content/format is application defined
}
ds_device
;
};
typedef
struct
{
struct
ds_profile
{
unsigned
int
numDevices
;
ds_device
*
devices
;
const
char
*
version
;
}
ds_profile
;
};
// deallocate memory used by score
typedef
ds_status
(
*
ds_score_release
)(
void
*
score
);
...
...
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