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
decf04df
Commit
decf04df
authored
Feb 21, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Feb 21, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #512 from jet47:core-gpu-updates
parents
c1a5d1c4
ce2559b3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
25 deletions
+8
-25
gpumat.hpp
modules/core/include/opencv2/core/gpumat.hpp
+8
-25
gpumat.cpp
modules/core/src/gpumat.cpp
+0
-0
No files found.
modules/core/include/opencv2/core/gpumat.hpp
View file @
decf04df
...
...
@@ -73,12 +73,16 @@ namespace cv { namespace gpu
FEATURE_SET_COMPUTE_20
=
20
,
FEATURE_SET_COMPUTE_21
=
21
,
FEATURE_SET_COMPUTE_30
=
30
,
FEATURE_SET_COMPUTE_35
=
35
,
GLOBAL_ATOMICS
=
FEATURE_SET_COMPUTE_11
,
SHARED_ATOMICS
=
FEATURE_SET_COMPUTE_12
,
NATIVE_DOUBLE
=
FEATURE_SET_COMPUTE_13
,
WARP_SHUFFLE_FUNCTIONS
=
FEATURE_SET_COMPUTE_30
WARP_SHUFFLE_FUNCTIONS
=
FEATURE_SET_COMPUTE_30
,
DYNAMIC_PARALLELISM
=
FEATURE_SET_COMPUTE_35
};
// Checks whether current device supports the given feature
CV_EXPORTS
bool
deviceSupports
(
FeatureSet
feature_set
);
// Gives information about what GPU archs this OpenCV GPU module was
...
...
@@ -116,6 +120,9 @@ namespace cv { namespace gpu
int
multiProcessorCount
()
const
{
return
multi_processor_count_
;
}
size_t
sharedMemPerBlock
()
const
;
void
queryMemory
(
size_t
&
totalMemory
,
size_t
&
freeMemory
)
const
;
size_t
freeMemory
()
const
;
size_t
totalMemory
()
const
;
...
...
@@ -129,7 +136,6 @@ namespace cv { namespace gpu
private
:
void
query
();
void
queryMemory
(
size_t
&
free_memory
,
size_t
&
total_memory
)
const
;
int
device_id_
;
...
...
@@ -549,29 +555,6 @@ namespace cv { namespace gpu
{
ensureSizeIsEnough
(
size
.
height
,
size
.
width
,
type
,
m
);
}
inline
void
createContinuous
(
int
rows
,
int
cols
,
int
type
,
GpuMat
&
m
)
{
int
area
=
rows
*
cols
;
if
(
!
m
.
isContinuous
()
||
m
.
type
()
!=
type
||
m
.
size
().
area
()
!=
area
)
ensureSizeIsEnough
(
1
,
area
,
type
,
m
);
m
=
m
.
reshape
(
0
,
rows
);
}
inline
void
ensureSizeIsEnough
(
int
rows
,
int
cols
,
int
type
,
GpuMat
&
m
)
{
if
(
m
.
type
()
==
type
&&
m
.
rows
>=
rows
&&
m
.
cols
>=
cols
)
m
=
m
(
Rect
(
0
,
0
,
cols
,
rows
));
else
m
.
create
(
rows
,
cols
,
type
);
}
inline
GpuMat
allocMatFromBuf
(
int
rows
,
int
cols
,
int
type
,
GpuMat
&
mat
)
{
if
(
!
mat
.
empty
()
&&
mat
.
type
()
==
type
&&
mat
.
rows
>=
rows
&&
mat
.
cols
>=
cols
)
return
mat
(
Rect
(
0
,
0
,
cols
,
rows
));
return
mat
=
GpuMat
(
rows
,
cols
,
type
);
}
}}
#endif // __cplusplus
...
...
modules/core/src/gpumat.cpp
View file @
decf04df
This diff is collapsed.
Click to expand it.
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