Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/tests/learn53/fixtures.om # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / tests / learn53 / fixtures.om` 122 lines · 1580 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Public fixtures, never sealed evaluation. Expected literals independently checked with Wolfram. 3 text okmsg "PASS " 4 text badmsg "FAIL " 5 global nums uchar 32 6 global tally ulong 2 7 global saved uchar 4096 8 fn digit n ulong to void 9 if ge n 10 10 digit div n 10 11 end 12 put nums 0 uchar add 48 rem n 10 13 w = write 1 nums 0 1 14 end 15 fn check yes bool to void 16 put tally 0 add get tally 0 1 17 if yes 18 w = write 1 okmsg 0 len okmsg 19 else 20 w = write 1 badmsg 0 len badmsg 21 put tally 1 add get tally 1 1 22 end 23 digit get tally 0 24 put nums 0 10 25 w = write 1 nums 0 1 26 end 27 fn tw p ulong v ulong to void 28 for i ulong 4 29 put kt add mul p 4 i uchar and shr v mul i 8 255 30 end 31 end 32 fn cw p ulong v ulong to void 33 for i ulong 4 34 put ko add mul p 4 i uchar and shr v mul i 8 255 35 end 36 end 37 fn header op ulong to void 38 for i ulong 4096 39 put kt i 0 40 end 41 for i ulong 258 42 cw i `2779096485` 43 end 44 tw 0 `827086147` 45 tw 1 1 46 tw 2 op 47 tw 3 1 48 tw 5 3 49 tw 6 1 50 tw 7 1 51 tw 8 2 52 tw 9 2 53 tw 10 2 54 tw 11 5 55 tw 12 5 56 tw 13 5 57 tw 14 1 58 tw 15 add mul op 100 1 59 tw 16 1 60 tw 17 1 61 tw 19 1 62 tw 20 1 63 end 64 fn vec to void 65 header 1 66 tw 24 `4294967295` 67 tw 25 111 68 tw 26 7 69 tw 27 222 70 tw 28 9 71 tw 29 1 72 tw 30 333 73 tw 31 4 74 tw 32 444 75 tw 33 6 76 cw 1 0 77 cw 3 11 78 cw 5 15 79 end 80 fn red to void 81 header 2 82 tw 9 0 83 tw 10 1 84 tw 12 0 85 tw 13 1 86 tw 24 `4294967295` 87 tw 25 111 88 tw 26 2 89 tw 27 222 90 tw 28 3 91 cw 1 4 92 end 93 fn mat to void 94 header 3 95 tw 5 2 96 tw 6 3 97 tw 7 2 98 tw 8 3 99 tw 9 4 100 tw 10 4 101 tw 11 5 102 tw 12 7 103 tw 13 7 104 tw 24 1 105 tw 25 2 106 tw 26 999 107 tw 27 3 108 tw 28 4 109 tw 29 5 110 tw 30 6 111 tw 31 7 112 tw 32 999 113 tw 33 8 114 tw 34 9 115 tw 35 10 116 cw 1 21 117 cw 2 24 118 cw 3 27 119 cw 5 47 120 cw 6 54 121 cw 7 61 122 end