Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Oct 23, 2023
1 parent c04393e commit a1f6e76
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Modules.Packed/OpenCLABC.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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<ValueTuple<CLContext,TimeSpan>>;
public static function GenerateAndCheckAllPossible(test_size: integer := 1024*24; test_max_seconds: real := 5): List<ValueTuple<CLContext,TimeSpan>>;

private static function LoadTestContext: CLContext;

Expand Down Expand Up @@ -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<CLDevice>(dvcs.Count);
foreach var choise in |true,false|.CartesianPower(dvcs.Count) do
Expand Down
3 changes: 2 additions & 1 deletion Packing/Descriptions/OpenCLABC.predoc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ValueTuple<CLContext,TimeSpan>>;
public static function GenerateAndCheckAllPossible(test_size: integer := 1024*24; test_max_seconds: real := 5): List<ValueTuple<CLContext,TimeSpan>>;

private static function LoadTestContext: CLContext;

Expand Down Expand Up @@ -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<CLDevice>(dvcs.Count);
foreach var choise in |true,false|.CartesianPower(dvcs.Count) do
Expand Down
8 changes: 6 additions & 2 deletions Tests/CLContextGen.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion Tests/Tester.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit a1f6e76

Please sign in to comment.