[docs] javadoc added for reduce and local group size calculation
@@ -612,14 +612,23 @@ class ReduceTaskSchedule {
return Runtime.getRuntime().availableProcessors() + 1;
case GPU:
case ACCELERATOR:
- return inputSize > calculateGroupSize(deviceToRun, inputSize) ? (inputSize / calculateGroupSize(deviceToRun, inputSize)) + 1 : 2;
+ return inputSize > calculateAcceleratorGroupSize(deviceToRun, inputSize) ? (inputSize / calculateAcceleratorGroupSize(deviceToRun, inputSize)) + 1 : 2;
default:
break;
}
return 0;
}
- private static int calculateGroupSize(TornadoDevice device, long globalWorkSize) {
+ /**
+ * It computes the right local work group size for GPUs/FPGAs.
+ *
+ * @param device
+ * Input device.
+ * @param globalWorkSize
+ * Number of global threads to run.
+ * @return Local Work Threads.
+ */
+ private static int calculateAcceleratorGroupSize(TornadoDevice device, long globalWorkSize) {
if (device.getPlatformName().contains("AMD")) {
return DEFAULT_GPU_WORK_GROUP;
