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
de99aa16
Kaydet (Commit)
de99aa16
authored
Kas 12, 2014
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't use misleading 'm' prefix for non-member variables
Change-Id: I5b3042e4b5cc11445a8f704df686cebe56874b12
üst
ed107094
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
openclwrapper.cxx
sc/source/core/opencl/openclwrapper.cxx
+9
-9
No files found.
sc/source/core/opencl/openclwrapper.cxx
Dosyayı görüntüle @
de99aa16
...
@@ -136,16 +136,16 @@ std::vector<boost::shared_ptr<osl::File> > OpenCLDevice::binaryGenerated( const
...
@@ -136,16 +136,16 @@ std::vector<boost::shared_ptr<osl::File> > OpenCLDevice::binaryGenerated( const
return
aGeneratedFiles
;
return
aGeneratedFiles
;
// grab the handles to all of the devices in the context.
// grab the handles to all of the devices in the context.
boost
::
scoped_array
<
cl_device_id
>
m
pArryDevsID
(
new
cl_device_id
[
numDevices
]);
boost
::
scoped_array
<
cl_device_id
>
pArryDevsID
(
new
cl_device_id
[
numDevices
]);
clStatus
=
clGetContextInfo
(
context
,
CL_CONTEXT_DEVICES
,
clStatus
=
clGetContextInfo
(
context
,
CL_CONTEXT_DEVICES
,
sizeof
(
cl_device_id
)
*
numDevices
,
m
pArryDevsID
.
get
(),
NULL
);
sizeof
(
cl_device_id
)
*
numDevices
,
pArryDevsID
.
get
(),
NULL
);
if
(
clStatus
!=
CL_SUCCESS
)
if
(
clStatus
!=
CL_SUCCESS
)
return
aGeneratedFiles
;
return
aGeneratedFiles
;
for
(
size_t
i
=
0
;
i
<
numDevices
;
i
++
)
for
(
size_t
i
=
0
;
i
<
numDevices
;
i
++
)
{
{
if
(
m
pArryDevsID
[
i
]
!=
0
)
if
(
pArryDevsID
[
i
]
!=
0
)
{
{
OString
fileName
=
createFileName
(
gpuEnv
.
mpArryDevsID
[
i
],
clFileName
);
OString
fileName
=
createFileName
(
gpuEnv
.
mpArryDevsID
[
i
],
clFileName
);
osl
::
File
*
pNewFile
=
new
osl
::
File
(
rtl
::
OStringToOUString
(
fileName
,
RTL_TEXTENCODING_UTF8
));
osl
::
File
*
pNewFile
=
new
osl
::
File
(
rtl
::
OStringToOUString
(
fileName
,
RTL_TEXTENCODING_UTF8
));
...
@@ -191,10 +191,10 @@ bool OpenCLDevice::generatBinFromKernelSource( cl_program program, const char *
...
@@ -191,10 +191,10 @@ bool OpenCLDevice::generatBinFromKernelSource( cl_program program, const char *
sizeof
(
numDevices
),
&
numDevices
,
NULL
);
sizeof
(
numDevices
),
&
numDevices
,
NULL
);
CHECK_OPENCL
(
clStatus
,
"clGetProgramInfo"
);
CHECK_OPENCL
(
clStatus
,
"clGetProgramInfo"
);
std
::
vector
<
cl_device_id
>
m
pArryDevsID
(
numDevices
);
std
::
vector
<
cl_device_id
>
pArryDevsID
(
numDevices
);
/* grab the handles to all of the devices in the program. */
/* grab the handles to all of the devices in the program. */
clStatus
=
clGetProgramInfo
(
program
,
CL_PROGRAM_DEVICES
,
clStatus
=
clGetProgramInfo
(
program
,
CL_PROGRAM_DEVICES
,
sizeof
(
cl_device_id
)
*
numDevices
,
&
m
pArryDevsID
[
0
],
NULL
);
sizeof
(
cl_device_id
)
*
numDevices
,
&
pArryDevsID
[
0
],
NULL
);
CHECK_OPENCL
(
clStatus
,
"clGetProgramInfo"
);
CHECK_OPENCL
(
clStatus
,
"clGetProgramInfo"
);
/* figure out the sizes of each of the binaries. */
/* figure out the sizes of each of the binaries. */
...
@@ -229,7 +229,7 @@ bool OpenCLDevice::generatBinFromKernelSource( cl_program program, const char *
...
@@ -229,7 +229,7 @@ bool OpenCLDevice::generatBinFromKernelSource( cl_program program, const char *
if
(
binarySizes
[
i
]
!=
0
)
if
(
binarySizes
[
i
]
!=
0
)
{
{
OString
fileName
=
createFileName
(
m
pArryDevsID
[
i
],
clFileName
);
OString
fileName
=
createFileName
(
pArryDevsID
[
i
],
clFileName
);
if
(
!
writeBinaryToFile
(
fileName
,
if
(
!
writeBinaryToFile
(
fileName
,
binaries
[
i
],
binarySizes
[
i
]
)
)
binaries
[
i
],
binarySizes
[
i
]
)
)
SAL_INFO
(
"sc.opencl.file"
,
"Writing binary file '"
<<
fileName
<<
"': FAIL"
);
SAL_INFO
(
"sc.opencl.file"
,
"Writing binary file '"
<<
fileName
<<
"': FAIL"
);
...
@@ -388,9 +388,9 @@ bool OpenCLDevice::buildProgramFromBinary(const char* buildOption, GPUEnv* gpuIn
...
@@ -388,9 +388,9 @@ bool OpenCLDevice::buildProgramFromBinary(const char* buildOption, GPUEnv* gpuIn
}
}
// grab the handles to all of the devices in the context.
// grab the handles to all of the devices in the context.
boost
::
scoped_array
<
cl_device_id
>
m
pArryDevsID
(
new
cl_device_id
[
numDevices
]);
boost
::
scoped_array
<
cl_device_id
>
pArryDevsID
(
new
cl_device_id
[
numDevices
]);
clStatus
=
clGetContextInfo
(
gpuInfo
->
mpContext
,
CL_CONTEXT_DEVICES
,
clStatus
=
clGetContextInfo
(
gpuInfo
->
mpContext
,
CL_CONTEXT_DEVICES
,
sizeof
(
cl_device_id
)
*
numDevices
,
m
pArryDevsID
.
get
(),
NULL
);
sizeof
(
cl_device_id
)
*
numDevices
,
pArryDevsID
.
get
(),
NULL
);
if
(
clStatus
!=
CL_SUCCESS
)
if
(
clStatus
!=
CL_SUCCESS
)
{
{
...
@@ -404,7 +404,7 @@ bool OpenCLDevice::buildProgramFromBinary(const char* buildOption, GPUEnv* gpuIn
...
@@ -404,7 +404,7 @@ bool OpenCLDevice::buildProgramFromBinary(const char* buildOption, GPUEnv* gpuIn
cl_int
binary_status
;
cl_int
binary_status
;
gpuInfo
->
mpArryPrograms
[
idx
]
=
clCreateProgramWithBinary
(
gpuInfo
->
mpContext
,
numDevices
,
gpuInfo
->
mpArryPrograms
[
idx
]
=
clCreateProgramWithBinary
(
gpuInfo
->
mpContext
,
numDevices
,
m
pArryDevsID
.
get
(),
length
.
get
(),
(
const
unsigned
char
**
)
pBinary
.
get
(),
pArryDevsID
.
get
(),
length
.
get
(),
(
const
unsigned
char
**
)
pBinary
.
get
(),
&
binary_status
,
&
clStatus
);
&
binary_status
,
&
clStatus
);
if
(
clStatus
!=
CL_SUCCESS
)
if
(
clStatus
!=
CL_SUCCESS
)
{
{
...
...
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