< prev index next >

test/java/util/Arrays/ParallelPrefix.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test 8014076 8025067
  26  * @summary unit test for Arrays.ParallelPrefix().
  27  * @author Tristan Yan
  28  * @run testng ParallelPrefix
  29  * @key intermittent
  30  */
  31 
  32 import java.util.Arrays;
  33 import java.util.function.BinaryOperator;
  34 import java.util.function.DoubleBinaryOperator;
  35 import java.util.function.Function;
  36 import java.util.function.IntBinaryOperator;
  37 import java.util.function.LongBinaryOperator;
  38 import java.util.stream.IntStream;
  39 import java.util.stream.LongStream;
  40 import static org.testng.Assert.*;
  41 import org.testng.annotations.DataProvider;
  42 import org.testng.annotations.Test;
  43 
  44 public class ParallelPrefix {
  45     //Array size less than MIN_PARTITION
  46     private static final int SMALL_ARRAY_SIZE = 1 << 3;
  47 
  48     //Array size equals MIN_PARTITION
  49     private static final int THRESHOLD_ARRAY_SIZE = 1 << 4;




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test 8014076 8025067
  26  * @summary unit test for Arrays.ParallelPrefix().
  27  * @author Tristan Yan
  28  * @run testng ParallelPrefix

  29  */
  30 
  31 import java.util.Arrays;
  32 import java.util.function.BinaryOperator;
  33 import java.util.function.DoubleBinaryOperator;
  34 import java.util.function.Function;
  35 import java.util.function.IntBinaryOperator;
  36 import java.util.function.LongBinaryOperator;
  37 import java.util.stream.IntStream;
  38 import java.util.stream.LongStream;
  39 import static org.testng.Assert.*;
  40 import org.testng.annotations.DataProvider;
  41 import org.testng.annotations.Test;
  42 
  43 public class ParallelPrefix {
  44     //Array size less than MIN_PARTITION
  45     private static final int SMALL_ARRAY_SIZE = 1 << 3;
  46 
  47     //Array size equals MIN_PARTITION
  48     private static final int THRESHOLD_ARRAY_SIZE = 1 << 4;


< prev index next >