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
75c4091b
Kaydet (Commit)
75c4091b
authored
Eki 03, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Inlining make no sense for virtual functions.
Change-Id: I6392eaceb0544b7faa9a0c726acf6619d971dbb7
üst
165eef49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
30 deletions
+93
-30
opbase.cxx
sc/source/core/opencl/opbase.cxx
+69
-0
opbase.hxx
sc/source/core/opencl/opbase.hxx
+24
-30
No files found.
sc/source/core/opencl/opbase.cxx
Dosyayı görüntüle @
75c4091b
...
...
@@ -88,17 +88,62 @@ DynamicKernelArgument::DynamicKernelArgument( const std::string& s,
FormulaTreeNodeRef
ft
)
:
mSymName
(
s
),
mFormulaTree
(
ft
)
{
}
std
::
string
DynamicKernelArgument
::
GenDoubleSlidingWindowDeclRef
(
bool
)
const
{
return
std
::
string
(
""
);
}
/// When Mix, it will be called
std
::
string
DynamicKernelArgument
::
GenStringSlidingWindowDeclRef
(
bool
)
const
{
return
std
::
string
(
""
);
}
bool
DynamicKernelArgument
::
IsMixedArgument
()
const
{
return
false
;
}
/// Generate use/references to the argument
void
DynamicKernelArgument
::
GenDeclRef
(
std
::
stringstream
&
ss
)
const
{
ss
<<
mSymName
;
}
void
DynamicKernelArgument
::
GenNumDeclRef
(
std
::
stringstream
&
ss
)
const
{
ss
<<
","
;
}
void
DynamicKernelArgument
::
GenStringDeclRef
(
std
::
stringstream
&
ss
)
const
{
ss
<<
","
;
}
void
DynamicKernelArgument
::
GenSlidingWindowFunction
(
std
::
stringstream
&
)
{}
FormulaToken
*
DynamicKernelArgument
::
GetFormulaToken
()
const
{
return
mFormulaTree
->
GetFormulaToken
();
}
std
::
string
DynamicKernelArgument
::
DumpOpName
()
const
{
return
std
::
string
(
""
);
}
void
DynamicKernelArgument
::
DumpInlineFun
(
std
::
set
<
std
::
string
>&
,
std
::
set
<
std
::
string
>&
)
const
{}
const
std
::
string
&
DynamicKernelArgument
::
GetName
()
const
{
return
mSymName
;
}
bool
DynamicKernelArgument
::
NeedParallelReduction
()
const
{
return
false
;
}
VectorRef
::
VectorRef
(
const
std
::
string
&
s
,
FormulaTreeNodeRef
ft
,
int
idx
)
:
DynamicKernelArgument
(
s
,
ft
),
mpClmem
(
NULL
),
mnIndex
(
idx
)
{
...
...
@@ -144,6 +189,8 @@ std::string VectorRef::GenSlidingWindowDeclRef( bool nested ) const
return
ss
.
str
();
}
void
VectorRef
::
GenSlidingWindowFunction
(
std
::
stringstream
&
)
{}
size_t
VectorRef
::
GetWindowSize
()
const
{
FormulaToken
*
pCur
=
mFormulaTree
->
GetFormulaToken
();
...
...
@@ -164,6 +211,28 @@ size_t VectorRef::GetWindowSize() const
}
}
std
::
string
VectorRef
::
DumpOpName
()
const
{
return
std
::
string
(
""
);
}
void
VectorRef
::
DumpInlineFun
(
std
::
set
<
std
::
string
>&
,
std
::
set
<
std
::
string
>&
)
const
{}
const
std
::
string
&
VectorRef
::
GetName
()
const
{
return
mSymName
;
}
cl_mem
VectorRef
::
GetCLBuffer
()
const
{
return
mpClmem
;
}
bool
VectorRef
::
NeedParallelReduction
()
const
{
return
false
;
}
void
Normal
::
GenSlidingWindowFunction
(
std
::
stringstream
&
ss
,
const
std
::
string
&
sSymName
,
SubArguments
&
vSubArguments
)
{
...
...
sc/source/core/opencl/opbase.hxx
Dosyayı görüntüle @
75c4091b
...
...
@@ -87,6 +87,7 @@ class DynamicKernelArgument : boost::noncopyable
{
public
:
DynamicKernelArgument
(
const
std
::
string
&
s
,
FormulaTreeNodeRef
ft
);
virtual
~
DynamicKernelArgument
()
{}
/// Generate declaration
virtual
void
GenDecl
(
std
::
stringstream
&
ss
)
const
=
0
;
...
...
@@ -97,36 +98,31 @@ public:
/// When referenced in a sliding window function
virtual
std
::
string
GenSlidingWindowDeclRef
(
bool
=
false
)
const
=
0
;
/// Create buffer and pass the buffer to a given kernel
virtual
size_t
Marshal
(
cl_kernel
,
int
,
int
,
cl_program
)
=
0
;
virtual
size_t
GetWindowSize
()
const
=
0
;
/// When Mix, it will be called
virtual
std
::
string
GenDoubleSlidingWindowDeclRef
(
bool
=
false
)
const
{
return
std
::
string
(
""
);
}
virtual
std
::
string
GenDoubleSlidingWindowDeclRef
(
bool
=
false
)
const
;
/// When Mix, it will be called
virtual
std
::
string
GenStringSlidingWindowDeclRef
(
bool
=
false
)
const
{
return
std
::
string
(
""
);
}
virtual
std
::
string
GenStringSlidingWindowDeclRef
(
bool
=
false
)
const
;
virtual
bool
IsMixedArgument
()
const
{
return
false
;
}
virtual
bool
IsMixedArgument
()
const
;
/// Generate use/references to the argument
virtual
void
GenDeclRef
(
std
::
stringstream
&
ss
)
const
;
virtual
void
GenNumDeclRef
(
std
::
stringstream
&
ss
)
const
{
ss
<<
","
;}
virtual
void
GenNumDeclRef
(
std
::
stringstream
&
ss
)
const
;
virtual
void
GenStringDeclRef
(
std
::
stringstream
&
ss
)
const
{
ss
<<
","
;}
virtual
void
GenStringDeclRef
(
std
::
stringstream
&
ss
)
const
;
/// Create buffer and pass the buffer to a given kernel
virtual
size_t
Marshal
(
cl_kernel
,
int
,
int
,
cl_program
)
=
0
;
virtual
~
DynamicKernelArgument
()
{
}
virtual
void
GenSlidingWindowFunction
(
std
::
stringstream
&
)
{
}
virtual
void
GenSlidingWindowFunction
(
std
::
stringstream
&
);
formula
::
FormulaToken
*
GetFormulaToken
()
const
;
virtual
size_t
GetWindowSize
()
const
=
0
;
virtual
std
::
string
DumpOpName
()
const
{
return
std
::
string
(
""
);
}
virtual
void
DumpInlineFun
(
std
::
set
<
std
::
string
>&
,
std
::
set
<
std
::
string
>&
)
const
{
}
const
std
::
string
&
GetName
()
const
{
return
mSymName
;
}
virtual
bool
NeedParallelReduction
()
const
{
return
false
;
}
virtual
std
::
string
DumpOpName
()
const
;
virtual
void
DumpInlineFun
(
std
::
set
<
std
::
string
>&
,
std
::
set
<
std
::
string
>&
)
const
;
const
std
::
string
&
GetName
()
const
;
virtual
bool
NeedParallelReduction
()
const
;
protected
:
std
::
string
mSymName
;
...
...
@@ -142,6 +138,7 @@ class VectorRef : public DynamicKernelArgument
{
public
:
VectorRef
(
const
std
::
string
&
s
,
FormulaTreeNodeRef
ft
,
int
index
=
0
);
virtual
~
VectorRef
();
/// Generate declaration
virtual
void
GenDecl
(
std
::
stringstream
&
ss
)
const
SAL_OVERRIDE
;
...
...
@@ -154,16 +151,13 @@ public:
/// Create buffer and pass the buffer to a given kernel
virtual
size_t
Marshal
(
cl_kernel
,
int
,
int
,
cl_program
)
SAL_OVERRIDE
;
virtual
~
VectorRef
();
virtual
void
GenSlidingWindowFunction
(
std
::
stringstream
&
)
SAL_OVERRIDE
{
}
virtual
void
GenSlidingWindowFunction
(
std
::
stringstream
&
)
SAL_OVERRIDE
;
virtual
size_t
GetWindowSize
()
const
SAL_OVERRIDE
;
virtual
std
::
string
DumpOpName
()
const
SAL_OVERRIDE
{
return
std
::
string
(
""
);
}
virtual
void
DumpInlineFun
(
std
::
set
<
std
::
string
>&
,
std
::
set
<
std
::
string
>&
)
const
SAL_OVERRIDE
{
}
const
std
::
string
&
GetName
()
const
{
return
mSymName
;
}
virtual
cl_mem
GetCLBuffer
()
const
{
return
mpClmem
;
}
virtual
bool
NeedParallelReduction
()
const
SAL_OVERRIDE
{
return
false
;
}
virtual
std
::
string
DumpOpName
()
const
SAL_OVERRIDE
;
virtual
void
DumpInlineFun
(
std
::
set
<
std
::
string
>&
,
std
::
set
<
std
::
string
>&
)
const
SAL_OVERRIDE
;
const
std
::
string
&
GetName
()
const
;
virtual
cl_mem
GetCLBuffer
()
const
;
virtual
bool
NeedParallelReduction
()
const
SAL_OVERRIDE
;
protected
:
// Used by marshaling
...
...
@@ -200,7 +194,7 @@ public:
typedef
std
::
vector
<
SubArgument
>
SubArguments
;
virtual
void
GenSlidingWindowFunction
(
std
::
stringstream
&
,
const
std
::
string
&
,
SubArguments
&
)
=
0
;
virtual
~
SlidingFunctionBase
()
{
}
;
virtual
~
SlidingFunctionBase
()
{
}
};
class
Normal
:
public
SlidingFunctionBase
...
...
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