Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
422396ef
Commit
422396ef
authored
Sep 16, 2013
by
peng xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build error
parent
f69ccfa4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
svm.cpp
modules/ocl/src/svm.cpp
+9
-5
No files found.
modules/ocl/src/svm.cpp
View file @
422396ef
...
...
@@ -450,7 +450,8 @@ float* CvSVMSolver_ocl::get_row_base( int i, bool* _existed, Mat& src )
return
row
->
data
;
}
void
matmul_sigmod
(
oclMat
&
src
,
oclMat
&
src2
,
oclMat
&
dst
,
int
src_rows
,
int
src2_cols
,
int
var_count
,
double
alpha1
,
double
beta1
)
#ifndef HAVE_CLAMDBLAS
static
void
matmul_sigmod
(
oclMat
&
src
,
oclMat
&
src2
,
oclMat
&
dst
,
int
src_rows
,
int
src2_cols
,
int
var_count
,
double
alpha1
,
double
beta1
)
{
Context
*
clCxt
=
Context
::
getContext
();
string
kernelName
=
"svm_sigmod"
;
...
...
@@ -489,7 +490,7 @@ void matmul_sigmod(oclMat & src, oclMat & src2, oclMat & dst, int src_rows, int
}
openCLExecuteKernel
(
clCxt
,
&
svm
,
kernelName
,
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
);
}
void
matmul_poly
(
oclMat
&
src
,
oclMat
&
src2
,
oclMat
&
dst
,
int
src_rows
,
int
src2_cols
,
int
var_count
,
double
alpha1
,
double
beta1
,
double
degree1
,
bool
flag
)
static
void
matmul_poly
(
oclMat
&
src
,
oclMat
&
src2
,
oclMat
&
dst
,
int
src_rows
,
int
src2_cols
,
int
var_count
,
double
alpha1
,
double
beta1
,
double
degree1
,
bool
flag
)
{
Context
*
clCxt
=
Context
::
getContext
();
string
kernelName
=
"svm_poly"
;
...
...
@@ -537,7 +538,7 @@ void matmul_poly(oclMat & src, oclMat & src2, oclMat & dst, int src_rows, int sr
}
openCLExecuteKernel
(
clCxt
,
&
svm
,
kernelName
,
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
,
build_options
);
}
void
matmul_linear
(
oclMat
&
src
,
oclMat
&
src2
,
oclMat
&
dst
,
int
src_rows
,
int
src2_cols
,
int
var_count
,
double
alpha1
,
double
beta1
)
static
void
matmul_linear
(
oclMat
&
src
,
oclMat
&
src2
,
oclMat
&
dst
,
int
src_rows
,
int
src2_cols
,
int
var_count
,
double
alpha1
,
double
beta1
)
{
Context
*
clCxt
=
Context
::
getContext
();
string
kernelName
=
"svm_linear"
;
...
...
@@ -576,7 +577,9 @@ void matmul_linear(oclMat & src, oclMat & src2, oclMat & dst, int src_rows, int
}
openCLExecuteKernel
(
clCxt
,
&
svm
,
kernelName
,
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
);
}
void
matmul_rbf
(
oclMat
&
src
,
oclMat
&
src_e
,
oclMat
&
dst
,
int
src_rows
,
int
src2_cols
,
int
var_count
,
double
gamma1
,
bool
flag
)
#endif // #ifndef HAVE_CLAMDBLAS
static
void
matmul_rbf
(
oclMat
&
src
,
oclMat
&
src_e
,
oclMat
&
dst
,
int
src_rows
,
int
src2_cols
,
int
var_count
,
double
gamma1
,
bool
flag
)
{
Context
*
clCxt
=
Context
::
getContext
();
...
...
@@ -621,6 +624,7 @@ void matmul_rbf(oclMat& src, oclMat& src_e, oclMat& dst, int src_rows, int src2_
openCLExecuteKernel
(
clCxt
,
&
svm
,
kernelName
,
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
,
build_options
);
}
float
CvSVM_OCL
::
predict
(
const
CvMat
*
samples
,
CV_OUT
CvMat
*
results
)
const
{
int
var_count
=
get_var_count
();
...
...
@@ -1169,7 +1173,7 @@ void CvSVMKernel_ocl::calc_sigmoid( int vcount, const int row_idx, Qfloat* resul
}
CvSVM_OCL
::
CvSVM_OCL
()
{
CvSVM
::
CvSVM
();
CvSVM
();
}
CvSVM_OCL
::
CvSVM_OCL
(
const
Mat
&
_train_data
,
const
Mat
&
_responses
,
...
...
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