Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/GAP/pkg/io/example/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 21.5.2025 mit Größe 340 B image not shown  

Quelle  parlist1.g   Sprache: unbekannt

 
LoadPackage("io");

# This is silly, since the communication dominates everything timewise,
# and in actual fact we serialise this. But nevertheless, it works:

l := [1..1000000]*2;

ll := ParListByFork(l,function(x) return x^2; end,
                    rec( NumberJobs := 3 ));
if ll <> List(l,x->x^2) then
    Error("did not work");
fi;


[ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ]