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
2a0b39d3
Commit
2a0b39d3
authored
Aug 05, 2014
by
Alexander Karsakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed calculate_histogram kernel
parent
eb9fdb01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
histogram.cl
modules/imgproc/src/opencl/histogram.cl
+3
-2
No files found.
modules/imgproc/src/opencl/histogram.cl
View file @
2a0b39d3
...
...
@@ -47,7 +47,7 @@
#
define
noconvert
__kernel
void
calculate_histogram
(
__global
const
uchar
*
src,
int
src_step,
int
src_offset,
int
src_rows,
int
src_cols,
__kernel
void
calculate_histogram
(
__global
const
uchar
*
src
_ptr
,
int
src_step,
int
src_offset,
int
src_rows,
int
src_cols,
__global
uchar
*
histptr,
int
total
)
{
int
lid
=
get_local_id
(
0
)
;
...
...
@@ -61,6 +61,7 @@ __kernel void calculate_histogram(__global const uchar * src, int src_step, int
localhist[i]
=
0
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
__global
const
uchar
*
src
=
src_ptr
+
src_offset
;
int
src_index
;
for
(
int
grain
=
HISTS_COUNT
*
WGS
*
kercn
; id < total; id += grain)
...
...
@@ -68,7 +69,7 @@ __kernel void calculate_histogram(__global const uchar * src, int src_step, int
#
ifdef
HAVE_SRC_CONT
src_index
=
id
;
#
else
src_index
=
mad24
(
id
/
src_cols,
src_step,
src_offset
+
id
%
src_cols
)
;
src_index
=
mad24
(
id
/
src_cols,
src_step,
id
%
src_cols
)
;
#
endif
#
if
kercn
==
1
...
...
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