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
d76b41b5
Commit
d76b41b5
authored
Apr 20, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocl: CL_MEM_USE_HOST_PTR workaround test
parent
7ea5029a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
ocl.cpp
modules/core/src/ocl.cpp
+3
-1
umatrix.cpp
modules/core/src/umatrix.cpp
+1
-1
No files found.
modules/core/src/ocl.cpp
View file @
d76b41b5
...
...
@@ -4666,7 +4666,9 @@ public:
#endif
{
tempUMatFlags
=
UMatData
::
TEMP_UMAT
;
if
(
u
->
origdata
==
cv
::
alignPtr
(
u
->
origdata
,
4
))
// There are OpenCL runtime issues for less aligned data
if
(
u
->
origdata
==
cv
::
alignPtr
(
u
->
origdata
,
4
)
// There are OpenCL runtime issues for less aligned data
&&
!
(
u
->
originalUMatData
&&
u
->
originalUMatData
->
handle
)
// Avoid sharing of host memory between OpenCL buffers
)
{
handle
=
clCreateBuffer
(
ctx_handle
,
CL_MEM_USE_HOST_PTR
|
createFlags
,
u
->
size
,
u
->
origdata
,
&
retval
);
...
...
modules/core/src/umatrix.cpp
View file @
d76b41b5
...
...
@@ -381,6 +381,7 @@ UMat Mat::getUMat(int accessFlags, UMatUsageFlags usageFlags) const
if
(
!
a
)
a
=
a0
;
new_u
=
a
->
allocate
(
dims
,
size
.
p
,
type
(),
data
,
step
.
p
,
accessFlags
,
usageFlags
);
new_u
->
originalUMatData
=
u
;
}
bool
allocated
=
false
;
CV_TRY
...
...
@@ -404,7 +405,6 @@ UMat Mat::getUMat(int accessFlags, UMatUsageFlags usageFlags) const
CV_Assert
(
new_u
->
tempUMat
());
}
#endif
new_u
->
originalUMatData
=
u
;
CV_XADD
(
&
(
u
->
refcount
),
1
);
CV_XADD
(
&
(
u
->
urefcount
),
1
);
}
...
...
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