Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
5440f892
Commit
5440f892
authored
8 years ago
by
Jeremie Deray
Browse files
Options
Downloads
Patches
Plain Diff
NodeBase & CaptureBase *id_count atomic_uint
parent
63e79c14
No related branches found
No related tags found
1 merge request
!90
[WIP] ProcessorBase multi-threading
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/capture_base.cpp
+1
-1
1 addition, 1 deletion
src/capture_base.cpp
src/capture_base.h
+1
-1
1 addition, 1 deletion
src/capture_base.h
src/node_base.cpp
+1
-1
1 addition, 1 deletion
src/node_base.cpp
src/node_base.h
+3
-1
3 additions, 1 deletion
src/node_base.h
with
6 additions
and
4 deletions
src/capture_base.cpp
+
1
−
1
View file @
5440f892
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
namespace
wolf
{
namespace
wolf
{
unsigned
int
CaptureBase
::
capture_id_count_
=
0
;
std
::
atomic_u
int
CaptureBase
::
capture_id_count_
(
0
)
;
CaptureBase
::
CaptureBase
(
const
std
::
string
&
_type
,
const
TimeStamp
&
_ts
,
SensorBasePtr
_sensor_ptr
)
:
CaptureBase
::
CaptureBase
(
const
std
::
string
&
_type
,
const
TimeStamp
&
_ts
,
SensorBasePtr
_sensor_ptr
)
:
NodeBase
(
"CAPTURE"
,
_type
),
NodeBase
(
"CAPTURE"
,
_type
),
...
...
This diff is collapsed.
Click to expand it.
src/capture_base.h
+
1
−
1
View file @
5440f892
...
@@ -23,7 +23,7 @@ class CaptureBase : public NodeBase, public std::enable_shared_from_this<Capture
...
@@ -23,7 +23,7 @@ class CaptureBase : public NodeBase, public std::enable_shared_from_this<Capture
FrameBaseWPtr
frame_ptr_
;
FrameBaseWPtr
frame_ptr_
;
FeatureBaseList
feature_list_
;
FeatureBaseList
feature_list_
;
static
unsigned
int
capture_id_count_
;
static
std
::
atomic_u
int
capture_id_count_
;
protected:
protected:
unsigned
int
capture_id_
;
unsigned
int
capture_id_
;
...
...
This diff is collapsed.
Click to expand it.
src/node_base.cpp
+
1
−
1
View file @
5440f892
...
@@ -3,6 +3,6 @@
...
@@ -3,6 +3,6 @@
namespace
wolf
{
namespace
wolf
{
//init static node counter
//init static node counter
unsigned
int
NodeBase
::
node_id_count_
=
0
;
std
::
atomic_u
int
NodeBase
::
node_id_count_
(
0
)
;
}
// namespace wolf
}
// namespace wolf
This diff is collapsed.
Click to expand it.
src/node_base.h
+
3
−
1
View file @
5440f892
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
// Wolf includes
// Wolf includes
#include
"wolf.h"
#include
"wolf.h"
// std includes
#include
<atomic>
namespace
wolf
{
namespace
wolf
{
...
@@ -54,7 +56,7 @@ namespace wolf {
...
@@ -54,7 +56,7 @@ namespace wolf {
class
NodeBase
class
NodeBase
{
{
private:
private:
static
unsigned
int
node_id_count_
;
///< Object counter (acts as simple ID factory)
static
std
::
atomic_u
int
node_id_count_
;
///< Object counter (acts as simple ID factory)
protected:
protected:
ProblemWPtr
problem_ptr_
;
ProblemWPtr
problem_ptr_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment