[cleaup] Remove unused snippet with local memory
@@ -549,51 +549,6 @@ public class ReduceGPUSnippets implements Snippets {
}
}
- /**
- * Full reduction in global memory for GPU.
- *
- * @param inputArray
- * @param outputArray
- * @param gidx
- */
- @Snippet
- public static void reduceIntAddLocalMemory(int[] inputArray, int[] outputArray, int gidx) {
- int localIdx = OpenCLIntrinsics.get_local_id(0);
- int localGroupSize = OpenCLIntrinsics.get_local_size(0);
- int groupID = OpenCLIntrinsics.get_group_id(0);
- int globalSize = OpenCLIntrinsics.get_global_size(0);
-
- int myID = localIdx + (localGroupSize * groupID);
-
- int sizeLocalMemory = 512;
- int[] localMemory = new int[sizeLocalMemory];
- // OpenCLIntrinsics.createLocalMemory(localMemory, sizeLocalMemory);
- localMemory[localIdx] = inputArray[myID];
-
- for (int stride = (localGroupSize / 2); stride > 0; stride /= 2) {
- OpenCLIntrinsics.localBarrier();
- if (localIdx < stride) {
- localMemory[localIdx] += localMemory[localIdx + stride];
- }
- }
-
- OpenCLIntrinsics.globalBarrier();
- if (localIdx == 0) {
- outputArray[groupID] = localMemory[0];
- }
-
- OpenCLIntrinsics.globalBarrier();
- if (myID == 0) {
- int numGroups = globalSize / localGroupSize;
- int acc = outputArray[0];
- for (int i = 1; i < numGroups; i++) {
- OpenCLIntrinsics.printEmpty();
- acc += outputArray[i];
- }
- outputArray[0] = acc;
- }
- }
-
public static class Templates extends AbstractTemplates implements TornadoSnippetTypeInference {
@SuppressWarnings("unused")
@@ -627,9 +582,6 @@ public class ReduceGPUSnippets implements Snippets {
private final SnippetInfo partialReduceMinFloatSnippetGlobal = snippet(ReduceGPUSnippets.class, "partialReduceFloatMinGlobal");
private final SnippetInfo partialReduceMinDoubleSnippetGlobal = snippet(ReduceGPUSnippets.class, "partialReduceDoubleMinGlobal");
- @SuppressWarnings("unused")
- private final SnippetInfo reduceIntSnippetLocalMemory = snippet(ReduceGPUSnippets.class, "reduceIntAddLocalMemory");
-
public Templates(OptionValues options, Providers providers, SnippetReflectionProvider snippetReflection, TargetDescription target) {
super(options, providers, snippetReflection, target);
}
