Top
Back: parallelWaitAll
Forward: parallelTestOR
FastBack:
FastForward:
Up: parallel_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.7.4 parallelTestAND

Procedure from library parallel.lib (see parallel_lib).

Usage:
parallelTestAND(commands, arguments[, timeout]); commands list or string, arguments list, timeout int

Return:
1, if commands[i] applied to arguments[i] is not equal to zero for all 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.

Note:
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.

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


Top Back: parallelWaitAll Forward: parallelTestOR FastBack: FastForward: Up: parallel_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4-0-3, 2016, generated by texi2html.