-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement dumb 'with parallel' (#265).
whitequark
committed
Feb 22, 2016
1 parent
51a5910
commit bc81be1
Showing
10 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# RUN: %python -m artiq.compiler.testbench.jit %s | ||
# REQUIRES: time | ||
|
||
assert now() == 0.0 | ||
delay(100.0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# RUN: %python -m artiq.compiler.testbench.jit %s | ||
# REQUIRES: time | ||
|
||
assert now_mu() == 0 | ||
delay_mu(100) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# RUN: %python -m artiq.compiler.testbench.jit %s | ||
# REQUIRES: time | ||
|
||
assert seconds_to_mu(2.0) == 2000000 | ||
assert mu_to_seconds(1500000) == 1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# RUN: %python -m artiq.compiler.testbench.jit %s | ||
# REQUIRES: time | ||
|
||
with parallel: | ||
with sequential: | ||
assert now_mu() == 0 | ||
delay_mu(10) | ||
assert now_mu() == 10 | ||
with sequential: | ||
assert now_mu() == 0 | ||
delay_mu(20) | ||
assert now_mu() == 20 | ||
with sequential: | ||
assert now_mu() == 0 | ||
delay_mu(15) | ||
assert now_mu() == 15 | ||
assert now_mu() == 0 | ||
assert now_mu() == 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters