@@ -0,0 +1,1945 @@
+/**%0A * Copyright (c) 2016 - 2018 Syncleus, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.aparapi.runtime;%0A%0Aimport com.aparapi.Kernel;%0Aimport com.aparapi.Range;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class IntArray2DTest %7B%0A    @Test%0A    public void test() %7B%0A        int size = 1048576;%0A        final int count = 3;%0A        final int%5B%5D%5B%5D V = new int%5Bcount%5D%5Bsize%5D;%0A%0A        //lets fill in V randomly...%0A        for (int j = 0; j %3C count; j++) %7B%0A            for (int i = 0; i %3C size; i++) %7B%0A                //random number either 0, 1, or 2%0A                V%5Bj%5D%5Bi%5D = (int) (Math.random() * 3);%0A            %7D%0A        %7D%0A%0A        Kernel sumConstantKernel= null;%0A        final int totals%5B%5D%5B%5D = V;%0A        try %7B%0A            sumConstantKernel = new Kernel() %7B%0A                @Override%0A                public void run() %7B%0A                    int gid = getGlobalId();%0A                    for(int index = 0; index %3C count; index++) %7B%0A                        totals%5Bindex%5D%5Bgid%5D += gid + 1;%0A                    %7D%0A                %7D%0A            %7D;%0A            sumConstantKernel.execute(Range.create(size));%0A        %7D finally %7B%0A            sumConstantKernel.dispose();%0A        %7D%0A%0A        for (int index = 0; index %3C count; index++) %7B%0A            for (int gid = 0; gid %3C size; gid++) %7B%0A                assertEquals(V%5Bindex%5D%5Bgid%5D + gid + 1, totals%5Bindex%5D%5Bgid%5D);%0A            %7D%0A        %7D%0A    %7D%0A%7D

Add test for #153 - IntArray2DTest (refs #153)