Package jromp.parallel.utils
Class Utils
java.lang.Object
jromp.parallel.utils.Utils
Utility methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcheckThreads(int threads) Check the number of threads.static booleanisMaster(int id) Check if the thread is the master thread.
-
Method Details
-
checkThreads
public static int checkThreads(int threads) Check the number of threads.- Parameters:
threads- The number of threads.- Returns:
- The number of threads.
-
isMaster
public static boolean isMaster(int id) Check if the thread is the master thread.- Parameters:
id- The thread ID.- Returns:
trueif the thread is the master thread,falseotherwise.
-