Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
typon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
cython-plus
typon
Commits
b8fda6bb
Commit
b8fda6bb
authored
Jun 06, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt exception.cpp and forkjoin_fibo.cpp
parent
0f01b72d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
rt/test/exceptions.cpp
rt/test/exceptions.cpp
+1
-1
rt/test/forkjoin_fibo.cpp
rt/test/forkjoin_fibo.cpp
+2
-2
No files found.
rt/test/exceptions.cpp
View file @
b8fda6bb
...
@@ -25,7 +25,7 @@ Join<void> fail_join() {
...
@@ -25,7 +25,7 @@ Join<void> fail_join() {
}
}
Join
<
void
>
join
(
int
max
)
{
Join
<
void
>
join
(
int
max
)
{
std
::
vector
<
Async
<
int
>>
v
;
std
::
vector
<
Forked
<
int
>>
v
;
for
(
int
i
=
0
;
i
<
max
;
i
++
)
{
for
(
int
i
=
0
;
i
<
max
;
i
++
)
{
v
.
push_back
(
co_await
fork
(
fib
()));
v
.
push_back
(
co_await
fork
(
fib
()));
}
}
...
...
rt/test/forkjoin_fibo.cpp
View file @
b8fda6bb
...
@@ -8,8 +8,8 @@ Join<int> fibo(int n) {
...
@@ -8,8 +8,8 @@ Join<int> fibo(int n) {
if
(
n
<
2
)
{
if
(
n
<
2
)
{
co_return
n
;
co_return
n
;
}
}
Async
a
=
co_await
fork
(
fibo
(
n
-
1
));
Forked
a
=
co_await
fork
(
fibo
(
n
-
1
));
Async
b
=
co_await
fork
(
fibo
(
n
-
2
));
Forked
b
=
co_await
fork
(
fibo
(
n
-
2
));
co_await
Sync
();
co_await
Sync
();
co_return
a
.
get
()
+
b
.
get
();
co_return
a
.
get
()
+
b
.
get
();
}
}
...
...
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