Home Online Manual
Back: parallelTestAND
Forward: poly_lib
Up: parallel_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.7.5 parallelTestOR

Procedure from library parallel.lib (see parallel_lib).

parallelTestOR(commands, arguments[, timeout]); commands list or string, arguments list, timeout int

1, if commands[i] applied to arguments[i] is not equal to zero for any i = 1, ..., size(arguments);
0, otherwise.
An optional timeout in ms can be provided. Default is 0 which disables the timeout. In case of timeout, -1 is returned.

The entries of the list commands must be strings. The entries of the list arguments must be lists.
commands[i] applied to arguments[i] must evaluate to an integer for i = 1, ..., size(arguments).
As a shortcut, commands can be a string. This is synonymous to providing a list of size(arguments) copies of this string.

LIB "parallel.lib";
ring R = 0, (x,y,z), dp;
ideal I;
string s;
list l;
module m1 = x*gen(1);
module m2;
string command = "size";
list arguments1 = list(list(I), list(s), list(l), list(m1));
list arguments2 = list(list(I), list(s), list(l), list(m2));
// test if any of the arguments has non-zero size
parallelTestOR(command, arguments1);
==> 1
parallelTestOR(command, arguments2);
==> 0
See also: parallelTestAND; tasks_lib.