Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
typon-concurrency
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
typon
typon-concurrency
Commits
61a969e2
Commit
61a969e2
authored
May 17, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scheduler.hpp: Rename parallelism into concurrency
parent
5c2f880f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
rt/include/typon/core/scheduler.hpp
rt/include/typon/core/scheduler.hpp
+8
-8
No files found.
rt/include/typon/core/scheduler.hpp
View file @
61a969e2
...
@@ -32,7 +32,7 @@ namespace typon
...
@@ -32,7 +32,7 @@ namespace typon
std
::
vector
<
std
::
thread
>
_thread
;
std
::
vector
<
std
::
thread
>
_thread
;
std
::
atomic_bool
_done
{
false
};
std
::
atomic_bool
_done
{
false
};
fdt
::
lock_free
::
event_count
<>
_notifyer
;
fdt
::
lock_free
::
event_count
<>
_notifyer
;
const
uint
_
parallelism
;
const
uint
_
concurrency
;
static
Scheduler
&
get
()
noexcept
static
Scheduler
&
get
()
noexcept
{
{
...
@@ -57,13 +57,13 @@ namespace typon
...
@@ -57,13 +57,13 @@ namespace typon
return
get
().
_deque
[
thread_id
].
pop
();
return
get
().
_deque
[
thread_id
].
pop
();
}
}
Scheduler
(
uint
parallelism
)
noexcept
Scheduler
(
uint
concurrency
)
noexcept
:
_deque
(
parallelism
+
1
)
:
_deque
(
concurrency
+
1
)
,
_
parallelism
(
parallelism
)
,
_
concurrency
(
concurrency
)
{
{
thread_id
=
parallelism
;
thread_id
=
concurrency
;
for
(
uint
id
=
0
;
id
<
parallelism
;
id
++
)
for
(
uint
id
=
0
;
id
<
concurrency
;
id
++
)
{
{
_thread
.
emplace_back
([
this
,
id
]()
{
_thread
.
emplace_back
([
this
,
id
]()
{
thread_id
=
id
;
thread_id
=
id
;
...
@@ -117,9 +117,9 @@ namespace typon
...
@@ -117,9 +117,9 @@ namespace typon
void
explore_task
(
Task
&
task
)
noexcept
void
explore_task
(
Task
&
task
)
noexcept
{
{
for
(
uint
i
=
0
;
i
<
_
parallelism
*
2
+
1
;
i
++
)
for
(
uint
i
=
0
;
i
<
_
concurrency
*
2
+
1
;
i
++
)
{
{
uint
id
=
fdt
::
random
::
random
()
%
_
parallelism
;
uint
id
=
fdt
::
random
::
random
()
%
_
concurrency
;
if
(
id
==
thread_id
)
if
(
id
==
thread_id
)
{
{
task
=
_deque
.
back
().
steal
();
task
=
_deque
.
back
().
steal
();
...
...
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