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
bc3669bf
Commit
bc3669bf
authored
Oct 08, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Oct 08, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1576 from alalek:ocl_fix_cl_double
parents
895308a8
1d6327ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
imgproc.cpp
modules/ocl/src/imgproc.cpp
+1
-1
svm.cpp
modules/ocl/src/svm.cpp
+6
-6
No files found.
modules/ocl/src/imgproc.cpp
View file @
bc3669bf
...
...
@@ -1301,7 +1301,7 @@ namespace cv
if
(
src
.
depth
()
!=
CV_8U
||
src
.
oclchannels
()
!=
4
)
CV_Error
(
CV_StsUnsupportedFormat
,
"Only 8-bit, 4-channel images are supported"
);
// if(!src.clCxt->supportsFeature(
Context::
CL_DOUBLE))
// if(!src.clCxt->supportsFeature(
FEATURE_
CL_DOUBLE))
// {
// CV_Error( CV_GpuNotSupported, "Selected device doesn't support double, so a deviation exists.\nIf the accuracy is acceptable, the error can be ignored.\n");
// }
...
...
modules/ocl/src/svm.cpp
View file @
bc3669bf
...
...
@@ -472,7 +472,7 @@ static void matmul_sigmod(oclMat & src, oclMat & src2, oclMat & dst, int src_row
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
width
));
float
alpha
=
0.0
f
,
beta
=
0.0
f
;
if
(
!
Context
::
getContext
()
->
supportsFeature
(
Context
::
CL_DOUBLE
))
if
(
!
Context
::
getContext
()
->
supportsFeature
(
FEATURE_
CL_DOUBLE
))
{
alpha
=
(
float
)
alpha1
;
beta
=
(
float
)
beta1
;
...
...
@@ -517,7 +517,7 @@ static void matmul_poly(oclMat & src, oclMat & src2, oclMat & dst, int src_rows,
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
width
));
float
alpha
=
0.0
f
,
beta
=
0.0
f
,
degree
=
0.0
f
;
if
(
!
Context
::
getContext
()
->
supportsFeature
(
Context
::
CL_DOUBLE
))
if
(
!
Context
::
getContext
()
->
supportsFeature
(
FEATURE_
CL_DOUBLE
))
{
alpha
=
(
float
)
alpha1
;
beta
=
(
float
)
beta1
;
...
...
@@ -559,7 +559,7 @@ static void matmul_linear(oclMat & src, oclMat & src2, oclMat & dst, int src_row
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
width
));
float
alpha
=
0.0
f
,
beta
=
0.0
f
;
if
(
!
Context
::
getContext
()
->
supportsFeature
(
Context
::
CL_DOUBLE
))
if
(
!
Context
::
getContext
()
->
supportsFeature
(
FEATURE_
CL_DOUBLE
))
{
alpha
=
(
float
)
alpha1
;
beta
=
(
float
)
beta1
;
...
...
@@ -708,7 +708,7 @@ float CvSVM_OCL::predict(const CvMat* samples, CV_OUT CvMat* results) const
#else
if
(
!
Context
::
getContext
()
->
supportsFeature
(
Context
::
CL_DOUBLE
))
if
(
!
Context
::
getContext
()
->
supportsFeature
(
FEATURE_
CL_DOUBLE
))
{
dst
=
oclMat
(
sample_count
,
sv_total
,
CV_32FC1
);
}
...
...
@@ -845,7 +845,7 @@ bool CvSVMSolver_ocl::solve_generic( CvSVMSolutionInfo& si )
}
#else
if
(
!
Context
::
getContext
()
->
supportsFeature
(
Context
::
CL_DOUBLE
))
if
(
!
Context
::
getContext
()
->
supportsFeature
(
FEATURE_
CL_DOUBLE
))
{
dst
=
oclMat
(
sample_count
,
sample_count
,
CV_32FC1
);
}
...
...
@@ -1093,7 +1093,7 @@ void CvSVMKernel_ocl::calc_non_rbf_base( int vcount, const int row_idx, Qfloat*
results
[
i
]
=
(
Qfloat
)
*
src
.
ptr
<
float
>
(
row_idx
,
i
);
}
#else
if
(
!
Context
::
getContext
()
->
supportsFeature
(
Context
::
CL_DOUBLE
))
if
(
!
Context
::
getContext
()
->
supportsFeature
(
FEATURE_
CL_DOUBLE
))
{
for
(
int
i
=
0
;
i
<
vcount
;
i
++
)
{
...
...
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