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
edcfa64d
Commit
edcfa64d
authored
Aug 10, 2011
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
experimental kernels for cuda
parent
50d1d711
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
kernels.hpp
modules/gpu/src/opencv2/gpu/device/kernels.hpp
+16
-3
No files found.
modules/gpu/src/opencv2/gpu/device/kernels.hpp
View file @
edcfa64d
...
...
@@ -63,7 +63,7 @@ namespace cv
struct
Warp
{
static
__forceinline__
__device__
int
STRIDE
()
{
return
warpSize
;
static
__forceinline__
__device__
int
STRIDE
()
{
return
warpSize
}
;
static
__forceinline__
__device__
int
SHIFT
()
{
return
threadIdx
.
x
&
(
warpSize
-
1
);
}
};
...
...
@@ -77,8 +77,8 @@ namespace cv
out
[
idx
]
=
in
[
idx
];
}
template
<
class
Worker
,
typename
ForwardIterator
,
typename
ForwardIterato
r
>
__forceinline__
__device__
void
Copy
(
ForwardIterator
beg
,
ForwardIterato
r
end
,
OutIter
out
)
template
<
class
Worker
,
typename
InIter
,
typename
OutIte
r
>
__forceinline__
__device__
void
Copy
(
InIter
beg
,
InIte
r
end
,
OutIter
out
)
{
int
STRIDE
=
Worker
::
STRIDE
();
int
SHIFT
=
Worker
::
SHIFT
();
...
...
@@ -103,6 +103,19 @@ namespace cv
for
(;
idx
<
length
;
idx
+=
STRIDE
,
cur
+=
STRIDE
)
out
[
idx
]
=
cur
;
}
template
<
class
Worker
,
typename
OutIter
>
__forceinline__
__device__
void
Yota
(
OutIter
beg
,
OutIter
end
,
int
val
)
{
int
STRIDE
=
Worker
::
STRIDE
();
int
SHIFT
=
Worker
::
SHIFT
();
beg
+=
SHIFT
;
val
+=
SHIFT
;
for
(;
beg
<
end
;
beg
+=
STRIDE
,
val
+=
STRIDE
)
*
beg
=
val
;
}
}
}
}
...
...
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