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
0656f131
Commit
0656f131
authored
Dec 13, 2012
by
Suenghoon Park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed useless comments in buildPointList_gpu()
parent
3a04cfed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
17 deletions
+2
-17
hough.cpp
modules/ocl/src/hough.cpp
+2
-17
No files found.
modules/ocl/src/hough.cpp
View file @
0656f131
...
...
@@ -88,22 +88,14 @@ namespace cv { namespace ocl
{
const
int
PIXELS_PER_THREAD
=
16
;
// void* counterPtr;
// cudaSafeCall( cudaGetSymbolAddress(&counterPtr, g_counter) );
// cudaSafeCall( cudaMemset(counterPtr, 0, sizeof(int)) );
int
totalCount
=
0
;
int
err
=
CL_SUCCESS
;
cl_mem
counter
=
clCreateBuffer
(
src
.
clCxt
->
impl
->
clContext
,
CL_MEM_COPY_HOST_PTR
,
// CL_MEM_READ_WRITE,
CL_MEM_COPY_HOST_PTR
,
sizeof
(
int
),
&
totalCount
,
// NULL,
&
totalCount
,
&
err
);
openCLSafeCall
(
err
);
// openCLSafeCall(clEnqueueWriteBuffer(src.clCxt->impl->clCmdQueue, counter, CL_TRUE, 0, sizeof(int), &totalCount, 0, 0, 0));
// const dim3 block(32, 4);
// const dim3 grid(divUp(src.cols, block.x * PIXELS_PER_THREAD), divUp(src.rows, block.y));
const
size_t
blkSizeX
=
32
;
const
size_t
blkSizeY
=
4
;
...
...
@@ -114,11 +106,6 @@ namespace cv { namespace ocl
const
size_t
glbSizeY
=
src
.
rows
%
blkSizeY
==
0
?
src
.
rows
:
(
src
.
rows
/
blkSizeY
+
1
)
*
blkSizeY
;
size_t
globalThreads
[
3
]
=
{
glbSizeX
,
glbSizeY
,
1
};
// cudaSafeCall( cudaFuncSetCacheConfig(buildPointList<PIXELS_PER_THREAD>, cudaFuncCachePreferShared) );
// buildPointList<PIXELS_PER_THREAD><<<grid, block>>>(src, list);
// cudaSafeCall( cudaGetLastError() );
// cudaSafeCall( cudaDeviceSynchronize() );
vector
<
pair
<
size_t
,
const
void
*>
>
args
;
args
.
push_back
(
make_pair
(
sizeof
(
cl_mem
)
,
(
void
*
)
&
src
.
data
));
args
.
push_back
(
make_pair
(
sizeof
(
cl_int
)
,
(
void
*
)
&
src
.
cols
));
...
...
@@ -128,8 +115,6 @@ namespace cv { namespace ocl
args
.
push_back
(
make_pair
(
sizeof
(
cl_mem
)
,
(
void
*
)
&
counter
));
openCLExecuteKernel
(
src
.
clCxt
,
&
hough
,
"buildPointList"
,
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
);
// int totalCount;
// cudaSafeCall( cudaMemcpy(&totalCount, counterPtr, sizeof(int), cudaMemcpyDeviceToHost) );
openCLSafeCall
(
clEnqueueReadBuffer
(
src
.
clCxt
->
impl
->
clCmdQueue
,
counter
,
CL_TRUE
,
0
,
sizeof
(
int
),
&
totalCount
,
0
,
NULL
,
NULL
));
openCLSafeCall
(
clReleaseMemObject
(
counter
));
...
...
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