Threads
Mul
a parallel implementation of mul
Calling Sequence
Parameters
Description
Examples
Mul( f,i = m..n )
Mul( f,i = x )
Mul( f,i in x )
Mul[ tasksize = s ]( ... )
f
-
(expression)
i
(name)
m, n
numeric value
x
s
(optional, posint) maximum task size
The Mul command is a parallel implementation of the mul command. For a complete description of the calling sequence of Mul, see the mul help page.
Mul is implemented using the Task programming model.
Mul attempts to determine how to divide the input into separate tasks to spread the work across all available cores. However in some situations Mul may not choose the optimal size. In particular a small number of long running tasks may not be spread evenly over all threads. In this case, you can specify the maximum task size using the tasksize option. Mul will divide the input into tasks that compute at most tasksize elements within a single task.
with⁡Threads:
Mul⁡i,i=1..5
120
L≔seq⁡i,i=1..5
L≔1,2,3,4,5
Mul⁡x−i,i=L
x−1⁢x−2⁢x−3⁢x−4⁢x−5
Mul⁡i,i=0..−∞
1
See Also
mul
Threads[Add]
Threads[Map]
Threads[Seq]
Download Help Document