interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / tests / components / run.om

782 lines · 19961 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Seeded native host conductor; concatenate proc.om, cases.om, then this file.
3note C and nvdisasm/sha256sum are independent verification tools only, never production dependencies.
4text Rt00000 "om/encoder/bw_spec_sm121.om"
5text Rt00002 "om/components/bw_alloc.om"
6text Rt00003 "om/components/bw_effect.om"
7text Rt00004 "om/components/bw_check.om"
8text Rt00005 "om/components/bw_project.om"
9text Rt00006 "om/components/rowpipe.om"
10text Rt00007 "om/components/staged.om"
11text Rt00008 "om/components/compose.om"
12text Rt00009 "om/encoder/bw_enc_sm121.om"
13text Rt00010 "om/components/encode.om"
14text Rt00011 "build/components/component-unit"
15text Rt00012 "tests/components/component-unit.om"
16text Rt00013 "build/components/compose-unit"
17text Rt00014 "tests/components/compose-unit.om"
18text Rt00015 "build/components/direct"
19text Rt00016 "tests/components/direct-caller.om"
20text Rt00017 "build/components/rowpipe"
21text Rt00018 "tests/components/rowpipe-caller.om"
22text Rt00019 "build/components/staged"
23text Rt00020 "tests/components/staged-caller.om"
24text Rt00021 "-std=gnu11"
25text Rt00022 "-O2"
26text Rt00023 "-Wall"
27text Rt00024 "-Wextra"
28text Rt00025 "-Werror"
29text Rt00026 "-DOMEGA_GPU_NO_POSIX"
30text Rt00027 "-ffunction-sections"
31text Rt00028 "-fdata-sections"
32text Rt00029 "-Wl,--gc-sections"
33text Rt00030 "-Isrc"
34text Rt00031 "-DWS_MAX_THREADS=1024"
35text Rt00032 "-DCOMPONENT_STAGED"
36text Rt00033 "tests/components/numerical.c"
37text Rt00034 "src/omega_gpu_fp8_pack.c"
38text Rt00035 "src/omega_gpu_hostmath.c"
39text Rt00036 "src/omega_gpu_fp8gemm_api.c"
40text Rt00037 "src/omega_blackwell_matmul.c"
41text Rt00038 "src/omega_blackwell_codegen_moe.c"
42text Rt00039 "src/omega_blackwell_codegen_moe2.c"
43text Rt00040 "src/omega_blackwell_codegen_gemm.c"
44text Rt00041 "src/omega_blackwell_codegen.c"
45text Rt00042 "-lm"
46text Rt00043 "tests/components/direct-oracle.c"
47text Rt00044 "src/omega_blackwell_codegen_moe.c"
48text Rt00045 "tests/components/rowpipe-oracle.c"
49text Rt00046 "src/omega_blackwell_codegen_moe2.c"
50text Rt00047 "tests/components/staged-oracle.c"
51text Rt00048 "src/omega_blackwell_codegen_gemm.c"
52text Rt00049 "src/omega_blackwell_codegen.c"
53text Rt00050 "-o"
54text Rt00051 "build/components/direct-oracle"
55text Rt00052 "build/components/rowpipe-oracle"
56text Rt00053 "build/components/staged-oracle"
57text Rt00054 "build/components/numerical-gemv"
58text Rt00055 "build/components/numerical-staged"
59text Rt00056 "build/components/hash.txt"
60text Rt00057 "2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f"
61text Rt00058 "\""
62text Rt00059 "\\"
63text Rt00060 ","
64text Rt00061 "\n"
65text Rt00062 "\n{\"family\":"
66text Rt00063 "direct"
67text Rt00064 "rowpipe"
68text Rt00065 "staged"
69text Rt00066 ",\"spec\":["
70text Rt00067 "],\"whole_frame_sha256\":"
71text Rt00068 ",\"code_sha256\":"
72text Rt00069 ",\"numerical_result\":"
73text Rt00070 ",\"result\":\"PASS\"}"
74text Rt00071 ":"
75text Rt00072 "build/components/receipt.json"
76text Rt00073 "{\"conductor\":\"seeded Omega proc.om + cases.om + run.om\",\"compiler\":\"2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f\",\"source_baseline\":\"b759afc3f5e46f152ffb06b39882ffa28cacaf96\",\"encoder_source_revision\":\"1c5a8398d93b49e6765c2e3752aaad8611027d0d\",\"quant_source_revision\":\"fe25929ce71b11703eafa72395df2dd495aa61f2\",\"physical_execution\":\"NOT_RUN: no GPU authority\",\"cases\":["
77text Rt00074 "],\"independent_numerical_execution\":\"PASS reused existing scalar/warp oracles on every native IR/allocation frame\",\"composer_root\":\"PASS direct/changed-direct/rowpipe/dense-staged/mapped-staged and mutant refusal\",\"negative_controls\":[\"reserved component fields refuse\",\"SB_B/SB_RD/branch reference mutations differ\",\"native/oracle resource exhaustion refuses without output\",\"truncated/oversized frames refuse without output\",\"typed op/bundle/wait/branch/resource/MMA controls PASS\",\"every native frame FFMA-to-FADD executes but numerical oracle disagrees\",\"every native frame unknown-op refusal preserved\"],\"source_sha256\":{\"tests/components/proc.om\":"
78text Rt00075 "tests/components/proc.om"
79text Rt00076 "tests/components/cases.om"
80text Rt00077 "tests/components/run.om"
81text Rt00078 "tests/components/numerical.c"
82text Rt00079 "tests/components/native-frame.h"
83text Rt00080 "tests/gpu_fp8_api_test.c"
84text Rt00081 "tests/gpu_fp8gemm_test.c"
85text Rt00082 "tests/bw_warp_sim.h"
86text Rt00083 "tests/bw_warp_sim_k.h"
87text Rt00084 "src/omega_gpu_fp8_pack.c"
88text Rt00085 "src/omega_gpu_hostmath.c"
89text Rt00086 "src/omega_gpu_fp8gemm_api.c"
90text Rt00087 "src/omega_blackwell_matmul.c"
91text Rt00088 "om/components/bw_alloc.om"
92text Rt00089 "om/components/bw_check.om"
93text Rt00090 "om/components/bw_effect.om"
94text Rt00091 "om/components/bw_project.om"
95text Rt00092 "om/components/compose.om"
96text Rt00093 "om/components/encode.om"
97text Rt00094 "om/components/fixture.om"
98text Rt00095 "om/components/realize.om"
99text Rt00096 "om/components/rowpipe.om"
100text Rt00097 "om/components/staged.om"
101text Rt00098 "},\"encoder_source_sha256\":{"
102text Rt00099 "om/encoder/bw_enc_sm121.om"
103text Rt00100 "om/encoder/bw_spec_sm121.om"
104text Rt00101 "},\"tool_versions\":{\"nvdisasm\":"
105text Rt00102 "usage: conductor OMC ENCODER_ROOT NVDISASM CC SHA256SUM QUANT_SOURCE\n"
106text Rt00103 "build"
107text Rt00104 "build/components"
108text Rt00105 "PASS native Omega component conductor: 8 direct, 14 rowpipe, 6 staged; independent numerics/bytes/disassembly/refusals and staged structural controls\n"
109text RtBytes ",\"code_bytes\":"
110text RtCcVer ",\"cc\":"
111text RtShaVer ",\"sha256sum\":"
112text RtVEnd "}}\n"
113text RtVerP "build/components/version.txt"
114text RtVFlag "--version"
115text RtDFlag "-V"
116text RtEncPin "12369bf1e383e79a4926e7758aaf5f3f778f2945c91327ce0aa570babffc05e6"
117text RtSpPin "d38dd63f842dff1dae525208576825f3a0027dead5ab2cde9482cf70b87e8ae9"
118text RtSrc0 "tests/components/component-unit.om"
119text RtSrc1 "tests/components/compose-unit.om"
120text RtSrc2 "tests/components/direct-caller.om"
121text RtSrc3 "tests/components/rowpipe-caller.om"
122text RtSrc4 "tests/components/staged-caller.om"
123text RtSrc5 "tests/components/direct-oracle.c"
124text RtSrc6 "tests/components/rowpipe-oracle.c"
125text RtSrc7 "tests/components/staged-oracle.c"
126text RtSrc8 "src/omega_blackwell_codegen.c"
127text RtSrc9 "src/omega_blackwell_codegen_moe.c"
128text RtSrc10 "src/omega_blackwell_codegen_moe2.c"
129text RtSrc11 "src/omega_blackwell_codegen_gemm.c"
130text RtSrc12 "src/omega_blackwell_codegen.h"
131text RtSrc13 "tests/components/wolfram.json"
132global HQuant uchar 1024
133global HQn ulong 1
134text RtQuant "om/quant/quant.om"
135text RtQPin "44bce96f3c274401e19a71b835814d69caf2bea8c2b1f4f43616c7c121232f09"
136text RtAdmit "om/components/admit.om"
137text RtRUnit "tests/components/record-unit.om"
138text RtRBin "build/components/record-unit"
139text RtRMut "build/components/record-mutant"
140text RtGuard "if lt compose_word b 22 add get actual 1 2"
141text RtWeak "if false"
142text RtRKey ",\"staged_structural_result\":"
143text RtRcpt "tests/components/capacity-host-receipt.json"
144text RtCap "tests/components/capacity-unit.om"
145text RtCapB "build/components/capacity-unit"
146text RtCapM1 "build/components/capacity-patch-mutant"
147text RtCapM2 "build/components/capacity-tail-mutant"
148text RtCapIf "if ge at 1024"
149text RtCapRs ",\"capacity_regression\":{\"baseline\":\"c6977b4906229fe83f41103b7eff65b64a0986d6\",\"baseline_exit\":103,\"fixed_exit\":0,\"patch_guard_removal_exit\":103,\"tail_guard_removal_exit\":103,\"staged_cfg\":[3,1536,16,8,16,0],\"result\":\"PASS\"}"
150text RtCapRun "tests/components/capacity-runtime-unit.om"
151text RtCapRB "build/components/capacity-runtime-unit"
152text RtVal "om/cache/validate.om"
153text RtDig "om/cache/digest.om"
154text RtRes "om/cache/residency.om"
155text RtArt "om/cache/artifact.om"
156fn rt_val to void
157path = new uchar 1024 0
158n = rt_qpath path
159hp_cat path n
160rt_nl
161hp_cat Rt00095 len Rt00095
162rt_nl
163hp_cat RtDig len RtDig
164rt_nl
165hp_cat RtRes len RtRes
166rt_nl
167hp_cat RtArt len RtArt
168rt_nl
169rt_enc Rt00009 len Rt00009
170rt_spec
171hp_cat Rt00010 len Rt00010
172rt_nl
173hp_cat RtAdmit len RtAdmit
174rt_nl
175hp_cat RtVal len RtVal
176rt_nl
177hp_cat RtCapRun len RtCapRun
178rt_nl
179hp_build RtCapRB len RtCapRB
180end
181fn rc_publish to void
182b = new uchar 262144 0
183n = hp_read Rt00072 len Rt00072 b len b
184hp_require gt n 0
185hp_write RtRcpt len RtRcpt b n
186end
187fn rt_qpath path edit uchar 1024 to ulong
188used = get HQn 0
189for j ulong used
190put path j get HQuant j
191end
192ret used
193end
194fn rt_qpin to void
195path = new uchar 1024 0
196n = rt_qpath path
197h = new uchar 64 0
198rh_get path n h
199for j ulong 64
200hp_require eq get h j get RtQPin j
201end
202end
203note Build a concrete weak-GPR checker mutant without changing checked-in production source.
204fn rt_weak to void
205hits = ulong 0
206used = get HUsed 0
207for pos ulong sub used len RtGuard
208same = uint 1
209for j ulong len RtGuard
210if ne get HSrc add pos j get RtGuard j
211same = 0
212end
213end
214if ne same 0
215hits = add hits 1
216for j ulong len RtGuard
217c = uchar 32
218if lt j len RtWeak
219c = get RtWeak j
220end
221put HSrc add pos j c
222end
223end
224end
225hp_require eq hits 1
226end
227fn rt_record kind ulong to void
228path = new uchar 1024 0
229n = rt_qpath path
230hp_cat path n
231rt_nl
232hp_cat Rt00095 len Rt00095
233rt_nl
234hp_cat RtAdmit len RtAdmit
235rt_nl
236hp_cat Rt00094 len Rt00094
237rt_nl
238hp_cat RtRUnit len RtRUnit
239rt_nl
240if eq kind 7
241rt_weak
242hp_build RtRMut len RtRMut
243else
244hp_build RtRBin len RtRBin
245end
246end
247
248fn rt_uncap which ulong to void
249hits = ulong 0
250for pos ulong sub get HUsed 0 len RtCapIf
251same = true
252for j ulong len RtCapIf
253if ne get HSrc add pos j get RtCapIf j
254same = false
255end
256end
257if same
258hits = add hits 1
259if eq hits which
260for j ulong len RtCapIf
261c = uchar 32
262if lt j len RtWeak
263c = get RtWeak j
264end
265put HSrc add pos j c
266end
267end
268end
269end
270hp_require eq hits 2
271end
272fn rt_nl to void
273pos = get HUsed 0
274hp_require lt pos len HSrc
275put HSrc pos 10
276put HUsed 0 add pos 1
277end
278fn rt_path suffix view uchar * n ulong dst edit uchar 1024 to ulong
279used = get HEn 0
280hp_require le add add used 1 n 1024
281for j ulong used
282put dst j get HEnc j
283end
284put dst used 47
285for j ulong n
286put dst add add used 1 j get suffix j
287end
288ret add add used 1 n
289end
290fn rt_enc suffix view uchar * n ulong to void
291path = new uchar 1024 0
292used = rt_path suffix n path
293hp_cat path used
294rt_nl
295end
296fn rt_spec to void
297rt_enc Rt00000 len Rt00000
298end
299fn rt_comp kind ulong to void
300put HUsed 0 0
301hp_cat Rt00002 len Rt00002
302rt_nl
303hp_cat Rt00003 len Rt00003
304rt_nl
305hp_cat Rt00004 len Rt00004
306rt_nl
307hp_cat Rt00005 len Rt00005
308rt_nl
309if or ge kind 6 or eq kind 2 eq kind 4
310hp_cat Rt00006 len Rt00006
311rt_nl
312end
313if or ge kind 6 or eq kind 2 eq kind 5
314hp_cat Rt00007 len Rt00007
315rt_nl
316end
317if or eq kind 2 ge kind 6
318hp_cat Rt00008 len Rt00008
319rt_nl
320end
321if and ge kind 3 le kind 5
322rt_enc Rt00009 len Rt00009
323rt_spec
324hp_cat Rt00010 len Rt00010
325rt_nl
326end
327if eq kind 1
328hp_cat Rt00012 len Rt00012
329rt_nl
330hp_build Rt00011 len Rt00011
331end
332if eq kind 2
333hp_cat Rt00014 len Rt00014
334rt_nl
335hp_build Rt00013 len Rt00013
336end
337if eq kind 3
338hp_cat Rt00016 len Rt00016
339rt_nl
340hp_build Rt00015 len Rt00015
341end
342if eq kind 4
343hp_cat Rt00018 len Rt00018
344rt_nl
345hp_build Rt00017 len Rt00017
346end
347if eq kind 5
348hp_cat Rt00020 len Rt00020
349rt_nl
350hp_build Rt00019 len Rt00019
351end
352if and ge kind 6 le kind 7
353rt_record kind
354end
355if and ge kind 8 le kind 10
356hp_cat RtCap len RtCap
357rt_nl
358if eq kind 8
359hp_build RtCapB len RtCapB
360else
361rt_uncap sub kind 8
362if eq kind 9
363hp_build RtCapM1 len RtCapM1
364else
365hp_build RtCapM2 len RtCapM2
366end
367end
368end
369if eq kind 11
370rt_val
371end
372end
373note execprog intentionally supplies an empty environment; locate the selected cc toolchain explicitly.
374fn rt_ccpref to void
375b = new uchar 1024 0
376last = ulong 0
377for j ulong get HCn 0
378if eq get HCc j 47
379last = add j 1
380end
381end
382hp_require gt last 0
383hp_require le last 1022
384put b 0 45
385put b 1 66
386for j ulong last
387put b add j 2 get HCc j
388end
389hp_arg b add last 2
390end
391fn rt_cc kind ulong to void
392hp_tool 1
393rt_ccpref
394hp_arg Rt00021 len Rt00021
395hp_arg Rt00022 len Rt00022
396hp_arg Rt00023 len Rt00023
397hp_arg Rt00024 len Rt00024
398hp_arg Rt00025 len Rt00025
399hp_arg Rt00026 len Rt00026
400hp_arg Rt00027 len Rt00027
401hp_arg Rt00028 len Rt00028
402hp_arg Rt00029 len Rt00029
403hp_arg Rt00030 len Rt00030
404if ge kind 4
405hp_arg Rt00031 len Rt00031
406if eq kind 5
407hp_arg Rt00032 len Rt00032
408end
409hp_arg Rt00033 len Rt00033
410hp_arg Rt00034 len Rt00034
411hp_arg Rt00035 len Rt00035
412hp_arg Rt00036 len Rt00036
413hp_arg Rt00037 len Rt00037
414hp_arg Rt00038 len Rt00038
415hp_arg Rt00039 len Rt00039
416hp_arg Rt00040 len Rt00040
417hp_arg Rt00041 len Rt00041
418hp_arg Rt00042 len Rt00042
419else
420if eq kind 1
421hp_arg Rt00043 len Rt00043
422hp_arg Rt00044 len Rt00044
423end
424if eq kind 2
425hp_arg Rt00045 len Rt00045
426hp_arg Rt00046 len Rt00046
427end
428if eq kind 3
429hp_arg Rt00047 len Rt00047
430hp_arg Rt00048 len Rt00048
431end
432hp_arg Rt00049 len Rt00049
433end
434hp_arg Rt00050 len Rt00050
435if eq kind 1
436hp_arg Rt00051 len Rt00051
437end
438if eq kind 2
439hp_arg Rt00052 len Rt00052
440end
441if eq kind 3
442hp_arg Rt00053 len Rt00053
443end
444if eq kind 4
445hp_arg Rt00054 len Rt00054
446end
447if eq kind 5
448hp_arg Rt00055 len Rt00055
449end
450hp_exec -1 -1 0
451end
452fn rh_get path view uchar * n ulong dst edit uchar 64 to void
453hp_tool 3
454hp_arg path n
455fd = int fopen Rt00056 0 len Rt00056 577 420
456hp_require ge fd 0
457hp_exec -1 fd 0
458hp_require eq fclose fd 0
459b = new uchar 2048 0
460used = hp_read Rt00056 len Rt00056 b 2048
461hp_require ge used 66
462hp_require eq get b 64 32
463for j ulong 64
464v = get b j
465hp_require or and ge v 48 le v 57 and ge v 97 le v 102
466put dst j v
467end
468end
469fn rt_pin to void
470path = new uchar 1024 0
471n = get HOn 0
472for j ulong n
473put path j get HOm j
474end
475h = new uchar 64 0
476rh_get path n h
477for j ulong 64
478hp_require eq get h j get Rt00057 j
479end
480end
481global RCFile int 1
482global RCCount ulong 1
483fn rc_text a view uchar * n ulong to void
484pos = ulong 0
485tries = ulong 0
486while lt pos n bound 999999
487z = write get RCFile 0 a pos sub n pos
488if eq z -4
489tries = add tries 1
490hp_require le tries 64
491else
492hp_require gt z 0
493pos = add pos ulong z
494end
495end
496end
497fn rc_quote a view uchar * n ulong to void
498rc_text Rt00058 len Rt00058
499b = new uchar 6 0
500for j ulong n
501v = get a j
502if or eq v 34 eq v 92
503put b 0 92
504put b 1 v
505rc_text b 2
506else
507if lt v 32
508put b 0 92
509put b 1 117
510put b 2 48
511put b 3 48
512hi = div ulong v 16
513lo = rem ulong v 16
514put b 4 uchar add hi 48
515if ge hi 10
516put b 4 uchar add hi 87
517end
518put b 5 uchar add lo 48
519if ge lo 10
520put b 5 uchar add lo 87
521end
522rc_text b 6
523else
524put b 0 v
525rc_text b 1
526end
527end
528end
529rc_text Rt00058 len Rt00058
530end
531fn rc_num n ulong to void
532b = new uchar 32 0
533used = hp_num n b
534rc_text b used
535end
536fn rc_hash path view uchar * n ulong to void
537h = new uchar 64 0
538rh_get path n h
539rc_quote h 64
540end
541fn rc_chash which ulong to void
542path = new uchar 256 0
543n = get KCAn 0
544if eq which 1
545n = get KCCn 0
546end
547for j ulong n
548if eq which 0
549put path j get KCActual j
550else
551put path j get KCCode j
552end
553end
554rc_hash path n
555end
556fn rc_numout to void
557path = new uchar 256 0
558n = get KCNn 0
559for j ulong n
560put path j get KCNum j
561end
562b = new uchar 8192 0
563used = hp_read path n b 8192
564hp_require gt used 0
565rc_quote b used
566end
567fn rc_record fam ulong idx ulong to void
568path = new uchar 256 0
569n = kc_name fam idx KCRText path
570b = new uchar 1024 0
571used = hp_read path n b 1024
572hp_require gt used 0
573rc_text RtRKey len RtRKey
574rc_quote b used
575end
576fn rc_case fam ulong idx ulong cfg view ulong 16 to void
577if ne get RCCount 0 0
578rc_text Rt00060 len Rt00060
579end
580rc_text Rt00062 len Rt00062
581if eq fam 1
582rc_quote Rt00063 len Rt00063
583end
584if eq fam 2
585rc_quote Rt00064 len Rt00064
586end
587if eq fam 3
588rc_quote Rt00065 len Rt00065
589end
590rc_text Rt00066 len Rt00066
591fields = ulong 5
592if eq fam 2
593fields = ulong 4
594end
595for j ulong fields
596if ne j 0
597rc_text Rt00060 len Rt00060
598end
599rc_num get cfg j
600end
601rc_text Rt00067 len Rt00067
602rc_chash 0
603rc_text Rt00068 len Rt00068
604rc_chash 1
605rc_text RtBytes len RtBytes
606rc_num get KCBytes 0
607rc_text Rt00069 len Rt00069
608rc_numout
609if eq fam 3
610rc_record fam idx
611end
612rc_text Rt00070 len Rt00070
613put RCCount 0 add get RCCount 0 1
614end
615fn rc_source path view uchar * n ulong to void
616rc_text Rt00060 len Rt00060
617rc_quote path n
618rc_text Rt00071 len Rt00071
619rc_hash path n
620end
621fn rc_begin to void
622fd = int fopen Rt00072 0 len Rt00072 577 420
623hp_require ge fd 0
624put RCFile 0 fd
625put RCCount 0 0
626rc_text Rt00073 len Rt00073
627end
628fn rc_finish to void
629hp_require eq get RCCount 0 28
630rc_text Rt00074 len Rt00074
631rc_hash Rt00075 len Rt00075
632rc_source Rt00076 len Rt00076
633rc_source Rt00077 len Rt00077
634rc_source Rt00078 len Rt00078
635rc_source Rt00079 len Rt00079
636rc_source Rt00080 len Rt00080
637rc_source Rt00081 len Rt00081
638rc_source Rt00082 len Rt00082
639rc_source Rt00083 len Rt00083
640rc_source Rt00084 len Rt00084
641rc_source Rt00085 len Rt00085
642rc_source Rt00086 len Rt00086
643rc_source Rt00087 len Rt00087
644rc_source Rt00088 len Rt00088
645rc_source Rt00089 len Rt00089
646rc_source Rt00090 len Rt00090
647rc_source Rt00091 len Rt00091
648rc_source Rt00092 len Rt00092
649rc_source Rt00093 len Rt00093
650rc_source Rt00094 len Rt00094
651rc_source Rt00095 len Rt00095
652rc_source Rt00096 len Rt00096
653rc_source Rt00097 len Rt00097
654rc_source RtSrc0 len RtSrc0
655rc_source RtSrc1 len RtSrc1
656rc_source RtSrc2 len RtSrc2
657rc_source RtSrc3 len RtSrc3
658rc_source RtSrc4 len RtSrc4
659rc_source RtSrc5 len RtSrc5
660rc_source RtSrc6 len RtSrc6
661rc_source RtSrc7 len RtSrc7
662rc_source RtSrc8 len RtSrc8
663rc_source RtSrc9 len RtSrc9
664rc_source RtSrc10 len RtSrc10
665rc_source RtSrc11 len RtSrc11
666rc_source RtSrc12 len RtSrc12
667rc_source RtSrc13 len RtSrc13
668rc_source RtAdmit len RtAdmit
669rc_source RtRUnit len RtRUnit
670rc_source RtCap len RtCap
671rc_source RtCapRun len RtCapRun
672rc_source RtVal len RtVal
673rc_source RtDig len RtDig
674rc_source RtRes len RtRes
675rc_source RtArt len RtArt
676rc_text Rt00060 len Rt00060
677rc_quote RtQuant len RtQuant
678rc_text Rt00071 len Rt00071
679path = new uchar 1024 0
680n = rt_qpath path
681rc_hash path n
682rc_text Rt00098 len Rt00098
683rc_quote Rt00099 len Rt00099
684rc_text Rt00071 len Rt00071
685rc_ehash Rt00099 len Rt00099
686rc_text Rt00060 len Rt00060
687rc_quote Rt00100 len Rt00100
688rc_text Rt00071 len Rt00071
689rc_ehash Rt00100 len Rt00100
690rc_text Rt00101 len Rt00101
691rc_ver 2 RtDFlag len RtDFlag
692rc_text RtCcVer len RtCcVer
693rc_ver 1 RtVFlag len RtVFlag
694rc_text RtShaVer len RtShaVer
695rc_ver 3 RtVFlag len RtVFlag
696rc_text RtCapRs len RtCapRs
697rc_text RtVEnd len RtVEnd
698hp_require eq fsync get RCFile 0 0
699hp_require eq fclose get RCFile 0 0
700end
701fn rc_ehash path view uchar * n ulong to void
702b = new uchar 1024 0
703used = rt_path path n b
704rc_hash b used
705end
706fn rt_epin suffix view uchar * n ulong expected view uchar 64 to void
707path = new uchar 1024 0
708used = rt_path suffix n path
709h = new uchar 64 0
710rh_get path used h
711for j ulong 64
712hp_require eq get h j get expected j
713end
714end
715fn rc_ver which ulong flag view uchar * n ulong to void
716hp_tool which
717hp_arg flag n
718fd = int fopen RtVerP 0 len RtVerP 577 420
719hp_require ge fd 0
720hp_exec -1 fd 0
721hp_require eq fclose fd 0
722b = new uchar 8192 0
723used = hp_read RtVerP len RtVerP b 8192
724hp_require gt used 0
725rc_quote b used
726end
727fn main to int
728if ne argcnt 7
729z = write 2 Rt00102 0 len Rt00102
730ret 64
731end
732n = argread 1 HOm 0 1024
733hp_require and gt n 0 le n 1024
734put HOn 0 ulong n
735n = argread 2 HEnc 0 1024
736hp_require and gt n 0 le n 1024
737put HEn 0 ulong n
738n = argread 3 HDis 0 1024
739hp_require and gt n 0 le n 1024
740put HDn 0 ulong n
741n = argread 4 HCc 0 1024
742hp_require and gt n 0 le n 1024
743put HCn 0 ulong n
744n = argread 5 HSha 0 1024
745hp_require and gt n 0 le n 1024
746put HSn 0 ulong n
747n = argread 6 HQuant 0 1024
748hp_require and gt n 0 le n 1024
749put HQn 0 ulong n
750z = makedir Rt00103 0 len Rt00103 493
751hp_require or eq z 0 eq z -17
752z = makedir Rt00104 0 len Rt00104 493
753hp_require or eq z 0 eq z -17
754rt_pin
755rt_epin Rt00099 len Rt00099 RtEncPin
756rt_epin Rt00100 len Rt00100 RtSpPin
757rt_qpin
758for i ulong 5
759rt_comp add i 1
760rt_cc add i 1
761end
762rt_comp 6
763rt_comp 7
764rt_comp 8
765rt_comp 9
766rt_comp 10
767hp_start RtCapB len RtCapB
768hp_exec -1 -1 0
769hp_start RtCapM1 len RtCapM1
770hp_exec -1 -1 103
771hp_start RtCapM2 len RtCapM2
772hp_exec -1 -1 103
773rt_comp 11
774hp_start RtCapRB len RtCapRB
775hp_exec -1 -1 0
776rc_begin
777kc_cases
778rc_finish
779rc_publish
780z = write 1 Rt00105 0 len Rt00105
781ret 0
782end