Created
September 7, 2017 01:54
-
-
Save akamah/05fd940bf77cff980da8c505cc2802c5 to your computer and use it in GitHub Desktop.
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
// 下層の電車 | |
// 1周目 | |
if (A == 0) { | |
R0 = 0; | |
} else if (A == 1) { | |
R1 = 0; | |
} | |
// 2周目 | |
if (A == 0) { | |
R1 = 1; | |
} else if (A == 1) { | |
R0 = 1; | |
} | |
//本来ならここでバリア同期をする//// | |
// 3周目(途中で上に登る) | |
if (A == 0) { | |
C = 0; | |
} else if (A == 1) { | |
if (R2 == 0) { | |
C = 0; | |
} else if (R2 == 1) { | |
C = 1; | |
} | |
} | |
// 上層の電車 | |
// 1周目 | |
if (B == 0) { | |
R2 = 0; | |
} else if (B == 1) { | |
R2 = 1; | |
} | |
// 2周目 | |
if (B == 0) { | |
R2 = 0; | |
} else if (B == 1) { | |
// NOP | |
} | |
/////////////////////////////// | |
// 3周目(途中で下に降りる) | |
if (B == 0) { | |
if (R0 == 0) { | |
S = 0; | |
} else if (R0 == 1) { | |
S = 1; | |
} | |
} else if (B == 1) { | |
if (R1 == 0) { | |
S = 0; | |
} else if (R1 == 1) { | |
S = 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment