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
3b412b51
Commit
3b412b51
authored
Oct 07, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved BufferPool management functions to public
parent
5ea80852
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
cuda.hpp
modules/core/include/opencv2/core/cuda.hpp
+4
-0
private.cuda.hpp
modules/core/include/opencv2/core/private.cuda.hpp
+0
-3
cuda_buffer_pool.cpp
modules/core/src/cuda_buffer_pool.cpp
+2
-2
perf_buffer_pool.cpp
modules/cuda/perf/perf_buffer_pool.cpp
+2
-2
No files found.
modules/core/include/opencv2/core/cuda.hpp
View file @
3b412b51
...
...
@@ -276,6 +276,10 @@ CV_EXPORTS void ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr
CV_EXPORTS
GpuMat
allocMatFromBuf
(
int
rows
,
int
cols
,
int
type
,
GpuMat
&
mat
);
//! BufferPool management (must be called before Stream creation)
CV_EXPORTS
void
setBufferPoolUsage
(
bool
on
);
CV_EXPORTS
void
setBufferPoolConfig
(
int
deviceId
,
size_t
stackSize
,
int
stackCount
);
//////////////////////////////// CudaMem ////////////////////////////////
// CudaMem is limited cv::Mat with page locked memory allocation.
...
...
modules/core/include/opencv2/core/private.cuda.hpp
View file @
3b412b51
...
...
@@ -122,9 +122,6 @@ namespace cv { namespace cuda
GpuMat
::
Allocator
*
allocator_
;
};
CV_EXPORTS
void
setBufferAllocatorUsage
(
bool
on
);
CV_EXPORTS
void
allocateMemoryPool
(
int
deviceId
,
size_t
stackSize
,
int
stackCount
);
static
inline
void
checkNppError
(
int
code
,
const
char
*
file
,
const
int
line
,
const
char
*
func
)
{
if
(
code
<
0
)
...
...
modules/core/src/cuda_buffer_pool.cpp
View file @
3b412b51
...
...
@@ -378,12 +378,12 @@ void cv::cuda::StackAllocator::free(uchar* devPtr, int* refcount)
fastFree
(
refcount
);
}
void
cv
::
cuda
::
setBuffer
Allocator
Usage
(
bool
on
)
void
cv
::
cuda
::
setBuffer
Pool
Usage
(
bool
on
)
{
enableMemoryPool
=
on
;
}
void
cv
::
cuda
::
allocateMemoryPool
(
int
deviceId
,
size_t
stackSize
,
int
stackCount
)
void
cv
::
cuda
::
setBufferPoolConfig
(
int
deviceId
,
size_t
stackSize
,
int
stackCount
)
{
const
int
currentDevice
=
getDevice
();
...
...
modules/cuda/perf/perf_buffer_pool.cpp
View file @
3b412b51
...
...
@@ -95,10 +95,10 @@ PERF_TEST_P(Sz, BufferPool, CUDA_TYPICAL_MAT_SIZES)
GpuMat
src1
(
host_src
),
src2
(
host_src
);
GpuMat
dst
;
setBuffer
Allocator
Usage
(
useBufferPool
);
setBuffer
Pool
Usage
(
useBufferPool
);
if
(
useBufferPool
&&
first
)
{
allocateMemoryPool
(
-
1
,
25
*
1024
*
1024
,
2
);
setBufferPoolConfig
(
-
1
,
25
*
1024
*
1024
,
2
);
first
=
false
;
}
...
...
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