From bb7ba8ec54bb1a53152cde7ca977f6216857c07d Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Mon, 22 Apr 2024 19:05:10 +0200 Subject: [PATCH] fix \n => \r\n in pascal files --- .../01#Const/1.pas" | 12 ++--- .../02#Parameter/1.pas" | 12 ++--- .../ThenConvUse_ConstDelayedFunc.pas" | 50 +++++++++---------- .../05#Multiusable/discard single res.pas" | 18 +++---- .../05#Multiusable/prev mu check.pas" | 18 +++---- .../05#Multiusable/~07#HostExec/Quick+MU.pas" | 6 +-- .../07#GPUCommandContainer/enq cancel.pas" | 46 ++++++++--------- .../enq err storage.pas" | 20 ++++---- .../~00#Err/LazyQuickErr.pas" | 16 +++--- .../08#HostExec/~00#Err/insta err.pas" | 14 +++--- .../~05#Wait/QuickUse.ThenWait.pas" | 34 ++++++------- .../Exec/CLABC/03#ToString/02#Parameter/1.pas | 6 +-- .../CLABC/03#ToString/03#Cast/typed nil.pas | 4 +- .../CLABC/03#ToString/11#Finally+Handle/1.pas | 14 +++--- 14 files changed, 135 insertions(+), 135 deletions(-) diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/01#Const/1.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/01#Const/1.pas" index 1b46baeb..87944f34 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/01#Const/1.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/01#Const/1.pas" @@ -1,7 +1,7 @@ -## uses OpenCLABC; - -var C := CQ(5); - -CLContext.Default.SyncInvoke( - CombineConvAsyncQueue(a->a, |C,C.ThenConvert(x->x*x, false)|, false).Print +## uses OpenCLABC; + +var C := CQ(5); + +CLContext.Default.SyncInvoke( + CombineConvAsyncQueue(a->a, |C,C.ThenConvert(x->x*x, false)|, false).Print ).Println; \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/02#Parameter/1.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/02#Parameter/1.pas" index 436e8d1a..ce4e727d 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/02#Parameter/1.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/02#Parameter/1.pas" @@ -1,7 +1,7 @@ -## uses OpenCLABC; - -var P := new ParameterQueue('P'); - -CLContext.Default.SyncInvoke( - CombineConvAsyncQueue(a->a, |P,P.ThenConvert(x->x*x, false)|, false), +## uses OpenCLABC; + +var P := new ParameterQueue('P'); + +CLContext.Default.SyncInvoke( + CombineConvAsyncQueue(a->a, |P,P.ThenConvert(x->x*x, false)|, false), P.NewSetter(5)).Println; \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/04#ThenConvert/ThenConvUse_ConstDelayedFunc.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/04#ThenConvert/ThenConvUse_ConstDelayedFunc.pas" index c31bc17f..c70f4ee9 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/04#ThenConvert/ThenConvUse_ConstDelayedFunc.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/04#ThenConvert/ThenConvUse_ConstDelayedFunc.pas" @@ -1,26 +1,26 @@ -## uses OpenCLABC; - -procedure Test(q: CommandQueue); -begin - q.Print; - - ('-'*30).Println; - CLContext.Default.SyncInvoke(q - .ThenUse(x->Println(x)) - .ThenConvert(x->(x*x).Println) - .ThenUse(x->Println(x)) - ); - - ('-'*30).Println; - CLContext.Default.SyncInvoke(q - .ThenUse(x->Println(x), false) - .ThenConvert(x->(x*x).Println, false) - .ThenUse(x->Println(x+1), false) - ); - - ('='*30).Println; -end; - -Test(2); -Test(HFQ(()->3)); +## uses OpenCLABC; + +procedure Test(q: CommandQueue); +begin + q.Print; + + ('-'*30).Println; + CLContext.Default.SyncInvoke(q + .ThenUse(x->Println(x)) + .ThenConvert(x->(x*x).Println) + .ThenUse(x->Println(x)) + ); + + ('-'*30).Println; + CLContext.Default.SyncInvoke(q + .ThenUse(x->Println(x), false) + .ThenConvert(x->(x*x).Println, false) + .ThenUse(x->Println(x+1), false) + ); + + ('='*30).Println; +end; + +Test(2); +Test(HFQ(()->3)); Test(HFQ(()->4 as object).Cast&); \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/discard single res.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/discard single res.pas" index 1db59836..d84a199b 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/discard single res.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/discard single res.pas" @@ -1,10 +1,10 @@ -## uses OpenCLABC; - -var Q := HFQ(()->123).Multiusable; -CLContext.Default.SyncInvoke( - Q.DiscardResult -// CombineConvAsyncQueueN2((a,b)->(a,b), Q, Q, false) -// Q*Q -// Q.ThenUse(x->Println(x), false)*Q -);//.Println; +## uses OpenCLABC; + +var Q := HFQ(()->123).Multiusable; +CLContext.Default.SyncInvoke( + Q.DiscardResult +// CombineConvAsyncQueueN2((a,b)->(a,b), Q, Q, false) +// Q*Q +// Q.ThenUse(x->Println(x), false)*Q +);//.Println; //EventDebug.ReportEventLogs; \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/prev mu check.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/prev mu check.pas" index 0d392f8d..f9f781d4 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/prev mu check.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/prev mu check.pas" @@ -1,10 +1,10 @@ -## uses OpenCLABC; - -var wh := new System.Threading.ManualResetEventSlim(false); -var Q := (HPQ(wh.Wait)+HFQ(()->123)).Multiusable; -var t := CLContext.Default.BeginInvoke( - Q * - Q.ThenUse(x->Println(x)) -); -wh.Set; +## uses OpenCLABC; + +var wh := new System.Threading.ManualResetEventSlim(false); +var Q := (HPQ(wh.Wait)+HFQ(()->123)).Multiusable; +var t := CLContext.Default.BeginInvoke( + Q * + Q.ThenUse(x->Println(x)) +); +wh.Set; t.Wait; \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/~07#HostExec/Quick+MU.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/~07#HostExec/Quick+MU.pas" index 79023400..6ce582c0 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/~07#HostExec/Quick+MU.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/05#Multiusable/~07#HostExec/Quick+MU.pas" @@ -1,4 +1,4 @@ -## uses OpenCLABC; - -var Q := HFQ(()->(1).Println+1, false).Multiusable; +## uses OpenCLABC; + +var Q := HFQ(()->(1).Println+1, false).Multiusable; CLContext.Default.SyncInvoke(CombineConvSyncQueue(a->a, |Q,Q|, false,true).Println).Println; \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/enq cancel.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/enq cancel.pas" index a26c7093..9686d273 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/enq cancel.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/enq cancel.pas" @@ -1,24 +1,24 @@ -## uses OpenCLABC; - -var a := new CLArray(1); -var wh := new System.Threading.ManualResetEventSlim(false); -CLContext.Default.SyncInvoke( - ( - HPQ(()-> - begin - wh.Wait; - $'HPQ+1'.Println; - raise new Exception('TestOK+1'); - end) + - CQ(a) - ).MakeCCQ.ThenWriteValue(0, HFQ(()-> - begin - Result := 0; - $'HFQ+2'.Println; - wh.Set; - raise new Exception('TestOK+2'); - end)) - .HandleWithoutRes(e->e.Message.Println <> nil) -); -a.Dispose; +## uses OpenCLABC; + +var a := new CLArray(1); +var wh := new System.Threading.ManualResetEventSlim(false); +CLContext.Default.SyncInvoke( + ( + HPQ(()-> + begin + wh.Wait; + $'HPQ+1'.Println; + raise new Exception('TestOK+1'); + end) + + CQ(a) + ).MakeCCQ.ThenWriteValue(0, HFQ(()-> + begin + Result := 0; + $'HFQ+2'.Println; + wh.Set; + raise new Exception('TestOK+2'); + end)) + .HandleWithoutRes(e->e.Message.Println <> nil) +); +a.Dispose; $'Expect 3 evs: HPQ + HFQ + async enq'.Println; \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/enq err storage.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/enq err storage.pas" index 739aa81c..ddc96058 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/enq err storage.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/enq err storage.pas" @@ -1,11 +1,11 @@ -## uses OpenCLABC; - -var a := new CLArray(1); -var wh := new System.Threading.ManualResetEventSlim(false); -var t := CLContext.Default.BeginInvoke( - (HPQ(wh.Wait) + CQ(a)).MakeCCQ.ThenWriteArray(HFQ(()->nil as array of integer, false)) - .HandleWithoutRes(e->TypeName(e).Println <> nil) -); -wh.Set; -t.Wait; +## uses OpenCLABC; + +var a := new CLArray(1); +var wh := new System.Threading.ManualResetEventSlim(false); +var t := CLContext.Default.BeginInvoke( + (HPQ(wh.Wait) + CQ(a)).MakeCCQ.ThenWriteArray(HFQ(()->nil as array of integer, false)) + .HandleWithoutRes(e->TypeName(e).Println <> nil) +); +wh.Set; +t.Wait; a.Dispose; \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/~00#Err/LazyQuickErr.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/~00#Err/LazyQuickErr.pas" index a7c17a8f..c9618b6b 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/~00#Err/LazyQuickErr.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/07#GPUCommandContainer/~00#Err/LazyQuickErr.pas" @@ -1,9 +1,9 @@ -## uses OpenCLABC; - -CLContext.Default.SyncInvoke( - CLMemoryCCQ.Create(HFQ(()->new CLMemory(1))).ThenWriteArray1(HFQ(()-> - begin - Result := new byte[0]; - raise new Exception('TestOK'); - end, false)) +## uses OpenCLABC; + +CLContext.Default.SyncInvoke( + CLMemoryCCQ.Create(HFQ(()->new CLMemory(1))).ThenWriteArray1(HFQ(()-> + begin + Result := new byte[0]; + raise new Exception('TestOK'); + end, false)) ); \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/08#HostExec/~00#Err/insta err.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/08#HostExec/~00#Err/insta err.pas" index c97e34e7..a6a7b22d 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/08#HostExec/~00#Err/insta err.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/08#HostExec/~00#Err/insta err.pas" @@ -1,8 +1,8 @@ -## uses OpenCLABC; - -CLContext.Default.SyncInvoke( - ( - HPQ(()->raise new Exception('TestOK'), need_own_thread:=false) + - HPQ(()->raise new Exception('TestError'), need_own_thread:=false) - ).HandleWithoutRes(e->e.Message.Println <> nil) +## uses OpenCLABC; + +CLContext.Default.SyncInvoke( + ( + HPQ(()->raise new Exception('TestOK'), need_own_thread:=false) + + HPQ(()->raise new Exception('TestError'), need_own_thread:=false) + ).HandleWithoutRes(e->e.Message.Println <> nil) ); \ No newline at end of file diff --git "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/08#HostExec/~05#Wait/QuickUse.ThenWait.pas" "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/08#HostExec/~05#Wait/QuickUse.ThenWait.pas" index 03eeb668..45e61e4e 100644 --- "a/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/08#HostExec/~05#Wait/QuickUse.ThenWait.pas" +++ "b/Tests/Exec/CLABC/02#\320\222\321\213\320\277\320\276\320\273\320\275\320\265\320\275\320\270\320\265 \320\276\321\207\320\265\321\200\320\265\320\264\320\265\320\271/08#HostExec/~05#Wait/QuickUse.ThenWait.pas" @@ -1,18 +1,18 @@ -## uses OpenCLABC; - -var M := WaitMarker.Create; - -var mre := new System.Threading.ManualResetEventSlim(false); -CLContext.Default.SyncInvoke( - HPQ(()-> - begin - mre.Wait; - 'M'.Println; - M.SendSignal; - end) * - HFQ(()->5).ThenUse(x-> - begin - $'/\{x}/\'.Println; - mre.Set; - end, false).ThenWaitFor(M) +## uses OpenCLABC; + +var M := WaitMarker.Create; + +var mre := new System.Threading.ManualResetEventSlim(false); +CLContext.Default.SyncInvoke( + HPQ(()-> + begin + mre.Wait; + 'M'.Println; + M.SendSignal; + end) * + HFQ(()->5).ThenUse(x-> + begin + $'/\{x}/\'.Println; + mre.Set; + end, false).ThenWaitFor(M) ).Println; \ No newline at end of file diff --git a/Tests/Exec/CLABC/03#ToString/02#Parameter/1.pas b/Tests/Exec/CLABC/03#ToString/02#Parameter/1.pas index 2c33d0fc..9d8ed782 100644 --- a/Tests/Exec/CLABC/03#ToString/02#Parameter/1.pas +++ b/Tests/Exec/CLABC/03#ToString/02#Parameter/1.pas @@ -1,4 +1,4 @@ -## uses OpenCLABC; - -Write(new ParameterQueue('P1', 1)); +## uses OpenCLABC; + +Write(new ParameterQueue('P1', 1)); Write(new ParameterQueue('P2', 2)); \ No newline at end of file diff --git a/Tests/Exec/CLABC/03#ToString/03#Cast/typed nil.pas b/Tests/Exec/CLABC/03#ToString/03#Cast/typed nil.pas index e053e9ec..2cb3e856 100644 --- a/Tests/Exec/CLABC/03#ToString/03#Cast/typed nil.pas +++ b/Tests/Exec/CLABC/03#ToString/03#Cast/typed nil.pas @@ -1,3 +1,3 @@ -## uses OpenCLABC; - +## uses OpenCLABC; + HPQ(()->begin end).Cast&.Print; \ No newline at end of file diff --git a/Tests/Exec/CLABC/03#ToString/11#Finally+Handle/1.pas b/Tests/Exec/CLABC/03#ToString/11#Finally+Handle/1.pas index e9363f76..6c41e699 100644 --- a/Tests/Exec/CLABC/03#ToString/11#Finally+Handle/1.pas +++ b/Tests/Exec/CLABC/03#ToString/11#Finally+Handle/1.pas @@ -1,8 +1,8 @@ -## uses OpenCLABC; - -var Q := HFQ(()->1); - -(Q >= Q).Println; -Q.HandleWithoutRes(e->true).Println; -Q.HandleDefaultRes(e->true, 2).Println; +## uses OpenCLABC; + +var Q := HFQ(()->1); + +(Q >= Q).Println; +Q.HandleWithoutRes(e->true).Println; +Q.HandleDefaultRes(e->true, 2).Println; Q.HandleReplaceRes(lst->3).Println; \ No newline at end of file