diff --git a/src/test/java/com/aparapi/runtime/Issue102Test.java b/src/test/java/com/aparapi/runtime/AccessGetterSetterTest.java similarity index 98% rename from src/test/java/com/aparapi/runtime/Issue102Test.java rename to src/test/java/com/aparapi/runtime/AccessGetterSetterTest.java index b3892d934f030d8a9fe554f78167c3ce37560127..9c7c1d6bd412d17a76d4ed5c1c8f7c4b9d3e48b1 100644 --- a/src/test/java/com/aparapi/runtime/Issue102Test.java +++ b/src/test/java/com/aparapi/runtime/AccessGetterSetterTest.java @@ -21,7 +21,7 @@ import org.junit.Test; import static org.junit.Assert.assertTrue; -public class Issue102Test { +public class AccessGetterSetterTest { @Test public void test() { diff --git a/src/test/java/com/aparapi/runtime/Issue81AtomicsSupportAdvTest.java b/src/test/java/com/aparapi/runtime/AtomicsSupportAdvTest.java similarity index 99% rename from src/test/java/com/aparapi/runtime/Issue81AtomicsSupportAdvTest.java rename to src/test/java/com/aparapi/runtime/AtomicsSupportAdvTest.java index 81d5a02d637eaf5495a578b3a05f664b69bdc74f..09ab4af626984cb8662f5587820c0cb25c4f1eae 100644 --- a/src/test/java/com/aparapi/runtime/Issue81AtomicsSupportAdvTest.java +++ b/src/test/java/com/aparapi/runtime/AtomicsSupportAdvTest.java @@ -39,7 +39,7 @@ import com.aparapi.internal.kernel.KernelManager; * Advanced tests for validation of the correctness of the atomics implementation both on Java and on OpenCL. * @author CodeRasurae */ -public class Issue81AtomicsSupportAdvTest { +public class AtomicsSupportAdvTest { private static OpenCLDevice openCLDevice = null; diff --git a/src/test/java/com/aparapi/runtime/Issue81AtomicsSupportTest.java b/src/test/java/com/aparapi/runtime/AtomicsSupportTest.java similarity index 99% rename from src/test/java/com/aparapi/runtime/Issue81AtomicsSupportTest.java rename to src/test/java/com/aparapi/runtime/AtomicsSupportTest.java index c1b6e3e11059eb20827339ca2608b603e8648f5d..2a8e772248301004aa1fcdf9341402f68dd93efc 100644 --- a/src/test/java/com/aparapi/runtime/Issue81AtomicsSupportTest.java +++ b/src/test/java/com/aparapi/runtime/AtomicsSupportTest.java @@ -38,7 +38,7 @@ import com.aparapi.internal.kernel.KernelManager; * Base tests for validation of the correctness of the atomics function computations, both on Java and on OpenCL. * @author CodeRasurae */ -public class Issue81AtomicsSupportTest { +public class AtomicsSupportTest { private static OpenCLDevice openCLDevice = null; diff --git a/src/test/java/com/aparapi/runtime/Issue84BarrierSupportTest.java b/src/test/java/com/aparapi/runtime/BarrierSupportTest.java similarity index 99% rename from src/test/java/com/aparapi/runtime/Issue84BarrierSupportTest.java rename to src/test/java/com/aparapi/runtime/BarrierSupportTest.java index a2b2c8e8a67b92cb0b35dacd372a26639472567d..f32468b479c5515c750acd0f004df0fd407f48d1 100644 --- a/src/test/java/com/aparapi/runtime/Issue84BarrierSupportTest.java +++ b/src/test/java/com/aparapi/runtime/BarrierSupportTest.java @@ -32,7 +32,7 @@ import java.util.List; import org.junit.Before; import org.junit.Test; -public class Issue84BarrierSupportTest { +public class BarrierSupportTest { private static OpenCLDevice openCLDevice = null; private static int SIZE; private int[] targetArray; diff --git a/src/test/java/com/aparapi/runtime/Issue68Test.java b/src/test/java/com/aparapi/runtime/FastNumberTheoreticTransformTest.java similarity index 97% rename from src/test/java/com/aparapi/runtime/Issue68Test.java rename to src/test/java/com/aparapi/runtime/FastNumberTheoreticTransformTest.java index fbc9e0dcd1101da88439fabff35cbac2871711eb..738d5756e86e0267ba56d7dfc29c0581fe2d3365 100644 --- a/src/test/java/com/aparapi/runtime/Issue68Test.java +++ b/src/test/java/com/aparapi/runtime/FastNumberTheoreticTransformTest.java @@ -19,14 +19,14 @@ import com.aparapi.Kernel; import org.junit.Ignore; import org.junit.Test; -public class Issue68Test { - @Ignore("Ported over but not working yet") +public class FastNumberTheoreticTransformTest { + @Ignore("No solution found yet") @Test public void test() { final int SQRT_LENGTH = 1024; final int LENGTH = SQRT_LENGTH * SQRT_LENGTH; final ArrayAccess arrayAccess = new IntMemoryArrayAccess(new int[LENGTH], 0, LENGTH); - new Issue68Test().transformColumns(SQRT_LENGTH, SQRT_LENGTH, false, arrayAccess, new int[SQRT_LENGTH], null); + new FastNumberTheoreticTransformTest().transformColumns(SQRT_LENGTH, SQRT_LENGTH, false, arrayAccess, new int[SQRT_LENGTH], null); } private void transformColumns(final int length, final int count, final boolean isInverse, final ArrayAccess arrayAccess, diff --git a/src/test/java/com/aparapi/runtime/Issue55Test.java b/src/test/java/com/aparapi/runtime/KernelManagerPreferredDeviceTest.java similarity index 97% rename from src/test/java/com/aparapi/runtime/Issue55Test.java rename to src/test/java/com/aparapi/runtime/KernelManagerPreferredDeviceTest.java index c2e9a26854fb6af80c5cb3cbf763d2ef043a9eee..096c69480cbef2a0618ec146923060a3179c150c 100644 --- a/src/test/java/com/aparapi/runtime/Issue55Test.java +++ b/src/test/java/com/aparapi/runtime/KernelManagerPreferredDeviceTest.java @@ -28,7 +28,7 @@ import com.aparapi.device.Device; import com.aparapi.internal.kernel.KernelManager; import com.aparapi.internal.kernel.KernelManagers; -public class Issue55Test { +public class KernelManagerPreferredDeviceTest { private Kernel testKernel; @Before diff --git a/src/test/java/com/aparapi/runtime/Issue79LocalArrayArgsTest.java b/src/test/java/com/aparapi/runtime/LocalArrayArgsTest.java similarity index 98% rename from src/test/java/com/aparapi/runtime/Issue79LocalArrayArgsTest.java rename to src/test/java/com/aparapi/runtime/LocalArrayArgsTest.java index 2d13b5c7ed6143eaae32e594e05c43f791166b1f..aba45b9efc522204deb5050538bb7461876a3366 100644 --- a/src/test/java/com/aparapi/runtime/Issue79LocalArrayArgsTest.java +++ b/src/test/java/com/aparapi/runtime/LocalArrayArgsTest.java @@ -27,7 +27,7 @@ import static org.junit.Assume.*; import org.junit.Before; import org.junit.Test; -public class Issue79LocalArrayArgsTest { +public class LocalArrayArgsTest { private static OpenCLDevice openCLDevice = null; private static final int SIZE = 32; private int[] targetArray; diff --git a/src/test/java/com/aparapi/runtime/Test12x4_4x2.java b/src/test/java/com/aparapi/runtime/Matrix12x4_4x2Test.java similarity index 99% rename from src/test/java/com/aparapi/runtime/Test12x4_4x2.java rename to src/test/java/com/aparapi/runtime/Matrix12x4_4x2Test.java index a1a72032cf9354788598bd29a6c312a4225ce277..e41882c5fb323b7c545eebb2f2c74db5c3757083 100644 --- a/src/test/java/com/aparapi/runtime/Test12x4_4x2.java +++ b/src/test/java/com/aparapi/runtime/Matrix12x4_4x2Test.java @@ -20,7 +20,7 @@ import com.aparapi.Range; import com.aparapi.device.Device; import org.junit.Test; -public class Test12x4_4x2 { +public class Matrix12x4_4x2Test { @SuppressWarnings("deprecation") @Test public void test() { diff --git a/src/test/java/com/aparapi/runtime/Issue69Test.java b/src/test/java/com/aparapi/runtime/MultiplePassesMemoryConsumptionTest.java similarity index 75% rename from src/test/java/com/aparapi/runtime/Issue69Test.java rename to src/test/java/com/aparapi/runtime/MultiplePassesMemoryConsumptionTest.java index d33243cbbc528edfd7daf43bcb21f9744e1949ed..aaa84cd97fbf5dd20bb62a56c0ee45d954a00514 100644 --- a/src/test/java/com/aparapi/runtime/Issue69Test.java +++ b/src/test/java/com/aparapi/runtime/MultiplePassesMemoryConsumptionTest.java @@ -20,7 +20,7 @@ import com.aparapi.Range; import org.junit.Assert; import org.junit.Test; -public class Issue69Test { +public class MultiplePassesMemoryConsumptionTest { @Test public void test() { @@ -31,22 +31,25 @@ public class Issue69Test { globalArray[getGlobalId()] = getGlobalId(); } }; + long baseFree = Runtime.getRuntime().freeMemory(); for (int loop = 0; loop < 100; loop++) { - - System.out.printf("%3d free = %10d\n", loop, Runtime.getRuntime().freeMemory()); + if( baseFree > Runtime.getRuntime().freeMemory()) + baseFree = Runtime.getRuntime().freeMemory(); kernel.execute(Range.create(512, 64), 1); for (int i = 0; i < globalArray.length; ++i) { Assert.assertEquals("Wrong", i, globalArray[i]); } } + long testFree = Runtime.getRuntime().freeMemory(); for (int loop = 0; loop < 100; loop++) { - - System.out.printf("%3d free = %10d\n", loop, Runtime.getRuntime().freeMemory()); + if( testFree > Runtime.getRuntime().freeMemory()) + testFree = Runtime.getRuntime().freeMemory(); kernel.execute(Range.create(512, 64), 2); for (int i = 0; i < globalArray.length; ++i) { Assert.assertEquals("Wrong", i, globalArray[i]); } } + Assert.assertTrue("Too much memory consumed", (baseFree - testFree) < 1000); } } diff --git a/src/test/java/com/aparapi/runtime/UseStaticArrayTest.java b/src/test/java/com/aparapi/runtime/StaticArrayAssignmentTest.java similarity index 91% rename from src/test/java/com/aparapi/runtime/UseStaticArrayTest.java rename to src/test/java/com/aparapi/runtime/StaticArrayAssignmentTest.java index 44e2a8222d276926650ca924992ae21446efed5e..887a13b9eb15c902792c24c23a0c2474d74d486e 100644 --- a/src/test/java/com/aparapi/runtime/UseStaticArrayTest.java +++ b/src/test/java/com/aparapi/runtime/StaticArrayAssignmentTest.java @@ -17,13 +17,15 @@ package com.aparapi.runtime; import com.aparapi.Kernel; import com.aparapi.device.Device; +import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertTrue; -public class UseStaticArrayTest { +public class StaticArrayAssignmentTest { @Test + @Ignore("Solution not implemented yet, will pass on cpu but not gpu") public void test() { UseStaticArrayKernel k = new UseStaticArrayKernel(); k.test(); @@ -54,9 +56,6 @@ public class UseStaticArrayTest { execute(size); assertArrayEquals("results == fooBar", results, values); -// for (int i = 0; i < size; i++) { -// assertTrue("results == fooBar", results[i] == values[i]); -// } } } } diff --git a/src/test/java/com/aparapi/runtime/StaticVariableAssignmentTest.java b/src/test/java/com/aparapi/runtime/StaticVariableAssignmentTest.java index f9e27b2ca3ca0c18f619cd038ef0f747eaf436e3..2eec2c87a7319250d15c39c7d68758d00dce2e86 100644 --- a/src/test/java/com/aparapi/runtime/StaticVariableAssignmentTest.java +++ b/src/test/java/com/aparapi/runtime/StaticVariableAssignmentTest.java @@ -24,7 +24,7 @@ import static org.junit.Assert.assertArrayEquals; public class StaticVariableAssignmentTest { @Test - @Ignore + @Ignore("Solution not implemented yet, will pass on cpu but not gpu") public void test() { Issue103Kernel b = new Issue103Kernel(); b.test();