From a1f6e76aeefd79efab32fdc374bd0bc40d14eb5c Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Mon, 23 Oct 2023 16:50:11 +0300 Subject: [PATCH] cleanup --- Modules.Packed/OpenCLABC.pas | 3 ++- Packing/Descriptions/OpenCLABC.predoc | 3 ++- Tests/CLContextGen.pas | 8 ++++++-- Tests/Tester.pas | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Modules.Packed/OpenCLABC.pas b/Modules.Packed/OpenCLABC.pas index 2461fe68..ee3a8c13 100644 --- a/Modules.Packed/OpenCLABC.pas +++ b/Modules.Packed/OpenCLABC.pas @@ -3263,7 +3263,7 @@ CLArrayProperties = class public function TestSanity(test_size: integer := 1024*24): TimeSpan?; - public static function GenerateAndCheckAllPossible(test_size: integer := 1024*24; test_max_seconds: real := 0.5): List>; + public static function GenerateAndCheckAllPossible(test_size: integer := 1024*24; test_max_seconds: real := 5): List>; private static function LoadTestContext: CLContext; @@ -35432,6 +35432,7 @@ function CLContext.TestSanity(test_size: integer): TimeSpan?; for var i := 0 to dvcs.Count-1 do if not keep[i] then dvcs[i] := nil; dvcs.RemoveAll(d->d=nil); + if dvcs.Count=0 then continue; var chosen := new List(dvcs.Count); foreach var choise in |true,false|.CartesianPower(dvcs.Count) do diff --git a/Packing/Descriptions/OpenCLABC.predoc b/Packing/Descriptions/OpenCLABC.predoc index 35936cf2..024cd217 100644 --- a/Packing/Descriptions/OpenCLABC.predoc +++ b/Packing/Descriptions/OpenCLABC.predoc @@ -3159,7 +3159,7 @@ type public function TestSanity(test_size: integer := 1024*24): TimeSpan?; - public static function GenerateAndCheckAllPossible(test_size: integer := 1024*24; test_max_seconds: real := 0.5): List>; + public static function GenerateAndCheckAllPossible(test_size: integer := 1024*24; test_max_seconds: real := 5): List>; private static function LoadTestContext: CLContext; @@ -34357,6 +34357,7 @@ begin for var i := 0 to dvcs.Count-1 do if not keep[i] then dvcs[i] := nil; dvcs.RemoveAll(d->d=nil); + if dvcs.Count=0 then continue; var chosen := new List(dvcs.Count); foreach var choise in |true,false|.CartesianPower(dvcs.Count) do diff --git a/Tests/CLContextGen.pas b/Tests/CLContextGen.pas index 634aaaf4..6a2e6b8b 100644 --- a/Tests/CLContextGen.pas +++ b/Tests/CLContextGen.pas @@ -9,10 +9,14 @@ begin var bw := new System.IO.BinaryWriter(System.IO.File.Create($'{dir}/{i}.dat')); - bw.Write(c.MainDevice.BaseCLPlatform.Properties.Name); + $'Platform:'.Print; + bw.Write(c.MainDevice.BaseCLPlatform.Properties.Name.Println); bw.Write(c.AllDevices.Count); foreach var dvc in c.AllDevices do - bw.Write(dvc.Properties.Name); + begin + $'Device:'.Print; + bw.Write(dvc.Properties.Name.Println); + end; bw.Close; end; \ No newline at end of file diff --git a/Tests/Tester.pas b/Tests/Tester.pas index 8c149a1b..950700eb 100644 --- a/Tests/Tester.pas +++ b/Tests/Tester.pas @@ -543,7 +543,7 @@ Otp($'Running Tests/CLContextGen.exe'); RunFile('Tests/CLContextGen.exe', nil, new_timer->(core_timer.cl_context_gen_exec := SimpleTimer(new_timer)), - l->exit(), nil + l->Otp($'CLContextGen: {l}', lk_console_only), nil ); Otp($'Finished running Tests/CLContextGen.exe');