From c7cd214e872384b9bef5b85a26093942fcc13f15 Mon Sep 17 00:00:00 2001 From: Gary Frost <frost.gary@gmail.com> Date: Mon, 29 Oct 2012 23:19:24 +0000 Subject: [PATCH] --- .../amd/aparapi/test/runtime/RangeSize.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/runtime/src/java/com/amd/aparapi/test/runtime/RangeSize.java diff --git a/test/runtime/src/java/com/amd/aparapi/test/runtime/RangeSize.java b/test/runtime/src/java/com/amd/aparapi/test/runtime/RangeSize.java new file mode 100644 index 00000000..f2ca745f --- /dev/null +++ b/test/runtime/src/java/com/amd/aparapi/test/runtime/RangeSize.java @@ -0,0 +1,27 @@ +package com.amd.aparapi.test.runtime; + +import com.amd.aparapi.Range; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class RangeSize{ + + @Test public void test384x384() { + Range range = Range.create2D(384,384); + System.out.println("local[0] "+range.getLocalSize(0)); + System.out.println("local[1] "+range.getLocalSize(1)); + System.out.println("workGroupSize "+range.getWorkGroupSize()); + assertTrue("Range > max work size", range.getLocalSize(0)*range.getLocalSize(1)<=range.getWorkGroupSize()); + } + + @Test public void test384x320() { + Range range = Range.create2D(384,320); + System.out.println("local[0] "+range.getLocalSize(0)); + System.out.println("local[1] "+range.getLocalSize(1)); + System.out.println("workGroupSize "+range.getWorkGroupSize()); + assertTrue("Range > max work size", range.getLocalSize(0)*range.getLocalSize(1)<=range.getWorkGroupSize()); + } + +} -- GitLab