Package es.upm.etsisi.cf4j.util.process
Class Parallelizer
- java.lang.Object
-
- es.upm.etsisi.cf4j.util.process.Parallelizer
-
public class Parallelizer extends Object
This class is used to simplify the parallelization of collaborative filtering algorithms
-
-
Constructor Summary
Constructors Constructor Description Parallelizer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
exec(Object[] objects, Partible partible)
Execs Partible for each object contained in the objects array.static void
exec(Object[] objects, Partible partible, int numThreads)
Execs Partible for each object contained in the objects array.
-
-
-
Method Detail
-
exec
public static void exec(Object[] objects, Partible partible)
Execs Partible for each object contained in the objects array. Each execution is run in parallel way. All available threads of the CPU will be used.- Parameters:
objects
- Array of objects to be executed in parallelpartible
- Partible to be executed for each object of the array
-
exec
public static void exec(Object[] objects, Partible partible, int numThreads)
Execs Partible for each object contained in the objects array. Each execution is run in parallel way.- Parameters:
objects
- Array of objects to be executed in parallelpartible
- Partible to be executed for each object of the arraynumThreads
- Number of threads to be launched in parallel
-
-