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
947307ba
Commit
947307ba
authored
Mar 15, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6261 from dtmoodie:issue_6251
parents
77832069
42c36c0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
utility.hpp
modules/core/include/opencv2/core/cuda/utility.hpp
+1
-1
gpu_mat.cu
modules/core/src/cuda/gpu_mat.cu
+4
-0
No files found.
modules/core/include/opencv2/core/cuda/utility.hpp
View file @
947307ba
...
@@ -57,7 +57,7 @@ namespace cv { namespace cuda { namespace device
...
@@ -57,7 +57,7 @@ namespace cv { namespace cuda { namespace device
struct
CV_EXPORTS
ThrustAllocator
struct
CV_EXPORTS
ThrustAllocator
{
{
typedef
uchar
value_type
;
typedef
uchar
value_type
;
virtual
~
ThrustAllocator
();
virtual
__device__
__host__
uchar
*
allocate
(
size_t
numBytes
)
=
0
;
virtual
__device__
__host__
uchar
*
allocate
(
size_t
numBytes
)
=
0
;
virtual
__device__
__host__
void
deallocate
(
uchar
*
ptr
,
size_t
numBytes
)
=
0
;
virtual
__device__
__host__
void
deallocate
(
uchar
*
ptr
,
size_t
numBytes
)
=
0
;
static
ThrustAllocator
&
getAllocator
();
static
ThrustAllocator
&
getAllocator
();
...
...
modules/core/src/cuda/gpu_mat.cu
View file @
947307ba
...
@@ -56,6 +56,9 @@ using namespace cv;
...
@@ -56,6 +56,9 @@ using namespace cv;
using namespace cv::cuda;
using namespace cv::cuda;
using namespace cv::cudev;
using namespace cv::cudev;
device::ThrustAllocator::~ThrustAllocator()
{
}
namespace
namespace
{
{
class DefaultThrustAllocator: public cv::cuda::device::ThrustAllocator
class DefaultThrustAllocator: public cv::cuda::device::ThrustAllocator
...
@@ -73,6 +76,7 @@ namespace
...
@@ -73,6 +76,7 @@ namespace
}
}
__device__ __host__ void deallocate(uchar* ptr, size_t numBytes)
__device__ __host__ void deallocate(uchar* ptr, size_t numBytes)
{
{
(void)numBytes;
#ifndef __CUDA_ARCH__
#ifndef __CUDA_ARCH__
CV_CUDEV_SAFE_CALL(cudaFree(ptr));
CV_CUDEV_SAFE_CALL(cudaFree(ptr));
#endif
#endif
...
...
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