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
887d8d09
Commit
887d8d09
authored
Aug 19, 2015
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5177 from lupustr3:pvlasov/tls_fixes
parents
76da19d5
a33d98c1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
cvdef.h
modules/core/include/opencv2/core/cvdef.h
+2
-0
utility.hpp
modules/core/include/opencv2/core/utility.hpp
+21
-9
system.cpp
modules/core/src/system.cpp
+0
-0
No files found.
modules/core/include/opencv2/core/cvdef.h
View file @
887d8d09
...
...
@@ -58,6 +58,8 @@
#include "opencv2/hal/defs.h"
#define OPENCV_ABI_COMPATIBILITY 300
#ifdef __OPENCV_BUILD
# define DISABLE_OPENCV_24_COMPATIBILITY
#endif
...
...
modules/core/include/opencv2/core/utility.hpp
View file @
887d8d09
...
...
@@ -513,30 +513,42 @@ private:
AutoLock
&
operator
=
(
const
AutoLock
&
);
};
// TLS interface
class
CV_EXPORTS
TLSDataContainer
{
private
:
int
key_
;
protected
:
TLSDataContainer
();
virtual
~
TLSDataContainer
();
#if OPENCV_ABI_COMPATIBILITY > 300
void
*
getData
()
const
;
void
release
();
private
:
#else
void
release
();
public
:
void
*
getData
()
const
;
#endif
virtual
void
*
createDataInstance
()
const
=
0
;
virtual
void
deleteDataInstance
(
void
*
d
ata
)
const
=
0
;
virtual
void
deleteDataInstance
(
void
*
pD
ata
)
const
=
0
;
void
*
getData
()
const
;
int
key_
;
};
// Main TLS data class
template
<
typename
T
>
class
TLSData
:
protected
TLSDataContainer
{
public
:
inline
TLSData
()
{}
inline
~
TLSData
()
{}
inline
T
*
get
()
const
{
return
(
T
*
)
getData
();
}
inline
TLSData
()
{}
inline
~
TLSData
()
{
release
();
}
// Release key and delete associated data
inline
T
*
get
()
const
{
return
(
T
*
)
getData
();
}
// Get data assosiated with key
private
:
virtual
void
*
createDataInstance
()
const
{
return
new
T
;
}
virtual
void
deleteDataInstance
(
void
*
data
)
const
{
delete
(
T
*
)
data
;
}
virtual
void
*
createDataInstance
()
const
{
return
new
T
;}
// Wrapper to allocate data by template
virtual
void
deleteDataInstance
(
void
*
pData
)
const
{
delete
(
T
*
)
pData
;}
// Wrapper to release data by template
};
/** @brief Designed for command line parsing
...
...
modules/core/src/system.cpp
View file @
887d8d09
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