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
5a4efe8b
Commit
5a4efe8b
authored
May 30, 2013
by
Vadim Pisarevsky
Committed by
OpenCV Buildbot
May 30, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #924 from pengx17:2.4_arithm_fix
parents
678371be
1d0c2835
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
arithm.cpp
modules/ocl/src/arithm.cpp
+4
-3
imgproc.cpp
modules/ocl/src/imgproc.cpp
+3
-5
No files found.
modules/ocl/src/arithm.cpp
View file @
5a4efe8b
...
...
@@ -413,11 +413,11 @@ static void arithmetic_scalar_run(const oclMat &src, oclMat &dst, string kernelN
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
cols
));
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
dst_step1
));
float
f_scalar
=
(
float
)
scalar
;
if
(
src
.
clCxt
->
supportsFeature
(
Context
::
CL_DOUBLE
))
args
.
push_back
(
make_pair
(
sizeof
(
cl_double
),
(
void
*
)
&
scalar
));
else
{
float
f_scalar
=
(
float
)
scalar
;
args
.
push_back
(
make_pair
(
sizeof
(
cl_float
),
(
void
*
)
&
f_scalar
));
}
...
...
@@ -1697,10 +1697,11 @@ void bitwise_run(const oclMat &src1, const oclMat &src2, oclMat &dst, string ker
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
cols
));
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
dst_step1
));
T
scalar
;
if
(
_scalar
!=
NULL
)
{
double
scalar1
=
*
((
double
*
)
_scalar
);
T
scalar
=
(
T
)
scalar1
;
scalar
=
(
T
)
scalar1
;
args
.
push_back
(
make_pair
(
sizeof
(
T
),
(
void
*
)
&
scalar
));
}
...
...
@@ -2317,9 +2318,9 @@ static void arithmetic_pow_run(const oclMat &src1, double p, oclMat &dst, string
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
dst
.
rows
));
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
cols
));
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
dst_step1
));
float
pf
=
p
;
if
(
!
src1
.
clCxt
->
supportsFeature
(
Context
::
CL_DOUBLE
))
{
float
pf
=
p
;
args
.
push_back
(
make_pair
(
sizeof
(
cl_float
),
(
void
*
)
&
pf
));
}
else
...
...
modules/ocl/src/imgproc.cpp
View file @
5a4efe8b
...
...
@@ -269,7 +269,7 @@ namespace cv
size_t
globalThreads
[
3
]
=
{
glbSizeX
,
glbSizeY
,
1
};
size_t
localThreads
[
3
]
=
{
blkSizeX
,
blkSizeY
,
1
};
float
borderFloat
[
4
]
=
{(
float
)
borderValue
[
0
],
(
float
)
borderValue
[
1
],
(
float
)
borderValue
[
2
],
(
float
)
borderValue
[
3
]};
vector
<
pair
<
size_t
,
const
void
*>
>
args
;
if
(
map1
.
channels
()
==
2
)
{
...
...
@@ -289,9 +289,8 @@ namespace cv
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
map1
.
cols
));
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
map1
.
rows
));
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
),
(
void
*
)
&
cols
));
float
borderFloat
[
4
]
=
{(
float
)
borderValue
[
0
],
(
float
)
borderValue
[
1
],
(
float
)
borderValue
[
2
],
(
float
)
borderValue
[
3
]};
if
(
src
.
clCxt
->
supportsFeature
(
Context
::
CL_DOUBLE
))
if
(
src
.
clCxt
->
supportsFeature
(
Context
::
CL_DOUBLE
))
{
args
.
push_back
(
make_pair
(
sizeof
(
cl_double4
),
(
void
*
)
&
borderValue
));
}
...
...
@@ -325,7 +324,6 @@ namespace cv
}
else
{
float
borderFloat
[
4
]
=
{(
float
)
borderValue
[
0
],
(
float
)
borderValue
[
1
],
(
float
)
borderValue
[
2
],
(
float
)
borderValue
[
3
]};
args
.
push_back
(
make_pair
(
sizeof
(
cl_float4
),
(
void
*
)
&
borderFloat
));
}
}
...
...
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