min-guk commented on code in PR #2103: URL: https://github.com/apache/systemds/pull/2103#discussion_r1748066375
########## src/test/java/org/apache/sysds/test/functions/reorg/FullRollTest.java: ########## @@ -0,0 +1,137 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.sysds.test.functions.reorg; + +import org.apache.sysds.api.DMLScript; +import org.apache.sysds.common.Types.ExecMode; +import org.apache.sysds.common.Types.ExecType; +import org.apache.sysds.runtime.instructions.Instruction; +import org.apache.sysds.runtime.matrix.data.MatrixValue.CellIndex; +import org.apache.sysds.test.AutomatedTestBase; +import org.apache.sysds.test.TestConfiguration; +import org.apache.sysds.test.TestUtils; +import org.apache.sysds.utils.Statistics; +import org.junit.Assert; +import org.junit.Test; + +import java.util.HashMap; + + +public class FullRollTest extends AutomatedTestBase +{ + private final static String TEST_NAME1 = "Roll1"; + private final static String TEST_NAME2 = "Roll2"; + + private final static String TEST_DIR = "functions/reorg/"; + private static final String TEST_CLASS_DIR = TEST_DIR + FullRollTest.class.getSimpleName() + "/"; + + private final static int rows1 = 2017; + private final static int cols1 = 1001; + private final static double sparsity1 = 0.7; + private final static double sparsity2 = 0.1; + + @Override + public void setUp() { + TestUtils.clearAssertionInformation(); + addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[]{"B"})); + addTestConfiguration(TEST_NAME2, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME2, new String[]{"B"})); + } + + @Test + public void testRollVectorDenseCP() { + runRollTest(TEST_NAME1, false, false, ExecType.CP); + } + + @Test + public void testRollVectorSparseCP() { + runRollTest(TEST_NAME2, false, true, ExecType.CP); + } + + @Test + public void testRollMatrixDenseCP() { + runRollTest(TEST_NAME2, true, false, ExecType.CP); + } + + @Test + public void testRollMatrixSparseCP() { + runRollTest(TEST_NAME2, true, true, ExecType.CP); + } + + /** + * + * @param sparseM1 + * @param sparseM2 + * @param instType + */ Review Comment: Deleted the comment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@systemds.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org