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
445299be
Kaydet (Commit)
445299be
authored
Kas 30, 2013
tarafından
haochen
Kaydeden (comit)
Michael Meeks
Ara 10, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
GPU Calc: cache more once compiled program in memory
Change-Id: Iab34567806e069d819c86b52f93d88355272416f
üst
e446b4a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
formulagroupcl.cxx
sc/source/core/opencl/formulagroupcl.cxx
+18
-10
No files found.
sc/source/core/opencl/formulagroupcl.cxx
Dosyayı görüntüle @
445299be
...
...
@@ -2675,21 +2675,27 @@ void DynamicKernel::CreateKernel(void)
KernelEnv
kEnv
;
OpenclDevice
::
setKernelEnv
(
&
kEnv
);
const
char
*
src
=
mFullProgramSrc
.
c_str
();
static
std
::
string
lastKernelHash
=
""
;
static
cl_program
lastProgram
=
NULL
;
static
std
::
string
lastOneKernelHash
=
""
;
static
std
::
string
lastSecondKernelHash
=
""
;
static
cl_program
lastOneProgram
=
NULL
;
static
cl_program
lastSecondProgram
=
NULL
;
std
::
string
KernelHash
=
mKernelSignature
+
GetMD5
();
if
(
last
KernelHash
==
KernelHash
&&
last
Program
)
if
(
last
OneKernelHash
==
KernelHash
&&
lastOne
Program
)
{
std
::
cerr
<<
"cl_program cache hit: "
<<
KernelHash
<<
"
\n
"
;
mpProgram
=
lastProgram
;
mpProgram
=
lastOneProgram
;
}
else
if
(
lastSecondKernelHash
==
KernelHash
&&
lastSecondProgram
)
{
std
::
cerr
<<
"cl_program cache hit: "
<<
KernelHash
<<
"
\n
"
;
mpProgram
=
lastSecondProgram
;
}
else
{
// doesn't match the last compiled formula.
if
(
lastProgram
)
{
std
::
cerr
<<
"Freeing last program: "
<<
GetMD5
()
<<
"
\n
"
;
clReleaseProgram
(
lastProgram
);
lastProgram
=
NULL
;
if
(
lastSecondProgram
)
{
std
::
cerr
<<
"Freeing lastsecond program: "
<<
GetMD5
()
<<
"
\n
"
;
clReleaseProgram
(
lastSecondProgram
);
}
if
(
OpenclDevice
::
buildProgramFromBinary
(
""
,
&
OpenclDevice
::
gpuEnv
,
KernelHash
.
c_str
(),
0
))
{
...
...
@@ -2754,8 +2760,10 @@ void DynamicKernel::CreateKernel(void)
OpenclDevice
::
generatBinFromKernelSource
(
mpProgram
,
(
mKernelSignature
+
GetMD5
()).
c_str
());
}
lastKernelHash
=
KernelHash
;
lastProgram
=
mpProgram
;
lastSecondKernelHash
=
lastOneKernelHash
;
lastSecondProgram
=
lastOneProgram
;
lastOneKernelHash
=
KernelHash
;
lastOneProgram
=
mpProgram
;
}
mpKernel
=
clCreateKernel
(
mpProgram
,
kname
.
c_str
(),
&
err
);
if
(
err
!=
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