Package jromp.parallel.utils
Class Utils
java.lang.Object
jromp.parallel.utils.Utils
Utility methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
checkThreads
(int threads) Check the number of threads.static boolean
isMaster
(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:
true
if the thread is the master thread,false
otherwise.
-