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
9c8b9fc7
Commit
9c8b9fc7
authored
Jun 27, 2014
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cv::transpose
parent
cbd0511a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
matrix.cpp
modules/core/src/matrix.cpp
+2
-2
transpose.cl
modules/core/src/opencl/transpose.cl
+3
-1
No files found.
modules/core/src/matrix.cpp
View file @
9c8b9fc7
...
...
@@ -3002,8 +3002,8 @@ static bool ocl_transpose( InputArray _src, OutputArray _dst )
k
.
args
(
ocl
::
KernelArg
::
ReadOnly
(
src
),
ocl
::
KernelArg
::
WriteOnlyNoSize
(
dst
));
size_t
localsize
[
3
]
=
{
TILE_DIM
,
BLOCK_ROWS
,
1
};
size_t
globalsize
[
3
]
=
{
src
.
cols
,
inplace
?
src
.
rows
:
divUp
(
src
.
rows
,
TILE_DIM
)
*
BLOCK_ROWS
,
1
};
size_t
localsize
[
2
]
=
{
TILE_DIM
,
BLOCK_ROWS
};
size_t
globalsize
[
2
]
=
{
src
.
cols
,
inplace
?
src
.
rows
:
divUp
(
src
.
rows
,
TILE_DIM
)
*
BLOCK_ROWS
};
return
k
.
run
(
2
,
globalsize
,
localsize
,
false
);
}
...
...
modules/core/src/opencl/transpose.cl
View file @
9c8b9fc7
...
...
@@ -53,7 +53,7 @@
#
define
TSIZE
((
int
)
sizeof
(
T1
)
*3
)
#
endif
#
define
LDS_STEP
TILE_DIM
#
define
LDS_STEP
(
TILE_DIM
+
1
)
__kernel
void
transpose
(
__global
const
uchar
*
srcptr,
int
src_step,
int
src_offset,
int
src_rows,
int
src_cols,
__global
uchar
*
dstptr,
int
dst_step,
int
dst_offset
)
...
...
@@ -90,6 +90,7 @@ __kernel void transpose(__global const uchar * srcptr, int src_step, int src_off
{
int
index_src
=
mad24
(
y,
src_step,
mad24
(
x,
TSIZE,
src_offset
))
;
#
pragma
unroll
for
(
int
i
=
0
; i < TILE_DIM; i += BLOCK_ROWS)
if
(
y
+
i
<
src_rows
)
{
...
...
@@ -103,6 +104,7 @@ __kernel void transpose(__global const uchar * srcptr, int src_step, int src_off
{
int
index_dst
=
mad24
(
y_index,
dst_step,
mad24
(
x_index,
TSIZE,
dst_offset
))
;
#
pragma
unroll
for
(
int
i
=
0
; i < TILE_DIM; i += BLOCK_ROWS)
if
((
y_index
+
i
)
<
src_cols
)
{
...
...
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