am 85e51ae6: Merge "Cts tests for Settings intents" into lmp-mr1-dev
* commit '85e51ae6902a825a7875a4f1ae3077d3fa7f2db8':
Cts tests for Settings intents
diff --git a/apps/CtsVerifier/jni/cameraanalyzer/Android.mk b/apps/CtsVerifier/jni/cameraanalyzer/Android.mk
index ed66992..d595a20 100644
--- a/apps/CtsVerifier/jni/cameraanalyzer/Android.mk
+++ b/apps/CtsVerifier/jni/cameraanalyzer/Android.mk
@@ -16,7 +16,7 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-include external/stlport/libstlport.mk
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := libcameraanalyzer
@@ -31,10 +31,12 @@
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../include/colorchecker $(JNI_H_INCLUDE)
+LOCAL_CXX_STL := libc++
LOCAL_STATIC_LIBRARIES := libcolorchecker
-LOCAL_SHARED_LIBRARIES := libjnigraphics \
- libstlport \
- libcutils \
- libutils liblog
+LOCAL_SHARED_LIBRARIES := \
+ libjnigraphics \
+ libcutils \
+ libutils \
+ liblog \
include $(BUILD_SHARED_LIBRARY)
diff --git a/apps/CtsVerifier/lib/colorchecker/Android.mk b/apps/CtsVerifier/lib/colorchecker/Android.mk
index 38f595f..48f1356 100644
--- a/apps/CtsVerifier/lib/colorchecker/Android.mk
+++ b/apps/CtsVerifier/lib/colorchecker/Android.mk
@@ -19,7 +19,7 @@
# Build image analysis library
include $(CLEAR_VARS)
-include external/stlport/libstlport.mk
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libcolorchecker
@@ -35,8 +35,9 @@
whitebalancetest.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../include/colorchecker
-LOCAL_SHARED_LIBRARIES := libstlport \
- libcutils \
- libutils
+LOCAL_CXX_STL := libc++
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
+ libutils \
include $(BUILD_STATIC_LIBRARY)
diff --git a/apps/CtsVerifier/lib/colorchecker/colorcheckertest.cpp b/apps/CtsVerifier/lib/colorchecker/colorcheckertest.cpp
index 46b8cc8..ef7d2c6 100644
--- a/apps/CtsVerifier/lib/colorchecker/colorcheckertest.cpp
+++ b/apps/CtsVerifier/lib/colorchecker/colorcheckertest.cpp
@@ -549,10 +549,10 @@
(pointBottomRight.x() >= mImage->getHeight()) ||
(pointBottomRight.y() < 0) ||
(pointBottomRight.y() >= mImage->getWidth()) ||
- (abs(pointUpperLeft.x() - pointBottomRight.x()) <= 5) ||
- (abs(pointUpperLeft.y() - pointBottomRight.y()) <= 5) ||
- (abs(pointUpperLeft.x() - pointBottomRight.x()) >= 30) ||
- (abs(pointUpperLeft.y() - pointBottomRight.y()) >= 30)) {
+ (std::abs(pointUpperLeft.x() - pointBottomRight.x()) <= 5) ||
+ (std::abs(pointUpperLeft.y() - pointBottomRight.y()) <= 5) ||
+ (std::abs(pointUpperLeft.x() - pointBottomRight.x()) >= 30) ||
+ (std::abs(pointUpperLeft.y() - pointBottomRight.y()) >= 30)) {
// If any of the quadrilateral corners are out of the image or if
// the distance between them are too large or too big, the quadrilateral
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleServerService.java b/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleServerService.java
old mode 100644
new mode 100755
diff --git a/build/test_executable.mk b/build/test_executable.mk
index e0352ba..35bf199 100644
--- a/build/test_executable.mk
+++ b/build/test_executable.mk
@@ -23,6 +23,7 @@
# as needed by CTS.
#
+LOCAL_CXX_STL := libc++
include $(BUILD_EXECUTABLE)
cts_executable_xml := $(CTS_TESTCASES_OUT)/$(LOCAL_MODULE).xml
diff --git a/libs/commonutil/src/com/android/cts/util/StatisticsUtils.java b/libs/commonutil/src/com/android/cts/util/StatisticsUtils.java
new file mode 100644
index 0000000..d6589af
--- /dev/null
+++ b/libs/commonutil/src/com/android/cts/util/StatisticsUtils.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed 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 com.android.cts.util;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Set of static helper methods for CTS tests.
+ */
+public class StatisticsUtils {
+
+
+ /**
+ * Private constructor for static class.
+ */
+ private StatisticsUtils() {}
+
+ /**
+ * Get the value of the 95th percentile using nearest rank algorithm.
+ *
+ * @throws IllegalArgumentException if the collection is null or empty
+ */
+ public static <TValue extends Comparable<? super TValue>> TValue get95PercentileValue(
+ Collection<TValue> collection) {
+ validateCollection(collection);
+
+ List<TValue> arrayCopy = new ArrayList<TValue>(collection);
+ Collections.sort(arrayCopy);
+
+ // zero-based array index
+ int arrayIndex = (int) Math.round(arrayCopy.size() * 0.95 + .5) - 1;
+
+ return arrayCopy.get(arrayIndex);
+ }
+
+ /**
+ * Calculate the mean of a collection.
+ *
+ * @throws IllegalArgumentException if the collection is null or empty
+ */
+ public static <TValue extends Number> double getMean(Collection<TValue> collection) {
+ validateCollection(collection);
+
+ double sum = 0.0;
+ for(TValue value : collection) {
+ sum += value.doubleValue();
+ }
+ return sum / collection.size();
+ }
+
+ /**
+ * Calculate the bias-corrected sample variance of a collection.
+ *
+ * @throws IllegalArgumentException if the collection is null or empty
+ */
+ public static <TValue extends Number> double getVariance(Collection<TValue> collection) {
+ validateCollection(collection);
+
+ double mean = getMean(collection);
+ ArrayList<Double> squaredDiffs = new ArrayList<Double>();
+ for(TValue value : collection) {
+ double difference = mean - value.doubleValue();
+ squaredDiffs.add(Math.pow(difference, 2));
+ }
+
+ double sum = 0.0;
+ for (Double value : squaredDiffs) {
+ sum += value;
+ }
+ return sum / (squaredDiffs.size() - 1);
+ }
+
+ /**
+ * Calculate the bias-corrected standard deviation of a collection.
+ *
+ * @throws IllegalArgumentException if the collection is null or empty
+ */
+ public static <TValue extends Number> double getStandardDeviation(
+ Collection<TValue> collection) {
+ return Math.sqrt(getVariance(collection));
+ }
+
+ /**
+ * Validate that a collection is not null or empty.
+ *
+ * @throws IllegalStateException if collection is null or empty.
+ */
+ private static <T> void validateCollection(Collection<T> collection) {
+ if(collection == null || collection.size() == 0) {
+ throw new IllegalStateException("Collection cannot be null or empty");
+ }
+ }
+
+}
diff --git a/libs/commonutil/src/com/android/cts/util/StatisticsUtilsTest.java b/libs/commonutil/src/com/android/cts/util/StatisticsUtilsTest.java
new file mode 100644
index 0000000..d78ba99
--- /dev/null
+++ b/libs/commonutil/src/com/android/cts/util/StatisticsUtilsTest.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed 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 com.android.cts.util;
+
+import junit.framework.TestCase;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Unit tests for the {@link StatisticsUtils} class.
+ */
+public class StatisticsUtilsTest extends TestCase {
+
+ /**
+ * Test {@link StatisticsUtils#get95PercentileValue(Collection)}.
+ */
+ public void testGet95PercentileValue() {
+ Collection<Integer> values = new HashSet<Integer>();
+ for (int i = 0; i < 100; i++) {
+ values.add(i);
+ }
+ assertEquals(95, (int) StatisticsUtils.get95PercentileValue(values));
+
+ values = new HashSet<Integer>();
+ for (int i = 0; i < 1000; i++) {
+ values.add(i);
+ }
+ assertEquals(950, (int) StatisticsUtils.get95PercentileValue(values));
+
+ values = new HashSet<Integer>();
+ for (int i = 0; i < 100; i++) {
+ values.add(i * i);
+ }
+ assertEquals(95 * 95, (int) StatisticsUtils.get95PercentileValue(values));
+ }
+
+ /**
+ * Test {@link StatisticsUtils#getMean(Collection)}.
+ */
+ public void testGetMean() {
+ List<Integer> values = Arrays.asList(0, 1, 2, 3, 4);
+ double mean = StatisticsUtils.getMean(values);
+ assertEquals(2.0, mean, 0.00001);
+
+ values = Arrays.asList(1, 2, 3, 4, 5);
+ mean = StatisticsUtils.getMean(values);
+ assertEquals(3.0, mean, 0.00001);
+
+ values = Arrays.asList(0, 1, 4, 9, 16);
+ mean = StatisticsUtils.getMean(values);
+ assertEquals(6.0, mean, 0.00001);
+ }
+
+ /**
+ * Test {@link StatisticsUtils#getVariance(Collection)}.
+ */
+ public void testGetVariance() {
+ List<Integer> values = Arrays.asList(0, 1, 2, 3, 4);
+ double variance = StatisticsUtils.getVariance(values);
+ assertEquals(2.5, variance, 0.00001);
+
+ values = Arrays.asList(1, 2, 3, 4, 5);
+ variance = StatisticsUtils.getVariance(values);
+ assertEquals(2.5, variance, 0.00001);
+
+ values = Arrays.asList(0, 2, 4, 6, 8);
+ variance = StatisticsUtils.getVariance(values);
+ assertEquals(10.0, variance, 0.00001);
+ }
+
+ /**
+ * Test {@link StatisticsUtils#getStandardDeviation(Collection)}.
+ */
+ public void testGetStandardDeviation() {
+ List<Integer> values = Arrays.asList(0, 1, 2, 3, 4);
+ double stddev = StatisticsUtils.getStandardDeviation(values);
+ assertEquals(Math.sqrt(2.5), stddev, 0.00001);
+
+ values = Arrays.asList(1, 2, 3, 4, 5);
+ stddev = StatisticsUtils.getStandardDeviation(values);
+ assertEquals(Math.sqrt(2.5), stddev, 0.00001);
+
+ values = Arrays.asList(0, 2, 4, 6, 8);
+ stddev = StatisticsUtils.getStandardDeviation(values);
+ assertEquals(Math.sqrt(10.0), stddev, 0.00001);
+ }
+
+
+}
diff --git a/suite/audio_quality/test/Android.mk b/suite/audio_quality/test/Android.mk
index 4582fe7..bd0033f 100644
--- a/suite/audio_quality/test/Android.mk
+++ b/suite/audio_quality/test/Android.mk
@@ -34,7 +34,7 @@
# functions and linker error happens
LOCAL_WHOLE_STATIC_LIBRARIES := libcts_audio_quality
LOCAL_CFLAGS:= -g -fno-exceptions
-LOCAL_LDFLAGS:= -g -lrt -ldl -lstdc++ -lm -fno-exceptions -lpthread
+LOCAL_LDFLAGS:= -g -lrt -ldl -lm -fno-exceptions -lpthread
LOCAL_MODULE:= cts_audio_quality_test
include $(BUILD_HOST_EXECUTABLE)
diff --git a/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/Boid.h b/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/Boid.h
index e50acd0..3e4367a 100644
--- a/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/Boid.h
+++ b/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/Boid.h
@@ -16,6 +16,7 @@
#define BOID_H
#include <graphics/Vector2D.h>
+#include <utils/Compat.h>
class Boid {
public:
@@ -24,14 +25,14 @@
void flock(const Boid* boids[], int numBoids, int index, float limitX, float limitY);
// The following floats are the parameters for the flocking algorithm, changing these
// modifies the boid's behaviour.
- static const float MAX_SPEED = 2.0f;// Upper limit of boid velocity.
- static const float MAX_FORCE = 0.05f;// Upper limit of the force used to push a boid.
- static const float NEIGHBOUR_RADIUS = 70.0f;// Radius used to find neighbours, was 50.
- static const float DESIRED_BOID_DIST = 35.0f;// Distance boids want to be from others, was 25.
+ static const CONSTEXPR float MAX_SPEED = 2.0f;// Upper limit of boid velocity.
+ static const CONSTEXPR float MAX_FORCE = 0.05f;// Upper limit of the force used to push a boid.
+ static const CONSTEXPR float NEIGHBOUR_RADIUS = 70.0f;// Radius used to find neighbours, was 50.
+ static const CONSTEXPR float DESIRED_BOID_DIST = 35.0f;// Distance boids want to be from others, was 25.
// The weightings of the components.
- static const float SEPARATION_WEIGHT = 2.0f;
- static const float ALIGNMENT_WEIGHT = 1.0f;
- static const float COHESION_WEIGHT = 1.0f;
+ static const CONSTEXPR float SEPARATION_WEIGHT = 2.0f;
+ static const CONSTEXPR float ALIGNMENT_WEIGHT = 1.0f;
+ static const CONSTEXPR float COHESION_WEIGHT = 1.0f;
Vector2D mPosition;
Vector2D mVelocity;
Vector2D mAcceleration;
diff --git a/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/FlockingScene.h b/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/FlockingScene.h
index 97bd4cc..7cdcffe 100644
--- a/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/FlockingScene.h
+++ b/suite/cts/deviceTests/opengl/jni/reference/scene/flocking/FlockingScene.h
@@ -15,6 +15,7 @@
#define FLOCKINGSCENE_H
#include <graphics/Program.h>
+#include <utils/Compat.h>
#include "../Scene.h"
#include "Boid.h"
@@ -41,6 +42,6 @@
float mBoardHeight;
Program* mMainProgram;
Program* mWaterProgram;
- static const float BOID_SCALE = 1.0f / 50.0f;
+ static const CONSTEXPR float BOID_SCALE = 1.0f / 50.0f;
};
#endif
diff --git a/suite/cts/deviceTests/opengl/test/Android.mk b/suite/cts/deviceTests/opengl/test/Android.mk
index a4abe4f..5270bac 100644
--- a/suite/cts/deviceTests/opengl/test/Android.mk
+++ b/suite/cts/deviceTests/opengl/test/Android.mk
@@ -18,6 +18,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(patsubst ./%,%, $(shell cd $(LOCAL_PATH); \
@@ -26,8 +27,8 @@
#$(info $(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES += external/gtest/include $(LOCAL_PATH)/../jni/graphics/
-LOCAL_STATIC_LIBRARIES := libutils libcutils libgtest_host libgtest_main_host liblog
-LOCAL_LDFLAGS:= -g -lrt -ldl -lstdc++ -lm -fno-exceptions -lpthread
+LOCAL_STATIC_LIBRARIES := libgtest_host libgtest_main_host liblog
+LOCAL_LDFLAGS:= -g -lpthread
LOCAL_MODULE:= cts_device_opengl_test
include $(BUILD_HOST_EXECUTABLE)
diff --git a/tests/tests/bionic/Android.mk b/tests/tests/bionic/Android.mk
index e1afd50..44e59e7 100644
--- a/tests/tests/bionic/Android.mk
+++ b/tests/tests/bionic/Android.mk
@@ -4,6 +4,7 @@
list_executable := $(test_executable)_list
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := $(test_executable)
LOCAL_MODULE_TAGS := optional
@@ -12,17 +13,15 @@
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-LOCAL_ADDITION_DEPENDENCIES := \
- $(LOCAL_PATH)/Android.mk \
-
LOCAL_SHARED_LIBRARIES += \
- libstlport \
libdl \
LOCAL_WHOLE_STATIC_LIBRARIES += \
libBionicTests \
LOCAL_STATIC_LIBRARIES += \
+ libtinyxml2 \
+ liblog \
libgtest \
libgtest_main \
@@ -31,6 +30,7 @@
ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := $(list_executable)
@@ -39,18 +39,17 @@
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
-LOCAL_ADDITION_DEPENDENCIES := \
- $(LOCAL_PATH)/Android.mk \
-
# A main without the extra output from the gtest main.
LOCAL_SRC_FILES := \
main.cpp \
LOCAL_LDLIBS += \
- -lrt \
+ -lrt -ldl -lutil \
LOCAL_WHOLE_STATIC_LIBRARIES += \
libBionicTests \
+LOCAL_CXX_STL := libc++
+
include $(BUILD_HOST_NATIVE_TEST)
endif # ifeq ($(HOST_OS)-$(HOST_ARCH),$(filter $(HOST_OS)-$(HOST_ARCH),linux-x86 linux-x86_64))
diff --git a/tests/tests/hardware/Android.mk b/tests/tests/hardware/Android.mk
index e5203e5..153445d 100644
--- a/tests/tests/hardware/Android.mk
+++ b/tests/tests/hardware/Android.mk
@@ -19,8 +19,11 @@
include $(CLEAR_VARS)
LOCAL_MODULE := cts-sensors-tests
+
LOCAL_MODULE_TAGS := tests
+LOCAL_STATIC_JAVA_LIBRARIES := ctsdeviceutil
+
LOCAL_SDK_VERSION := current
# TODO: sensors need to be refactored out into their own namespace: android.hardware.sensors.cts
@@ -49,11 +52,8 @@
LOCAL_PACKAGE_NAME := CtsHardwareTestCases
-# uncomment when b/13281332 is fixed
-# please also uncomment the equivalent code in
-# cts/apps/CtsVerifiers/Android.mk
-#
-# LOCAL_SDK_VERSION := current
+LOCAL_SDK_VERSION := current
+
LOCAL_JAVA_LIBRARIES := android.test.runner
include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/hardware/src/android/hardware/cts/helpers/SensorCtsHelperTest.java b/tests/tests/hardware/src/android/hardware/cts/helpers/SensorCtsHelperTest.java
index 6f99692..daac8d1 100644
--- a/tests/tests/hardware/src/android/hardware/cts/helpers/SensorCtsHelperTest.java
+++ b/tests/tests/hardware/src/android/hardware/cts/helpers/SensorCtsHelperTest.java
@@ -30,80 +30,6 @@
public class SensorCtsHelperTest extends TestCase {
/**
- * Test {@link SensorCtsHelper#get95PercentileValue(Collection)}.
- */
- public void testGet95PercentileValue() {
- Collection<Integer> values = new HashSet<Integer>();
- for (int i = 0; i < 100; i++) {
- values.add(i);
- }
- assertEquals(95, (int) SensorCtsHelper.get95PercentileValue(values));
-
- values = new HashSet<Integer>();
- for (int i = 0; i < 1000; i++) {
- values.add(i);
- }
- assertEquals(950, (int) SensorCtsHelper.get95PercentileValue(values));
-
- values = new HashSet<Integer>();
- for (int i = 0; i < 100; i++) {
- values.add(i * i);
- }
- assertEquals(95 * 95, (int) SensorCtsHelper.get95PercentileValue(values));
- }
-
- /**
- * Test {@link SensorCtsHelper#getMean(Collection)}.
- */
- public void testGetMean() {
- List<Integer> values = Arrays.asList(0, 1, 2, 3, 4);
- double mean = SensorCtsHelper.getMean(values);
- assertEquals(2.0, mean, 0.00001);
-
- values = Arrays.asList(1, 2, 3, 4, 5);
- mean = SensorCtsHelper.getMean(values);
- assertEquals(3.0, mean, 0.00001);
-
- values = Arrays.asList(0, 1, 4, 9, 16);
- mean = SensorCtsHelper.getMean(values);
- assertEquals(6.0, mean, 0.00001);
- }
-
- /**
- * Test {@link SensorCtsHelper#getVariance(Collection)}.
- */
- public void testGetVariance() {
- List<Integer> values = Arrays.asList(0, 1, 2, 3, 4);
- double variance = SensorCtsHelper.getVariance(values);
- assertEquals(2.5, variance, 0.00001);
-
- values = Arrays.asList(1, 2, 3, 4, 5);
- variance = SensorCtsHelper.getVariance(values);
- assertEquals(2.5, variance, 0.00001);
-
- values = Arrays.asList(0, 2, 4, 6, 8);
- variance = SensorCtsHelper.getVariance(values);
- assertEquals(10.0, variance, 0.00001);
- }
-
- /**
- * Test {@link SensorCtsHelper#getStandardDeviation(Collection)}.
- */
- public void testGetStandardDeviation() {
- List<Integer> values = Arrays.asList(0, 1, 2, 3, 4);
- double stddev = SensorCtsHelper.getStandardDeviation(values);
- assertEquals(Math.sqrt(2.5), stddev, 0.00001);
-
- values = Arrays.asList(1, 2, 3, 4, 5);
- stddev = SensorCtsHelper.getStandardDeviation(values);
- assertEquals(Math.sqrt(2.5), stddev, 0.00001);
-
- values = Arrays.asList(0, 2, 4, 6, 8);
- stddev = SensorCtsHelper.getStandardDeviation(values);
- assertEquals(Math.sqrt(10.0), stddev, 0.00001);
- }
-
- /**
* Test {@link SensorCtsHelper#getFrequency(Number, TimeUnit)}.
*/
public void testGetFrequency() {
diff --git a/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/JitterVerification.java b/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/JitterVerification.java
index f95ea0b..6633903 100644
--- a/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/JitterVerification.java
+++ b/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/JitterVerification.java
@@ -25,6 +25,8 @@
import android.hardware.cts.helpers.TestSensorEvent;
import android.util.SparseIntArray;
+import com.android.cts.util.StatisticsUtils;
+
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -131,7 +133,7 @@
for (int i = 1; i < mTimestamps.size(); i++) {
deltas.add(mTimestamps.get(i) - mTimestamps.get(i - 1));
}
- double deltaMean = SensorCtsHelper.getMean(deltas);
+ double deltaMean = StatisticsUtils.getMean(deltas);
List<Double> jitters = new ArrayList<Double>(deltas.size());
for (long delta : deltas) {
jitters.add(Math.abs(delta - deltaMean));
diff --git a/tests/tests/keystore/src/android/keystore/cts/AndroidKeyStoreTest.java b/tests/tests/keystore/src/android/keystore/cts/AndroidKeyStoreTest.java
index 2c926a8..4ee9a80 100644
--- a/tests/tests/keystore/src/android/keystore/cts/AndroidKeyStoreTest.java
+++ b/tests/tests/keystore/src/android/keystore/cts/AndroidKeyStoreTest.java
@@ -16,14 +16,17 @@
package android.keystore.cts;
+import android.security.KeyPairGeneratorSpec;
import android.security.KeyStoreParameter;
import android.test.AndroidTestCase;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
+import java.math.BigInteger;
import java.security.Key;
import java.security.KeyFactory;
+import java.security.KeyPairGenerator;
import java.security.KeyStore;
import java.security.KeyStore.Entry;
import java.security.KeyStore.PrivateKeyEntry;
@@ -41,6 +44,7 @@
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.Enumeration;
@@ -48,9 +52,11 @@
import java.util.Iterator;
import java.util.Set;
+import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
+import javax.security.auth.x500.X500Principal;
public class AndroidKeyStoreTest extends AndroidTestCase {
private KeyStore mKeyStore;
@@ -2250,4 +2256,51 @@
assertEquals(Arrays.toString(expectedSecret.getEncoded()),
Arrays.toString(actualSecret.getEncoded()));
}
+
+ public void testKeyStore_Encrypting_RSA_NONE_NOPADDING() throws Exception {
+
+ String alias = "MyKey";
+ KeyStore ks = KeyStore.getInstance("AndroidKeyStore");
+ assertNotNull(ks);
+ ks.load(null);
+
+ Calendar cal = Calendar.getInstance();
+ cal.set(1944, 5, 6);
+ Date now = cal.getTime();
+ cal.clear();
+
+ cal.set(1945, 8, 2);
+ Date end = cal.getTime();
+
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "AndroidKeyStore");
+ assertNotNull(kpg);
+ kpg.initialize(new KeyPairGeneratorSpec.Builder(mContext)
+ .setAlias(alias)
+ .setStartDate(now)
+ .setEndDate(end)
+ .setSerialNumber(BigInteger.valueOf(1))
+ .setSubject(new X500Principal("CN=test1"))
+ .build());
+
+ kpg.generateKeyPair();
+
+ RSAPrivateKey key = (RSAPrivateKey) ks.getKey(alias, null);
+ assertNotNull(key);
+ String cipher = key.getAlgorithm() + "/NONE/NOPADDING";
+ Cipher encrypt = Cipher.getInstance(cipher);
+ assertNotNull(encrypt);
+ encrypt.init(Cipher.ENCRYPT_MODE, key);
+
+ byte[] plainText = new byte[encrypt.getBlockSize()];
+ Arrays.fill(plainText, (byte) 0xFF);
+
+ // We expect a BadPaddingException here as the message size (plaintext)
+ // is bigger than the modulus.
+ try {
+ encrypt.doFinal(plainText);
+ fail("Expected BadPaddingException");
+ } catch (BadPaddingException e) {
+ // pass on exception as it is expected
+ }
+ }
}
diff --git a/tests/tests/media/libmediandkjni/native-media-jni.cpp b/tests/tests/media/libmediandkjni/native-media-jni.cpp
index 9bca242..2624c25 100644
--- a/tests/tests/media/libmediandkjni/native-media-jni.cpp
+++ b/tests/tests/media/libmediandkjni/native-media-jni.cpp
@@ -234,7 +234,7 @@
AMediaFormat **format = new AMediaFormat*[numtracks];
bool *sawInputEOS = new bool[numtracks];
bool *sawOutputEOS = new bool[numtracks];
- simplevector<int> sizes[numtracks];
+ simplevector<int> *sizes = new simplevector<int>[numtracks];
ALOGV("input has %d tracks", numtracks);
for (int i = 0; i < numtracks; i++) {
@@ -354,6 +354,8 @@
}
env->ReleaseIntArrayElements(ret, org, 0);
+ delete[] sizes;
+ delete[] sawOutputEOS;
delete[] sawInputEOS;
for (int i = 0; i < numtracks; i++) {
AMediaFormat_delete(format[i]);
diff --git a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
index 89d6efa..014c1a5 100644
--- a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
+++ b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
@@ -657,6 +657,7 @@
} catch (InterruptedException e) {
// don't care
}
+ cleanupGl();
mCompositionThread = null;
mSurface = null;
mStartCompletionSemaphore = null;
@@ -966,6 +967,7 @@
public void cleanup() {
mNumTextureUpdated.set(0);
+ mVerticesData.clear();
if (mTextureId != 0) {
int[] textures = new int[] {
mTextureId
diff --git a/tests/tests/media/src/android/media/cts/ExtractDecodeEditEncodeMuxTest.java b/tests/tests/media/src/android/media/cts/ExtractDecodeEditEncodeMuxTest.java
index 029a632..9da229c 100644
--- a/tests/tests/media/src/android/media/cts/ExtractDecodeEditEncodeMuxTest.java
+++ b/tests/tests/media/src/android/media/cts/ExtractDecodeEditEncodeMuxTest.java
@@ -29,6 +29,10 @@
import android.util.Log;
import android.view.Surface;
+import android.media.MediaCodecInfo;
+import android.media.MediaCodecInfo.CodecCapabilities;
+import android.media.MediaCodecInfo.CodecProfileLevel;
+
import com.android.cts.media.R;
import java.io.File;
@@ -111,28 +115,28 @@
private String mOutputFile;
public void testExtractDecodeEditEncodeMuxQCIF() throws Throwable {
- setSize(176, 144);
+ if(!setSize(176, 144)) return;
setSource(R.raw.video_480x360_mp4_h264_500kbps_30fps_aac_stereo_128kbps_44100hz);
setCopyVideo();
TestWrapper.runTest(this);
}
public void testExtractDecodeEditEncodeMuxQVGA() throws Throwable {
- setSize(320, 240);
+ if(!setSize(320, 240)) return;
setSource(R.raw.video_480x360_mp4_h264_500kbps_30fps_aac_stereo_128kbps_44100hz);
setCopyVideo();
TestWrapper.runTest(this);
}
public void testExtractDecodeEditEncodeMux720p() throws Throwable {
- setSize(1280, 720);
+ if(!setSize(1280, 720)) return;
setSource(R.raw.video_480x360_mp4_h264_500kbps_30fps_aac_stereo_128kbps_44100hz);
setCopyVideo();
TestWrapper.runTest(this);
}
public void testExtractDecodeEditEncodeMuxAudio() throws Throwable {
- setSize(1280, 720);
+ if(!setSize(1280, 720)) return;
setSource(R.raw.video_480x360_mp4_h264_500kbps_30fps_aac_stereo_128kbps_44100hz);
setCopyAudio();
setVerifyAudioFormat();
@@ -140,7 +144,7 @@
}
public void testExtractDecodeEditEncodeMuxAudioVideo() throws Throwable {
- setSize(1280, 720);
+ if(!setSize(1280, 720)) return;
setSource(R.raw.video_480x360_mp4_h264_500kbps_30fps_aac_stereo_128kbps_44100hz);
setCopyAudio();
setCopyVideo();
@@ -203,14 +207,21 @@
}
/**
- * Sets the desired frame size.
+ * Sets the desired frame size and returns whether the given resolution is
+ * supported.
+ *
+ * <p>If decoding/encoding using AVC as the codec, checks that the resolution
+ * is supported. For other codecs, always return {@code true}.
*/
- private void setSize(int width, int height) {
+ private boolean setSize(int width, int height) {
if ((width % 16) != 0 || (height % 16) != 0) {
Log.w(TAG, "WARNING: width or height not multiple of 16");
}
mWidth = width;
mHeight = height;
+
+ // TODO: remove this logic in setSize as it is now handled when configuring codecs
+ return true;
}
/**
diff --git a/tests/tests/nativemedia/sl/Android.mk b/tests/tests/nativemedia/sl/Android.mk
index 48b816c..28dfeff 100644
--- a/tests/tests/nativemedia/sl/Android.mk
+++ b/tests/tests/nativemedia/sl/Android.mk
@@ -6,6 +6,7 @@
list_executable := $(test_executable)_list
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := $(test_executable)
LOCAL_MODULE_TAGS := optional
@@ -15,11 +16,8 @@
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
LOCAL_C_INCLUDES := \
- bionic \
- bionic/libstdc++/include \
external/gtest/include \
$(call include-path-for, wilhelm) \
- external/stlport/stlport \
$(call include-path-for, wilhelm-ut)
LOCAL_SRC_FILES := \
@@ -29,7 +27,6 @@
libutils \
liblog \
libOpenSLES \
- libstlport
LOCAL_STATIC_LIBRARIES := \
libOpenSLESUT \
@@ -39,6 +36,7 @@
include $(BUILD_CTS_EXECUTABLE)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := $(list_executable)
LOCAL_MODULE_TAGS := optional
diff --git a/tests/tests/nativemedia/xa/Android.mk b/tests/tests/nativemedia/xa/Android.mk
index ace315a..52126c3 100644
--- a/tests/tests/nativemedia/xa/Android.mk
+++ b/tests/tests/nativemedia/xa/Android.mk
@@ -6,6 +6,7 @@
list_executable := $(test_executable)_list
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE:= $(test_executable)
LOCAL_MODULE_TAGS := optional
@@ -15,11 +16,8 @@
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
LOCAL_C_INCLUDES := \
- bionic \
- bionic/libstdc++/include \
external/gtest/include \
$(call include-path-for, wilhelm) \
- external/stlport/stlport \
$(call include-path-for, wilhelm-ut)
LOCAL_SRC_FILES := \
@@ -29,15 +27,15 @@
libutils \
liblog \
libOpenMAXAL \
- libstlport
LOCAL_STATIC_LIBRARIES := \
- libgtest
+ libgtest \
LOCAL_CTS_TEST_PACKAGE := android.nativemedia.xa
include $(BUILD_CTS_EXECUTABLE)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := $(list_executable)
LOCAL_MODULE_TAGS := optional
diff --git a/tests/tests/nativeopengl/libnativeopengltests/Android.mk b/tests/tests/nativeopengl/libnativeopengltests/Android.mk
index 5d7dd6e..62e28ec 100644
--- a/tests/tests/nativeopengl/libnativeopengltests/Android.mk
+++ b/tests/tests/nativeopengl/libnativeopengltests/Android.mk
@@ -16,9 +16,11 @@
# This is the shared library included by the JNI test app.
#
-LOCAL_PATH:= $(call my-dir)/../standalone/jni/
+LOCAL_PATH := $(call my-dir)/../standalone/jni/
+REAL_LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(REAL_LOCAL_PATH)/Android.mk
LOCAL_MODULE := libnativeopengltests
@@ -26,10 +28,7 @@
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE) \
- bionic \
- bionic/libstdc++/include \
external/gtest/include \
- external/stlport/stlport
LOCAL_SRC_FILES := \
register.cpp \
@@ -38,11 +37,11 @@
tests/EGLCleanup_test.cpp \
tests/EGLCreateContext_test.cpp
+LOCAL_CXX_STL := libc++
LOCAL_SHARED_LIBRARIES := libEGL \
libGLESv2 \
- libstlport \
libandroid \
- liblog
+ liblog \
LOCAL_STATIC_LIBRARIES := libgtest
diff --git a/tests/tests/net/src/android/net/cts/LocalSocketTest.java b/tests/tests/net/src/android/net/cts/LocalSocketTest.java
index 0a4bc0d..865ec21 100644
--- a/tests/tests/net/src/android/net/cts/LocalSocketTest.java
+++ b/tests/tests/net/src/android/net/cts/LocalSocketTest.java
@@ -126,8 +126,8 @@
socket.setReceiveBufferSize(1999);
assertEquals(1999 << 1, socket.getReceiveBufferSize());
- socket.setSendBufferSize(1998);
- assertEquals(1998 << 1, socket.getSendBufferSize());
+ socket.setSendBufferSize(3998);
+ assertEquals(3998 << 1, socket.getSendBufferSize());
// Timeout is not support at present, so set is ignored
socket.setSoTimeout(1996);
diff --git a/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java b/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java
index 6175923..60ac226 100644
--- a/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java
+++ b/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java
@@ -26,7 +26,7 @@
import android.net.SSLCertificateSocketFactory;
import android.test.AndroidTestCase;
-import libcore.javax.net.ssl.SSLDefaultConfigurationAsserts;
+import libcore.javax.net.ssl.SSLConfigurationAsserts;
public class SSLCertificateSocketFactoryTest extends AndroidTestCase {
private SSLCertificateSocketFactory mFactory;
@@ -40,7 +40,7 @@
}
public void testDefaultConfiguration() throws Exception {
- SSLDefaultConfigurationAsserts.assertSSLSocketFactory(mFactory);
+ SSLConfigurationAsserts.assertSSLSocketFactoryDefaultConfiguration(mFactory);
}
public void testAccessProperties() throws Exception {
diff --git a/tests/tests/os/jni/android_os_cts_NoExecutePermissionTest.cpp b/tests/tests/os/jni/android_os_cts_NoExecutePermissionTest.cpp
index e30599c..5425fde 100644
--- a/tests/tests/os/jni/android_os_cts_NoExecutePermissionTest.cpp
+++ b/tests/tests/os/jni/android_os_cts_NoExecutePermissionTest.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*
*/
+#include <errno.h>
#include <jni.h>
#include <string.h>
#include <stdio.h>
diff --git a/tests/tests/os/jni/android_os_cts_OSFeatures.cpp b/tests/tests/os/jni/android_os_cts_OSFeatures.cpp
index 5f3ee4e..2ee31b1 100644
--- a/tests/tests/os/jni/android_os_cts_OSFeatures.cpp
+++ b/tests/tests/os/jni/android_os_cts_OSFeatures.cpp
@@ -14,18 +14,21 @@
* limitations under the License.
*
*/
-#include <jni.h>
-#include <sys/prctl.h>
-#include <string.h>
+
+#include "jni.h"
+
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <linux/filter.h>
#include <linux/seccomp.h>
-#include <sys/utsname.h>
+#include <sys/prctl.h>
#include <sys/types.h>
+#include <sys/utsname.h>
#include <sys/wait.h>
jint android_os_cts_OSFeatures_getNoNewPrivs(JNIEnv* env, jobject thiz)
diff --git a/tests/tests/renderscript/libcoremathtestcpp/Android.mk b/tests/tests/renderscript/libcoremathtestcpp/Android.mk
index 7ec8671..3b693e0 100644
--- a/tests/tests/renderscript/libcoremathtestcpp/Android.mk
+++ b/tests/tests/renderscript/libcoremathtestcpp/Android.mk
@@ -17,15 +17,17 @@
#
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := libcoremathtestcpp_jni
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := CoreMathTestJni.cpp
+LOCAL_CFLAGS := -std=c++11
+
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
LOCAL_C_INCLUDES += frameworks/rs/cpp
LOCAL_C_INCLUDES += frameworks/rs
-LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
-LOCAL_SHARED_LIBRARIES := libdl liblog libRScpp libstlport
+LOCAL_SHARED_LIBRARIES := libdl liblog libRScpp
LOCAL_STATIC_LIBRARIES := libcutils
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java b/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
index dfcf1f5..686281c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
@@ -290,14 +290,14 @@
}
static private Target.Floaty atan2(float y, float x, Target t) {
- Target.Floaty inY = t.new32(y);
- Target.Floaty inX = t.new32(x);
+ Target.Floaty numerator = t.new32(y);
+ Target.Floaty denominator = t.new32(x);
return t.new32(
- atan2(inY.mid32(), inX.mid32()),
- atan2(inY.min32(), inX.min32()),
- atan2(inY.min32(), inX.max32()),
- atan2(inY.max32(), inX.min32()),
- atan2(inY.max32(), inX.max32()));
+ atan2(numerator.mid32(), denominator.mid32()),
+ atan2(numerator.min32(), denominator.min32()),
+ atan2(numerator.min32(), denominator.max32()),
+ atan2(numerator.max32(), denominator.min32()),
+ atan2(numerator.max32(), denominator.max32()));
}
static private Target.Floaty atan2pi(float y, float x, Target t) {
@@ -462,14 +462,14 @@
}
static private Target.Floaty powr(float x, float y, Target t) {
- Target.Floaty inX = t.new32(x);
- Target.Floaty inY = t.new32(y);
+ Target.Floaty base = t.new32(x);
+ Target.Floaty exponent = t.new32(y);
return t.new32(
- pow(inX.mid32(), inY.mid32()),
- pow(inX.min32(), inY.min32()),
- pow(inX.min32(), inY.max32()),
- pow(inX.max32(), inY.min32()),
- pow(inX.max32(), inY.max32()));
+ pow(base.mid32(), exponent.mid32()),
+ pow(base.min32(), exponent.min32()),
+ pow(base.min32(), exponent.max32()),
+ pow(base.max32(), exponent.min32()),
+ pow(base.max32(), exponent.max32()));
}
static private Target.Floaty recip(float f, Target t) {
@@ -570,15 +570,15 @@
}
static public void computeAbs(TestAbs.ArgumentsCharUchar args) {
- args.out = (byte)Math.abs(args.inValue);
+ args.out = (byte)Math.abs(args.inV);
}
static public void computeAbs(TestAbs.ArgumentsShortUshort args) {
- args.out = (short)Math.abs(args.inValue);
+ args.out = (short)Math.abs(args.inV);
}
static public void computeAbs(TestAbs.ArgumentsIntUint args) {
- args.out = Math.abs(args.inValue);
+ args.out = Math.abs(args.inV);
}
static public void computeAcos(TestAcos.ArgumentsFloatFloat args, Target t) {
@@ -588,7 +588,7 @@
static public void computeAcosh(TestAcosh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = acosh(args.in, t);
+ args.out = acosh(args.inV, t);
}
static public void computeAcospi(TestAcospi.ArgumentsFloatFloat args, Target t) {
@@ -603,7 +603,7 @@
static public void computeAsinh(TestAsinh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = asinh(args.in, t);
+ args.out = asinh(args.inV, t);
}
static public void computeAsinpi(TestAsinpi.ArgumentsFloatFloat args, Target t) {
@@ -628,22 +628,22 @@
static public void computeAtan2(TestAtan2.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(6, 128, false);
- args.out = atan2(args.inY, args.inX, t);
+ args.out = atan2(args.inNumerator, args.inDenominator, t);
}
static public void computeAtan2pi(TestAtan2pi.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(6, 128, false);
- args.out = atan2pi(args.inY, args.inX, t);
+ args.out = atan2pi(args.inNumerator, args.inDenominator, t);
}
static public void computeCbrt(TestCbrt.ArgumentsFloatFloat args, Target t) {
t.setPrecision(2, 128, false);
- args.out = cbrt(args.in, t);
+ args.out = cbrt(args.inV, t);
}
static public void computeCeil(TestCeil.ArgumentsFloatFloat args, Target t) {
t.setPrecision(0, 1, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
ceil(in.mid32()),
ceil(in.min32()),
@@ -1047,59 +1047,59 @@
static public void computeCopysign(TestCopysign.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- args.out = t.new32(Math.copySign(args.inX, args.inY));
+ args.out = t.new32(Math.copySign(args.inMagnitudeValue, args.inSignValue));
}
static public void computeCos(TestCos.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = cos(args.in, t);
+ args.out = cos(args.inV, t);
}
static public void computeCosh(TestCosh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = cosh(args.in, t);
+ args.out = cosh(args.inV, t);
}
static public void computeCospi(TestCospi.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = cospi(args.in, t);
+ args.out = cospi(args.inV, t);
}
static public void computeCross(TestCross.ArgumentsFloatNFloatNFloatN args, Target t) {
t.setPrecision(1, 4, false);
- cross(args.inLhs, args.inRhs, args.out, t);
+ cross(args.inLeftVector, args.inRightVector, args.out, t);
}
static public void computeDegrees(TestDegrees.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 3, false);
- Target.Floaty in = t.new32(args.inValue);
+ Target.Floaty in = t.new32(args.inV);
Target.Floaty k = t.new32((float)(180.0 / Math.PI));
args.out = t.multiply(in, k);
}
static public void computeDistance(TestDistance.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(1, 1, false);
- args.out = distance(new float[] {args.inLhs}, new float[] {args.inRhs}, t);
+ args.out = distance(new float[] {args.inLeftVector}, new float[] {args.inRightVector}, t);
}
static public void computeDistance(TestDistance.ArgumentsFloatNFloatNFloat args, Target t) {
t.setPrecision(1, 1, false);
- args.out = distance(args.inLhs, args.inRhs, t);
+ args.out = distance(args.inLeftVector, args.inRightVector, t);
}
static public void computeDot(TestDot.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(1, 4, false);
- Target.Floaty a = t.new32(args.inLhs);
- Target.Floaty b = t.new32(args.inRhs);
+ Target.Floaty a = t.new32(args.inLeftVector);
+ Target.Floaty b = t.new32(args.inRightVector);
args.out = t.multiply(a, b);
}
static public void computeDot(TestDot.ArgumentsFloatNFloatNFloat args, Target t) {
t.setPrecision(1, 4, false);
Target.Floaty sum = t.new32(0.f);
- for (int i = 0; i < args.inLhs.length; i++) {
- Target.Floaty a = t.new32(args.inLhs[i]);
- Target.Floaty b = t.new32(args.inRhs[i]);
+ for (int i = 0; i < args.inLeftVector.length; i++) {
+ Target.Floaty a = t.new32(args.inLeftVector[i]);
+ Target.Floaty b = t.new32(args.inRightVector[i]);
sum = t.add(sum, t.multiply(a, b));
}
args.out = sum;
@@ -1107,59 +1107,59 @@
static public void computeErf(TestErf.ArgumentsFloatFloat args, Target t) {
t.setPrecision(16, 128, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
- erf(args.in),
+ erf(args.inV),
erf(in.min32()),
erf(in.max32()));
}
static public void computeErfc(TestErfc.ArgumentsFloatFloat args, Target t) {
t.setPrecision(16, 128, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
- erfc(args.in),
+ erfc(args.inV),
erfc(in.min32()),
erfc(in.max32()));
}
static public void computeExp(TestExp.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 16, false);
- args.out = exp(args.in, t);
+ args.out = exp(args.inV, t);
}
static public void computeExp10(TestExp10.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 32, false);
- args.out = exp10(args.in, t);
+ args.out = exp10(args.inV, t);
}
static public void computeExp2(TestExp2.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 16, false);
- args.out = exp2(args.in, t);
+ args.out = exp2(args.inV, t);
}
static public void computeExpm1(TestExpm1.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 16, false);
- args.out = expm1(args.in, t);
+ args.out = expm1(args.inV, t);
}
static public void computeFabs(TestFabs.ArgumentsFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
- Math.abs(args.in),
+ Math.abs(args.inV),
Math.abs(in.min32()),
Math.abs(in.max32()));
}
static public void computeFastDistance(TestFastDistance.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
- args.out = distance(new float[] {args.inLhs}, new float[] {args.inRhs}, t);
+ args.out = distance(new float[] {args.inLeftVector}, new float[] {args.inRightVector}, t);
}
static public void computeFastDistance(TestFastDistance.ArgumentsFloatNFloatNFloat args, Target t) {
t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
- args.out = distance(args.inLhs, args.inRhs, t);
+ args.out = distance(args.inLeftVector, args.inRightVector, t);
}
static public void computeFastLength(TestFastLength.ArgumentsFloatFloat args, Target t) {
@@ -1197,53 +1197,53 @@
static public void computeFloor(TestFloor.ArgumentsFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
- floor(args.in),
+ floor(args.inV),
floor(in.min32()),
floor(in.max32()));
}
static public void computeFma(TestFma.ArgumentsFloatFloatFloatFloat args, Target t) {
t.setPrecision(1, 1, false);
- Target.Floaty ab = t.multiply(t.new32(args.inA), t.new32(args.inB));
- args.out = t.add(ab, t.new32(args.inC));
+ Target.Floaty ab = t.multiply(t.new32(args.inMultiplicand1), t.new32(args.inMultiplicand2));
+ args.out = t.add(ab, t.new32(args.inOffset));
}
static public void computeFmax(TestFmax.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty inX = t.new32(args.inX);
- Target.Floaty inY = t.new32(args.inY);
+ Target.Floaty a = t.new32(args.inA);
+ Target.Floaty b = t.new32(args.inB);
args.out = t.new32(
- Math.max(args.inX, args.inY),
- Math.max(inX.min32(), inY.min32()),
- Math.max(inX.min32(), inY.max32()),
- Math.max(inX.max32(), inY.min32()),
- Math.max(inX.max32(), inY.max32()));
+ Math.max(args.inA, args.inB),
+ Math.max(a.min32(), b.min32()),
+ Math.max(a.min32(), b.max32()),
+ Math.max(a.max32(), b.min32()),
+ Math.max(a.max32(), b.max32()));
}
static public void computeFmin(TestFmin.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty inX = t.new32(args.inX);
- Target.Floaty inY = t.new32(args.inY);
+ Target.Floaty a = t.new32(args.inA);
+ Target.Floaty b = t.new32(args.inB);
args.out = t.new32(
- Math.min(args.inX, args.inY),
- Math.min(inX.min32(), inY.min32()),
- Math.min(inX.min32(), inY.max32()),
- Math.min(inX.max32(), inY.min32()),
- Math.min(inX.max32(), inY.max32()));
+ Math.min(args.inA, args.inB),
+ Math.min(a.min32(), b.min32()),
+ Math.min(a.min32(), b.max32()),
+ Math.min(a.max32(), b.min32()),
+ Math.min(a.max32(), b.max32()));
}
static public void computeFmod(TestFmod.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(1, 1, false);
- Target.Floaty inX = t.new32(args.inX);
- Target.Floaty inY = t.new32(args.inY);
+ Target.Floaty numerator = t.new32(args.inNumerator);
+ Target.Floaty denominator = t.new32(args.inDenominator);
args.out = t.new32(
- args.inX % args.inY,
- inX.min32() % inY.min32(),
- inX.min32() % inY.max32(),
- inX.max32() % inY.min32(),
- inX.max32() % inY.max32());
+ args.inNumerator % args.inDenominator,
+ numerator.min32() % denominator.min32(),
+ numerator.min32() % denominator.max32(),
+ numerator.max32() % denominator.min32(),
+ numerator.max32() % denominator.max32());
}
static public void computeFract(TestFract.ArgumentsFloatFloatFloat args, Target t) {
@@ -1265,7 +1265,7 @@
t.setPrecision(0, 0, false);
FrexpResult result = frexp(args.inV);
args.out = t.new32(result.significand);
- args.outIptr = result.exponent;
+ args.outExponent = result.exponent;
}
static public void computeHalfRecip(TestHalfRecip.ArgumentsFloatFloat args, Target t) {
@@ -1285,18 +1285,18 @@
static public void computeHypot(TestHypot.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(4, 4, false);
- args.out = hypot(args.inX, args.inY, t);
+ args.out = hypot(args.inA, args.inB, t);
}
static public String verifyIlogb(TestIlogb.ArgumentsFloatInt args) {
// Special case when the input is 0. We accept two different answers.
- if (args.in == 0.f) {
+ if (args.inV == 0.f) {
if (args.out != -Integer.MAX_VALUE && args.out != Integer.MIN_VALUE) {
return "Expected " + Integer.toString(-Integer.MAX_VALUE) + " or " +
Integer.toString(Integer.MIN_VALUE);
}
} else {
- int result = ilogb(args.in);
+ int result = ilogb(args.inV);
if (args.out != result) {
return "Expected " + Integer.toString(result);
}
@@ -1306,11 +1306,11 @@
static public void computeLdexp(TestLdexp.ArgumentsFloatIntFloat args, Target t) {
t.setPrecision(1, 1, false);
- Target.Floaty inX = t.new32(args.inX);
+ Target.Floaty inMantissa = t.new32(args.inMantissa);
args.out = t.new32(
- ldexp(inX.mid32(), args.inY),
- ldexp(inX.min32(), args.inY),
- ldexp(inX.max32(), args.inY));
+ ldexp(inMantissa.mid32(), args.inExponent),
+ ldexp(inMantissa.min32(), args.inExponent),
+ ldexp(inMantissa.max32(), args.inExponent));
}
static public void computeLength(TestLength.ArgumentsFloatFloat args, Target t) {
@@ -1325,7 +1325,7 @@
static public void computeLgamma(TestLgamma.ArgumentsFloatFloat args, Target t) {
t.setPrecision(16, 128, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
lgamma(in.mid32()),
lgamma(in.min32()),
@@ -1337,7 +1337,7 @@
* is fixed, we can restore computeLgamma and remove verifyLgamma.
static public void computeLgamma(TestLgamma.ArgumentsFloatIntFloat args, Target t) {
t.setPrecision(16, 128, false);
- Target.Floaty in = t.new32(args.inX);
+ Target.Floaty in = t.new32(args.inV);
LgammaResult result = lgamma2(in.mid32());
LgammaResult resultMin = lgamma2(in.min32());
LgammaResult resultMax = lgamma2(in.max32());
@@ -1347,25 +1347,25 @@
*/
static public String verifyLgamma(TestLgamma.ArgumentsFloatIntFloat args, Target t) {
t.setPrecision(16, 128, false);
- Target.Floaty in = t.new32(args.inX);
+ Target.Floaty in = t.new32(args.inV);
LgammaResult result = lgamma2(in.mid32());
LgammaResult resultMin = lgamma2(in.min32());
LgammaResult resultMax = lgamma2(in.max32());
Target.Floaty expectedOut = t.new32(result.lgamma, resultMin.lgamma, resultMax.lgamma);
- boolean isNegativeZero = args.inX == 0.f && 1.f / args.inX < 0.f;
+ boolean isNegativeZero = args.inV == 0.f && 1.f / args.inV < 0.f;
/* TODO The current implementation of bionic does not handle the -0.f case correctly.
* It should set the sign to -1 but sets it to 1.
*/
if (!expectedOut.couldBe(args.out) ||
- (args.outY != result.gammaSign && !isNegativeZero)) {
+ (args.outSignOfGamma != result.gammaSign && !isNegativeZero)) {
StringBuilder message = new StringBuilder();
- message.append(String.format("Input in %14.8g {%8x}:\n", args.inX, Float.floatToRawIntBits(args.inX)));
+ message.append(String.format("Input in %14.8g {%8x}:\n", args.inV, Float.floatToRawIntBits(args.inV)));
message.append("Expected out: ");
message.append(expectedOut.toString());
message.append("\n");
message.append(String.format("Actual out: %14.8g {%8x}", args.out, Float.floatToRawIntBits(args.out)));
- message.append(String.format("Expected outY: %d\n", result.gammaSign));
- message.append(String.format("Actual outY: %d\n", args.outY));
+ message.append(String.format("Expected outSign: %d\n", result.gammaSign));
+ message.append(String.format("Actual outSign: %d\n", args.outSignOfGamma));
return message.toString();
}
@@ -1376,27 +1376,27 @@
// They are not consistent.
static public void computeLog(TestLog.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 16, false);
- args.out = log(args.in, t);
+ args.out = log(args.inV, t);
}
static public void computeLog10(TestLog10.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 16, false);
- args.out = log10(args.in, t);
+ args.out = log10(args.inV, t);
}
static public void computeLog1p(TestLog1p.ArgumentsFloatFloat args, Target t) {
t.setPrecision(2, 16, false);
- args.out = log1p(args.in, t);
+ args.out = log1p(args.inV, t);
}
static public void computeLog2(TestLog2.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 128, false);
- args.out = log2(args.in, t);
+ args.out = log2(args.inV, t);
}
static public void computeLogb(TestLogb.ArgumentsFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
logb(in.mid32()),
logb(in.min32()),
@@ -1405,89 +1405,89 @@
static public void computeMad(TestMad.ArgumentsFloatFloatFloatFloat args, Target t) {
t.setPrecision(1, 4, false);
- Target.Floaty ab = t.multiply(t.new32(args.inA), t.new32(args.inB));
- args.out = t.add(ab, t.new32(args.inC));
+ Target.Floaty ab = t.multiply(t.new32(args.inMultiplicand1), t.new32(args.inMultiplicand2));
+ args.out = t.add(ab, t.new32(args.inOffset));
}
static public void computeMax(TestMax.ArgumentsCharCharChar args) {
- args.out = maxI8(args.inV1, args.inV2);
+ args.out = maxI8(args.inA, args.inB);
}
static public void computeMax(TestMax.ArgumentsUcharUcharUchar args) {
- args.out = maxU8(args.inV1, args.inV2);
+ args.out = maxU8(args.inA, args.inB);
}
static public void computeMax(TestMax.ArgumentsShortShortShort args) {
- args.out = maxI16(args.inV1, args.inV2);
+ args.out = maxI16(args.inA, args.inB);
}
static public void computeMax(TestMax.ArgumentsUshortUshortUshort args) {
- args.out = maxU16(args.inV1, args.inV2);
+ args.out = maxU16(args.inA, args.inB);
}
static public void computeMax(TestMax.ArgumentsIntIntInt args) {
- args.out = maxI32(args.inV1, args.inV2);
+ args.out = maxI32(args.inA, args.inB);
}
static public void computeMax(TestMax.ArgumentsUintUintUint args) {
- args.out = maxU32(args.inV1, args.inV2);
+ args.out = maxU32(args.inA, args.inB);
}
static public void computeMax(TestMax.ArgumentsLongLongLong args) {
- args.out = maxI64(args.inV1, args.inV2);
+ args.out = maxI64(args.inA, args.inB);
}
static public void computeMax(TestMax.ArgumentsUlongUlongUlong args) {
- args.out = maxU64(args.inV1, args.inV2);
+ args.out = maxU64(args.inA, args.inB);
}
static public void computeMax(TestMax.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty in = t.new32(args.in);
- Target.Floaty in1 = t.new32(args.in1);
+ Target.Floaty a = t.new32(args.inA);
+ Target.Floaty b = t.new32(args.inB);
args.out = t.new32(
- Math.max(in.mid32(), in1.mid32()),
- Math.max(in.min32(), in1.min32()),
- Math.max(in.min32(), in1.max32()),
- Math.max(in.max32(), in1.min32()),
- Math.max(in.max32(), in1.max32()));
+ Math.max(a.mid32(), b.mid32()),
+ Math.max(a.min32(), b.min32()),
+ Math.max(a.min32(), b.max32()),
+ Math.max(a.max32(), b.min32()),
+ Math.max(a.max32(), b.max32()));
}
static public void computeMin(TestMin.ArgumentsCharCharChar args) {
- args.out = minI8(args.inV1, args.inV2);
+ args.out = minI8(args.inA, args.inB);
}
static public void computeMin(TestMin.ArgumentsUcharUcharUchar args) {
- args.out = minU8(args.inV1, args.inV2);
+ args.out = minU8(args.inA, args.inB);
}
static public void computeMin(TestMin.ArgumentsShortShortShort args) {
- args.out = minI16(args.inV1, args.inV2);
+ args.out = minI16(args.inA, args.inB);
}
static public void computeMin(TestMin.ArgumentsUshortUshortUshort args) {
- args.out = minU16(args.inV1, args.inV2);
+ args.out = minU16(args.inA, args.inB);
}
static public void computeMin(TestMin.ArgumentsIntIntInt args) {
- args.out = minI32(args.inV1, args.inV2);
+ args.out = minI32(args.inA, args.inB);
}
static public void computeMin(TestMin.ArgumentsUintUintUint args) {
- args.out = minU32(args.inV1, args.inV2);
+ args.out = minU32(args.inA, args.inB);
}
static public void computeMin(TestMin.ArgumentsLongLongLong args) {
- args.out = minI64(args.inV1, args.inV2);
+ args.out = minI64(args.inA, args.inB);
}
static public void computeMin(TestMin.ArgumentsUlongUlongUlong args) {
- args.out = minU64(args.inV1, args.inV2);
+ args.out = minU64(args.inA, args.inB);
}
static public void computeMin(TestMin.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- args.out = t.new32(Math.min(args.in, args.in1));
+ args.out = t.new32(Math.min(args.inA, args.inB));
}
static public void computeMix(TestMix.ArgumentsFloatFloatFloatFloat args, Target t) {
@@ -1495,18 +1495,19 @@
Target.Floaty start = t.new32(args.inStart);
Target.Floaty stop = t.new32(args.inStop);
Target.Floaty diff = t.subtract(stop, start);
- args.out = t.add(start, t.multiply(diff, t.new32(args.inAmount)));
+ args.out = t.add(start, t.multiply(diff, t.new32(args.inFraction)));
}
static public void computeModf(TestModf.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- float ret = (float)(int)args.inX;
- args.outIret = t.new32(ret);
- args.out = t.new32(args.inX - ret);
+ float ret = (float)(int)args.inV;
+ args.outIntegralPart = t.new32(ret);
+ args.out = t.new32(args.inV - ret);
}
static public void computeNan(TestNan.ArgumentsUintFloat args, Target t) {
t.setPrecision(0, 0, false);
+ // TODO(jeanluc) We're not using the input argument
args.out = t.new32(Float.NaN);
}
@@ -1517,7 +1518,7 @@
static public void computeNativeAcosh(TestNativeAcosh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = acosh(args.in, t);
+ args.out = acosh(args.inV, t);
}
static public void computeNativeAcospi(TestNativeAcospi.ArgumentsFloatFloat args, Target t) {
@@ -1532,7 +1533,7 @@
static public void computeNativeAsinh(TestNativeAsinh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = asinh(args.in, t);
+ args.out = asinh(args.inV, t);
}
static public void computeNativeAsinpi(TestNativeAsinpi.ArgumentsFloatFloat args, Target t) {
@@ -1547,7 +1548,7 @@
static public void computeNativeAtanh(TestNativeAtanh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = atanh(args.inIn, t);
+ args.out = atanh(args.inV, t);
}
static public void computeNativeAtanpi(TestNativeAtanpi.ArgumentsFloatFloat args, Target t) {
@@ -1557,47 +1558,47 @@
static public void computeNativeAtan2(TestNativeAtan2.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = atan2(args.inY, args.inX, t);
+ args.out = atan2(args.inNumerator, args.inDenominator, t);
}
static public void computeNativeAtan2pi(TestNativeAtan2pi.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = atan2pi(args.inY, args.inX, t);
+ args.out = atan2pi(args.inNumerator, args.inDenominator, t);
}
static public void computeNativeCbrt(TestNativeCbrt.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = cbrt(args.in, t);
+ args.out = cbrt(args.inV, t);
}
static public void computeNativeCos(TestNativeCos.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = cos(args.in, t);
+ args.out = cos(args.inV, t);
}
static public void computeNativeCosh(TestNativeCosh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = cosh(args.in, t);
+ args.out = cosh(args.inV, t);
}
static public void computeNativeCospi(TestNativeCospi.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = cospi(args.in, t);
+ args.out = cospi(args.inV, t);
}
static public void computeNativeDistance(TestNativeDistance.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = distance(new float[]{args.inLhs}, new float[]{args.inRhs}, t);
+ args.out = distance(new float[]{args.inLeftVector}, new float[]{args.inRightVector}, t);
}
static public void computeNativeDistance(TestNativeDistance.ArgumentsFloatNFloatNFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = distance(args.inLhs, args.inRhs, t);
+ args.out = distance(args.inLeftVector, args.inRightVector, t);
}
static public void computeNativeDivide(TestNativeDivide.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = t.divide(t.new32(args.inLhs), t.new32(args.inRhs));
+ args.out = t.divide(t.new32(args.inLeftVector), t.new32(args.inRightVector));
}
static public void computeNativeExp(TestNativeExp.ArgumentsFloatFloat args, Target t) {
@@ -1618,12 +1619,12 @@
static public void computeNativeExpm1(TestNativeExpm1.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = expm1(args.in, t);
+ args.out = expm1(args.inV, t);
}
static public void computeNativeHypot(TestNativeHypot.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = hypot(args.inX, args.inY, t);
+ args.out = hypot(args.inA, args.inB, t);
}
static public void computeNativeLength(TestNativeLength.ArgumentsFloatFloat args, Target t) {
@@ -1658,7 +1659,7 @@
static public void computeNativeLog1p(TestNativeLog1p.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = log1p(args.in, t);
+ args.out = log1p(args.inV, t);
}
static public void computeNativeLog2(TestNativeLog2.ArgumentsFloatFloat args, Target t) {
@@ -1687,10 +1688,10 @@
// TODO we would like to use NATIVE_PRECISION, NATIVE_PRECISION
t.setPrecision(32000, 32000, true);
// For very small values, allow anything.
- if (Math.abs(args.inV) < 1.e-20) {
+ if (Math.abs(args.inBase) < 1.e-20) {
args.out = any32(t);
} else {
- args.out = powr(args.inV, args.inY, t);
+ args.out = powr(args.inBase, args.inExponent, t);
}
}
@@ -1711,53 +1712,53 @@
static public void computeNativeRsqrt(TestNativeRsqrt.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = rsqrt(args.in, t);
+ args.out = rsqrt(args.inV, t);
}
static public void computeNativeSin(TestNativeSin.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = sin(args.in, t);
+ args.out = sin(args.inV, t);
}
static public void computeNativeSincos(TestNativeSincos.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.outCosptr = cos(args.inV, t);
+ args.outCos = cos(args.inV, t);
args.out = sin(args.inV, t);
}
static public void computeNativeSinh(TestNativeSinh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = sinh(args.in, t);
+ args.out = sinh(args.inV, t);
}
static public void computeNativeSinpi(TestNativeSinpi.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = sinpi(args.in, t);
+ args.out = sinpi(args.inV, t);
}
static public void computeNativeSqrt(TestNativeSqrt.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = sqrt(args.in, t);
+ args.out = sqrt(args.inV, t);
}
static public void computeNativeTan(TestNativeTan.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = tan(args.in, t);
+ args.out = tan(args.inV, t);
}
static public void computeNativeTanh(TestNativeTanh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = tanh(args.in, t);
+ args.out = tanh(args.inV, t);
}
static public void computeNativeTanpi(TestNativeTanpi.ArgumentsFloatFloat args, Target t) {
t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
- args.out = tanpi(args.in, t);
+ args.out = tanpi(args.inV, t);
}
static public void computeNextafter(TestNextafter.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- args.out = t.new32(Math.nextAfter(args.inX, args.inY));
+ args.out = t.new32(Math.nextAfter(args.inV, args.inTarget));
}
static public void computeNormalize(TestNormalize.ArgumentsFloatFloat args, Target t) {
@@ -1774,23 +1775,23 @@
static public void computePow(TestPow.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(16, 128, false);
- Target.Floaty inX = t.new32(args.inX);
- Target.Floaty inY = t.new32(args.inY);
+ Target.Floaty base = t.new32(args.inBase);
+ Target.Floaty exponent = t.new32(args.inExponent);
args.out = t.new32(
- pow(inX.mid32(), inY.mid32()),
- pow(inX.min32(), inY.min32()),
- pow(inX.min32(), inY.max32()),
- pow(inX.max32(), inY.min32()),
- pow(inX.max32(), inY.max32()));
+ pow(base.mid32(), exponent.mid32()),
+ pow(base.min32(), exponent.min32()),
+ pow(base.min32(), exponent.max32()),
+ pow(base.max32(), exponent.min32()),
+ pow(base.max32(), exponent.max32()));
}
static public void computePown(TestPown.ArgumentsFloatIntFloat args, Target t) {
t.setPrecision(16, 128, false);
- Target.Floaty in = t.new32(args.inX);
+ Target.Floaty in = t.new32(args.inBase);
// We use double for the calculations because floats does not have enough
// mantissa bits. Knowing if an int is odd or even will matter for negative
// numbers. Using a float loses the lowest bit.
- final double y = (double) args.inY;
+ final double y = (double) args.inExponent;
args.out = t.new32(
(float) Math.pow(in.mid32(), y),
(float) Math.pow(in.min32(), y),
@@ -1799,25 +1800,25 @@
static public void computePowr(TestPowr.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(16, 128, false);
- args.out = powr(args.inX, args.inY, t);
+ args.out = powr(args.inBase, args.inExponent, t);
}
static public void computeRadians(TestRadians.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 3, false);
- Target.Floaty in = t.new32(args.inValue);
+ Target.Floaty in = t.new32(args.inV);
Target.Floaty k = t.new32((float)(Math.PI / 180.0));
args.out = t.multiply(in, k);
}
static public void computeRemainder(TestRemainder.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- RemquoResult result = remquo(args.inX, args.inY);
+ RemquoResult result = remquo(args.inNumerator, args.inDenominator);
args.out = t.new32(result.remainder);
}
static public String verifyRemquo(TestRemquo.ArgumentsFloatFloatIntFloat args, Target t) {
t.setPrecision(0, 0, false);
- RemquoResult expected = remquo(args.inB, args.inC);
+ RemquoResult expected = remquo(args.inNumerator, args.inDenominator);
// If the expected remainder is NaN, we don't validate the quotient. It's because of
// a division by zero.
if (expected.remainder != expected.remainder) {
@@ -1827,8 +1828,8 @@
}
} else {
// The quotient should have the same lowest three bits.
- if ((args.outD & 0x07) != (expected.quotient & 0x07)) {
- return "Quotient returned " + Integer.toString(args.outD) +
+ if ((args.outQuotient & 0x07) != (expected.quotient & 0x07)) {
+ return "Quotient returned " + Integer.toString(args.outQuotient) +
" does not have the same lower three bits as the expected " +
Integer.toString(expected.quotient);
}
@@ -1844,7 +1845,7 @@
static public void computeRint(TestRint.ArgumentsFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
rint(in.mid32()),
rint(in.min32()),
@@ -1858,7 +1859,7 @@
static public void computeRound(TestRound.ArgumentsFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
round(in.mid32()),
round(in.min32()),
@@ -1867,7 +1868,7 @@
static public void computeRsqrt(TestRsqrt.ArgumentsFloatFloat args, Target t) {
t.setPrecision(2, 2, false);
- args.out = rsqrt(args.in, t);
+ args.out = rsqrt(args.inV, t);
}
static public void computeSign(TestSign.ArgumentsFloatFloat args, Target t) {
@@ -1877,28 +1878,28 @@
static public void computeSin(TestSin.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = sin(args.in, t);
+ args.out = sin(args.inV, t);
}
static public void computeSincos(TestSincos.ArgumentsFloatFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.outCosptr = cos(args.inV,t );
+ args.outCos = cos(args.inV,t );
args.out = sin(args.inV, t);
}
static public void computeSinh(TestSinh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = sinh(args.in, t);
+ args.out = sinh(args.inV, t);
}
static public void computeSinpi(TestSinpi.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = sinpi(args.in, t);
+ args.out = sinpi(args.inV, t);
}
static public void computeSqrt(TestSqrt.ArgumentsFloatFloat args, Target t) {
t.setPrecision(3, 3, false);
- args.out = sqrt(args.in, t);
+ args.out = sqrt(args.inV, t);
}
static public void computeStep(TestStep.ArgumentsFloatFloatFloat args, Target t) {
@@ -1908,22 +1909,22 @@
static public void computeTan(TestTan.ArgumentsFloatFloat args, Target t) {
t.setPrecision(5, 128, false);
- args.out = tan(args.in, t);
+ args.out = tan(args.inV, t);
}
static public void computeTanh(TestTanh.ArgumentsFloatFloat args, Target t) {
t.setPrecision(5, 128, false);
- args.out = tanh(args.in, t);
+ args.out = tanh(args.inV, t);
}
static public void computeTanpi(TestTanpi.ArgumentsFloatFloat args, Target t) {
t.setPrecision(4, 128, false);
- args.out = tanpi(args.in, t);
+ args.out = tanpi(args.inV, t);
}
static public void computeTgamma(TestTgamma.ArgumentsFloatFloat args, Target t) {
t.setPrecision(16, 128, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
tgamma(in.mid32()),
tgamma(in.min32()),
@@ -1932,7 +1933,7 @@
static public void computeTrunc(TestTrunc.ArgumentsFloatFloat args, Target t) {
t.setPrecision(0, 0, false);
- Target.Floaty in = t.new32(args.in);
+ Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
trunc(in.mid32()),
trunc(in.min32()),
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/IntrinsicResize.java b/tests/tests/renderscript/src/android/renderscript/cts/IntrinsicResize.java
index d593bff..9028c37 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/IntrinsicResize.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/IntrinsicResize.java
@@ -67,8 +67,24 @@
sr.forEach_bicubic_U1(mAllocDst);
break;
}
+ } else {
+ switch(vecSize) {
+ case 4:
+ sr.forEach_bicubic_F4(mAllocDst);
+ break;
+ case 3:
+ sr.forEach_bicubic_F3(mAllocDst);
+ break;
+ case 2:
+ sr.forEach_bicubic_F2(mAllocDst);
+ break;
+ case 1:
+ sr.forEach_bicubic_F1(mAllocDst);
+ break;
+ }
}
+
mVerify.invoke_verify(mAllocRef, mAllocDst, mAllocSrc);
if (outW == w && outH == h) {
//when scale = 1, check with the original.
@@ -248,4 +264,176 @@
testReszie(inX, inY, Element.DataType.UNSIGNED_8, 1, 0.5f, 0.5f);
checkError();
}
+
+
+ public void test_F32_4_SCALE10_10_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 4, 1.f, 1.f);
+ checkError();
+ }
+ public void test_F32_3_SCALE10_10_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 3, 1.f, 1.f);
+ checkError();
+ }
+ public void test_F32_2_SCALE10_10_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 2, 1.f, 1.f);
+ checkError();
+ }
+ public void test_F32_1_SCALE10_10_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 1, 1.f, 1.f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE20_20_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 4, 2.f, 2.f);
+ checkError();
+ }
+ public void test_F32_3_SCALE20_20_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 3, 2.f, 2.f);
+ checkError();
+ }
+ public void test_F32_2_SCALE20_20_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 2, 2.f, 2.f);
+ checkError();
+ }
+ public void test_F32_1_SCALE20_20_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 1, 2.f, 2.f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE05_20_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 4, 0.5f, 2.f);
+ checkError();
+ }
+ public void test_F32_3_SCALE05_20_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 3, 0.5f, 2.f);
+ checkError();
+ }
+ public void test_F32_2_SCALE05_20_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 2, 0.5f, 2.f);
+ checkError();
+ }
+ public void test_F32_1_SCALE05_20_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 1, 0.5f, 2.f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE20_05_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 4, 2.f, 0.5f);
+ checkError();
+ }
+ public void test_F32_3_SCALE20_05_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 3, 2.f, 0.5f);
+ checkError();
+ }
+ public void test_F32_2_SCALE20_05_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 2, 2.f, 0.5f);
+ checkError();
+ }
+ public void test_F32_1_SCALE20_05_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 1, 2.f, 0.5f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE05_05_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 4, 0.5f, 0.5f);
+ checkError();
+ }
+ public void test_F32_3_SCALE05_05_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 3, 0.5f, 0.5f);
+ checkError();
+ }
+ public void test_F32_2_SCALE05_05_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 2, 0.5f, 0.5f);
+ checkError();
+ }
+ public void test_F32_1_SCALE05_05_inSqure() {
+ testReszie(inX, inX, Element.DataType.FLOAT_32, 1, 0.5f, 0.5f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE10_10_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 4, 1.f, 1.f);
+ checkError();
+ }
+ public void test_F32_3_SCALE10_10_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 3, 1.f, 1.f);
+ checkError();
+ }
+ public void test_F32_2_SCALE10_10_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 2, 1.f, 1.f);
+ checkError();
+ }
+ public void test_F32_1_SCALE10_10_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 1, 1.f, 1.f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE20_20_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 4, 2.f, 2.f);
+ checkError();
+ }
+ public void test_F32_3_SCALE20_20_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 3, 2.f, 2.f);
+ checkError();
+ }
+ public void test_F32_2_SCALE20_20_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 2, 2.f, 2.f);
+ checkError();
+ }
+ public void test_F32_1_SCALE20_20_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 1, 2.f, 2.f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE05_20_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 4, 0.5f, 2.f);
+ checkError();
+ }
+ public void test_F32_3_SCALE05_20_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 3, 0.5f, 2.f);
+ checkError();
+ }
+ public void test_F32_2_SCALE05_20_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 2, 0.5f, 2.f);
+ checkError();
+ }
+ public void test_F32_1_SCALE05_20_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 1, 0.5f, 2.f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE20_05_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 4, 2.f, 0.5f);
+ checkError();
+ }
+ public void test_F32_3_SCALE20_05_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 3, 2.f, 0.5f);
+ checkError();
+ }
+ public void test_F32_2_SCALE20_05_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 2, 2.f, 0.5f);
+ checkError();
+ }
+ public void test_F32_1_SCALE20_05_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 1, 2.f, 0.5f);
+ checkError();
+ }
+
+ public void test_F32_4_SCALE05_05_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 4, 0.5f, 0.5f);
+ checkError();
+ }
+ public void test_F32_3_SCALE05_05_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 3, 0.5f, 0.5f);
+ checkError();
+ }
+ public void test_F32_2_SCALE05_05_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 2, 0.5f, 0.5f);
+ checkError();
+ }
+ public void test_F32_1_SCALE05_05_inRectangle() {
+ testReszie(inX, inY, Element.DataType.FLOAT_32, 1, 0.5f, 0.5f);
+ checkError();
+ }
+
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.java
index 6b3914c..5f9b0c5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.java
@@ -35,38 +35,38 @@
}
public class ArgumentsCharUchar {
- public byte inValue;
+ public byte inV;
public byte out;
}
private void checkAbsCharUchar() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x4c0d03eb0d0c5a91l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x79257810f7393ea6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 1), INPUTSIZE);
- script.forEach_testAbsCharUchar(inValue, out);
- verifyResultsAbsCharUchar(inValue, out, false);
+ script.forEach_testAbsCharUchar(inV, out);
+ verifyResultsAbsCharUchar(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsCharUchar: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 1), INPUTSIZE);
- scriptRelaxed.forEach_testAbsCharUchar(inValue, out);
- verifyResultsAbsCharUchar(inValue, out, true);
+ scriptRelaxed.forEach_testAbsCharUchar(inV, out);
+ verifyResultsAbsCharUchar(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsCharUchar: " + e.toString());
}
}
- private void verifyResultsAbsCharUchar(Allocation inValue, Allocation out, boolean relaxed) {
- byte[] arrayInValue = new byte[INPUTSIZE * 1];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsCharUchar(Allocation inV, Allocation out, boolean relaxed) {
+ byte[] arrayInV = new byte[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
byte[] arrayOut = new byte[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsCharUchar args = new ArgumentsCharUchar();
- args.inValue = arrayInValue[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -76,8 +76,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -96,33 +96,33 @@
}
private void checkAbsChar2Uchar2() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0x901d551e7f67bb87l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0xff611dd40e5e407cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 2), INPUTSIZE);
- script.forEach_testAbsChar2Uchar2(inValue, out);
- verifyResultsAbsChar2Uchar2(inValue, out, false);
+ script.forEach_testAbsChar2Uchar2(inV, out);
+ verifyResultsAbsChar2Uchar2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsChar2Uchar2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 2), INPUTSIZE);
- scriptRelaxed.forEach_testAbsChar2Uchar2(inValue, out);
- verifyResultsAbsChar2Uchar2(inValue, out, true);
+ scriptRelaxed.forEach_testAbsChar2Uchar2(inV, out);
+ verifyResultsAbsChar2Uchar2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsChar2Uchar2: " + e.toString());
}
}
- private void verifyResultsAbsChar2Uchar2(Allocation inValue, Allocation out, boolean relaxed) {
- byte[] arrayInValue = new byte[INPUTSIZE * 2];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsChar2Uchar2(Allocation inV, Allocation out, boolean relaxed) {
+ byte[] arrayInV = new byte[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
byte[] arrayOut = new byte[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsCharUchar args = new ArgumentsCharUchar();
- args.inValue = arrayInValue[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -132,8 +132,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -152,33 +152,33 @@
}
private void checkAbsChar3Uchar3() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0xb5d1caa5c8a5e105l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0xff62e6ef0479615al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 3), INPUTSIZE);
- script.forEach_testAbsChar3Uchar3(inValue, out);
- verifyResultsAbsChar3Uchar3(inValue, out, false);
+ script.forEach_testAbsChar3Uchar3(inV, out);
+ verifyResultsAbsChar3Uchar3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsChar3Uchar3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 3), INPUTSIZE);
- scriptRelaxed.forEach_testAbsChar3Uchar3(inValue, out);
- verifyResultsAbsChar3Uchar3(inValue, out, true);
+ scriptRelaxed.forEach_testAbsChar3Uchar3(inV, out);
+ verifyResultsAbsChar3Uchar3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsChar3Uchar3: " + e.toString());
}
}
- private void verifyResultsAbsChar3Uchar3(Allocation inValue, Allocation out, boolean relaxed) {
- byte[] arrayInValue = new byte[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsChar3Uchar3(Allocation inV, Allocation out, boolean relaxed) {
+ byte[] arrayInV = new byte[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsCharUchar args = new ArgumentsCharUchar();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -188,8 +188,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -208,33 +208,33 @@
}
private void checkAbsChar4Uchar4() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0xdb86402d11e40683l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0xff64b009fa948238l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 4), INPUTSIZE);
- script.forEach_testAbsChar4Uchar4(inValue, out);
- verifyResultsAbsChar4Uchar4(inValue, out, false);
+ script.forEach_testAbsChar4Uchar4(inV, out);
+ verifyResultsAbsChar4Uchar4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsChar4Uchar4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 4), INPUTSIZE);
- scriptRelaxed.forEach_testAbsChar4Uchar4(inValue, out);
- verifyResultsAbsChar4Uchar4(inValue, out, true);
+ scriptRelaxed.forEach_testAbsChar4Uchar4(inV, out);
+ verifyResultsAbsChar4Uchar4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsChar4Uchar4: " + e.toString());
}
}
- private void verifyResultsAbsChar4Uchar4(Allocation inValue, Allocation out, boolean relaxed) {
- byte[] arrayInValue = new byte[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsChar4Uchar4(Allocation inV, Allocation out, boolean relaxed) {
+ byte[] arrayInV = new byte[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsCharUchar args = new ArgumentsCharUchar();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -244,8 +244,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -264,38 +264,38 @@
}
public class ArgumentsShortUshort {
- public short inValue;
+ public short inV;
public short out;
}
private void checkAbsShortUshort() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0xaead1a96b6ea02a7l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0xfab837da064819cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 1), INPUTSIZE);
- script.forEach_testAbsShortUshort(inValue, out);
- verifyResultsAbsShortUshort(inValue, out, false);
+ script.forEach_testAbsShortUshort(inV, out);
+ verifyResultsAbsShortUshort(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsShortUshort: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 1), INPUTSIZE);
- scriptRelaxed.forEach_testAbsShortUshort(inValue, out);
- verifyResultsAbsShortUshort(inValue, out, true);
+ scriptRelaxed.forEach_testAbsShortUshort(inV, out);
+ verifyResultsAbsShortUshort(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsShortUshort: " + e.toString());
}
}
- private void verifyResultsAbsShortUshort(Allocation inValue, Allocation out, boolean relaxed) {
- short[] arrayInValue = new short[INPUTSIZE * 1];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsShortUshort(Allocation inV, Allocation out, boolean relaxed) {
+ short[] arrayInV = new short[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
short[] arrayOut = new short[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsShortUshort args = new ArgumentsShortUshort();
- args.inValue = arrayInValue[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -305,8 +305,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -325,33 +325,33 @@
}
private void checkAbsShort2Ushort2() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0x41a1894ff6b0da9l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0x231450e16856b93el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 2), INPUTSIZE);
- script.forEach_testAbsShort2Ushort2(inValue, out);
- verifyResultsAbsShort2Ushort2(inValue, out, false);
+ script.forEach_testAbsShort2Ushort2(inV, out);
+ verifyResultsAbsShort2Ushort2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsShort2Ushort2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 2), INPUTSIZE);
- scriptRelaxed.forEach_testAbsShort2Ushort2(inValue, out);
- verifyResultsAbsShort2Ushort2(inValue, out, true);
+ scriptRelaxed.forEach_testAbsShort2Ushort2(inV, out);
+ verifyResultsAbsShort2Ushort2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsShort2Ushort2: " + e.toString());
}
}
- private void verifyResultsAbsShort2Ushort2(Allocation inValue, Allocation out, boolean relaxed) {
- short[] arrayInValue = new short[INPUTSIZE * 2];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsShort2Ushort2(Allocation inV, Allocation out, boolean relaxed) {
+ short[] arrayInV = new short[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
short[] arrayOut = new short[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsShortUshort args = new ArgumentsShortUshort();
- args.inValue = arrayInValue[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -361,8 +361,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -381,33 +381,33 @@
}
private void checkAbsShort3Ushort3() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x5969cbec377ba515l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x23611868beb24a6al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 3), INPUTSIZE);
- script.forEach_testAbsShort3Ushort3(inValue, out);
- verifyResultsAbsShort3Ushort3(inValue, out, false);
+ script.forEach_testAbsShort3Ushort3(inV, out);
+ verifyResultsAbsShort3Ushort3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsShort3Ushort3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 3), INPUTSIZE);
- scriptRelaxed.forEach_testAbsShort3Ushort3(inValue, out);
- verifyResultsAbsShort3Ushort3(inValue, out, true);
+ scriptRelaxed.forEach_testAbsShort3Ushort3(inV, out);
+ verifyResultsAbsShort3Ushort3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsShort3Ushort3: " + e.toString());
}
}
- private void verifyResultsAbsShort3Ushort3(Allocation inValue, Allocation out, boolean relaxed) {
- short[] arrayInValue = new short[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsShort3Ushort3(Allocation inV, Allocation out, boolean relaxed) {
+ short[] arrayInV = new short[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsShortUshort args = new ArgumentsShortUshort();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -417,8 +417,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -437,33 +437,33 @@
}
private void checkAbsShort4Ushort4() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0xaeb97f436f8c3c81l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0x23addff0150ddb96l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 4), INPUTSIZE);
- script.forEach_testAbsShort4Ushort4(inValue, out);
- verifyResultsAbsShort4Ushort4(inValue, out, false);
+ script.forEach_testAbsShort4Ushort4(inV, out);
+ verifyResultsAbsShort4Ushort4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsShort4Ushort4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 4), INPUTSIZE);
- scriptRelaxed.forEach_testAbsShort4Ushort4(inValue, out);
- verifyResultsAbsShort4Ushort4(inValue, out, true);
+ scriptRelaxed.forEach_testAbsShort4Ushort4(inV, out);
+ verifyResultsAbsShort4Ushort4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsShort4Ushort4: " + e.toString());
}
}
- private void verifyResultsAbsShort4Ushort4(Allocation inValue, Allocation out, boolean relaxed) {
- short[] arrayInValue = new short[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsShort4Ushort4(Allocation inV, Allocation out, boolean relaxed) {
+ short[] arrayInV = new short[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsShortUshort args = new ArgumentsShortUshort();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -473,8 +473,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -493,38 +493,38 @@
}
public class ArgumentsIntUint {
- public int inValue;
+ public int inV;
public int out;
}
private void checkAbsIntUint() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xcda40fd4fa1abbd1l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x6adb1880ac5b83e6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 1), INPUTSIZE);
- script.forEach_testAbsIntUint(inValue, out);
- verifyResultsAbsIntUint(inValue, out, false);
+ script.forEach_testAbsIntUint(inV, out);
+ verifyResultsAbsIntUint(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsIntUint: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testAbsIntUint(inValue, out);
- verifyResultsAbsIntUint(inValue, out, true);
+ scriptRelaxed.forEach_testAbsIntUint(inV, out);
+ verifyResultsAbsIntUint(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsIntUint: " + e.toString());
}
}
- private void verifyResultsAbsIntUint(Allocation inValue, Allocation out, boolean relaxed) {
- int[] arrayInValue = new int[INPUTSIZE * 1];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsIntUint(Allocation inV, Allocation out, boolean relaxed) {
+ int[] arrayInV = new int[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
int[] arrayOut = new int[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsIntUint args = new ArgumentsIntUint();
- args.inValue = arrayInValue[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -534,8 +534,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -554,33 +554,33 @@
}
private void checkAbsInt2Uint2() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x71326739aabbb4a5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0xc8728053938616fal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 2), INPUTSIZE);
- script.forEach_testAbsInt2Uint2(inValue, out);
- verifyResultsAbsInt2Uint2(inValue, out, false);
+ script.forEach_testAbsInt2Uint2(inV, out);
+ verifyResultsAbsInt2Uint2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsInt2Uint2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testAbsInt2Uint2(inValue, out);
- verifyResultsAbsInt2Uint2(inValue, out, true);
+ scriptRelaxed.forEach_testAbsInt2Uint2(inV, out);
+ verifyResultsAbsInt2Uint2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsInt2Uint2: " + e.toString());
}
}
- private void verifyResultsAbsInt2Uint2(Allocation inValue, Allocation out, boolean relaxed) {
- int[] arrayInValue = new int[INPUTSIZE * 2];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsInt2Uint2(Allocation inV, Allocation out, boolean relaxed) {
+ int[] arrayInV = new int[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
int[] arrayOut = new int[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsIntUint args = new ArgumentsIntUint();
- args.inValue = arrayInValue[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -590,8 +590,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -610,33 +610,33 @@
}
private void checkAbsInt3Uint3() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x9bbf87f7a6fae959l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0xc8728af4f28ddbeel, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 3), INPUTSIZE);
- script.forEach_testAbsInt3Uint3(inValue, out);
- verifyResultsAbsInt3Uint3(inValue, out, false);
+ script.forEach_testAbsInt3Uint3(inV, out);
+ verifyResultsAbsInt3Uint3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsInt3Uint3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testAbsInt3Uint3(inValue, out);
- verifyResultsAbsInt3Uint3(inValue, out, true);
+ scriptRelaxed.forEach_testAbsInt3Uint3(inV, out);
+ verifyResultsAbsInt3Uint3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsInt3Uint3: " + e.toString());
}
}
- private void verifyResultsAbsInt3Uint3(Allocation inValue, Allocation out, boolean relaxed) {
- int[] arrayInValue = new int[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsInt3Uint3(Allocation inV, Allocation out, boolean relaxed) {
+ int[] arrayInV = new int[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsIntUint args = new ArgumentsIntUint();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -646,8 +646,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -666,33 +666,33 @@
}
private void checkAbsInt4Uint4() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0xc64ca8b5a33a1e0dl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0xc87295965195a0e2l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 4), INPUTSIZE);
- script.forEach_testAbsInt4Uint4(inValue, out);
- verifyResultsAbsInt4Uint4(inValue, out, false);
+ script.forEach_testAbsInt4Uint4(inV, out);
+ verifyResultsAbsInt4Uint4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsInt4Uint4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testAbsInt4Uint4(inValue, out);
- verifyResultsAbsInt4Uint4(inValue, out, true);
+ scriptRelaxed.forEach_testAbsInt4Uint4(inV, out);
+ verifyResultsAbsInt4Uint4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAbsInt4Uint4: " + e.toString());
}
}
- private void verifyResultsAbsInt4Uint4(Allocation inValue, Allocation out, boolean relaxed) {
- int[] arrayInValue = new int[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsAbsInt4Uint4(Allocation inV, Allocation out, boolean relaxed) {
+ int[] arrayInV = new int[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsIntUint args = new ArgumentsIntUint();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
@@ -702,8 +702,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
- message.append(String.format("%d", args.inValue));
+ message.append("Input inV: ");
+ message.append(String.format("%d", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.rs
index 8f1747e..1a7fb31 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.rs
@@ -20,50 +20,50 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-uchar __attribute__((kernel)) testAbsCharUchar(char inValue) {
- return abs(inValue);
+uchar __attribute__((kernel)) testAbsCharUchar(char inV) {
+ return abs(inV);
}
-uchar2 __attribute__((kernel)) testAbsChar2Uchar2(char2 inValue) {
- return abs(inValue);
+uchar2 __attribute__((kernel)) testAbsChar2Uchar2(char2 inV) {
+ return abs(inV);
}
-uchar3 __attribute__((kernel)) testAbsChar3Uchar3(char3 inValue) {
- return abs(inValue);
+uchar3 __attribute__((kernel)) testAbsChar3Uchar3(char3 inV) {
+ return abs(inV);
}
-uchar4 __attribute__((kernel)) testAbsChar4Uchar4(char4 inValue) {
- return abs(inValue);
+uchar4 __attribute__((kernel)) testAbsChar4Uchar4(char4 inV) {
+ return abs(inV);
}
-ushort __attribute__((kernel)) testAbsShortUshort(short inValue) {
- return abs(inValue);
+ushort __attribute__((kernel)) testAbsShortUshort(short inV) {
+ return abs(inV);
}
-ushort2 __attribute__((kernel)) testAbsShort2Ushort2(short2 inValue) {
- return abs(inValue);
+ushort2 __attribute__((kernel)) testAbsShort2Ushort2(short2 inV) {
+ return abs(inV);
}
-ushort3 __attribute__((kernel)) testAbsShort3Ushort3(short3 inValue) {
- return abs(inValue);
+ushort3 __attribute__((kernel)) testAbsShort3Ushort3(short3 inV) {
+ return abs(inV);
}
-ushort4 __attribute__((kernel)) testAbsShort4Ushort4(short4 inValue) {
- return abs(inValue);
+ushort4 __attribute__((kernel)) testAbsShort4Ushort4(short4 inV) {
+ return abs(inV);
}
-uint __attribute__((kernel)) testAbsIntUint(int inValue) {
- return abs(inValue);
+uint __attribute__((kernel)) testAbsIntUint(int inV) {
+ return abs(inV);
}
-uint2 __attribute__((kernel)) testAbsInt2Uint2(int2 inValue) {
- return abs(inValue);
+uint2 __attribute__((kernel)) testAbsInt2Uint2(int2 inV) {
+ return abs(inV);
}
-uint3 __attribute__((kernel)) testAbsInt3Uint3(int3 inValue) {
- return abs(inValue);
+uint3 __attribute__((kernel)) testAbsInt3Uint3(int3 inV) {
+ return abs(inV);
}
-uint4 __attribute__((kernel)) testAbsInt4Uint4(int4 inValue) {
- return abs(inValue);
+uint4 __attribute__((kernel)) testAbsInt4Uint4(int4 inV) {
+ return abs(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.java
index 1412c2e..40e6e9a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkAcoshFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb2c74105f8e94ea7l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x777ec00cf303663l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testAcoshFloatFloat(in, out);
- verifyResultsAcoshFloatFloat(in, out, false);
+ script.forEach_testAcoshFloatFloat(inV, out);
+ verifyResultsAcoshFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAcoshFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testAcoshFloatFloat(in, out);
- verifyResultsAcoshFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testAcoshFloatFloat(inV, out);
+ verifyResultsAcoshFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAcoshFloatFloat: " + e.toString());
}
}
- private void verifyResultsAcoshFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsAcoshFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAcosh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkAcoshFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4123c61e7e518f4bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xf102471f37b311efl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testAcoshFloat2Float2(in, out);
- verifyResultsAcoshFloat2Float2(in, out, false);
+ script.forEach_testAcoshFloat2Float2(inV, out);
+ verifyResultsAcoshFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAcoshFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testAcoshFloat2Float2(in, out);
- verifyResultsAcoshFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testAcoshFloat2Float2(inV, out);
+ verifyResultsAcoshFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAcoshFloat2Float2: " + e.toString());
}
}
- private void verifyResultsAcoshFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsAcoshFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAcosh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkAcoshFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x4123d0bfdd5824e5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf104103a2dce32cdl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testAcoshFloat3Float3(in, out);
- verifyResultsAcoshFloat3Float3(in, out, false);
+ script.forEach_testAcoshFloat3Float3(inV, out);
+ verifyResultsAcoshFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAcoshFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testAcoshFloat3Float3(in, out);
- verifyResultsAcoshFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testAcoshFloat3Float3(inV, out);
+ verifyResultsAcoshFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAcoshFloat3Float3: " + e.toString());
}
}
- private void verifyResultsAcoshFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsAcoshFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAcosh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkAcoshFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4123db613c5eba7fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf105d95523e953abl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testAcoshFloat4Float4(in, out);
- verifyResultsAcoshFloat4Float4(in, out, false);
+ script.forEach_testAcoshFloat4Float4(inV, out);
+ verifyResultsAcoshFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAcoshFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testAcoshFloat4Float4(in, out);
- verifyResultsAcoshFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testAcoshFloat4Float4(inV, out);
+ verifyResultsAcoshFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAcoshFloat4Float4: " + e.toString());
}
}
- private void verifyResultsAcoshFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsAcoshFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAcosh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.rs
index 9be2fa2..35c4c73 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testAcoshFloatFloat(float in) {
- return acosh(in);
+float __attribute__((kernel)) testAcoshFloatFloat(float inV) {
+ return acosh(inV);
}
-float2 __attribute__((kernel)) testAcoshFloat2Float2(float2 in) {
- return acosh(in);
+float2 __attribute__((kernel)) testAcoshFloat2Float2(float2 inV) {
+ return acosh(inV);
}
-float3 __attribute__((kernel)) testAcoshFloat3Float3(float3 in) {
- return acosh(in);
+float3 __attribute__((kernel)) testAcoshFloat3Float3(float3 inV) {
+ return acosh(inV);
}
-float4 __attribute__((kernel)) testAcoshFloat4Float4(float4 in) {
- return acosh(in);
+float4 __attribute__((kernel)) testAcoshFloat4Float4(float4 inV) {
+ return acosh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.java
index 90c26a0..5e34898 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkAsinhFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3c94145f20a86cdal, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2cdf6bfa7c4a48f4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testAsinhFloatFloat(in, out);
- verifyResultsAsinhFloatFloat(in, out, false);
+ script.forEach_testAsinhFloatFloat(inV, out);
+ verifyResultsAsinhFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAsinhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testAsinhFloatFloat(in, out);
- verifyResultsAsinhFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testAsinhFloatFloat(inV, out);
+ verifyResultsAsinhFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAsinhFloatFloat: " + e.toString());
}
}
- private void verifyResultsAsinhFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsAsinhFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAsinh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkAsinhFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8986450e91b2ada6l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x198d997279032b38l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testAsinhFloat2Float2(in, out);
- verifyResultsAsinhFloat2Float2(in, out, false);
+ script.forEach_testAsinhFloat2Float2(inV, out);
+ verifyResultsAsinhFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAsinhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testAsinhFloat2Float2(in, out);
- verifyResultsAsinhFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testAsinhFloat2Float2(inV, out);
+ verifyResultsAsinhFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAsinhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsAsinhFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsAsinhFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAsinh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkAsinhFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x89864faff0b94340l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x198f628d6f1e4c16l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testAsinhFloat3Float3(in, out);
- verifyResultsAsinhFloat3Float3(in, out, false);
+ script.forEach_testAsinhFloat3Float3(inV, out);
+ verifyResultsAsinhFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAsinhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testAsinhFloat3Float3(in, out);
- verifyResultsAsinhFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testAsinhFloat3Float3(inV, out);
+ verifyResultsAsinhFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAsinhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsAsinhFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsAsinhFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAsinh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkAsinhFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x89865a514fbfd8dal, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x19912ba865396cf4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testAsinhFloat4Float4(in, out);
- verifyResultsAsinhFloat4Float4(in, out, false);
+ script.forEach_testAsinhFloat4Float4(inV, out);
+ verifyResultsAsinhFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAsinhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testAsinhFloat4Float4(in, out);
- verifyResultsAsinhFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testAsinhFloat4Float4(inV, out);
+ verifyResultsAsinhFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAsinhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsAsinhFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsAsinhFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAsinh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.rs
index a72a5f4..b7567db 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testAsinhFloatFloat(float in) {
- return asinh(in);
+float __attribute__((kernel)) testAsinhFloatFloat(float inV) {
+ return asinh(inV);
}
-float2 __attribute__((kernel)) testAsinhFloat2Float2(float2 in) {
- return asinh(in);
+float2 __attribute__((kernel)) testAsinhFloat2Float2(float2 inV) {
+ return asinh(inV);
}
-float3 __attribute__((kernel)) testAsinhFloat3Float3(float3 in) {
- return asinh(in);
+float3 __attribute__((kernel)) testAsinhFloat3Float3(float3 inV) {
+ return asinh(inV);
}
-float4 __attribute__((kernel)) testAsinhFloat4Float4(float4 in) {
- return asinh(in);
+float4 __attribute__((kernel)) testAsinhFloat4Float4(float4 inV) {
+ return asinh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.java
index 10b862d..05b078d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inY;
- public float inX;
+ public float inNumerator;
+ public float inDenominator;
public Target.Floaty out;
}
private void checkAtan2FloatFloatFloat() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x8f58f1f953c03c32l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x8f58f1f953c03c31l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x717c0d8e261d332l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x37738e957bd90d5bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testAtan2FloatFloatFloat(inY, out);
- verifyResultsAtan2FloatFloatFloat(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testAtan2FloatFloatFloat(inNumerator, out);
+ verifyResultsAtan2FloatFloatFloat(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2FloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testAtan2FloatFloatFloat(inY, out);
- verifyResultsAtan2FloatFloatFloat(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testAtan2FloatFloatFloat(inNumerator, out);
+ verifyResultsAtan2FloatFloatFloat(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2FloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsAtan2FloatFloatFloat(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
+ private void verifyResultsAtan2FloatFloatFloat(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 1];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 1];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i];
- args.inX = arrayInX[i];
+ args.inNumerator = arrayInNumerator[i];
+ args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAtan2(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkAtan2Float2Float2Float2() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbe78dcdcd414b6c0l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbe78dcdcd414b6bfl, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8658ecfeefb30700l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x552b6d6bab583839l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testAtan2Float2Float2Float2(inY, out);
- verifyResultsAtan2Float2Float2Float2(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testAtan2Float2Float2Float2(inNumerator, out);
+ verifyResultsAtan2Float2Float2Float2(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2Float2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testAtan2Float2Float2Float2(inY, out);
- verifyResultsAtan2Float2Float2Float2(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testAtan2Float2Float2Float2(inNumerator, out);
+ verifyResultsAtan2Float2Float2Float2(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2Float2Float2Float2: " + e.toString());
}
}
- private void verifyResultsAtan2Float2Float2Float2(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
+ private void verifyResultsAtan2Float2Float2Float2(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 2];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 2];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 2 + j];
- args.inX = arrayInX[i * 2 + j];
+ args.inNumerator = arrayInNumerator[i * 2 + j];
+ args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAtan2(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkAtan2Float3Float3Float3() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x12ddbafcd5f2b861l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x12ddbafcd5f2b860l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x61e79638927ef301l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1e8faeb47e33cb72l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testAtan2Float3Float3Float3(inY, out);
- verifyResultsAtan2Float3Float3Float3(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testAtan2Float3Float3Float3(inNumerator, out);
+ verifyResultsAtan2Float3Float3Float3(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2Float3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testAtan2Float3Float3Float3(inY, out);
- verifyResultsAtan2Float3Float3Float3(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testAtan2Float3Float3Float3(inNumerator, out);
+ verifyResultsAtan2Float3Float3Float3(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2Float3Float3Float3: " + e.toString());
}
}
- private void verifyResultsAtan2Float3Float3Float3(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
+ private void verifyResultsAtan2Float3Float3Float3(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 4 + j];
- args.inX = arrayInX[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAtan2(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkAtan2Float4Float4Float4() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6742991cd7d0ba02l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6742991cd7d0ba01l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3d763f72354adf02l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe7f3effd510f5eabl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testAtan2Float4Float4Float4(inY, out);
- verifyResultsAtan2Float4Float4Float4(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testAtan2Float4Float4Float4(inNumerator, out);
+ verifyResultsAtan2Float4Float4Float4(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2Float4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testAtan2Float4Float4Float4(inY, out);
- verifyResultsAtan2Float4Float4Float4(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testAtan2Float4Float4Float4(inNumerator, out);
+ verifyResultsAtan2Float4Float4Float4(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2Float4Float4Float4: " + e.toString());
}
}
- private void verifyResultsAtan2Float4Float4Float4(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
+ private void verifyResultsAtan2Float4Float4Float4(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 4 + j];
- args.inX = arrayInX[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAtan2(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.rs
index 877402d..e75ec89 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInX;
+rs_allocation gAllocInDenominator;
-float __attribute__((kernel)) testAtan2FloatFloatFloat(float inY, unsigned int x) {
- float inX = rsGetElementAt_float(gAllocInX, x);
- return atan2(inY, inX);
+float __attribute__((kernel)) testAtan2FloatFloatFloat(float inNumerator, unsigned int x) {
+ float inDenominator = rsGetElementAt_float(gAllocInDenominator, x);
+ return atan2(inNumerator, inDenominator);
}
-float2 __attribute__((kernel)) testAtan2Float2Float2Float2(float2 inY, unsigned int x) {
- float2 inX = rsGetElementAt_float2(gAllocInX, x);
- return atan2(inY, inX);
+float2 __attribute__((kernel)) testAtan2Float2Float2Float2(float2 inNumerator, unsigned int x) {
+ float2 inDenominator = rsGetElementAt_float2(gAllocInDenominator, x);
+ return atan2(inNumerator, inDenominator);
}
-float3 __attribute__((kernel)) testAtan2Float3Float3Float3(float3 inY, unsigned int x) {
- float3 inX = rsGetElementAt_float3(gAllocInX, x);
- return atan2(inY, inX);
+float3 __attribute__((kernel)) testAtan2Float3Float3Float3(float3 inNumerator, unsigned int x) {
+ float3 inDenominator = rsGetElementAt_float3(gAllocInDenominator, x);
+ return atan2(inNumerator, inDenominator);
}
-float4 __attribute__((kernel)) testAtan2Float4Float4Float4(float4 inY, unsigned int x) {
- float4 inX = rsGetElementAt_float4(gAllocInX, x);
- return atan2(inY, inX);
+float4 __attribute__((kernel)) testAtan2Float4Float4Float4(float4 inNumerator, unsigned int x) {
+ float4 inDenominator = rsGetElementAt_float4(gAllocInDenominator, x);
+ return atan2(inNumerator, inDenominator);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.java
index 8837003..9ae8170 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inY;
- public float inX;
+ public float inNumerator;
+ public float inDenominator;
public Target.Floaty out;
}
private void checkAtan2piFloatFloatFloat() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5a912731bef85233l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5a912731bef85232l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3276ace81dcb793l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xc4961da25a748df4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testAtan2piFloatFloatFloat(inY, out);
- verifyResultsAtan2piFloatFloatFloat(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testAtan2piFloatFloatFloat(inNumerator, out);
+ verifyResultsAtan2piFloatFloatFloat(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2piFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testAtan2piFloatFloatFloat(inY, out);
- verifyResultsAtan2piFloatFloatFloat(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testAtan2piFloatFloatFloat(inNumerator, out);
+ verifyResultsAtan2piFloatFloatFloat(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2piFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsAtan2piFloatFloatFloat(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
+ private void verifyResultsAtan2piFloatFloatFloat(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 1];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 1];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i];
- args.inX = arrayInX[i];
+ args.inNumerator = arrayInNumerator[i];
+ args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAtan2pi(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkAtan2piFloat2Float2Float2() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8031be184fee8f53l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8031be184fee8f52l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3b26f42853d1a0b3l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x393d275fcc5c5614l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testAtan2piFloat2Float2Float2(inY, out);
- verifyResultsAtan2piFloat2Float2Float2(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testAtan2piFloat2Float2Float2(inNumerator, out);
+ verifyResultsAtan2piFloat2Float2Float2(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2piFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testAtan2piFloat2Float2Float2(inY, out);
- verifyResultsAtan2piFloat2Float2Float2(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testAtan2piFloat2Float2Float2(inNumerator, out);
+ verifyResultsAtan2piFloat2Float2Float2(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2piFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsAtan2piFloat2Float2Float2(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
+ private void verifyResultsAtan2piFloat2Float2Float2(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 2];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 2];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 2 + j];
- args.inX = arrayInX[i * 2 + j];
+ args.inNumerator = arrayInNumerator[i * 2 + j];
+ args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAtan2pi(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkAtan2piFloat3Float3Float3() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd4969c3851cc90f4l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd4969c3851cc90f3l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x16b59d61f69d8cb4l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x2a168a89f37e94dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testAtan2piFloat3Float3Float3(inY, out);
- verifyResultsAtan2piFloat3Float3Float3(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testAtan2piFloat3Float3Float3(inNumerator, out);
+ verifyResultsAtan2piFloat3Float3Float3(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2piFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testAtan2piFloat3Float3Float3(inY, out);
- verifyResultsAtan2piFloat3Float3Float3(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testAtan2piFloat3Float3Float3(inNumerator, out);
+ verifyResultsAtan2piFloat3Float3Float3(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2piFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsAtan2piFloat3Float3Float3(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
+ private void verifyResultsAtan2piFloat3Float3Float3(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 4 + j];
- args.inX = arrayInX[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAtan2pi(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkAtan2piFloat4Float4Float4() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x28fb7a5853aa9295l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x28fb7a5853aa9294l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf244469b996978b5l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xcc05a9f172137c86l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testAtan2piFloat4Float4Float4(inY, out);
- verifyResultsAtan2piFloat4Float4Float4(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testAtan2piFloat4Float4Float4(inNumerator, out);
+ verifyResultsAtan2piFloat4Float4Float4(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2piFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testAtan2piFloat4Float4Float4(inY, out);
- verifyResultsAtan2piFloat4Float4Float4(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testAtan2piFloat4Float4Float4(inNumerator, out);
+ verifyResultsAtan2piFloat4Float4Float4(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtan2piFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsAtan2piFloat4Float4Float4(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
+ private void verifyResultsAtan2piFloat4Float4Float4(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 4 + j];
- args.inX = arrayInX[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeAtan2pi(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.rs
index f0520d7..25064f9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInX;
+rs_allocation gAllocInDenominator;
-float __attribute__((kernel)) testAtan2piFloatFloatFloat(float inY, unsigned int x) {
- float inX = rsGetElementAt_float(gAllocInX, x);
- return atan2pi(inY, inX);
+float __attribute__((kernel)) testAtan2piFloatFloatFloat(float inNumerator, unsigned int x) {
+ float inDenominator = rsGetElementAt_float(gAllocInDenominator, x);
+ return atan2pi(inNumerator, inDenominator);
}
-float2 __attribute__((kernel)) testAtan2piFloat2Float2Float2(float2 inY, unsigned int x) {
- float2 inX = rsGetElementAt_float2(gAllocInX, x);
- return atan2pi(inY, inX);
+float2 __attribute__((kernel)) testAtan2piFloat2Float2Float2(float2 inNumerator, unsigned int x) {
+ float2 inDenominator = rsGetElementAt_float2(gAllocInDenominator, x);
+ return atan2pi(inNumerator, inDenominator);
}
-float3 __attribute__((kernel)) testAtan2piFloat3Float3Float3(float3 inY, unsigned int x) {
- float3 inX = rsGetElementAt_float3(gAllocInX, x);
- return atan2pi(inY, inX);
+float3 __attribute__((kernel)) testAtan2piFloat3Float3Float3(float3 inNumerator, unsigned int x) {
+ float3 inDenominator = rsGetElementAt_float3(gAllocInDenominator, x);
+ return atan2pi(inNumerator, inDenominator);
}
-float4 __attribute__((kernel)) testAtan2piFloat4Float4Float4(float4 inY, unsigned int x) {
- float4 inX = rsGetElementAt_float4(gAllocInX, x);
- return atan2pi(inY, inX);
+float4 __attribute__((kernel)) testAtan2piFloat4Float4Float4(float4 inNumerator, unsigned int x) {
+ float4 inDenominator = rsGetElementAt_float4(gAllocInDenominator, x);
+ return atan2pi(inNumerator, inDenominator);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.java
index c6e6bd3..ec5418c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkCbrtFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4e2c540726cc677al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x21721d33845561d4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testCbrtFloatFloat(in, out);
- verifyResultsCbrtFloatFloat(in, out, false);
+ script.forEach_testCbrtFloatFloat(inV, out);
+ verifyResultsCbrtFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCbrtFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testCbrtFloatFloat(in, out);
- verifyResultsCbrtFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testCbrtFloatFloat(inV, out);
+ verifyResultsCbrtFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCbrtFloatFloat: " + e.toString());
}
}
- private void verifyResultsCbrtFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsCbrtFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCbrt(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkCbrtFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x9e2a09a2eb8fdb46l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x910f9e5d9129d518l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testCbrtFloat2Float2(in, out);
- verifyResultsCbrtFloat2Float2(in, out, false);
+ script.forEach_testCbrtFloat2Float2(inV, out);
+ verifyResultsCbrtFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCbrtFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testCbrtFloat2Float2(in, out);
- verifyResultsCbrtFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testCbrtFloat2Float2(inV, out);
+ verifyResultsCbrtFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCbrtFloat2Float2: " + e.toString());
}
}
- private void verifyResultsCbrtFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsCbrtFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCbrt(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkCbrtFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x9e2a14444a9670e0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x911167788744f5f6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testCbrtFloat3Float3(in, out);
- verifyResultsCbrtFloat3Float3(in, out, false);
+ script.forEach_testCbrtFloat3Float3(inV, out);
+ verifyResultsCbrtFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCbrtFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testCbrtFloat3Float3(in, out);
- verifyResultsCbrtFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testCbrtFloat3Float3(inV, out);
+ verifyResultsCbrtFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCbrtFloat3Float3: " + e.toString());
}
}
- private void verifyResultsCbrtFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCbrtFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCbrt(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkCbrtFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x9e2a1ee5a99d067al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x911330937d6016d4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testCbrtFloat4Float4(in, out);
- verifyResultsCbrtFloat4Float4(in, out, false);
+ script.forEach_testCbrtFloat4Float4(inV, out);
+ verifyResultsCbrtFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCbrtFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testCbrtFloat4Float4(in, out);
- verifyResultsCbrtFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testCbrtFloat4Float4(inV, out);
+ verifyResultsCbrtFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCbrtFloat4Float4: " + e.toString());
}
}
- private void verifyResultsCbrtFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCbrtFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCbrt(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.rs
index d14f508..1544c27 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testCbrtFloatFloat(float in) {
- return cbrt(in);
+float __attribute__((kernel)) testCbrtFloatFloat(float inV) {
+ return cbrt(inV);
}
-float2 __attribute__((kernel)) testCbrtFloat2Float2(float2 in) {
- return cbrt(in);
+float2 __attribute__((kernel)) testCbrtFloat2Float2(float2 inV) {
+ return cbrt(inV);
}
-float3 __attribute__((kernel)) testCbrtFloat3Float3(float3 in) {
- return cbrt(in);
+float3 __attribute__((kernel)) testCbrtFloat3Float3(float3 inV) {
+ return cbrt(inV);
}
-float4 __attribute__((kernel)) testCbrtFloat4Float4(float4 in) {
- return cbrt(in);
+float4 __attribute__((kernel)) testCbrtFloat4Float4(float4 inV) {
+ return cbrt(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.java
index 80121a8..585457e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkCeilFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa65a49d160f51d9al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf12a662b492bf934l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testCeilFloatFloat(in, out);
- verifyResultsCeilFloatFloat(in, out, false);
+ script.forEach_testCeilFloatFloat(inV, out);
+ verifyResultsCeilFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCeilFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testCeilFloatFloat(in, out);
- verifyResultsCeilFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testCeilFloatFloat(inV, out);
+ verifyResultsCeilFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCeilFloatFloat: " + e.toString());
}
}
- private void verifyResultsCeilFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsCeilFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCeil(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkCeilFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x821e4b40fb9b4866l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdb16a3ea43152978l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testCeilFloat2Float2(in, out);
- verifyResultsCeilFloat2Float2(in, out, false);
+ script.forEach_testCeilFloat2Float2(inV, out);
+ verifyResultsCeilFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCeilFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testCeilFloat2Float2(in, out);
- verifyResultsCeilFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testCeilFloat2Float2(inV, out);
+ verifyResultsCeilFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCeilFloat2Float2: " + e.toString());
}
}
- private void verifyResultsCeilFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsCeilFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCeil(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkCeilFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x821e55e25aa1de00l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xdb186d0539304a56l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testCeilFloat3Float3(in, out);
- verifyResultsCeilFloat3Float3(in, out, false);
+ script.forEach_testCeilFloat3Float3(inV, out);
+ verifyResultsCeilFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCeilFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testCeilFloat3Float3(in, out);
- verifyResultsCeilFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testCeilFloat3Float3(inV, out);
+ verifyResultsCeilFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCeilFloat3Float3: " + e.toString());
}
}
- private void verifyResultsCeilFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCeilFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCeil(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkCeilFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x821e6083b9a8739al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xdb1a36202f4b6b34l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testCeilFloat4Float4(in, out);
- verifyResultsCeilFloat4Float4(in, out, false);
+ script.forEach_testCeilFloat4Float4(inV, out);
+ verifyResultsCeilFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCeilFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testCeilFloat4Float4(in, out);
- verifyResultsCeilFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testCeilFloat4Float4(inV, out);
+ verifyResultsCeilFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCeilFloat4Float4: " + e.toString());
}
}
- private void verifyResultsCeilFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCeilFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCeil(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.rs
index 80c8708..1bfba39 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testCeilFloatFloat(float in) {
- return ceil(in);
+float __attribute__((kernel)) testCeilFloatFloat(float inV) {
+ return ceil(inV);
}
-float2 __attribute__((kernel)) testCeilFloat2Float2(float2 in) {
- return ceil(in);
+float2 __attribute__((kernel)) testCeilFloat2Float2(float2 inV) {
+ return ceil(inV);
}
-float3 __attribute__((kernel)) testCeilFloat3Float3(float3 in) {
- return ceil(in);
+float3 __attribute__((kernel)) testCeilFloat3Float3(float3 inV) {
+ return ceil(inV);
}
-float4 __attribute__((kernel)) testCeilFloat4Float4(float4 in) {
- return ceil(in);
+float4 __attribute__((kernel)) testCeilFloat4Float4(float4 inV) {
+ return ceil(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.java
index cb8794a..308b7f5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inMagnitudeValue;
+ public float inSignValue;
public Target.Floaty out;
}
private void checkCopysignFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xeebba96e8c48145l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xeebba96e8c48146l, false);
+ Allocation inMagnitudeValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4218ae4ccf086614l, false);
+ Allocation inSignValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xd95dacad9d8d3ef5l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testCopysignFloatFloatFloat(inX, out);
- verifyResultsCopysignFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInSignValue(inSignValue);
+ script.forEach_testCopysignFloatFloatFloat(inMagnitudeValue, out);
+ verifyResultsCopysignFloatFloatFloat(inMagnitudeValue, inSignValue, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCopysignFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testCopysignFloatFloatFloat(inX, out);
- verifyResultsCopysignFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInSignValue(inSignValue);
+ scriptRelaxed.forEach_testCopysignFloatFloatFloat(inMagnitudeValue, out);
+ verifyResultsCopysignFloatFloatFloat(inMagnitudeValue, inSignValue, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCopysignFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsCopysignFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsCopysignFloatFloatFloat(Allocation inMagnitudeValue, Allocation inSignValue, Allocation out, boolean relaxed) {
+ float[] arrayInMagnitudeValue = new float[INPUTSIZE * 1];
+ inMagnitudeValue.copyTo(arrayInMagnitudeValue);
+ float[] arrayInSignValue = new float[INPUTSIZE * 1];
+ inSignValue.copyTo(arrayInSignValue);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inMagnitudeValue = arrayInMagnitudeValue[i];
+ args.inSignValue = arrayInSignValue[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCopysign(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMagnitudeValue: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMagnitudeValue, Float.floatToRawIntBits(args.inMagnitudeValue), args.inMagnitudeValue));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inSignValue: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inSignValue, Float.floatToRawIntBits(args.inSignValue), args.inSignValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkCopysignFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbeb0e1cc912e993bl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbeb0e1cc912e993cl, false);
+ Allocation inMagnitudeValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8efe093722e9f786l, false);
+ Allocation inSignValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xb33b4a8420cec72bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testCopysignFloat2Float2Float2(inX, out);
- verifyResultsCopysignFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInSignValue(inSignValue);
+ script.forEach_testCopysignFloat2Float2Float2(inMagnitudeValue, out);
+ verifyResultsCopysignFloat2Float2Float2(inMagnitudeValue, inSignValue, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCopysignFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testCopysignFloat2Float2Float2(inX, out);
- verifyResultsCopysignFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInSignValue(inSignValue);
+ scriptRelaxed.forEach_testCopysignFloat2Float2Float2(inMagnitudeValue, out);
+ verifyResultsCopysignFloat2Float2Float2(inMagnitudeValue, inSignValue, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCopysignFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsCopysignFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsCopysignFloat2Float2Float2(Allocation inMagnitudeValue, Allocation inSignValue, Allocation out, boolean relaxed) {
+ float[] arrayInMagnitudeValue = new float[INPUTSIZE * 2];
+ inMagnitudeValue.copyTo(arrayInMagnitudeValue);
+ float[] arrayInSignValue = new float[INPUTSIZE * 2];
+ inSignValue.copyTo(arrayInSignValue);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inMagnitudeValue = arrayInMagnitudeValue[i * 2 + j];
+ args.inSignValue = arrayInSignValue[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCopysign(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMagnitudeValue: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMagnitudeValue, Float.floatToRawIntBits(args.inMagnitudeValue), args.inMagnitudeValue));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inSignValue: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inSignValue, Float.floatToRawIntBits(args.inSignValue), args.inSignValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkCopysignFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1315bfec930c9adcl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1315bfec930c9addl, false);
+ Allocation inMagnitudeValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x9a9db55e1b468741l, false);
+ Allocation inSignValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8ec9f3bdc39ab32cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testCopysignFloat3Float3Float3(inX, out);
- verifyResultsCopysignFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInSignValue(inSignValue);
+ script.forEach_testCopysignFloat3Float3Float3(inMagnitudeValue, out);
+ verifyResultsCopysignFloat3Float3Float3(inMagnitudeValue, inSignValue, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCopysignFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testCopysignFloat3Float3Float3(inX, out);
- verifyResultsCopysignFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInSignValue(inSignValue);
+ scriptRelaxed.forEach_testCopysignFloat3Float3Float3(inMagnitudeValue, out);
+ verifyResultsCopysignFloat3Float3Float3(inMagnitudeValue, inSignValue, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCopysignFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsCopysignFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsCopysignFloat3Float3Float3(Allocation inMagnitudeValue, Allocation inSignValue, Allocation out, boolean relaxed) {
+ float[] arrayInMagnitudeValue = new float[INPUTSIZE * 4];
+ inMagnitudeValue.copyTo(arrayInMagnitudeValue);
+ float[] arrayInSignValue = new float[INPUTSIZE * 4];
+ inSignValue.copyTo(arrayInSignValue);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inMagnitudeValue = arrayInMagnitudeValue[i * 4 + j];
+ args.inSignValue = arrayInSignValue[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCopysign(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMagnitudeValue: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMagnitudeValue, Float.floatToRawIntBits(args.inMagnitudeValue), args.inMagnitudeValue));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inSignValue: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inSignValue, Float.floatToRawIntBits(args.inSignValue), args.inSignValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkCopysignFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x677a9e0c94ea9c7dl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x677a9e0c94ea9c7el, false);
+ Allocation inMagnitudeValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa63d618513a316fcl, false);
+ Allocation inSignValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6a589cf766669f2dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testCopysignFloat4Float4Float4(inX, out);
- verifyResultsCopysignFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInSignValue(inSignValue);
+ script.forEach_testCopysignFloat4Float4Float4(inMagnitudeValue, out);
+ verifyResultsCopysignFloat4Float4Float4(inMagnitudeValue, inSignValue, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCopysignFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testCopysignFloat4Float4Float4(inX, out);
- verifyResultsCopysignFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInSignValue(inSignValue);
+ scriptRelaxed.forEach_testCopysignFloat4Float4Float4(inMagnitudeValue, out);
+ verifyResultsCopysignFloat4Float4Float4(inMagnitudeValue, inSignValue, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCopysignFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsCopysignFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsCopysignFloat4Float4Float4(Allocation inMagnitudeValue, Allocation inSignValue, Allocation out, boolean relaxed) {
+ float[] arrayInMagnitudeValue = new float[INPUTSIZE * 4];
+ inMagnitudeValue.copyTo(arrayInMagnitudeValue);
+ float[] arrayInSignValue = new float[INPUTSIZE * 4];
+ inSignValue.copyTo(arrayInSignValue);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inMagnitudeValue = arrayInMagnitudeValue[i * 4 + j];
+ args.inSignValue = arrayInSignValue[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCopysign(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMagnitudeValue: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMagnitudeValue, Float.floatToRawIntBits(args.inMagnitudeValue), args.inMagnitudeValue));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inSignValue: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inSignValue, Float.floatToRawIntBits(args.inSignValue), args.inSignValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.rs
index d7bc4d0..ccbf2b7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInSignValue;
-float __attribute__((kernel)) testCopysignFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return copysign(inX, inY);
+float __attribute__((kernel)) testCopysignFloatFloatFloat(float inMagnitudeValue, unsigned int x) {
+ float inSignValue = rsGetElementAt_float(gAllocInSignValue, x);
+ return copysign(inMagnitudeValue, inSignValue);
}
-float2 __attribute__((kernel)) testCopysignFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return copysign(inX, inY);
+float2 __attribute__((kernel)) testCopysignFloat2Float2Float2(float2 inMagnitudeValue, unsigned int x) {
+ float2 inSignValue = rsGetElementAt_float2(gAllocInSignValue, x);
+ return copysign(inMagnitudeValue, inSignValue);
}
-float3 __attribute__((kernel)) testCopysignFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return copysign(inX, inY);
+float3 __attribute__((kernel)) testCopysignFloat3Float3Float3(float3 inMagnitudeValue, unsigned int x) {
+ float3 inSignValue = rsGetElementAt_float3(gAllocInSignValue, x);
+ return copysign(inMagnitudeValue, inSignValue);
}
-float4 __attribute__((kernel)) testCopysignFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return copysign(inX, inY);
+float4 __attribute__((kernel)) testCopysignFloat4Float4Float4(float4 inMagnitudeValue, unsigned int x) {
+ float4 inSignValue = rsGetElementAt_float4(gAllocInSignValue, x);
+ return copysign(inMagnitudeValue, inSignValue);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCos.java
index c3aaf28..595a284 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCos.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkCosFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x35eace7a33fd0be0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe70ae86bb80fef6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testCosFloatFloat(in, out);
- verifyResultsCosFloatFloat(in, out, false);
+ script.forEach_testCosFloatFloat(inV, out);
+ verifyResultsCosFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCosFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testCosFloatFloat(in, out);
- verifyResultsCosFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testCosFloatFloat(inV, out);
+ verifyResultsCosFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCosFloatFloat: " + e.toString());
}
}
- private void verifyResultsCosFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsCosFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCos(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkCosFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x6cec729d2fe33ffcl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4bb740670b2bbfaal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testCosFloat2Float2(in, out);
- verifyResultsCosFloat2Float2(in, out, false);
+ script.forEach_testCosFloat2Float2(inV, out);
+ verifyResultsCosFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCosFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testCosFloat2Float2(in, out);
- verifyResultsCosFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testCosFloat2Float2(inV, out);
+ verifyResultsCosFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCosFloat2Float2: " + e.toString());
}
}
- private void verifyResultsCosFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsCosFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCos(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkCosFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6cec7d3e8ee9d596l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x4bb909820146e088l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testCosFloat3Float3(in, out);
- verifyResultsCosFloat3Float3(in, out, false);
+ script.forEach_testCosFloat3Float3(inV, out);
+ verifyResultsCosFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCosFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testCosFloat3Float3(in, out);
- verifyResultsCosFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testCosFloat3Float3(inV, out);
+ verifyResultsCosFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCosFloat3Float3: " + e.toString());
}
}
- private void verifyResultsCosFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCosFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCos(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkCosFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6cec87dfedf06b30l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4bbad29cf7620166l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testCosFloat4Float4(in, out);
- verifyResultsCosFloat4Float4(in, out, false);
+ script.forEach_testCosFloat4Float4(inV, out);
+ verifyResultsCosFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCosFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testCosFloat4Float4(in, out);
- verifyResultsCosFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testCosFloat4Float4(inV, out);
+ verifyResultsCosFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCosFloat4Float4: " + e.toString());
}
}
- private void verifyResultsCosFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCosFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCos(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCos.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestCos.rs
index 5605139..005b568 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCos.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCos.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testCosFloatFloat(float in) {
- return cos(in);
+float __attribute__((kernel)) testCosFloatFloat(float inV) {
+ return cos(inV);
}
-float2 __attribute__((kernel)) testCosFloat2Float2(float2 in) {
- return cos(in);
+float2 __attribute__((kernel)) testCosFloat2Float2(float2 inV) {
+ return cos(inV);
}
-float3 __attribute__((kernel)) testCosFloat3Float3(float3 in) {
- return cos(in);
+float3 __attribute__((kernel)) testCosFloat3Float3(float3 inV) {
+ return cos(inV);
}
-float4 __attribute__((kernel)) testCosFloat4Float4(float4 in) {
- return cos(in);
+float4 __attribute__((kernel)) testCosFloat4Float4(float4 inV) {
+ return cos(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.java
index c1f6bf3..436d4b8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkCoshFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xca4f5b95e29e11bel, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xfb54622d108cfb40l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testCoshFloatFloat(in, out);
- verifyResultsCoshFloatFloat(in, out, false);
+ script.forEach_testCoshFloatFloat(inV, out);
+ verifyResultsCoshFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCoshFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testCoshFloatFloat(in, out);
- verifyResultsCoshFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testCoshFloatFloat(inV, out);
+ verifyResultsCoshFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCoshFloatFloat: " + e.toString());
}
}
- private void verifyResultsCoshFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsCoshFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCosh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkCoshFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x372b9f8d78e6a06al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4453ccc34ebcf224l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testCoshFloat2Float2(in, out);
- verifyResultsCoshFloat2Float2(in, out, false);
+ script.forEach_testCoshFloat2Float2(inV, out);
+ verifyResultsCoshFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCoshFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testCoshFloat2Float2(in, out);
- verifyResultsCoshFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testCoshFloat2Float2(inV, out);
+ verifyResultsCoshFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCoshFloat2Float2: " + e.toString());
}
}
- private void verifyResultsCoshFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsCoshFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCosh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkCoshFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x372baa2ed7ed3604l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x445595de44d81302l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testCoshFloat3Float3(in, out);
- verifyResultsCoshFloat3Float3(in, out, false);
+ script.forEach_testCoshFloat3Float3(inV, out);
+ verifyResultsCoshFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCoshFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testCoshFloat3Float3(in, out);
- verifyResultsCoshFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testCoshFloat3Float3(inV, out);
+ verifyResultsCoshFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCoshFloat3Float3: " + e.toString());
}
}
- private void verifyResultsCoshFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCoshFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCosh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkCoshFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x372bb4d036f3cb9el, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x44575ef93af333e0l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testCoshFloat4Float4(in, out);
- verifyResultsCoshFloat4Float4(in, out, false);
+ script.forEach_testCoshFloat4Float4(inV, out);
+ verifyResultsCoshFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCoshFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testCoshFloat4Float4(in, out);
- verifyResultsCoshFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testCoshFloat4Float4(inV, out);
+ verifyResultsCoshFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCoshFloat4Float4: " + e.toString());
}
}
- private void verifyResultsCoshFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCoshFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCosh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.rs
index b2d89b9..3064edb 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testCoshFloatFloat(float in) {
- return cosh(in);
+float __attribute__((kernel)) testCoshFloatFloat(float inV) {
+ return cosh(inV);
}
-float2 __attribute__((kernel)) testCoshFloat2Float2(float2 in) {
- return cosh(in);
+float2 __attribute__((kernel)) testCoshFloat2Float2(float2 inV) {
+ return cosh(inV);
}
-float3 __attribute__((kernel)) testCoshFloat3Float3(float3 in) {
- return cosh(in);
+float3 __attribute__((kernel)) testCoshFloat3Float3(float3 inV) {
+ return cosh(inV);
}
-float4 __attribute__((kernel)) testCoshFloat4Float4(float4 in) {
- return cosh(in);
+float4 __attribute__((kernel)) testCoshFloat4Float4(float4 inV) {
+ return cosh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.java
index 2d18af9..689ac3d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkCospiFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf63d9fae6fcc7f1l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x95c59d24cc7595d1l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testCospiFloatFloat(in, out);
- verifyResultsCospiFloatFloat(in, out, false);
+ script.forEach_testCospiFloatFloat(inV, out);
+ verifyResultsCospiFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCospiFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testCospiFloatFloat(in, out);
- verifyResultsCospiFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testCospiFloatFloat(inV, out);
+ verifyResultsCospiFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCospiFloatFloat: " + e.toString());
}
}
- private void verifyResultsCospiFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsCospiFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCospi(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkCospiFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2830872a08f896c5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc026b40f81c1536dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testCospiFloat2Float2(in, out);
- verifyResultsCospiFloat2Float2(in, out, false);
+ script.forEach_testCospiFloat2Float2(inV, out);
+ verifyResultsCospiFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCospiFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testCospiFloat2Float2(in, out);
- verifyResultsCospiFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testCospiFloat2Float2(inV, out);
+ verifyResultsCospiFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCospiFloat2Float2: " + e.toString());
}
}
- private void verifyResultsCospiFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsCospiFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCospi(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkCospiFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x283091cb67ff2c5fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc0287d2a77dc744bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testCospiFloat3Float3(in, out);
- verifyResultsCospiFloat3Float3(in, out, false);
+ script.forEach_testCospiFloat3Float3(inV, out);
+ verifyResultsCospiFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCospiFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testCospiFloat3Float3(in, out);
- verifyResultsCospiFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testCospiFloat3Float3(inV, out);
+ verifyResultsCospiFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCospiFloat3Float3: " + e.toString());
}
}
- private void verifyResultsCospiFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCospiFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCospi(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkCospiFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x28309c6cc705c1f9l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc02a46456df79529l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testCospiFloat4Float4(in, out);
- verifyResultsCospiFloat4Float4(in, out, false);
+ script.forEach_testCospiFloat4Float4(inV, out);
+ verifyResultsCospiFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCospiFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testCospiFloat4Float4(in, out);
- verifyResultsCospiFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testCospiFloat4Float4(inV, out);
+ verifyResultsCospiFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCospiFloat4Float4: " + e.toString());
}
}
- private void verifyResultsCospiFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsCospiFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeCospi(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.rs
index a0cc778..25f9e8e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testCospiFloatFloat(float in) {
- return cospi(in);
+float __attribute__((kernel)) testCospiFloatFloat(float inV) {
+ return cospi(inV);
}
-float2 __attribute__((kernel)) testCospiFloat2Float2(float2 in) {
- return cospi(in);
+float2 __attribute__((kernel)) testCospiFloat2Float2(float2 inV) {
+ return cospi(inV);
}
-float3 __attribute__((kernel)) testCospiFloat3Float3(float3 in) {
- return cospi(in);
+float3 __attribute__((kernel)) testCospiFloat3Float3(float3 inV) {
+ return cospi(inV);
}
-float4 __attribute__((kernel)) testCospiFloat4Float4(float4 in) {
- return cospi(in);
+float4 __attribute__((kernel)) testCospiFloat4Float4(float4 inV) {
+ return cospi(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCross.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCross.java
index c5dc979..89f8d44 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCross.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCross.java
@@ -35,51 +35,51 @@
}
public class ArgumentsFloatNFloatNFloatN {
- public float[] inLhs;
- public float[] inRhs;
+ public float[] inLeftVector;
+ public float[] inRightVector;
public Target.Floaty[] out;
}
private void checkCrossFloat3Float3Float3() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xdec3726a2995edb5l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xdec3726a2996190bl, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3505ebf7382f1ad4l, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe9d27bf3de024b21l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testCrossFloat3Float3Float3(inLhs, out);
- verifyResultsCrossFloat3Float3Float3(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testCrossFloat3Float3Float3(inLeftVector, out);
+ verifyResultsCrossFloat3Float3Float3(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCrossFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testCrossFloat3Float3Float3(inLhs, out);
- verifyResultsCrossFloat3Float3Float3(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testCrossFloat3Float3Float3(inLeftVector, out);
+ verifyResultsCrossFloat3Float3Float3(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCrossFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsCrossFloat3Float3Float3(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsCrossFloat3Float3Float3(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloatN args = new ArgumentsFloatNFloatNFloatN();
// Create the appropriate sized arrays in args
- args.inLhs = new float[3];
- args.inRhs = new float[3];
+ args.inLeftVector = new float[3];
+ args.inRightVector = new float[3];
args.out = new Target.Floaty[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 3 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeCross(args, target);
@@ -94,15 +94,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
@@ -124,45 +124,45 @@
}
private void checkCrossFloat4Float4Float4() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6b4bc797a60fb18el, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6b4bc797a60fdce4l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x15fc58a5906fbeffl, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xb336bd3cb0ddde5al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testCrossFloat4Float4Float4(inLhs, out);
- verifyResultsCrossFloat4Float4Float4(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testCrossFloat4Float4Float4(inLeftVector, out);
+ verifyResultsCrossFloat4Float4Float4(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCrossFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testCrossFloat4Float4Float4(inLhs, out);
- verifyResultsCrossFloat4Float4Float4(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testCrossFloat4Float4Float4(inLeftVector, out);
+ verifyResultsCrossFloat4Float4Float4(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testCrossFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsCrossFloat4Float4Float4(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsCrossFloat4Float4Float4(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloatN args = new ArgumentsFloatNFloatNFloatN();
// Create the appropriate sized arrays in args
- args.inLhs = new float[4];
- args.inRhs = new float[4];
+ args.inLeftVector = new float[4];
+ args.inRightVector = new float[4];
args.out = new Target.Floaty[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 4 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeCross(args, target);
@@ -177,15 +177,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCross.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestCross.rs
index 16d5d35..7858054 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCross.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCross.rs
@@ -19,14 +19,14 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInRhs;
+rs_allocation gAllocInRightVector;
-float3 __attribute__((kernel)) testCrossFloat3Float3Float3(float3 inLhs, unsigned int x) {
- float3 inRhs = rsGetElementAt_float3(gAllocInRhs, x);
- return cross(inLhs, inRhs);
+float3 __attribute__((kernel)) testCrossFloat3Float3Float3(float3 inLeftVector, unsigned int x) {
+ float3 inRightVector = rsGetElementAt_float3(gAllocInRightVector, x);
+ return cross(inLeftVector, inRightVector);
}
-float4 __attribute__((kernel)) testCrossFloat4Float4Float4(float4 inLhs, unsigned int x) {
- float4 inRhs = rsGetElementAt_float4(gAllocInRhs, x);
- return cross(inLhs, inRhs);
+float4 __attribute__((kernel)) testCrossFloat4Float4Float4(float4 inLeftVector, unsigned int x) {
+ float4 inRightVector = rsGetElementAt_float4(gAllocInRightVector, x);
+ return cross(inLeftVector, inRightVector);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.java b/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.java
index b956dbd..ead6e66 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float inValue;
+ public float inV;
public Target.Floaty out;
}
private void checkDegreesFloatFloat() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3325fa58542a6bb5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x606ed077c5dde30al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testDegreesFloatFloat(inValue, out);
- verifyResultsDegreesFloatFloat(inValue, out, false);
+ script.forEach_testDegreesFloatFloat(inV, out);
+ verifyResultsDegreesFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDegreesFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testDegreesFloatFloat(inValue, out);
- verifyResultsDegreesFloatFloat(inValue, out, true);
+ scriptRelaxed.forEach_testDegreesFloatFloat(inV, out);
+ verifyResultsDegreesFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDegreesFloatFloat: " + e.toString());
}
}
- private void verifyResultsDegreesFloatFloat(Allocation inValue, Allocation out, boolean relaxed) {
- float[] arrayInValue = new float[INPUTSIZE * 1];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsDegreesFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inValue = arrayInValue[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeDegrees(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkDegreesFloat2Float2() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x7a202f393d2a289l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x803a665ae417141el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testDegreesFloat2Float2(inValue, out);
- verifyResultsDegreesFloat2Float2(inValue, out, false);
+ script.forEach_testDegreesFloat2Float2(inV, out);
+ verifyResultsDegreesFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDegreesFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testDegreesFloat2Float2(inValue, out);
- verifyResultsDegreesFloat2Float2(inValue, out, true);
+ scriptRelaxed.forEach_testDegreesFloat2Float2(inV, out);
+ verifyResultsDegreesFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDegreesFloat2Float2: " + e.toString());
}
}
- private void verifyResultsDegreesFloat2Float2(Allocation inValue, Allocation out, boolean relaxed) {
- float[] arrayInValue = new float[INPUTSIZE * 2];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsDegreesFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inValue = arrayInValue[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeDegrees(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkDegreesFloat3Float3() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x2d56787add10c807l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x803c2f75da3234fcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testDegreesFloat3Float3(inValue, out);
- verifyResultsDegreesFloat3Float3(inValue, out, false);
+ script.forEach_testDegreesFloat3Float3(inV, out);
+ verifyResultsDegreesFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDegreesFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testDegreesFloat3Float3(inValue, out);
- verifyResultsDegreesFloat3Float3(inValue, out, true);
+ scriptRelaxed.forEach_testDegreesFloat3Float3(inV, out);
+ verifyResultsDegreesFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDegreesFloat3Float3: " + e.toString());
}
}
- private void verifyResultsDegreesFloat3Float3(Allocation inValue, Allocation out, boolean relaxed) {
- float[] arrayInValue = new float[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsDegreesFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeDegrees(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkDegreesFloat4Float4() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x530aee02264eed85l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x803df890d04d55dal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testDegreesFloat4Float4(inValue, out);
- verifyResultsDegreesFloat4Float4(inValue, out, false);
+ script.forEach_testDegreesFloat4Float4(inV, out);
+ verifyResultsDegreesFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDegreesFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testDegreesFloat4Float4(inValue, out);
- verifyResultsDegreesFloat4Float4(inValue, out, true);
+ scriptRelaxed.forEach_testDegreesFloat4Float4(inV, out);
+ verifyResultsDegreesFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDegreesFloat4Float4: " + e.toString());
}
}
- private void verifyResultsDegreesFloat4Float4(Allocation inValue, Allocation out, boolean relaxed) {
- float[] arrayInValue = new float[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsDegreesFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeDegrees(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.rs
index 78741a8..bfbb9f4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testDegreesFloatFloat(float inValue) {
- return degrees(inValue);
+float __attribute__((kernel)) testDegreesFloatFloat(float inV) {
+ return degrees(inV);
}
-float2 __attribute__((kernel)) testDegreesFloat2Float2(float2 inValue) {
- return degrees(inValue);
+float2 __attribute__((kernel)) testDegreesFloat2Float2(float2 inV) {
+ return degrees(inV);
}
-float3 __attribute__((kernel)) testDegreesFloat3Float3(float3 inValue) {
- return degrees(inValue);
+float3 __attribute__((kernel)) testDegreesFloat3Float3(float3 inV) {
+ return degrees(inV);
}
-float4 __attribute__((kernel)) testDegreesFloat4Float4(float4 inValue) {
- return degrees(inValue);
+float4 __attribute__((kernel)) testDegreesFloat4Float4(float4 inV) {
+ return degrees(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.java
index 091c12c..d6acd24 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inLhs;
- public float inRhs;
+ public float inLeftVector;
+ public float inRightVector;
public Target.Floaty out;
}
private void checkDistanceFloatFloatFloat() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf62f685ebafc5b67l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf62f685ebafc86bdl, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa481527082ced52al, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa38cb25366d69793l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testDistanceFloatFloatFloat(inLhs, out);
- verifyResultsDistanceFloatFloatFloat(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testDistanceFloatFloatFloat(inLeftVector, out);
+ verifyResultsDistanceFloatFloatFloat(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDistanceFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testDistanceFloatFloatFloat(inLhs, out);
- verifyResultsDistanceFloatFloatFloat(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testDistanceFloatFloatFloat(inLeftVector, out);
+ verifyResultsDistanceFloatFloatFloat(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDistanceFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsDistanceFloatFloatFloat(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 1];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 1];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsDistanceFloatFloatFloat(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 1];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 1];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
// Create the appropriate sized arrays in args
// Fill args with the input values
- args.inLhs = arrayInLhs[i];
- args.inRhs = arrayInRhs[i];
+ args.inLeftVector = arrayInLeftVector[i];
+ args.inRightVector = arrayInRightVector[i];
Target target = new Target(relaxed);
CoreMathVerifier.computeDistance(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i], Float.floatToRawIntBits(arrayInLhs[i]), arrayInLhs[i]));
+ arrayInLeftVector[i], Float.floatToRawIntBits(arrayInLeftVector[i]), arrayInLeftVector[i]));
message.append("\n");
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i], Float.floatToRawIntBits(arrayInRhs[i]), arrayInRhs[i]));
+ arrayInRightVector[i], Float.floatToRawIntBits(arrayInRightVector[i]), arrayInRightVector[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -109,50 +109,50 @@
}
public class ArgumentsFloatNFloatNFloat {
- public float[] inLhs;
- public float[] inRhs;
+ public float[] inLeftVector;
+ public float[] inRightVector;
public Target.Floaty out;
}
private void checkDistanceFloat2Float2Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3fdeb51f89981593l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3fdeb51f899840e9l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbf71d23b554dab2el, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x29f22964c2248a3fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testDistanceFloat2Float2Float(inLhs, out);
- verifyResultsDistanceFloat2Float2Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testDistanceFloat2Float2Float(inLeftVector, out);
+ verifyResultsDistanceFloat2Float2Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDistanceFloat2Float2Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testDistanceFloat2Float2Float(inLhs, out);
- verifyResultsDistanceFloat2Float2Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testDistanceFloat2Float2Float(inLeftVector, out);
+ verifyResultsDistanceFloat2Float2Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDistanceFloat2Float2Float: " + e.toString());
}
}
- private void verifyResultsDistanceFloat2Float2Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 2];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 2];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsDistanceFloat2Float2Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 2];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 2];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[2];
- args.inRhs = new float[2];
+ args.inLeftVector = new float[2];
+ args.inRightVector = new float[2];
// Fill args with the input values
for (int j = 0; j < 2 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 2 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 2 + j];
}
for (int j = 0; j < 2 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 2 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 2 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeDistance(args, target);
@@ -165,15 +165,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 2 + j], Float.floatToRawIntBits(arrayInLhs[i * 2 + j]), arrayInLhs[i * 2 + j]));
+ arrayInLeftVector[i * 2 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 2 + j]), arrayInLeftVector[i * 2 + j]));
message.append("\n");
}
for (int j = 0; j < 2 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 2 + j], Float.floatToRawIntBits(arrayInRhs[i * 2 + j]), arrayInRhs[i * 2 + j]));
+ arrayInRightVector[i * 2 + j], Float.floatToRawIntBits(arrayInRightVector[i * 2 + j]), arrayInRightVector[i * 2 + j]));
message.append("\n");
}
message.append("Expected output out: ");
@@ -193,44 +193,44 @@
}
private void checkDistanceFloat3Float3Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6cd0047fd9ae30edl, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6cd0047fd9ae5c43l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8e1af7b976ec5f7cl, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe05b759467ccd359l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testDistanceFloat3Float3Float(inLhs, out);
- verifyResultsDistanceFloat3Float3Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testDistanceFloat3Float3Float(inLeftVector, out);
+ verifyResultsDistanceFloat3Float3Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDistanceFloat3Float3Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testDistanceFloat3Float3Float(inLhs, out);
- verifyResultsDistanceFloat3Float3Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testDistanceFloat3Float3Float(inLeftVector, out);
+ verifyResultsDistanceFloat3Float3Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDistanceFloat3Float3Float: " + e.toString());
}
}
- private void verifyResultsDistanceFloat3Float3Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsDistanceFloat3Float3Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[3];
- args.inRhs = new float[3];
+ args.inLeftVector = new float[3];
+ args.inRightVector = new float[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 3 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeDistance(args, target);
@@ -243,15 +243,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
message.append("Expected output out: ");
@@ -271,44 +271,44 @@
}
private void checkDistanceFloat4Float4Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x99c153e029c44c47l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x99c153e029c4779dl, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x5cc41d37988b13cal, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x96c4c1c40d751c73l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testDistanceFloat4Float4Float(inLhs, out);
- verifyResultsDistanceFloat4Float4Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testDistanceFloat4Float4Float(inLeftVector, out);
+ verifyResultsDistanceFloat4Float4Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDistanceFloat4Float4Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testDistanceFloat4Float4Float(inLhs, out);
- verifyResultsDistanceFloat4Float4Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testDistanceFloat4Float4Float(inLeftVector, out);
+ verifyResultsDistanceFloat4Float4Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDistanceFloat4Float4Float: " + e.toString());
}
}
- private void verifyResultsDistanceFloat4Float4Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsDistanceFloat4Float4Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[4];
- args.inRhs = new float[4];
+ args.inLeftVector = new float[4];
+ args.inRightVector = new float[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 4 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeDistance(args, target);
@@ -321,15 +321,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
message.append("Expected output out: ");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.rs
index fdc1783..cbea040 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInRhs;
+rs_allocation gAllocInRightVector;
-float __attribute__((kernel)) testDistanceFloatFloatFloat(float inLhs, unsigned int x) {
- float inRhs = rsGetElementAt_float(gAllocInRhs, x);
- return distance(inLhs, inRhs);
+float __attribute__((kernel)) testDistanceFloatFloatFloat(float inLeftVector, unsigned int x) {
+ float inRightVector = rsGetElementAt_float(gAllocInRightVector, x);
+ return distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testDistanceFloat2Float2Float(float2 inLhs, unsigned int x) {
- float2 inRhs = rsGetElementAt_float2(gAllocInRhs, x);
- return distance(inLhs, inRhs);
+float __attribute__((kernel)) testDistanceFloat2Float2Float(float2 inLeftVector, unsigned int x) {
+ float2 inRightVector = rsGetElementAt_float2(gAllocInRightVector, x);
+ return distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testDistanceFloat3Float3Float(float3 inLhs, unsigned int x) {
- float3 inRhs = rsGetElementAt_float3(gAllocInRhs, x);
- return distance(inLhs, inRhs);
+float __attribute__((kernel)) testDistanceFloat3Float3Float(float3 inLeftVector, unsigned int x) {
+ float3 inRightVector = rsGetElementAt_float3(gAllocInRightVector, x);
+ return distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testDistanceFloat4Float4Float(float4 inLhs, unsigned int x) {
- float4 inRhs = rsGetElementAt_float4(gAllocInRhs, x);
- return distance(inLhs, inRhs);
+float __attribute__((kernel)) testDistanceFloat4Float4Float(float4 inLeftVector, unsigned int x) {
+ float4 inRightVector = rsGetElementAt_float4(gAllocInRightVector, x);
+ return distance(inLeftVector, inRightVector);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDot.java b/tests/tests/renderscript/src/android/renderscript/cts/TestDot.java
index 666906b..e9bfd98 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDot.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inLhs;
- public float inRhs;
+ public float inLeftVector;
+ public float inRightVector;
public Target.Floaty out;
}
private void checkDotFloatFloatFloat() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x93a0502d7b6ecc43l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x93a0502d7b6ef799l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x38fe5ebdf7ff2d3el, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x948dc35615f562efl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testDotFloatFloatFloat(inLhs, out);
- verifyResultsDotFloatFloatFloat(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testDotFloatFloatFloat(inLeftVector, out);
+ verifyResultsDotFloatFloatFloat(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDotFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testDotFloatFloatFloat(inLhs, out);
- verifyResultsDotFloatFloatFloat(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testDotFloatFloatFloat(inLeftVector, out);
+ verifyResultsDotFloatFloatFloat(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDotFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsDotFloatFloatFloat(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 1];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 1];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsDotFloatFloatFloat(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 1];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 1];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
// Create the appropriate sized arrays in args
// Fill args with the input values
- args.inLhs = arrayInLhs[i];
- args.inRhs = arrayInRhs[i];
+ args.inLeftVector = arrayInLeftVector[i];
+ args.inRightVector = arrayInRightVector[i];
Target target = new Target(relaxed);
CoreMathVerifier.computeDot(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i], Float.floatToRawIntBits(arrayInLhs[i]), arrayInLhs[i]));
+ arrayInLeftVector[i], Float.floatToRawIntBits(arrayInLeftVector[i]), arrayInLeftVector[i]));
message.append("\n");
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i], Float.floatToRawIntBits(arrayInRhs[i]), arrayInRhs[i]));
+ arrayInRightVector[i], Float.floatToRawIntBits(arrayInRightVector[i]), arrayInRightVector[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -109,50 +109,50 @@
}
public class ArgumentsFloatNFloatNFloat {
- public float[] inLhs;
- public float[] inRhs;
+ public float[] inLeftVector;
+ public float[] inRightVector;
public Target.Floaty out;
}
private void checkDotFloat2Float2Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x6458f96b84293a8fl, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x6458f96b842965e5l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3a9fadaebf79d3a2l, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdaa605c7978f55bbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testDotFloat2Float2Float(inLhs, out);
- verifyResultsDotFloat2Float2Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testDotFloat2Float2Float(inLeftVector, out);
+ verifyResultsDotFloat2Float2Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDotFloat2Float2Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testDotFloat2Float2Float(inLhs, out);
- verifyResultsDotFloat2Float2Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testDotFloat2Float2Float(inLeftVector, out);
+ verifyResultsDotFloat2Float2Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDotFloat2Float2Float: " + e.toString());
}
}
- private void verifyResultsDotFloat2Float2Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 2];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 2];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsDotFloat2Float2Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 2];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 2];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[2];
- args.inRhs = new float[2];
+ args.inLeftVector = new float[2];
+ args.inRightVector = new float[2];
// Fill args with the input values
for (int j = 0; j < 2 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 2 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 2 + j];
}
for (int j = 0; j < 2 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 2 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 2 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeDot(args, target);
@@ -165,15 +165,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 2 + j], Float.floatToRawIntBits(arrayInLhs[i * 2 + j]), arrayInLhs[i * 2 + j]));
+ arrayInLeftVector[i * 2 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 2 + j]), arrayInLeftVector[i * 2 + j]));
message.append("\n");
}
for (int j = 0; j < 2 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 2 + j], Float.floatToRawIntBits(arrayInRhs[i * 2 + j]), arrayInRhs[i * 2 + j]));
+ arrayInRightVector[i * 2 + j], Float.floatToRawIntBits(arrayInRightVector[i * 2 + j]), arrayInRightVector[i * 2 + j]));
message.append("\n");
}
message.append("Expected output out: ");
@@ -193,44 +193,44 @@
}
private void checkDotFloat3Float3Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x914a48cbd43f55e9l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x914a48cbd43f813fl, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x948d32ce11887f0l, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x910f51f73d379ed5l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testDotFloat3Float3Float(inLhs, out);
- verifyResultsDotFloat3Float3Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testDotFloat3Float3Float(inLeftVector, out);
+ verifyResultsDotFloat3Float3Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDotFloat3Float3Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testDotFloat3Float3Float(inLhs, out);
- verifyResultsDotFloat3Float3Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testDotFloat3Float3Float(inLeftVector, out);
+ verifyResultsDotFloat3Float3Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDotFloat3Float3Float: " + e.toString());
}
}
- private void verifyResultsDotFloat3Float3Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsDotFloat3Float3Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[3];
- args.inRhs = new float[3];
+ args.inLeftVector = new float[3];
+ args.inRightVector = new float[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 3 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeDot(args, target);
@@ -243,15 +243,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
message.append("Expected output out: ");
@@ -271,44 +271,44 @@
}
private void checkDotFloat4Float4Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbe3b982c24557143l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbe3b982c24559c99l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd7f1f8ab02b73c3el, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x47789e26e2dfe7efl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testDotFloat4Float4Float(inLhs, out);
- verifyResultsDotFloat4Float4Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testDotFloat4Float4Float(inLeftVector, out);
+ verifyResultsDotFloat4Float4Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDotFloat4Float4Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testDotFloat4Float4Float(inLhs, out);
- verifyResultsDotFloat4Float4Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testDotFloat4Float4Float(inLeftVector, out);
+ verifyResultsDotFloat4Float4Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testDotFloat4Float4Float: " + e.toString());
}
}
- private void verifyResultsDotFloat4Float4Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsDotFloat4Float4Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[4];
- args.inRhs = new float[4];
+ args.inLeftVector = new float[4];
+ args.inRightVector = new float[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 4 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeDot(args, target);
@@ -321,15 +321,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
message.append("Expected output out: ");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDot.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestDot.rs
index 27aa8aa..cd531b4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDot.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDot.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInRhs;
+rs_allocation gAllocInRightVector;
-float __attribute__((kernel)) testDotFloatFloatFloat(float inLhs, unsigned int x) {
- float inRhs = rsGetElementAt_float(gAllocInRhs, x);
- return dot(inLhs, inRhs);
+float __attribute__((kernel)) testDotFloatFloatFloat(float inLeftVector, unsigned int x) {
+ float inRightVector = rsGetElementAt_float(gAllocInRightVector, x);
+ return dot(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testDotFloat2Float2Float(float2 inLhs, unsigned int x) {
- float2 inRhs = rsGetElementAt_float2(gAllocInRhs, x);
- return dot(inLhs, inRhs);
+float __attribute__((kernel)) testDotFloat2Float2Float(float2 inLeftVector, unsigned int x) {
+ float2 inRightVector = rsGetElementAt_float2(gAllocInRightVector, x);
+ return dot(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testDotFloat3Float3Float(float3 inLhs, unsigned int x) {
- float3 inRhs = rsGetElementAt_float3(gAllocInRhs, x);
- return dot(inLhs, inRhs);
+float __attribute__((kernel)) testDotFloat3Float3Float(float3 inLeftVector, unsigned int x) {
+ float3 inRightVector = rsGetElementAt_float3(gAllocInRightVector, x);
+ return dot(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testDotFloat4Float4Float(float4 inLhs, unsigned int x) {
- float4 inRhs = rsGetElementAt_float4(gAllocInRhs, x);
- return dot(inLhs, inRhs);
+float __attribute__((kernel)) testDotFloat4Float4Float(float4 inLeftVector, unsigned int x) {
+ float4 inRightVector = rsGetElementAt_float4(gAllocInRightVector, x);
+ return dot(inLeftVector, inRightVector);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestErf.java b/tests/tests/renderscript/src/android/renderscript/cts/TestErf.java
index 6c73bf1..27cdc32 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestErf.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestErf.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkErfFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x287cee12fdd9cb26l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xccfbfd30a3951fb8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testErfFloatFloat(in, out);
- verifyResultsErfFloatFloat(in, out, false);
+ script.forEach_testErfFloatFloat(inV, out);
+ verifyResultsErfFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testErfFloatFloat(in, out);
- verifyResultsErfFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testErfFloatFloat(inV, out);
+ verifyResultsErfFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfFloatFloat: " + e.toString());
}
}
- private void verifyResultsErfFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsErfFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeErf(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkErfFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x6e52a9272b44c092l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x87e26994448c58dcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testErfFloat2Float2(in, out);
- verifyResultsErfFloat2Float2(in, out, false);
+ script.forEach_testErfFloat2Float2(inV, out);
+ verifyResultsErfFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testErfFloat2Float2(in, out);
- verifyResultsErfFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testErfFloat2Float2(inV, out);
+ verifyResultsErfFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfFloat2Float2: " + e.toString());
}
}
- private void verifyResultsErfFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsErfFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeErf(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkErfFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6e52b3c88a4b562cl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x87e432af3aa779bal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testErfFloat3Float3(in, out);
- verifyResultsErfFloat3Float3(in, out, false);
+ script.forEach_testErfFloat3Float3(inV, out);
+ verifyResultsErfFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testErfFloat3Float3(in, out);
- verifyResultsErfFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testErfFloat3Float3(inV, out);
+ verifyResultsErfFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfFloat3Float3: " + e.toString());
}
}
- private void verifyResultsErfFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsErfFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeErf(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkErfFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6e52be69e951ebc6l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x87e5fbca30c29a98l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testErfFloat4Float4(in, out);
- verifyResultsErfFloat4Float4(in, out, false);
+ script.forEach_testErfFloat4Float4(inV, out);
+ verifyResultsErfFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testErfFloat4Float4(in, out);
- verifyResultsErfFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testErfFloat4Float4(inV, out);
+ verifyResultsErfFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfFloat4Float4: " + e.toString());
}
}
- private void verifyResultsErfFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsErfFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeErf(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestErf.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestErf.rs
index 5d26ed6..15b4d0b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestErf.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestErf.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testErfFloatFloat(float in) {
- return erf(in);
+float __attribute__((kernel)) testErfFloatFloat(float inV) {
+ return erf(inV);
}
-float2 __attribute__((kernel)) testErfFloat2Float2(float2 in) {
- return erf(in);
+float2 __attribute__((kernel)) testErfFloat2Float2(float2 inV) {
+ return erf(inV);
}
-float3 __attribute__((kernel)) testErfFloat3Float3(float3 in) {
- return erf(in);
+float3 __attribute__((kernel)) testErfFloat3Float3(float3 inV) {
+ return erf(inV);
}
-float4 __attribute__((kernel)) testErfFloat4Float4(float4 in) {
- return erf(in);
+float4 __attribute__((kernel)) testErfFloat4Float4(float4 inV) {
+ return erf(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.java b/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.java
index 86c2aa1..4ec0fa8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkErfcFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb41907c64db86b2bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x40344e4f0dfa008fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testErfcFloatFloat(in, out);
- verifyResultsErfcFloatFloat(in, out, false);
+ script.forEach_testErfcFloatFloat(inV, out);
+ verifyResultsErfcFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfcFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testErfcFloatFloat(in, out);
- verifyResultsErfcFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testErfcFloatFloat(inV, out);
+ verifyResultsErfcFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfcFloatFloat: " + e.toString());
}
}
- private void verifyResultsErfcFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsErfcFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeErfc(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkErfcFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc8c849430a3684afl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xb9a44e42b72849bbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testErfcFloat2Float2(in, out);
- verifyResultsErfcFloat2Float2(in, out, false);
+ script.forEach_testErfcFloat2Float2(inV, out);
+ verifyResultsErfcFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfcFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testErfcFloat2Float2(in, out);
- verifyResultsErfcFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testErfcFloat2Float2(inV, out);
+ verifyResultsErfcFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfcFloat2Float2: " + e.toString());
}
}
- private void verifyResultsErfcFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsErfcFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeErfc(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkErfcFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc8c853e4693d1a49l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xb9a6175dad436a99l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testErfcFloat3Float3(in, out);
- verifyResultsErfcFloat3Float3(in, out, false);
+ script.forEach_testErfcFloat3Float3(inV, out);
+ verifyResultsErfcFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfcFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testErfcFloat3Float3(in, out);
- verifyResultsErfcFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testErfcFloat3Float3(inV, out);
+ verifyResultsErfcFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfcFloat3Float3: " + e.toString());
}
}
- private void verifyResultsErfcFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsErfcFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeErfc(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkErfcFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc8c85e85c843afe3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xb9a7e078a35e8b77l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testErfcFloat4Float4(in, out);
- verifyResultsErfcFloat4Float4(in, out, false);
+ script.forEach_testErfcFloat4Float4(inV, out);
+ verifyResultsErfcFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfcFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testErfcFloat4Float4(in, out);
- verifyResultsErfcFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testErfcFloat4Float4(inV, out);
+ verifyResultsErfcFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testErfcFloat4Float4: " + e.toString());
}
}
- private void verifyResultsErfcFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsErfcFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeErfc(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.rs
index d12ea25..154e7d8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testErfcFloatFloat(float in) {
- return erfc(in);
+float __attribute__((kernel)) testErfcFloatFloat(float inV) {
+ return erfc(inV);
}
-float2 __attribute__((kernel)) testErfcFloat2Float2(float2 in) {
- return erfc(in);
+float2 __attribute__((kernel)) testErfcFloat2Float2(float2 inV) {
+ return erfc(inV);
}
-float3 __attribute__((kernel)) testErfcFloat3Float3(float3 in) {
- return erfc(in);
+float3 __attribute__((kernel)) testErfcFloat3Float3(float3 inV) {
+ return erfc(inV);
}
-float4 __attribute__((kernel)) testErfcFloat4Float4(float4 in) {
- return erfc(in);
+float4 __attribute__((kernel)) testErfcFloat4Float4(float4 inV) {
+ return erfc(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp.java b/tests/tests/renderscript/src/android/renderscript/cts/TestExp.java
index 224a64c..4c35d3e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkExpFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb43af2b5f55920f2l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x45e6c49035f888fcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testExpFloatFloat(in, out);
- verifyResultsExpFloatFloat(in, out, false);
+ script.forEach_testExpFloatFloat(inV, out);
+ verifyResultsExpFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testExpFloatFloat(in, out);
- verifyResultsExpFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testExpFloatFloat(inV, out);
+ verifyResultsExpFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpFloatFloat: " + e.toString());
}
}
- private void verifyResultsExpFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsExpFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkExpFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbdc22634c1f76efel, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdf9c6adc948fa500l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testExpFloat2Float2(in, out);
- verifyResultsExpFloat2Float2(in, out, false);
+ script.forEach_testExpFloat2Float2(inV, out);
+ verifyResultsExpFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testExpFloat2Float2(in, out);
- verifyResultsExpFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testExpFloat2Float2(inV, out);
+ verifyResultsExpFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpFloat2Float2: " + e.toString());
}
}
- private void verifyResultsExpFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsExpFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkExpFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xbdc230d620fe0498l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xdf9e33f78aaac5del, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testExpFloat3Float3(in, out);
- verifyResultsExpFloat3Float3(in, out, false);
+ script.forEach_testExpFloat3Float3(inV, out);
+ verifyResultsExpFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testExpFloat3Float3(in, out);
- verifyResultsExpFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testExpFloat3Float3(inV, out);
+ verifyResultsExpFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpFloat3Float3: " + e.toString());
}
}
- private void verifyResultsExpFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsExpFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkExpFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbdc23b7780049a32l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xdf9ffd1280c5e6bcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testExpFloat4Float4(in, out);
- verifyResultsExpFloat4Float4(in, out, false);
+ script.forEach_testExpFloat4Float4(inV, out);
+ verifyResultsExpFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testExpFloat4Float4(in, out);
- verifyResultsExpFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testExpFloat4Float4(inV, out);
+ verifyResultsExpFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpFloat4Float4: " + e.toString());
}
}
- private void verifyResultsExpFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsExpFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestExp.rs
index 90879d9..d7e22fa 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testExpFloatFloat(float in) {
- return exp(in);
+float __attribute__((kernel)) testExpFloatFloat(float inV) {
+ return exp(inV);
}
-float2 __attribute__((kernel)) testExpFloat2Float2(float2 in) {
- return exp(in);
+float2 __attribute__((kernel)) testExpFloat2Float2(float2 inV) {
+ return exp(inV);
}
-float3 __attribute__((kernel)) testExpFloat3Float3(float3 in) {
- return exp(in);
+float3 __attribute__((kernel)) testExpFloat3Float3(float3 inV) {
+ return exp(inV);
}
-float4 __attribute__((kernel)) testExpFloat4Float4(float4 in) {
- return exp(in);
+float4 __attribute__((kernel)) testExpFloat4Float4(float4 inV) {
+ return exp(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.java b/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.java
index 874d17b..a0679d7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkExp10FloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x9f6474a4cee90545l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xc5df97aec123e2edl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testExp10FloatFloat(in, out);
- verifyResultsExp10FloatFloat(in, out, false);
+ script.forEach_testExp10FloatFloat(inV, out);
+ verifyResultsExp10FloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp10FloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testExp10FloatFloat(in, out);
- verifyResultsExp10FloatFloat(in, out, true);
+ scriptRelaxed.forEach_testExp10FloatFloat(inV, out);
+ verifyResultsExp10FloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp10FloatFloat: " + e.toString());
}
}
- private void verifyResultsExp10FloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsExp10FloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp10(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkExp10Float2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3c8d9c56223f8a79l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2bc94277c0ac42a9l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testExp10Float2Float2(in, out);
- verifyResultsExp10Float2Float2(in, out, false);
+ script.forEach_testExp10Float2Float2(inV, out);
+ verifyResultsExp10Float2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp10Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testExp10Float2Float2(in, out);
- verifyResultsExp10Float2Float2(in, out, true);
+ scriptRelaxed.forEach_testExp10Float2Float2(inV, out);
+ verifyResultsExp10Float2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp10Float2Float2: " + e.toString());
}
}
- private void verifyResultsExp10Float2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsExp10Float2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp10(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkExp10Float3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3c8da6f781462013l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x2bcb0b92b6c76387l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testExp10Float3Float3(in, out);
- verifyResultsExp10Float3Float3(in, out, false);
+ script.forEach_testExp10Float3Float3(inV, out);
+ verifyResultsExp10Float3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp10Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testExp10Float3Float3(in, out);
- verifyResultsExp10Float3Float3(in, out, true);
+ scriptRelaxed.forEach_testExp10Float3Float3(inV, out);
+ verifyResultsExp10Float3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp10Float3Float3: " + e.toString());
}
}
- private void verifyResultsExp10Float3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsExp10Float3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp10(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkExp10Float4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3c8db198e04cb5adl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x2bccd4adace28465l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testExp10Float4Float4(in, out);
- verifyResultsExp10Float4Float4(in, out, false);
+ script.forEach_testExp10Float4Float4(inV, out);
+ verifyResultsExp10Float4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp10Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testExp10Float4Float4(in, out);
- verifyResultsExp10Float4Float4(in, out, true);
+ scriptRelaxed.forEach_testExp10Float4Float4(inV, out);
+ verifyResultsExp10Float4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp10Float4Float4: " + e.toString());
}
}
- private void verifyResultsExp10Float4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsExp10Float4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp10(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.rs
index 117fe26..95e5548 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testExp10FloatFloat(float in) {
- return exp10(in);
+float __attribute__((kernel)) testExp10FloatFloat(float inV) {
+ return exp10(inV);
}
-float2 __attribute__((kernel)) testExp10Float2Float2(float2 in) {
- return exp10(in);
+float2 __attribute__((kernel)) testExp10Float2Float2(float2 inV) {
+ return exp10(inV);
}
-float3 __attribute__((kernel)) testExp10Float3Float3(float3 in) {
- return exp10(in);
+float3 __attribute__((kernel)) testExp10Float3Float3(float3 inV) {
+ return exp10(inV);
}
-float4 __attribute__((kernel)) testExp10Float4Float4(float4 in) {
- return exp10(in);
+float4 __attribute__((kernel)) testExp10Float4Float4(float4 inV) {
+ return exp10(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.java
index bbb9c68..561bdd0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkExp2FloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x80096e5b0f2662el, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x58195894b8b72a10l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testExp2FloatFloat(in, out);
- verifyResultsExp2FloatFloat(in, out, false);
+ script.forEach_testExp2FloatFloat(inV, out);
+ verifyResultsExp2FloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp2FloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testExp2FloatFloat(in, out);
- verifyResultsExp2FloatFloat(in, out, true);
+ scriptRelaxed.forEach_testExp2FloatFloat(inV, out);
+ verifyResultsExp2FloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp2FloatFloat: " + e.toString());
}
}
- private void verifyResultsExp2FloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsExp2FloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp2(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkExp2Float2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xcc4102f6b7fc7d5al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4eeb7f70e7690e74l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testExp2Float2Float2(in, out);
- verifyResultsExp2Float2Float2(in, out, false);
+ script.forEach_testExp2Float2Float2(inV, out);
+ verifyResultsExp2Float2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testExp2Float2Float2(in, out);
- verifyResultsExp2Float2Float2(in, out, true);
+ scriptRelaxed.forEach_testExp2Float2Float2(inV, out);
+ verifyResultsExp2Float2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp2Float2Float2: " + e.toString());
}
}
- private void verifyResultsExp2Float2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsExp2Float2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp2(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkExp2Float3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xcc410d98170312f4l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x4eed488bdd842f52l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testExp2Float3Float3(in, out);
- verifyResultsExp2Float3Float3(in, out, false);
+ script.forEach_testExp2Float3Float3(inV, out);
+ verifyResultsExp2Float3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp2Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testExp2Float3Float3(in, out);
- verifyResultsExp2Float3Float3(in, out, true);
+ scriptRelaxed.forEach_testExp2Float3Float3(inV, out);
+ verifyResultsExp2Float3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp2Float3Float3: " + e.toString());
}
}
- private void verifyResultsExp2Float3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsExp2Float3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp2(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkExp2Float4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xcc4118397609a88el, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4eef11a6d39f5030l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testExp2Float4Float4(in, out);
- verifyResultsExp2Float4Float4(in, out, false);
+ script.forEach_testExp2Float4Float4(inV, out);
+ verifyResultsExp2Float4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp2Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testExp2Float4Float4(in, out);
- verifyResultsExp2Float4Float4(in, out, true);
+ scriptRelaxed.forEach_testExp2Float4Float4(inV, out);
+ verifyResultsExp2Float4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExp2Float4Float4: " + e.toString());
}
}
- private void verifyResultsExp2Float4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsExp2Float4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExp2(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.rs
index 61ff900..d85f60a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testExp2FloatFloat(float in) {
- return exp2(in);
+float __attribute__((kernel)) testExp2FloatFloat(float inV) {
+ return exp2(inV);
}
-float2 __attribute__((kernel)) testExp2Float2Float2(float2 in) {
- return exp2(in);
+float2 __attribute__((kernel)) testExp2Float2Float2(float2 inV) {
+ return exp2(inV);
}
-float3 __attribute__((kernel)) testExp2Float3Float3(float3 in) {
- return exp2(in);
+float3 __attribute__((kernel)) testExp2Float3Float3(float3 inV) {
+ return exp2(inV);
}
-float4 __attribute__((kernel)) testExp2Float4Float4(float4 in) {
- return exp2(in);
+float4 __attribute__((kernel)) testExp2Float4Float4(float4 inV) {
+ return exp2(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.java b/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.java
index c922e49..2fb7e5b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkExpm1FloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa03d120368f727aal, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xea420692a183a9e4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testExpm1FloatFloat(in, out);
- verifyResultsExpm1FloatFloat(in, out, false);
+ script.forEach_testExpm1FloatFloat(inV, out);
+ verifyResultsExpm1FloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpm1FloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testExpm1FloatFloat(in, out);
- verifyResultsExpm1FloatFloat(in, out, true);
+ scriptRelaxed.forEach_testExpm1FloatFloat(inV, out);
+ verifyResultsExpm1FloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpm1FloatFloat: " + e.toString());
}
}
- private void verifyResultsExpm1FloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsExpm1FloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExpm1(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkExpm1Float2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x59163c9cd255f5f6l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xf6bc2e57547050a8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testExpm1Float2Float2(in, out);
- verifyResultsExpm1Float2Float2(in, out, false);
+ script.forEach_testExpm1Float2Float2(inV, out);
+ verifyResultsExpm1Float2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpm1Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testExpm1Float2Float2(in, out);
- verifyResultsExpm1Float2Float2(in, out, true);
+ scriptRelaxed.forEach_testExpm1Float2Float2(inV, out);
+ verifyResultsExpm1Float2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpm1Float2Float2: " + e.toString());
}
}
- private void verifyResultsExpm1Float2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsExpm1Float2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExpm1(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkExpm1Float3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x5916473e315c8b90l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf6bdf7724a8b7186l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testExpm1Float3Float3(in, out);
- verifyResultsExpm1Float3Float3(in, out, false);
+ script.forEach_testExpm1Float3Float3(inV, out);
+ verifyResultsExpm1Float3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpm1Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testExpm1Float3Float3(in, out);
- verifyResultsExpm1Float3Float3(in, out, true);
+ scriptRelaxed.forEach_testExpm1Float3Float3(inV, out);
+ verifyResultsExpm1Float3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpm1Float3Float3: " + e.toString());
}
}
- private void verifyResultsExpm1Float3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsExpm1Float3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExpm1(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkExpm1Float4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x591651df9063212al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf6bfc08d40a69264l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testExpm1Float4Float4(in, out);
- verifyResultsExpm1Float4Float4(in, out, false);
+ script.forEach_testExpm1Float4Float4(inV, out);
+ verifyResultsExpm1Float4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpm1Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testExpm1Float4Float4(in, out);
- verifyResultsExpm1Float4Float4(in, out, true);
+ scriptRelaxed.forEach_testExpm1Float4Float4(inV, out);
+ verifyResultsExpm1Float4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testExpm1Float4Float4: " + e.toString());
}
}
- private void verifyResultsExpm1Float4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsExpm1Float4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeExpm1(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.rs
index 9399576..45faabd 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testExpm1FloatFloat(float in) {
- return expm1(in);
+float __attribute__((kernel)) testExpm1FloatFloat(float inV) {
+ return expm1(inV);
}
-float2 __attribute__((kernel)) testExpm1Float2Float2(float2 in) {
- return expm1(in);
+float2 __attribute__((kernel)) testExpm1Float2Float2(float2 inV) {
+ return expm1(inV);
}
-float3 __attribute__((kernel)) testExpm1Float3Float3(float3 in) {
- return expm1(in);
+float3 __attribute__((kernel)) testExpm1Float3Float3(float3 inV) {
+ return expm1(inV);
}
-float4 __attribute__((kernel)) testExpm1Float4Float4(float4 in) {
- return expm1(in);
+float4 __attribute__((kernel)) testExpm1Float4Float4(float4 inV) {
+ return expm1(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.java
index 29cdd86..383fd4f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkFabsFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x70316affaf9e3339l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xd84cf8f27f929ae9l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testFabsFloatFloat(in, out);
- verifyResultsFabsFloatFloat(in, out, false);
+ script.forEach_testFabsFloatFloat(inV, out);
+ verifyResultsFabsFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFabsFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testFabsFloatFloat(in, out);
- verifyResultsFabsFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testFabsFloatFloat(inV, out);
+ verifyResultsFabsFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFabsFloatFloat: " + e.toString());
}
}
- private void verifyResultsFabsFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsFabsFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFabs(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkFabsFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x54ecf2b71ed871cdl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x43ccc4c22e5b1dc5l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testFabsFloat2Float2(in, out);
- verifyResultsFabsFloat2Float2(in, out, false);
+ script.forEach_testFabsFloat2Float2(inV, out);
+ verifyResultsFabsFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFabsFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testFabsFloat2Float2(in, out);
- verifyResultsFabsFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testFabsFloat2Float2(inV, out);
+ verifyResultsFabsFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFabsFloat2Float2: " + e.toString());
}
}
- private void verifyResultsFabsFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsFabsFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFabs(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkFabsFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x54ecfd587ddf0767l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x43ce8ddd24763ea3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testFabsFloat3Float3(in, out);
- verifyResultsFabsFloat3Float3(in, out, false);
+ script.forEach_testFabsFloat3Float3(inV, out);
+ verifyResultsFabsFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFabsFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testFabsFloat3Float3(in, out);
- verifyResultsFabsFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testFabsFloat3Float3(inV, out);
+ verifyResultsFabsFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFabsFloat3Float3: " + e.toString());
}
}
- private void verifyResultsFabsFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsFabsFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFabs(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkFabsFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x54ed07f9dce59d01l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x43d056f81a915f81l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testFabsFloat4Float4(in, out);
- verifyResultsFabsFloat4Float4(in, out, false);
+ script.forEach_testFabsFloat4Float4(inV, out);
+ verifyResultsFabsFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFabsFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testFabsFloat4Float4(in, out);
- verifyResultsFabsFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testFabsFloat4Float4(inV, out);
+ verifyResultsFabsFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFabsFloat4Float4: " + e.toString());
}
}
- private void verifyResultsFabsFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsFabsFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFabs(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.rs
index aed0318..61ba16f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testFabsFloatFloat(float in) {
- return fabs(in);
+float __attribute__((kernel)) testFabsFloatFloat(float inV) {
+ return fabs(inV);
}
-float2 __attribute__((kernel)) testFabsFloat2Float2(float2 in) {
- return fabs(in);
+float2 __attribute__((kernel)) testFabsFloat2Float2(float2 inV) {
+ return fabs(inV);
}
-float3 __attribute__((kernel)) testFabsFloat3Float3(float3 in) {
- return fabs(in);
+float3 __attribute__((kernel)) testFabsFloat3Float3(float3 inV) {
+ return fabs(inV);
}
-float4 __attribute__((kernel)) testFabsFloat4Float4(float4 in) {
- return fabs(in);
+float4 __attribute__((kernel)) testFabsFloat4Float4(float4 inV) {
+ return fabs(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.java
index 8091015..19bf840 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inLhs;
- public float inRhs;
+ public float inLeftVector;
+ public float inRightVector;
public Target.Floaty out;
}
private void checkFastDistanceFloatFloatFloat() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xfe7e5e843bff0cb7l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xfe7e5e843bff380dl, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xeb32e5abb9b28b1al, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x83606d459f1626e3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testFastDistanceFloatFloatFloat(inLhs, out);
- verifyResultsFastDistanceFloatFloatFloat(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testFastDistanceFloatFloatFloat(inLeftVector, out);
+ verifyResultsFastDistanceFloatFloatFloat(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFastDistanceFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testFastDistanceFloatFloatFloat(inLhs, out);
- verifyResultsFastDistanceFloatFloatFloat(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testFastDistanceFloatFloatFloat(inLeftVector, out);
+ verifyResultsFastDistanceFloatFloatFloat(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFastDistanceFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsFastDistanceFloatFloatFloat(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 1];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 1];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsFastDistanceFloatFloatFloat(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 1];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 1];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
// Create the appropriate sized arrays in args
// Fill args with the input values
- args.inLhs = arrayInLhs[i];
- args.inRhs = arrayInRhs[i];
+ args.inLeftVector = arrayInLeftVector[i];
+ args.inRightVector = arrayInRightVector[i];
Target target = new Target(relaxed);
CoreMathVerifier.computeFastDistance(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i], Float.floatToRawIntBits(arrayInLhs[i]), arrayInLhs[i]));
+ arrayInLeftVector[i], Float.floatToRawIntBits(arrayInLeftVector[i]), arrayInLeftVector[i]));
message.append("\n");
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i], Float.floatToRawIntBits(arrayInRhs[i]), arrayInRhs[i]));
+ arrayInRightVector[i], Float.floatToRawIntBits(arrayInRightVector[i]), arrayInRightVector[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -109,50 +109,50 @@
}
public class ArgumentsFloatNFloatNFloat {
- public float[] inLhs;
- public float[] inRhs;
+ public float[] inLeftVector;
+ public float[] inRightVector;
public Target.Floaty out;
}
private void checkFastDistanceFloat2Float2Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x422e8a00560ac063l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x422e8a00560aebb9l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x580238eac7fabd9el, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xca3368dd0536a30fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testFastDistanceFloat2Float2Float(inLhs, out);
- verifyResultsFastDistanceFloat2Float2Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testFastDistanceFloat2Float2Float(inLeftVector, out);
+ verifyResultsFastDistanceFloat2Float2Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFastDistanceFloat2Float2Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testFastDistanceFloat2Float2Float(inLhs, out);
- verifyResultsFastDistanceFloat2Float2Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testFastDistanceFloat2Float2Float(inLeftVector, out);
+ verifyResultsFastDistanceFloat2Float2Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFastDistanceFloat2Float2Float: " + e.toString());
}
}
- private void verifyResultsFastDistanceFloat2Float2Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 2];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 2];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsFastDistanceFloat2Float2Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 2];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 2];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[2];
- args.inRhs = new float[2];
+ args.inLeftVector = new float[2];
+ args.inRightVector = new float[2];
// Fill args with the input values
for (int j = 0; j < 2 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 2 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 2 + j];
}
for (int j = 0; j < 2 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 2 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 2 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeFastDistance(args, target);
@@ -165,15 +165,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 2 + j], Float.floatToRawIntBits(arrayInLhs[i * 2 + j]), arrayInLhs[i * 2 + j]));
+ arrayInLeftVector[i * 2 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 2 + j]), arrayInLeftVector[i * 2 + j]));
message.append("\n");
}
for (int j = 0; j < 2 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 2 + j], Float.floatToRawIntBits(arrayInRhs[i * 2 + j]), arrayInRhs[i * 2 + j]));
+ arrayInRightVector[i * 2 + j], Float.floatToRawIntBits(arrayInRightVector[i * 2 + j]), arrayInRightVector[i * 2 + j]));
message.append("\n");
}
message.append("Expected output out: ");
@@ -193,44 +193,44 @@
}
private void checkFastDistanceFloat3Float3Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6f1fd960a620dbbdl, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6f1fd960a6210713l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x26ab5e68e99971ecl, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x809cb50caadeec29l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testFastDistanceFloat3Float3Float(inLhs, out);
- verifyResultsFastDistanceFloat3Float3Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testFastDistanceFloat3Float3Float(inLeftVector, out);
+ verifyResultsFastDistanceFloat3Float3Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFastDistanceFloat3Float3Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testFastDistanceFloat3Float3Float(inLhs, out);
- verifyResultsFastDistanceFloat3Float3Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testFastDistanceFloat3Float3Float(inLeftVector, out);
+ verifyResultsFastDistanceFloat3Float3Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFastDistanceFloat3Float3Float: " + e.toString());
}
}
- private void verifyResultsFastDistanceFloat3Float3Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsFastDistanceFloat3Float3Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[3];
- args.inRhs = new float[3];
+ args.inLeftVector = new float[3];
+ args.inRightVector = new float[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 3 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeFastDistance(args, target);
@@ -243,15 +243,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
message.append("Expected output out: ");
@@ -271,44 +271,44 @@
}
private void checkFastDistanceFloat4Float4Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x9c1128c0f636f717l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x9c1128c0f637226dl, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf55483e70b38263al, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3706013c50873543l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testFastDistanceFloat4Float4Float(inLhs, out);
- verifyResultsFastDistanceFloat4Float4Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testFastDistanceFloat4Float4Float(inLeftVector, out);
+ verifyResultsFastDistanceFloat4Float4Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFastDistanceFloat4Float4Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testFastDistanceFloat4Float4Float(inLhs, out);
- verifyResultsFastDistanceFloat4Float4Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testFastDistanceFloat4Float4Float(inLeftVector, out);
+ verifyResultsFastDistanceFloat4Float4Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFastDistanceFloat4Float4Float: " + e.toString());
}
}
- private void verifyResultsFastDistanceFloat4Float4Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsFastDistanceFloat4Float4Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[4];
- args.inRhs = new float[4];
+ args.inLeftVector = new float[4];
+ args.inRightVector = new float[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 4 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeFastDistance(args, target);
@@ -321,15 +321,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
message.append("Expected output out: ");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.rs
index 62c0931..1101207 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInRhs;
+rs_allocation gAllocInRightVector;
-float __attribute__((kernel)) testFastDistanceFloatFloatFloat(float inLhs, unsigned int x) {
- float inRhs = rsGetElementAt_float(gAllocInRhs, x);
- return fast_distance(inLhs, inRhs);
+float __attribute__((kernel)) testFastDistanceFloatFloatFloat(float inLeftVector, unsigned int x) {
+ float inRightVector = rsGetElementAt_float(gAllocInRightVector, x);
+ return fast_distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testFastDistanceFloat2Float2Float(float2 inLhs, unsigned int x) {
- float2 inRhs = rsGetElementAt_float2(gAllocInRhs, x);
- return fast_distance(inLhs, inRhs);
+float __attribute__((kernel)) testFastDistanceFloat2Float2Float(float2 inLeftVector, unsigned int x) {
+ float2 inRightVector = rsGetElementAt_float2(gAllocInRightVector, x);
+ return fast_distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testFastDistanceFloat3Float3Float(float3 inLhs, unsigned int x) {
- float3 inRhs = rsGetElementAt_float3(gAllocInRhs, x);
- return fast_distance(inLhs, inRhs);
+float __attribute__((kernel)) testFastDistanceFloat3Float3Float(float3 inLeftVector, unsigned int x) {
+ float3 inRightVector = rsGetElementAt_float3(gAllocInRightVector, x);
+ return fast_distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testFastDistanceFloat4Float4Float(float4 inLhs, unsigned int x) {
- float4 inRhs = rsGetElementAt_float4(gAllocInRhs, x);
- return fast_distance(inLhs, inRhs);
+float __attribute__((kernel)) testFastDistanceFloat4Float4Float(float4 inLeftVector, unsigned int x) {
+ float4 inRightVector = rsGetElementAt_float4(gAllocInRightVector, x);
+ return fast_distance(inLeftVector, inRightVector);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.java
index 39ec8bd..7b0325c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkFloorFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x9c2b15433f045885l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3b3c924b95badeadl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testFloorFloatFloat(in, out);
- verifyResultsFloorFloatFloat(in, out, false);
+ script.forEach_testFloorFloatFloat(inV, out);
+ verifyResultsFloorFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFloorFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testFloorFloatFloat(in, out);
- verifyResultsFloorFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testFloorFloatFloat(inV, out);
+ verifyResultsFloorFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFloorFloatFloat: " + e.toString());
}
}
- private void verifyResultsFloorFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsFloorFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFloor(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkFloorFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xf32bb4add79bd3b9l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd8575933372c9069l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testFloorFloat2Float2(in, out);
- verifyResultsFloorFloat2Float2(in, out, false);
+ script.forEach_testFloorFloat2Float2(inV, out);
+ verifyResultsFloorFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFloorFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testFloorFloat2Float2(in, out);
- verifyResultsFloorFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testFloorFloat2Float2(inV, out);
+ verifyResultsFloorFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFloorFloat2Float2: " + e.toString());
}
}
- private void verifyResultsFloorFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsFloorFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFloor(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkFloorFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf32bbf4f36a26953l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd859224e2d47b147l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testFloorFloat3Float3(in, out);
- verifyResultsFloorFloat3Float3(in, out, false);
+ script.forEach_testFloorFloat3Float3(inV, out);
+ verifyResultsFloorFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFloorFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testFloorFloat3Float3(in, out);
- verifyResultsFloorFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testFloorFloat3Float3(inV, out);
+ verifyResultsFloorFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFloorFloat3Float3: " + e.toString());
}
}
- private void verifyResultsFloorFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsFloorFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFloor(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkFloorFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf32bc9f095a8feedl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd85aeb692362d225l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testFloorFloat4Float4(in, out);
- verifyResultsFloorFloat4Float4(in, out, false);
+ script.forEach_testFloorFloat4Float4(inV, out);
+ verifyResultsFloorFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFloorFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testFloorFloat4Float4(in, out);
- verifyResultsFloorFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testFloorFloat4Float4(inV, out);
+ verifyResultsFloorFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFloorFloat4Float4: " + e.toString());
}
}
- private void verifyResultsFloorFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsFloorFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFloor(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.rs
index f74fc2b..abb50e3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testFloorFloatFloat(float in) {
- return floor(in);
+float __attribute__((kernel)) testFloorFloatFloat(float inV) {
+ return floor(inV);
}
-float2 __attribute__((kernel)) testFloorFloat2Float2(float2 in) {
- return floor(in);
+float2 __attribute__((kernel)) testFloorFloat2Float2(float2 inV) {
+ return floor(inV);
}
-float3 __attribute__((kernel)) testFloorFloat3Float3(float3 in) {
- return floor(in);
+float3 __attribute__((kernel)) testFloorFloat3Float3(float3 inV) {
+ return floor(inV);
}
-float4 __attribute__((kernel)) testFloorFloat4Float4(float4 in) {
- return floor(in);
+float4 __attribute__((kernel)) testFloorFloat4Float4(float4 inV) {
+ return floor(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFma.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFma.java
index fcb7c5f..074f975 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFma.java
@@ -35,52 +35,52 @@
}
public class ArgumentsFloatFloatFloatFloat {
- public float inA;
- public float inB;
- public float inC;
+ public float inMultiplicand1;
+ public float inMultiplicand2;
+ public float inOffset;
public Target.Floaty out;
}
private void checkFmaFloatFloatFloatFloat() {
- Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5f6b3ee0c3466c2l, false);
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5f6b3ee0c3466c3l, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5f6b3ee0c3466c4l, false);
+ Allocation inMultiplicand1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x716293a685c419bel, false);
+ Allocation inMultiplicand2 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x716293a685c419bfl, false);
+ Allocation inOffset = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4a235a109d441b0el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInB(inB);
- script.set_gAllocInC(inC);
- script.forEach_testFmaFloatFloatFloatFloat(inA, out);
- verifyResultsFmaFloatFloatFloatFloat(inA, inB, inC, out, false);
+ script.set_gAllocInMultiplicand2(inMultiplicand2);
+ script.set_gAllocInOffset(inOffset);
+ script.forEach_testFmaFloatFloatFloatFloat(inMultiplicand1, out);
+ verifyResultsFmaFloatFloatFloatFloat(inMultiplicand1, inMultiplicand2, inOffset, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaFloatFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInB(inB);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.forEach_testFmaFloatFloatFloatFloat(inA, out);
- verifyResultsFmaFloatFloatFloatFloat(inA, inB, inC, out, true);
+ scriptRelaxed.set_gAllocInMultiplicand2(inMultiplicand2);
+ scriptRelaxed.set_gAllocInOffset(inOffset);
+ scriptRelaxed.forEach_testFmaFloatFloatFloatFloat(inMultiplicand1, out);
+ verifyResultsFmaFloatFloatFloatFloat(inMultiplicand1, inMultiplicand2, inOffset, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaFloatFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsFmaFloatFloatFloatFloat(Allocation inA, Allocation inB, Allocation inC, Allocation out, boolean relaxed) {
- float[] arrayInA = new float[INPUTSIZE * 1];
- inA.copyTo(arrayInA);
- float[] arrayInB = new float[INPUTSIZE * 1];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 1];
- inC.copyTo(arrayInC);
+ private void verifyResultsFmaFloatFloatFloatFloat(Allocation inMultiplicand1, Allocation inMultiplicand2, Allocation inOffset, Allocation out, boolean relaxed) {
+ float[] arrayInMultiplicand1 = new float[INPUTSIZE * 1];
+ inMultiplicand1.copyTo(arrayInMultiplicand1);
+ float[] arrayInMultiplicand2 = new float[INPUTSIZE * 1];
+ inMultiplicand2.copyTo(arrayInMultiplicand2);
+ float[] arrayInOffset = new float[INPUTSIZE * 1];
+ inOffset.copyTo(arrayInOffset);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
- args.inA = arrayInA[i];
- args.inB = arrayInB[i];
- args.inC = arrayInC[i];
+ args.inMultiplicand1 = arrayInMultiplicand1[i];
+ args.inMultiplicand2 = arrayInMultiplicand2[i];
+ args.inOffset = arrayInOffset[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFma(args, target);
@@ -91,17 +91,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inA: ");
+ message.append("Input inMultiplicand1: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inA, Float.floatToRawIntBits(args.inA), args.inA));
+ args.inMultiplicand1, Float.floatToRawIntBits(args.inMultiplicand1), args.inMultiplicand1));
message.append("\n");
- message.append("Input inB: ");
+ message.append("Input inMultiplicand2: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inMultiplicand2, Float.floatToRawIntBits(args.inMultiplicand2), args.inMultiplicand2));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inOffset: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inOffset, Float.floatToRawIntBits(args.inOffset), args.inOffset));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -121,45 +121,45 @@
}
private void checkFmaFloat2Float2Float2Float2() {
- Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x47b62b8849bc43dal, false);
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x47b62b8849bc43dbl, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x47b62b8849bc43dcl, false);
+ Allocation inMultiplicand1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x1bb42af9dda15056l, false);
+ Allocation inMultiplicand2 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x1bb42af9dda15057l, false);
+ Allocation inOffset = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x667fbd778aeda396l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInB(inB);
- script.set_gAllocInC(inC);
- script.forEach_testFmaFloat2Float2Float2Float2(inA, out);
- verifyResultsFmaFloat2Float2Float2Float2(inA, inB, inC, out, false);
+ script.set_gAllocInMultiplicand2(inMultiplicand2);
+ script.set_gAllocInOffset(inOffset);
+ script.forEach_testFmaFloat2Float2Float2Float2(inMultiplicand1, out);
+ verifyResultsFmaFloat2Float2Float2Float2(inMultiplicand1, inMultiplicand2, inOffset, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaFloat2Float2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInB(inB);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.forEach_testFmaFloat2Float2Float2Float2(inA, out);
- verifyResultsFmaFloat2Float2Float2Float2(inA, inB, inC, out, true);
+ scriptRelaxed.set_gAllocInMultiplicand2(inMultiplicand2);
+ scriptRelaxed.set_gAllocInOffset(inOffset);
+ scriptRelaxed.forEach_testFmaFloat2Float2Float2Float2(inMultiplicand1, out);
+ verifyResultsFmaFloat2Float2Float2Float2(inMultiplicand1, inMultiplicand2, inOffset, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaFloat2Float2Float2Float2: " + e.toString());
}
}
- private void verifyResultsFmaFloat2Float2Float2Float2(Allocation inA, Allocation inB, Allocation inC, Allocation out, boolean relaxed) {
- float[] arrayInA = new float[INPUTSIZE * 2];
- inA.copyTo(arrayInA);
- float[] arrayInB = new float[INPUTSIZE * 2];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 2];
- inC.copyTo(arrayInC);
+ private void verifyResultsFmaFloat2Float2Float2Float2(Allocation inMultiplicand1, Allocation inMultiplicand2, Allocation inOffset, Allocation out, boolean relaxed) {
+ float[] arrayInMultiplicand1 = new float[INPUTSIZE * 2];
+ inMultiplicand1.copyTo(arrayInMultiplicand1);
+ float[] arrayInMultiplicand2 = new float[INPUTSIZE * 2];
+ inMultiplicand2.copyTo(arrayInMultiplicand2);
+ float[] arrayInOffset = new float[INPUTSIZE * 2];
+ inOffset.copyTo(arrayInOffset);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
- args.inA = arrayInA[i * 2 + j];
- args.inB = arrayInB[i * 2 + j];
- args.inC = arrayInC[i * 2 + j];
+ args.inMultiplicand1 = arrayInMultiplicand1[i * 2 + j];
+ args.inMultiplicand2 = arrayInMultiplicand2[i * 2 + j];
+ args.inOffset = arrayInOffset[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFma(args, target);
@@ -170,17 +170,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inA: ");
+ message.append("Input inMultiplicand1: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inA, Float.floatToRawIntBits(args.inA), args.inA));
+ args.inMultiplicand1, Float.floatToRawIntBits(args.inMultiplicand1), args.inMultiplicand1));
message.append("\n");
- message.append("Input inB: ");
+ message.append("Input inMultiplicand2: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inMultiplicand2, Float.floatToRawIntBits(args.inMultiplicand2), args.inMultiplicand2));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inOffset: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inOffset, Float.floatToRawIntBits(args.inOffset), args.inOffset));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -200,45 +200,45 @@
}
private void checkFmaFloat3Float3Float3Float3() {
- Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1d2fcf231c237d76l, false);
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1d2fcf231c237d77l, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1d2fcf231c237d78l, false);
+ Allocation inMultiplicand1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x19169f2d349697b2l, false);
+ Allocation inMultiplicand2 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x19169f2d349697b3l, false);
+ Allocation inOffset = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3a56bf5454d5ec8al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInB(inB);
- script.set_gAllocInC(inC);
- script.forEach_testFmaFloat3Float3Float3Float3(inA, out);
- verifyResultsFmaFloat3Float3Float3Float3(inA, inB, inC, out, false);
+ script.set_gAllocInMultiplicand2(inMultiplicand2);
+ script.set_gAllocInOffset(inOffset);
+ script.forEach_testFmaFloat3Float3Float3Float3(inMultiplicand1, out);
+ verifyResultsFmaFloat3Float3Float3Float3(inMultiplicand1, inMultiplicand2, inOffset, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaFloat3Float3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInB(inB);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.forEach_testFmaFloat3Float3Float3Float3(inA, out);
- verifyResultsFmaFloat3Float3Float3Float3(inA, inB, inC, out, true);
+ scriptRelaxed.set_gAllocInMultiplicand2(inMultiplicand2);
+ scriptRelaxed.set_gAllocInOffset(inOffset);
+ scriptRelaxed.forEach_testFmaFloat3Float3Float3Float3(inMultiplicand1, out);
+ verifyResultsFmaFloat3Float3Float3Float3(inMultiplicand1, inMultiplicand2, inOffset, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaFloat3Float3Float3Float3: " + e.toString());
}
}
- private void verifyResultsFmaFloat3Float3Float3Float3(Allocation inA, Allocation inB, Allocation inC, Allocation out, boolean relaxed) {
- float[] arrayInA = new float[INPUTSIZE * 4];
- inA.copyTo(arrayInA);
- float[] arrayInB = new float[INPUTSIZE * 4];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 4];
- inC.copyTo(arrayInC);
+ private void verifyResultsFmaFloat3Float3Float3Float3(Allocation inMultiplicand1, Allocation inMultiplicand2, Allocation inOffset, Allocation out, boolean relaxed) {
+ float[] arrayInMultiplicand1 = new float[INPUTSIZE * 4];
+ inMultiplicand1.copyTo(arrayInMultiplicand1);
+ float[] arrayInMultiplicand2 = new float[INPUTSIZE * 4];
+ inMultiplicand2.copyTo(arrayInMultiplicand2);
+ float[] arrayInOffset = new float[INPUTSIZE * 4];
+ inOffset.copyTo(arrayInOffset);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
- args.inA = arrayInA[i * 4 + j];
- args.inB = arrayInB[i * 4 + j];
- args.inC = arrayInC[i * 4 + j];
+ args.inMultiplicand1 = arrayInMultiplicand1[i * 4 + j];
+ args.inMultiplicand2 = arrayInMultiplicand2[i * 4 + j];
+ args.inOffset = arrayInOffset[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFma(args, target);
@@ -249,17 +249,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inA: ");
+ message.append("Input inMultiplicand1: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inA, Float.floatToRawIntBits(args.inA), args.inA));
+ args.inMultiplicand1, Float.floatToRawIntBits(args.inMultiplicand1), args.inMultiplicand1));
message.append("\n");
- message.append("Input inB: ");
+ message.append("Input inMultiplicand2: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inMultiplicand2, Float.floatToRawIntBits(args.inMultiplicand2), args.inMultiplicand2));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inOffset: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inOffset, Float.floatToRawIntBits(args.inOffset), args.inOffset));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -279,45 +279,45 @@
}
private void checkFmaFloat4Float4Float4Float4() {
- Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf2a972bdee8ab712l, false);
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf2a972bdee8ab713l, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf2a972bdee8ab714l, false);
+ Allocation inMultiplicand1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x167913608b8bdf0el, false);
+ Allocation inMultiplicand2 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x167913608b8bdf0fl, false);
+ Allocation inOffset = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe2dc1311ebe357el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInB(inB);
- script.set_gAllocInC(inC);
- script.forEach_testFmaFloat4Float4Float4Float4(inA, out);
- verifyResultsFmaFloat4Float4Float4Float4(inA, inB, inC, out, false);
+ script.set_gAllocInMultiplicand2(inMultiplicand2);
+ script.set_gAllocInOffset(inOffset);
+ script.forEach_testFmaFloat4Float4Float4Float4(inMultiplicand1, out);
+ verifyResultsFmaFloat4Float4Float4Float4(inMultiplicand1, inMultiplicand2, inOffset, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaFloat4Float4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInB(inB);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.forEach_testFmaFloat4Float4Float4Float4(inA, out);
- verifyResultsFmaFloat4Float4Float4Float4(inA, inB, inC, out, true);
+ scriptRelaxed.set_gAllocInMultiplicand2(inMultiplicand2);
+ scriptRelaxed.set_gAllocInOffset(inOffset);
+ scriptRelaxed.forEach_testFmaFloat4Float4Float4Float4(inMultiplicand1, out);
+ verifyResultsFmaFloat4Float4Float4Float4(inMultiplicand1, inMultiplicand2, inOffset, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaFloat4Float4Float4Float4: " + e.toString());
}
}
- private void verifyResultsFmaFloat4Float4Float4Float4(Allocation inA, Allocation inB, Allocation inC, Allocation out, boolean relaxed) {
- float[] arrayInA = new float[INPUTSIZE * 4];
- inA.copyTo(arrayInA);
- float[] arrayInB = new float[INPUTSIZE * 4];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 4];
- inC.copyTo(arrayInC);
+ private void verifyResultsFmaFloat4Float4Float4Float4(Allocation inMultiplicand1, Allocation inMultiplicand2, Allocation inOffset, Allocation out, boolean relaxed) {
+ float[] arrayInMultiplicand1 = new float[INPUTSIZE * 4];
+ inMultiplicand1.copyTo(arrayInMultiplicand1);
+ float[] arrayInMultiplicand2 = new float[INPUTSIZE * 4];
+ inMultiplicand2.copyTo(arrayInMultiplicand2);
+ float[] arrayInOffset = new float[INPUTSIZE * 4];
+ inOffset.copyTo(arrayInOffset);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
- args.inA = arrayInA[i * 4 + j];
- args.inB = arrayInB[i * 4 + j];
- args.inC = arrayInC[i * 4 + j];
+ args.inMultiplicand1 = arrayInMultiplicand1[i * 4 + j];
+ args.inMultiplicand2 = arrayInMultiplicand2[i * 4 + j];
+ args.inOffset = arrayInOffset[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFma(args, target);
@@ -328,17 +328,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inA: ");
+ message.append("Input inMultiplicand1: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inA, Float.floatToRawIntBits(args.inA), args.inA));
+ args.inMultiplicand1, Float.floatToRawIntBits(args.inMultiplicand1), args.inMultiplicand1));
message.append("\n");
- message.append("Input inB: ");
+ message.append("Input inMultiplicand2: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inMultiplicand2, Float.floatToRawIntBits(args.inMultiplicand2), args.inMultiplicand2));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inOffset: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inOffset, Float.floatToRawIntBits(args.inOffset), args.inOffset));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFma.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestFma.rs
index b0cb2dd..cc67007 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFma.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFma.rs
@@ -19,29 +19,29 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInB;
-rs_allocation gAllocInC;
+rs_allocation gAllocInMultiplicand2;
+rs_allocation gAllocInOffset;
-float __attribute__((kernel)) testFmaFloatFloatFloatFloat(float inA, unsigned int x) {
- float inB = rsGetElementAt_float(gAllocInB, x);
- float inC = rsGetElementAt_float(gAllocInC, x);
- return fma(inA, inB, inC);
+float __attribute__((kernel)) testFmaFloatFloatFloatFloat(float inMultiplicand1, unsigned int x) {
+ float inMultiplicand2 = rsGetElementAt_float(gAllocInMultiplicand2, x);
+ float inOffset = rsGetElementAt_float(gAllocInOffset, x);
+ return fma(inMultiplicand1, inMultiplicand2, inOffset);
}
-float2 __attribute__((kernel)) testFmaFloat2Float2Float2Float2(float2 inA, unsigned int x) {
- float2 inB = rsGetElementAt_float2(gAllocInB, x);
- float2 inC = rsGetElementAt_float2(gAllocInC, x);
- return fma(inA, inB, inC);
+float2 __attribute__((kernel)) testFmaFloat2Float2Float2Float2(float2 inMultiplicand1, unsigned int x) {
+ float2 inMultiplicand2 = rsGetElementAt_float2(gAllocInMultiplicand2, x);
+ float2 inOffset = rsGetElementAt_float2(gAllocInOffset, x);
+ return fma(inMultiplicand1, inMultiplicand2, inOffset);
}
-float3 __attribute__((kernel)) testFmaFloat3Float3Float3Float3(float3 inA, unsigned int x) {
- float3 inB = rsGetElementAt_float3(gAllocInB, x);
- float3 inC = rsGetElementAt_float3(gAllocInC, x);
- return fma(inA, inB, inC);
+float3 __attribute__((kernel)) testFmaFloat3Float3Float3Float3(float3 inMultiplicand1, unsigned int x) {
+ float3 inMultiplicand2 = rsGetElementAt_float3(gAllocInMultiplicand2, x);
+ float3 inOffset = rsGetElementAt_float3(gAllocInOffset, x);
+ return fma(inMultiplicand1, inMultiplicand2, inOffset);
}
-float4 __attribute__((kernel)) testFmaFloat4Float4Float4Float4(float4 inA, unsigned int x) {
- float4 inB = rsGetElementAt_float4(gAllocInB, x);
- float4 inC = rsGetElementAt_float4(gAllocInC, x);
- return fma(inA, inB, inC);
+float4 __attribute__((kernel)) testFmaFloat4Float4Float4Float4(float4 inMultiplicand1, unsigned int x) {
+ float4 inMultiplicand2 = rsGetElementAt_float4(gAllocInMultiplicand2, x);
+ float4 inOffset = rsGetElementAt_float4(gAllocInOffset, x);
+ return fma(inMultiplicand1, inMultiplicand2, inOffset);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.java
index 7d4e633..3d657cc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inA;
+ public float inB;
public Target.Floaty out;
}
private void checkFmaxFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe6ec75a46e6fdd91l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe6ec75a46e6fdd92l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe6ec75a46e6fdd7al, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe6ec75a46e6fdd7bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmaxFloatFloatFloat(inX, out);
- verifyResultsFmaxFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFmaxFloatFloatFloat(inA, out);
+ verifyResultsFmaxFloatFloatFloat(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmaxFloatFloatFloat(inX, out);
- verifyResultsFmaxFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFmaxFloatFloatFloat(inA, out);
+ verifyResultsFmaxFloatFloatFloat(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsFmaxFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmaxFloatFloatFloat(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmax(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkFmaxFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xa99eaa6dd458a0dfl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xa99eaa6dd458a0e0l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xa99eaa6dd458a0c8l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xa99eaa6dd458a0c9l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmaxFloat2Float2Float2(inX, out);
- verifyResultsFmaxFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFmaxFloat2Float2Float2(inA, out);
+ verifyResultsFmaxFloat2Float2Float2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmaxFloat2Float2Float2(inX, out);
- verifyResultsFmaxFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFmaxFloat2Float2Float2(inA, out);
+ verifyResultsFmaxFloat2Float2Float2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsFmaxFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmaxFloat2Float2Float2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmax(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkFmaxFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xfe03888dd636a280l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xfe03888dd636a281l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xfe03888dd636a269l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xfe03888dd636a26al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmaxFloat3Float3Float3(inX, out);
- verifyResultsFmaxFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFmaxFloat3Float3Float3(inA, out);
+ verifyResultsFmaxFloat3Float3Float3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmaxFloat3Float3Float3(inX, out);
- verifyResultsFmaxFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFmaxFloat3Float3Float3(inA, out);
+ verifyResultsFmaxFloat3Float3Float3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsFmaxFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmaxFloat3Float3Float3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmax(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkFmaxFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x526866add814a421l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x526866add814a422l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x526866add814a40al, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x526866add814a40bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmaxFloat4Float4Float4(inX, out);
- verifyResultsFmaxFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFmaxFloat4Float4Float4(inA, out);
+ verifyResultsFmaxFloat4Float4Float4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmaxFloat4Float4Float4(inX, out);
- verifyResultsFmaxFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFmaxFloat4Float4Float4(inA, out);
+ verifyResultsFmaxFloat4Float4Float4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsFmaxFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmaxFloat4Float4Float4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmax(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -317,39 +317,39 @@
}
private void checkFmaxFloat2FloatFloat2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xce5ddc06dc631119l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xce5ddc06dc63111al, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xce5ddc06dc631102l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xce5ddc06dc631103l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmaxFloat2FloatFloat2(inX, out);
- verifyResultsFmaxFloat2FloatFloat2(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFmaxFloat2FloatFloat2(inA, out);
+ verifyResultsFmaxFloat2FloatFloat2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat2FloatFloat2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmaxFloat2FloatFloat2(inX, out);
- verifyResultsFmaxFloat2FloatFloat2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFmaxFloat2FloatFloat2(inA, out);
+ verifyResultsFmaxFloat2FloatFloat2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat2FloatFloat2: " + e.toString());
}
}
- private void verifyResultsFmaxFloat2FloatFloat2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmaxFloat2FloatFloat2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmax(args, target);
@@ -360,13 +360,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -386,39 +386,39 @@
}
private void checkFmaxFloat3FloatFloat3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x23ad8f1ecace0575l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x23ad8f1ecace0576l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x23ad8f1ecace055el, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x23ad8f1ecace055fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmaxFloat3FloatFloat3(inX, out);
- verifyResultsFmaxFloat3FloatFloat3(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFmaxFloat3FloatFloat3(inA, out);
+ verifyResultsFmaxFloat3FloatFloat3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat3FloatFloat3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmaxFloat3FloatFloat3(inX, out);
- verifyResultsFmaxFloat3FloatFloat3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFmaxFloat3FloatFloat3(inA, out);
+ verifyResultsFmaxFloat3FloatFloat3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat3FloatFloat3: " + e.toString());
}
}
- private void verifyResultsFmaxFloat3FloatFloat3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmaxFloat3FloatFloat3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmax(args, target);
@@ -429,13 +429,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -455,39 +455,39 @@
}
private void checkFmaxFloat4FloatFloat4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x78fd4236b938f9d1l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x78fd4236b938f9d2l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x78fd4236b938f9bal, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x78fd4236b938f9bbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmaxFloat4FloatFloat4(inX, out);
- verifyResultsFmaxFloat4FloatFloat4(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFmaxFloat4FloatFloat4(inA, out);
+ verifyResultsFmaxFloat4FloatFloat4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat4FloatFloat4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmaxFloat4FloatFloat4(inX, out);
- verifyResultsFmaxFloat4FloatFloat4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFmaxFloat4FloatFloat4(inA, out);
+ verifyResultsFmaxFloat4FloatFloat4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmaxFloat4FloatFloat4: " + e.toString());
}
}
- private void verifyResultsFmaxFloat4FloatFloat4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmaxFloat4FloatFloat4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmax(args, target);
@@ -498,13 +498,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.rs
index 50e5e3f..59eb2bd 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.rs
@@ -19,39 +19,39 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInB;
-float __attribute__((kernel)) testFmaxFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmax(inX, inY);
+float __attribute__((kernel)) testFmaxFloatFloatFloat(float inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return fmax(inA, inB);
}
-float2 __attribute__((kernel)) testFmaxFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return fmax(inX, inY);
+float2 __attribute__((kernel)) testFmaxFloat2Float2Float2(float2 inA, unsigned int x) {
+ float2 inB = rsGetElementAt_float2(gAllocInB, x);
+ return fmax(inA, inB);
}
-float3 __attribute__((kernel)) testFmaxFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return fmax(inX, inY);
+float3 __attribute__((kernel)) testFmaxFloat3Float3Float3(float3 inA, unsigned int x) {
+ float3 inB = rsGetElementAt_float3(gAllocInB, x);
+ return fmax(inA, inB);
}
-float4 __attribute__((kernel)) testFmaxFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return fmax(inX, inY);
+float4 __attribute__((kernel)) testFmaxFloat4Float4Float4(float4 inA, unsigned int x) {
+ float4 inB = rsGetElementAt_float4(gAllocInB, x);
+ return fmax(inA, inB);
}
-float2 __attribute__((kernel)) testFmaxFloat2FloatFloat2(float2 inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmax(inX, inY);
+float2 __attribute__((kernel)) testFmaxFloat2FloatFloat2(float2 inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return fmax(inA, inB);
}
-float3 __attribute__((kernel)) testFmaxFloat3FloatFloat3(float3 inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmax(inX, inY);
+float3 __attribute__((kernel)) testFmaxFloat3FloatFloat3(float3 inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return fmax(inA, inB);
}
-float4 __attribute__((kernel)) testFmaxFloat4FloatFloat4(float4 inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmax(inX, inY);
+float4 __attribute__((kernel)) testFmaxFloat4FloatFloat4(float4 inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return fmax(inA, inB);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.java
index f206a74..2f52a7f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inA;
+ public float inB;
public Target.Floaty out;
}
private void checkFminFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7b46a8451d7b106fl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7b46a8451d7b1070l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7b46a8451d7b1058l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7b46a8451d7b1059l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFminFloatFloatFloat(inX, out);
- verifyResultsFminFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFminFloatFloatFloat(inA, out);
+ verifyResultsFminFloatFloatFloat(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFminFloatFloatFloat(inX, out);
- verifyResultsFminFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFminFloatFloatFloat(inA, out);
+ verifyResultsFminFloatFloatFloat(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsFminFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFminFloatFloatFloat(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmin(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkFminFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x12b850a9e75faa59l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x12b850a9e75faa5al, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x12b850a9e75faa42l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x12b850a9e75faa43l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFminFloat2Float2Float2(inX, out);
- verifyResultsFminFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFminFloat2Float2Float2(inA, out);
+ verifyResultsFminFloat2Float2Float2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFminFloat2Float2Float2(inX, out);
- verifyResultsFminFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFminFloat2Float2Float2(inA, out);
+ verifyResultsFminFloat2Float2Float2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsFminFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsFminFloat2Float2Float2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmin(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkFminFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x671d2ec9e93dabfal, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x671d2ec9e93dabfbl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x671d2ec9e93dabe3l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x671d2ec9e93dabe4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFminFloat3Float3Float3(inX, out);
- verifyResultsFminFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFminFloat3Float3Float3(inA, out);
+ verifyResultsFminFloat3Float3Float3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFminFloat3Float3Float3(inX, out);
- verifyResultsFminFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFminFloat3Float3Float3(inA, out);
+ verifyResultsFminFloat3Float3Float3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsFminFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsFminFloat3Float3Float3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmin(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkFminFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbb820ce9eb1bad9bl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbb820ce9eb1bad9cl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbb820ce9eb1bad84l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbb820ce9eb1bad85l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFminFloat4Float4Float4(inX, out);
- verifyResultsFminFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFminFloat4Float4Float4(inA, out);
+ verifyResultsFminFloat4Float4Float4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFminFloat4Float4Float4(inX, out);
- verifyResultsFminFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFminFloat4Float4Float4(inA, out);
+ verifyResultsFminFloat4Float4Float4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsFminFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsFminFloat4Float4Float4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmin(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -317,39 +317,39 @@
}
private void checkFminFloat2FloatFloat2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4dd5869724457687l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4dd5869724457688l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4dd5869724457670l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4dd5869724457671l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFminFloat2FloatFloat2(inX, out);
- verifyResultsFminFloat2FloatFloat2(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFminFloat2FloatFloat2(inA, out);
+ verifyResultsFminFloat2FloatFloat2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat2FloatFloat2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFminFloat2FloatFloat2(inX, out);
- verifyResultsFminFloat2FloatFloat2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFminFloat2FloatFloat2(inA, out);
+ verifyResultsFminFloat2FloatFloat2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat2FloatFloat2: " + e.toString());
}
}
- private void verifyResultsFminFloat2FloatFloat2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFminFloat2FloatFloat2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmin(args, target);
@@ -360,13 +360,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -386,39 +386,39 @@
}
private void checkFminFloat3FloatFloat3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xa32539af12b06ae3l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa32539af12b06ae4l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xa32539af12b06accl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa32539af12b06acdl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFminFloat3FloatFloat3(inX, out);
- verifyResultsFminFloat3FloatFloat3(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFminFloat3FloatFloat3(inA, out);
+ verifyResultsFminFloat3FloatFloat3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat3FloatFloat3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFminFloat3FloatFloat3(inX, out);
- verifyResultsFminFloat3FloatFloat3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFminFloat3FloatFloat3(inA, out);
+ verifyResultsFminFloat3FloatFloat3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat3FloatFloat3: " + e.toString());
}
}
- private void verifyResultsFminFloat3FloatFloat3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFminFloat3FloatFloat3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmin(args, target);
@@ -429,13 +429,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -455,39 +455,39 @@
}
private void checkFminFloat4FloatFloat4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf874ecc7011b5f3fl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf874ecc7011b5f40l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf874ecc7011b5f28l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf874ecc7011b5f29l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFminFloat4FloatFloat4(inX, out);
- verifyResultsFminFloat4FloatFloat4(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testFminFloat4FloatFloat4(inA, out);
+ verifyResultsFminFloat4FloatFloat4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat4FloatFloat4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFminFloat4FloatFloat4(inX, out);
- verifyResultsFminFloat4FloatFloat4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testFminFloat4FloatFloat4(inA, out);
+ verifyResultsFminFloat4FloatFloat4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFminFloat4FloatFloat4: " + e.toString());
}
}
- private void verifyResultsFminFloat4FloatFloat4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFminFloat4FloatFloat4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmin(args, target);
@@ -498,13 +498,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.rs
index 28db18f..0846051 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.rs
@@ -19,39 +19,39 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInB;
-float __attribute__((kernel)) testFminFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmin(inX, inY);
+float __attribute__((kernel)) testFminFloatFloatFloat(float inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return fmin(inA, inB);
}
-float2 __attribute__((kernel)) testFminFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return fmin(inX, inY);
+float2 __attribute__((kernel)) testFminFloat2Float2Float2(float2 inA, unsigned int x) {
+ float2 inB = rsGetElementAt_float2(gAllocInB, x);
+ return fmin(inA, inB);
}
-float3 __attribute__((kernel)) testFminFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return fmin(inX, inY);
+float3 __attribute__((kernel)) testFminFloat3Float3Float3(float3 inA, unsigned int x) {
+ float3 inB = rsGetElementAt_float3(gAllocInB, x);
+ return fmin(inA, inB);
}
-float4 __attribute__((kernel)) testFminFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return fmin(inX, inY);
+float4 __attribute__((kernel)) testFminFloat4Float4Float4(float4 inA, unsigned int x) {
+ float4 inB = rsGetElementAt_float4(gAllocInB, x);
+ return fmin(inA, inB);
}
-float2 __attribute__((kernel)) testFminFloat2FloatFloat2(float2 inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmin(inX, inY);
+float2 __attribute__((kernel)) testFminFloat2FloatFloat2(float2 inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return fmin(inA, inB);
}
-float3 __attribute__((kernel)) testFminFloat3FloatFloat3(float3 inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmin(inX, inY);
+float3 __attribute__((kernel)) testFminFloat3FloatFloat3(float3 inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return fmin(inA, inB);
}
-float4 __attribute__((kernel)) testFminFloat4FloatFloat4(float4 inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmin(inX, inY);
+float4 __attribute__((kernel)) testFminFloat4FloatFloat4(float4 inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return fmin(inA, inB);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.java
index 7bd59ef..e35adbc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inNumerator;
+ public float inDenominator;
public Target.Floaty out;
}
private void checkFmodFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x51ab5ae4481379a7l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x51ab5ae4481379a8l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xed70b65ddcc790e8l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xeff8dc0a04b044e1l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmodFloatFloatFloat(inX, out);
- verifyResultsFmodFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testFmodFloatFloatFloat(inNumerator, out);
+ verifyResultsFmodFloatFloatFloat(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmodFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmodFloatFloatFloat(inX, out);
- verifyResultsFmodFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testFmodFloatFloatFloat(inNumerator, out);
+ verifyResultsFmodFloatFloatFloat(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmodFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsFmodFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmodFloatFloatFloat(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 1];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 1];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inNumerator = arrayInNumerator[i];
+ args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmod(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkFmodFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x1ed79fa3ec4de581l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x1ed79fa3ec4de582l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x84bcef91ebd95a82l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xb582050adc295e2bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmodFloat2Float2Float2(inX, out);
- verifyResultsFmodFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testFmodFloat2Float2Float2(inNumerator, out);
+ verifyResultsFmodFloat2Float2Float2(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmodFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmodFloat2Float2Float2(inX, out);
- verifyResultsFmodFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testFmodFloat2Float2Float2(inNumerator, out);
+ verifyResultsFmodFloat2Float2Float2(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmodFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsFmodFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmodFloat2Float2Float2(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 2];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 2];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inNumerator = arrayInNumerator[i * 2 + j];
+ args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmod(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkFmodFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x733c7dc3ee2be722l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x733c7dc3ee2be723l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x604b98cb8ea54683l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x7ee64653af04f164l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmodFloat3Float3Float3(inX, out);
- verifyResultsFmodFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testFmodFloat3Float3Float3(inNumerator, out);
+ verifyResultsFmodFloat3Float3Float3(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmodFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmodFloat3Float3Float3(inX, out);
- verifyResultsFmodFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testFmodFloat3Float3Float3(inNumerator, out);
+ verifyResultsFmodFloat3Float3Float3(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmodFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsFmodFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmodFloat3Float3Float3(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmod(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkFmodFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc7a15be3f009e8c3l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc7a15be3f009e8c4l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3bda420531713284l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x484a879c81e0849dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testFmodFloat4Float4Float4(inX, out);
- verifyResultsFmodFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testFmodFloat4Float4Float4(inNumerator, out);
+ verifyResultsFmodFloat4Float4Float4(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmodFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testFmodFloat4Float4Float4(inX, out);
- verifyResultsFmodFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testFmodFloat4Float4Float4(inNumerator, out);
+ verifyResultsFmodFloat4Float4Float4(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFmodFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsFmodFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsFmodFloat4Float4Float4(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeFmod(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.rs
index c1c2bff..d8238aa 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInDenominator;
-float __attribute__((kernel)) testFmodFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return fmod(inX, inY);
+float __attribute__((kernel)) testFmodFloatFloatFloat(float inNumerator, unsigned int x) {
+ float inDenominator = rsGetElementAt_float(gAllocInDenominator, x);
+ return fmod(inNumerator, inDenominator);
}
-float2 __attribute__((kernel)) testFmodFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return fmod(inX, inY);
+float2 __attribute__((kernel)) testFmodFloat2Float2Float2(float2 inNumerator, unsigned int x) {
+ float2 inDenominator = rsGetElementAt_float2(gAllocInDenominator, x);
+ return fmod(inNumerator, inDenominator);
}
-float3 __attribute__((kernel)) testFmodFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return fmod(inX, inY);
+float3 __attribute__((kernel)) testFmodFloat3Float3Float3(float3 inNumerator, unsigned int x) {
+ float3 inDenominator = rsGetElementAt_float3(gAllocInDenominator, x);
+ return fmod(inNumerator, inDenominator);
}
-float4 __attribute__((kernel)) testFmodFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return fmod(inX, inY);
+float4 __attribute__((kernel)) testFmodFloat4Float4Float4(float4 inNumerator, unsigned int x) {
+ float4 inDenominator = rsGetElementAt_float4(gAllocInDenominator, x);
+ return fmod(inNumerator, inDenominator);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.java
index 7258d3c..4e030c5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.java
@@ -36,37 +36,37 @@
public class ArgumentsFloatIntFloat {
public float inV;
- public int outIptr;
+ public int outExponent;
public Target.Floaty out;
}
private void checkFrexpFloatIntFloat() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x57ae9fe07384e56dl, false);
try {
- Allocation outIptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
+ Allocation outExponent = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocOutIptr(outIptr);
+ script.set_gAllocOutExponent(outExponent);
script.forEach_testFrexpFloatIntFloat(inV, out);
- verifyResultsFrexpFloatIntFloat(inV, outIptr, out, false);
+ verifyResultsFrexpFloatIntFloat(inV, outExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFrexpFloatIntFloat: " + e.toString());
}
try {
- Allocation outIptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
+ Allocation outExponent = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocOutIptr(outIptr);
+ scriptRelaxed.set_gAllocOutExponent(outExponent);
scriptRelaxed.forEach_testFrexpFloatIntFloat(inV, out);
- verifyResultsFrexpFloatIntFloat(inV, outIptr, out, true);
+ verifyResultsFrexpFloatIntFloat(inV, outExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFrexpFloatIntFloat: " + e.toString());
}
}
- private void verifyResultsFrexpFloatIntFloat(Allocation inV, Allocation outIptr, Allocation out, boolean relaxed) {
+ private void verifyResultsFrexpFloatIntFloat(Allocation inV, Allocation outExponent, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 1];
inV.copyTo(arrayInV);
- int[] arrayOutIptr = new int[INPUTSIZE * 1];
- outIptr.copyTo(arrayOutIptr);
+ int[] arrayOutExponent = new int[INPUTSIZE * 1];
+ outExponent.copyTo(arrayOutExponent);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -79,7 +79,7 @@
CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
- if (args.outIptr != arrayOutIptr[i * 1 + j]) {
+ if (args.outExponent != arrayOutExponent[i * 1 + j]) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -91,12 +91,12 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outIptr: ");
- message.append(String.format("%d", args.outIptr));
+ message.append("Expected output outExponent: ");
+ message.append(String.format("%d", args.outExponent));
message.append("\n");
- message.append("Actual output outIptr: ");
- message.append(String.format("%d", arrayOutIptr[i * 1 + j]));
- if (args.outIptr != arrayOutIptr[i * 1 + j]) {
+ message.append("Actual output outExponent: ");
+ message.append(String.format("%d", arrayOutExponent[i * 1 + j]));
+ if (args.outExponent != arrayOutExponent[i * 1 + j]) {
message.append(" FAIL");
}
message.append("\n");
@@ -120,30 +120,30 @@
private void checkFrexpFloat2Int2Float2() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x544e0a688fe7701l, false);
try {
- Allocation outIptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
+ Allocation outExponent = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocOutIptr(outIptr);
+ script.set_gAllocOutExponent(outExponent);
script.forEach_testFrexpFloat2Int2Float2(inV, out);
- verifyResultsFrexpFloat2Int2Float2(inV, outIptr, out, false);
+ verifyResultsFrexpFloat2Int2Float2(inV, outExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFrexpFloat2Int2Float2: " + e.toString());
}
try {
- Allocation outIptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
+ Allocation outExponent = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocOutIptr(outIptr);
+ scriptRelaxed.set_gAllocOutExponent(outExponent);
scriptRelaxed.forEach_testFrexpFloat2Int2Float2(inV, out);
- verifyResultsFrexpFloat2Int2Float2(inV, outIptr, out, true);
+ verifyResultsFrexpFloat2Int2Float2(inV, outExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFrexpFloat2Int2Float2: " + e.toString());
}
}
- private void verifyResultsFrexpFloat2Int2Float2(Allocation inV, Allocation outIptr, Allocation out, boolean relaxed) {
+ private void verifyResultsFrexpFloat2Int2Float2(Allocation inV, Allocation outExponent, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 2];
inV.copyTo(arrayInV);
- int[] arrayOutIptr = new int[INPUTSIZE * 2];
- outIptr.copyTo(arrayOutIptr);
+ int[] arrayOutExponent = new int[INPUTSIZE * 2];
+ outExponent.copyTo(arrayOutExponent);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -156,7 +156,7 @@
CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
- if (args.outIptr != arrayOutIptr[i * 2 + j]) {
+ if (args.outExponent != arrayOutExponent[i * 2 + j]) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -168,12 +168,12 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outIptr: ");
- message.append(String.format("%d", args.outIptr));
+ message.append("Expected output outExponent: ");
+ message.append(String.format("%d", args.outExponent));
message.append("\n");
- message.append("Actual output outIptr: ");
- message.append(String.format("%d", arrayOutIptr[i * 2 + j]));
- if (args.outIptr != arrayOutIptr[i * 2 + j]) {
+ message.append("Actual output outExponent: ");
+ message.append(String.format("%d", arrayOutExponent[i * 2 + j]));
+ if (args.outExponent != arrayOutExponent[i * 2 + j]) {
message.append(" FAIL");
}
message.append("\n");
@@ -197,30 +197,30 @@
private void checkFrexpFloat3Int3Float3() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x2afb1f097eb0e3bal, false);
try {
- Allocation outIptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
+ Allocation outExponent = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocOutIptr(outIptr);
+ script.set_gAllocOutExponent(outExponent);
script.forEach_testFrexpFloat3Int3Float3(inV, out);
- verifyResultsFrexpFloat3Int3Float3(inV, outIptr, out, false);
+ verifyResultsFrexpFloat3Int3Float3(inV, outExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFrexpFloat3Int3Float3: " + e.toString());
}
try {
- Allocation outIptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
+ Allocation outExponent = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocOutIptr(outIptr);
+ scriptRelaxed.set_gAllocOutExponent(outExponent);
scriptRelaxed.forEach_testFrexpFloat3Int3Float3(inV, out);
- verifyResultsFrexpFloat3Int3Float3(inV, outIptr, out, true);
+ verifyResultsFrexpFloat3Int3Float3(inV, outExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFrexpFloat3Int3Float3: " + e.toString());
}
}
- private void verifyResultsFrexpFloat3Int3Float3(Allocation inV, Allocation outIptr, Allocation out, boolean relaxed) {
+ private void verifyResultsFrexpFloat3Int3Float3(Allocation inV, Allocation outExponent, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 4];
inV.copyTo(arrayInV);
- int[] arrayOutIptr = new int[INPUTSIZE * 4];
- outIptr.copyTo(arrayOutIptr);
+ int[] arrayOutExponent = new int[INPUTSIZE * 4];
+ outExponent.copyTo(arrayOutExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -233,7 +233,7 @@
CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
- if (args.outIptr != arrayOutIptr[i * 4 + j]) {
+ if (args.outExponent != arrayOutExponent[i * 4 + j]) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -245,12 +245,12 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outIptr: ");
- message.append(String.format("%d", args.outIptr));
+ message.append("Expected output outExponent: ");
+ message.append(String.format("%d", args.outExponent));
message.append("\n");
- message.append("Actual output outIptr: ");
- message.append(String.format("%d", arrayOutIptr[i * 4 + j]));
- if (args.outIptr != arrayOutIptr[i * 4 + j]) {
+ message.append("Actual output outExponent: ");
+ message.append(String.format("%d", arrayOutExponent[i * 4 + j]));
+ if (args.outExponent != arrayOutExponent[i * 4 + j]) {
message.append(" FAIL");
}
message.append("\n");
@@ -274,30 +274,30 @@
private void checkFrexpFloat4Int4Float4() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x50b15d6c74635073l, false);
try {
- Allocation outIptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
+ Allocation outExponent = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocOutIptr(outIptr);
+ script.set_gAllocOutExponent(outExponent);
script.forEach_testFrexpFloat4Int4Float4(inV, out);
- verifyResultsFrexpFloat4Int4Float4(inV, outIptr, out, false);
+ verifyResultsFrexpFloat4Int4Float4(inV, outExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFrexpFloat4Int4Float4: " + e.toString());
}
try {
- Allocation outIptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
+ Allocation outExponent = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocOutIptr(outIptr);
+ scriptRelaxed.set_gAllocOutExponent(outExponent);
scriptRelaxed.forEach_testFrexpFloat4Int4Float4(inV, out);
- verifyResultsFrexpFloat4Int4Float4(inV, outIptr, out, true);
+ verifyResultsFrexpFloat4Int4Float4(inV, outExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testFrexpFloat4Int4Float4: " + e.toString());
}
}
- private void verifyResultsFrexpFloat4Int4Float4(Allocation inV, Allocation outIptr, Allocation out, boolean relaxed) {
+ private void verifyResultsFrexpFloat4Int4Float4(Allocation inV, Allocation outExponent, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 4];
inV.copyTo(arrayInV);
- int[] arrayOutIptr = new int[INPUTSIZE * 4];
- outIptr.copyTo(arrayOutIptr);
+ int[] arrayOutExponent = new int[INPUTSIZE * 4];
+ outExponent.copyTo(arrayOutExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -310,7 +310,7 @@
CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
- if (args.outIptr != arrayOutIptr[i * 4 + j]) {
+ if (args.outExponent != arrayOutExponent[i * 4 + j]) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -322,12 +322,12 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outIptr: ");
- message.append(String.format("%d", args.outIptr));
+ message.append("Expected output outExponent: ");
+ message.append(String.format("%d", args.outExponent));
message.append("\n");
- message.append("Actual output outIptr: ");
- message.append(String.format("%d", arrayOutIptr[i * 4 + j]));
- if (args.outIptr != arrayOutIptr[i * 4 + j]) {
+ message.append("Actual output outExponent: ");
+ message.append(String.format("%d", arrayOutExponent[i * 4 + j]));
+ if (args.outExponent != arrayOutExponent[i * 4 + j]) {
message.append(" FAIL");
}
message.append("\n");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.rs
index 70c6c13..7193fe6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.rs
@@ -19,32 +19,32 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocOutIptr;
+rs_allocation gAllocOutExponent;
float __attribute__((kernel)) testFrexpFloatIntFloat(float inV, unsigned int x) {
- int outIptr = 0;
- float out = frexp(inV, &outIptr);
- rsSetElementAt_int(gAllocOutIptr, outIptr, x);
+ int outExponent = 0;
+ float out = frexp(inV, &outExponent);
+ rsSetElementAt_int(gAllocOutExponent, outExponent, x);
return out;
}
float2 __attribute__((kernel)) testFrexpFloat2Int2Float2(float2 inV, unsigned int x) {
- int2 outIptr = 0;
- float2 out = frexp(inV, &outIptr);
- rsSetElementAt_int2(gAllocOutIptr, outIptr, x);
+ int2 outExponent = 0;
+ float2 out = frexp(inV, &outExponent);
+ rsSetElementAt_int2(gAllocOutExponent, outExponent, x);
return out;
}
float3 __attribute__((kernel)) testFrexpFloat3Int3Float3(float3 inV, unsigned int x) {
- int3 outIptr = 0;
- float3 out = frexp(inV, &outIptr);
- rsSetElementAt_int3(gAllocOutIptr, outIptr, x);
+ int3 outExponent = 0;
+ float3 out = frexp(inV, &outExponent);
+ rsSetElementAt_int3(gAllocOutExponent, outExponent, x);
return out;
}
float4 __attribute__((kernel)) testFrexpFloat4Int4Float4(float4 inV, unsigned int x) {
- int4 outIptr = 0;
- float4 out = frexp(inV, &outIptr);
- rsSetElementAt_int4(gAllocOutIptr, outIptr, x);
+ int4 outExponent = 0;
+ float4 out = frexp(inV, &outExponent);
+ rsSetElementAt_int4(gAllocOutExponent, outExponent, x);
return out;
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.java b/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.java
index 8aecdcd..f7e41b3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inA;
+ public float inB;
public Target.Floaty out;
}
private void checkHypotFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7deb65e7738c74dbl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7deb65e7738c74dcl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7deb65e7738c74c4l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7deb65e7738c74c5l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testHypotFloatFloatFloat(inX, out);
- verifyResultsHypotFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testHypotFloatFloatFloat(inA, out);
+ verifyResultsHypotFloatFloatFloat(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testHypotFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testHypotFloatFloatFloat(inX, out);
- verifyResultsHypotFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testHypotFloatFloatFloat(inA, out);
+ verifyResultsHypotFloatFloatFloat(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testHypotFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsHypotFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsHypotFloatFloatFloat(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeHypot(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkHypotFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x14f3c91a62f71c5dl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x14f3c91a62f71c5el, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x14f3c91a62f71c46l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x14f3c91a62f71c47l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testHypotFloat2Float2Float2(inX, out);
- verifyResultsHypotFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testHypotFloat2Float2Float2(inA, out);
+ verifyResultsHypotFloat2Float2Float2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testHypotFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testHypotFloat2Float2Float2(inX, out);
- verifyResultsHypotFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testHypotFloat2Float2Float2(inA, out);
+ verifyResultsHypotFloat2Float2Float2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testHypotFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsHypotFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsHypotFloat2Float2Float2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeHypot(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkHypotFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6958a73a64d51dfel, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6958a73a64d51dffl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6958a73a64d51de7l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6958a73a64d51de8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testHypotFloat3Float3Float3(inX, out);
- verifyResultsHypotFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testHypotFloat3Float3Float3(inA, out);
+ verifyResultsHypotFloat3Float3Float3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testHypotFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testHypotFloat3Float3Float3(inX, out);
- verifyResultsHypotFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testHypotFloat3Float3Float3(inA, out);
+ verifyResultsHypotFloat3Float3Float3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testHypotFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsHypotFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsHypotFloat3Float3Float3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeHypot(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkHypotFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbdbd855a66b31f9fl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbdbd855a66b31fa0l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbdbd855a66b31f88l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbdbd855a66b31f89l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testHypotFloat4Float4Float4(inX, out);
- verifyResultsHypotFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testHypotFloat4Float4Float4(inA, out);
+ verifyResultsHypotFloat4Float4Float4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testHypotFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testHypotFloat4Float4Float4(inX, out);
- verifyResultsHypotFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testHypotFloat4Float4Float4(inA, out);
+ verifyResultsHypotFloat4Float4Float4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testHypotFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsHypotFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsHypotFloat4Float4Float4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeHypot(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.rs
index 9425121..655344c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInB;
-float __attribute__((kernel)) testHypotFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return hypot(inX, inY);
+float __attribute__((kernel)) testHypotFloatFloatFloat(float inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return hypot(inA, inB);
}
-float2 __attribute__((kernel)) testHypotFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return hypot(inX, inY);
+float2 __attribute__((kernel)) testHypotFloat2Float2Float2(float2 inA, unsigned int x) {
+ float2 inB = rsGetElementAt_float2(gAllocInB, x);
+ return hypot(inA, inB);
}
-float3 __attribute__((kernel)) testHypotFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return hypot(inX, inY);
+float3 __attribute__((kernel)) testHypotFloat3Float3Float3(float3 inA, unsigned int x) {
+ float3 inB = rsGetElementAt_float3(gAllocInB, x);
+ return hypot(inA, inB);
}
-float4 __attribute__((kernel)) testHypotFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return hypot(inX, inY);
+float4 __attribute__((kernel)) testHypotFloat4Float4Float4(float4 inA, unsigned int x) {
+ float4 inB = rsGetElementAt_float4(gAllocInB, x);
+ return hypot(inA, inB);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.java b/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.java
index 9bac16f..6fc9cc8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatInt {
- public float in;
+ public float inV;
public int out;
}
private void checkIlogbFloatInt() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xc0c48da27f084aefl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x6103ca4b5664967bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
- script.forEach_testIlogbFloatInt(in, out);
- verifyResultsIlogbFloatInt(in, out, false);
+ script.forEach_testIlogbFloatInt(inV, out);
+ verifyResultsIlogbFloatInt(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testIlogbFloatInt: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testIlogbFloatInt(in, out);
- verifyResultsIlogbFloatInt(in, out, true);
+ scriptRelaxed.forEach_testIlogbFloatInt(inV, out);
+ verifyResultsIlogbFloatInt(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testIlogbFloatInt: " + e.toString());
}
}
- private void verifyResultsIlogbFloatInt(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsIlogbFloatInt(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
int[] arrayOut = new int[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatInt args = new ArgumentsFloatInt();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Extract the outputs.
args.out = arrayOut[i * 1 + j];
// Ask the CoreMathVerifier to validate.
@@ -74,9 +74,9 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Output out: ");
message.append(String.format("%d", args.out));
@@ -90,33 +90,33 @@
}
private void checkIlogbFloat2Int2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4ba2fa846382ada1l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xb460143cb6f32a61l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
- script.forEach_testIlogbFloat2Int2(in, out);
- verifyResultsIlogbFloat2Int2(in, out, false);
+ script.forEach_testIlogbFloat2Int2(inV, out);
+ verifyResultsIlogbFloat2Int2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testIlogbFloat2Int2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testIlogbFloat2Int2(in, out);
- verifyResultsIlogbFloat2Int2(in, out, true);
+ scriptRelaxed.forEach_testIlogbFloat2Int2(inV, out);
+ verifyResultsIlogbFloat2Int2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testIlogbFloat2Int2: " + e.toString());
}
}
- private void verifyResultsIlogbFloat2Int2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsIlogbFloat2Int2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
int[] arrayOut = new int[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatInt args = new ArgumentsFloatInt();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Extract the outputs.
args.out = arrayOut[i * 2 + j];
// Ask the CoreMathVerifier to validate.
@@ -124,9 +124,9 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Output out: ");
message.append(String.format("%d", args.out));
@@ -140,33 +140,33 @@
}
private void checkIlogbFloat3Int3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x4ba2fa85dc4b0d43l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xb460147c009b3a97l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
- script.forEach_testIlogbFloat3Int3(in, out);
- verifyResultsIlogbFloat3Int3(in, out, false);
+ script.forEach_testIlogbFloat3Int3(inV, out);
+ verifyResultsIlogbFloat3Int3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testIlogbFloat3Int3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testIlogbFloat3Int3(in, out);
- verifyResultsIlogbFloat3Int3(in, out, true);
+ scriptRelaxed.forEach_testIlogbFloat3Int3(inV, out);
+ verifyResultsIlogbFloat3Int3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testIlogbFloat3Int3: " + e.toString());
}
}
- private void verifyResultsIlogbFloat3Int3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsIlogbFloat3Int3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatInt args = new ArgumentsFloatInt();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Extract the outputs.
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
@@ -174,9 +174,9 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Output out: ");
message.append(String.format("%d", args.out));
@@ -190,33 +190,33 @@
}
private void checkIlogbFloat4Int4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4ba2fa8755136ce5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xb46014bb4a434acdl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
- script.forEach_testIlogbFloat4Int4(in, out);
- verifyResultsIlogbFloat4Int4(in, out, false);
+ script.forEach_testIlogbFloat4Int4(inV, out);
+ verifyResultsIlogbFloat4Int4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testIlogbFloat4Int4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testIlogbFloat4Int4(in, out);
- verifyResultsIlogbFloat4Int4(in, out, true);
+ scriptRelaxed.forEach_testIlogbFloat4Int4(inV, out);
+ verifyResultsIlogbFloat4Int4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testIlogbFloat4Int4: " + e.toString());
}
}
- private void verifyResultsIlogbFloat4Int4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsIlogbFloat4Int4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatInt args = new ArgumentsFloatInt();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Extract the outputs.
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
@@ -224,9 +224,9 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Output out: ");
message.append(String.format("%d", args.out));
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.rs
index d9d62ed..fbc070d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-int __attribute__((kernel)) testIlogbFloatInt(float in) {
- return ilogb(in);
+int __attribute__((kernel)) testIlogbFloatInt(float inV) {
+ return ilogb(inV);
}
-int2 __attribute__((kernel)) testIlogbFloat2Int2(float2 in) {
- return ilogb(in);
+int2 __attribute__((kernel)) testIlogbFloat2Int2(float2 inV) {
+ return ilogb(inV);
}
-int3 __attribute__((kernel)) testIlogbFloat3Int3(float3 in) {
- return ilogb(in);
+int3 __attribute__((kernel)) testIlogbFloat3Int3(float3 inV) {
+ return ilogb(inV);
}
-int4 __attribute__((kernel)) testIlogbFloat4Int4(float4 in) {
- return ilogb(in);
+int4 __attribute__((kernel)) testIlogbFloat4Int4(float4 inV) {
+ return ilogb(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.java
index 3f3aee9..63c8059 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatIntFloat {
- public float inX;
- public int inY;
+ public float inMantissa;
+ public int inExponent;
public Target.Floaty out;
}
private void checkLdexpFloatIntFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xdeada0999238fe8bl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xdeada0999238fe8cl, false);
+ Allocation inMantissa = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xdffd225490f0e26fl, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xdffd207c2e4133c4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testLdexpFloatIntFloat(inX, out);
- verifyResultsLdexpFloatIntFloat(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testLdexpFloatIntFloat(inMantissa, out);
+ verifyResultsLdexpFloatIntFloat(inMantissa, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloatIntFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testLdexpFloatIntFloat(inX, out);
- verifyResultsLdexpFloatIntFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testLdexpFloatIntFloat(inMantissa, out);
+ verifyResultsLdexpFloatIntFloat(inMantissa, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloatIntFloat: " + e.toString());
}
}
- private void verifyResultsLdexpFloatIntFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsLdexpFloatIntFloat(Allocation inMantissa, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInMantissa = new float[INPUTSIZE * 1];
+ inMantissa.copyTo(arrayInMantissa);
+ int[] arrayInExponent = new int[INPUTSIZE * 1];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inMantissa = arrayInMantissa[i];
+ args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLdexp(args, target);
@@ -84,12 +84,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMantissa: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMantissa, Float.floatToRawIntBits(args.inMantissa), args.inMantissa));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -109,39 +109,39 @@
}
private void checkLdexpFloat2Int2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x5492762140d0ca17l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x5492762140d0ca18l, false);
+ Allocation inMantissa = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x7d0b1a44fe92893l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x7d0afcbed3979e8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testLdexpFloat2Int2Float2(inX, out);
- verifyResultsLdexpFloat2Int2Float2(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testLdexpFloat2Int2Float2(inMantissa, out);
+ verifyResultsLdexpFloat2Int2Float2(inMantissa, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat2Int2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testLdexpFloat2Int2Float2(inX, out);
- verifyResultsLdexpFloat2Int2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testLdexpFloat2Int2Float2(inMantissa, out);
+ verifyResultsLdexpFloat2Int2Float2(inMantissa, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat2Int2Float2: " + e.toString());
}
}
- private void verifyResultsLdexpFloat2Int2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsLdexpFloat2Int2Float2(Allocation inMantissa, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInMantissa = new float[INPUTSIZE * 2];
+ inMantissa.copyTo(arrayInMantissa);
+ int[] arrayInExponent = new int[INPUTSIZE * 2];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inMantissa = arrayInMantissa[i * 2 + j];
+ args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLdexp(args, target);
@@ -152,12 +152,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMantissa: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMantissa, Float.floatToRawIntBits(args.inMantissa), args.inMantissa));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -177,39 +177,39 @@
}
private void checkLdexpFloat3Int3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x7a48b484368336d0l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x7a48b484368336d1l, false);
+ Allocation inMantissa = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xa8e041253fa3335el, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0xa8e03f4cdcf384b3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testLdexpFloat3Int3Float3(inX, out);
- verifyResultsLdexpFloat3Int3Float3(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testLdexpFloat3Int3Float3(inMantissa, out);
+ verifyResultsLdexpFloat3Int3Float3(inMantissa, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat3Int3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testLdexpFloat3Int3Float3(inX, out);
- verifyResultsLdexpFloat3Int3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testLdexpFloat3Int3Float3(inMantissa, out);
+ verifyResultsLdexpFloat3Int3Float3(inMantissa, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat3Int3Float3: " + e.toString());
}
}
- private void verifyResultsLdexpFloat3Int3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsLdexpFloat3Int3Float3(Allocation inMantissa, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInMantissa = new float[INPUTSIZE * 4];
+ inMantissa.copyTo(arrayInMantissa);
+ int[] arrayInExponent = new int[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inMantissa = arrayInMantissa[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLdexp(args, target);
@@ -220,12 +220,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMantissa: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMantissa, Float.floatToRawIntBits(args.inMantissa), args.inMantissa));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -245,39 +245,39 @@
}
private void checkLdexpFloat4Int4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x9ffef2e72c35a389l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x9ffef2e72c35a38al, false);
+ Allocation inMantissa = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x49efd0a62f5d3e29l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x49efcecdccad8f7el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testLdexpFloat4Int4Float4(inX, out);
- verifyResultsLdexpFloat4Int4Float4(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testLdexpFloat4Int4Float4(inMantissa, out);
+ verifyResultsLdexpFloat4Int4Float4(inMantissa, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat4Int4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testLdexpFloat4Int4Float4(inX, out);
- verifyResultsLdexpFloat4Int4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testLdexpFloat4Int4Float4(inMantissa, out);
+ verifyResultsLdexpFloat4Int4Float4(inMantissa, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat4Int4Float4: " + e.toString());
}
}
- private void verifyResultsLdexpFloat4Int4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsLdexpFloat4Int4Float4(Allocation inMantissa, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInMantissa = new float[INPUTSIZE * 4];
+ inMantissa.copyTo(arrayInMantissa);
+ int[] arrayInExponent = new int[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inMantissa = arrayInMantissa[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLdexp(args, target);
@@ -288,12 +288,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMantissa: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMantissa, Float.floatToRawIntBits(args.inMantissa), args.inMantissa));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -313,39 +313,39 @@
}
private void checkLdexpFloat2IntFloat2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xa2b6e0c39777b8c1l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xa2b6e0c39777b8c2l, false);
+ Allocation inMantissa = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x6a72b89838bd38d1l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x6a72b6bfd60d8a26l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testLdexpFloat2IntFloat2(inX, out);
- verifyResultsLdexpFloat2IntFloat2(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testLdexpFloat2IntFloat2(inMantissa, out);
+ verifyResultsLdexpFloat2IntFloat2(inMantissa, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat2IntFloat2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testLdexpFloat2IntFloat2(inX, out);
- verifyResultsLdexpFloat2IntFloat2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testLdexpFloat2IntFloat2(inMantissa, out);
+ verifyResultsLdexpFloat2IntFloat2(inMantissa, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat2IntFloat2: " + e.toString());
}
}
- private void verifyResultsLdexpFloat2IntFloat2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsLdexpFloat2IntFloat2(Allocation inMantissa, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInMantissa = new float[INPUTSIZE * 2];
+ inMantissa.copyTo(arrayInMantissa);
+ int[] arrayInExponent = new int[INPUTSIZE * 1];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i];
+ args.inMantissa = arrayInMantissa[i * 2 + j];
+ args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLdexp(args, target);
@@ -356,12 +356,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMantissa: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMantissa, Float.floatToRawIntBits(args.inMantissa), args.inMantissa));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -381,39 +381,39 @@
}
private void checkLdexpFloat3IntFloat3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xcd4401424a114a65l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xcd4401424a114a66l, false);
+ Allocation inMantissa = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x49ba40205150f83dl, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x49ba3e47eea14992l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testLdexpFloat3IntFloat3(inX, out);
- verifyResultsLdexpFloat3IntFloat3(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testLdexpFloat3IntFloat3(inMantissa, out);
+ verifyResultsLdexpFloat3IntFloat3(inMantissa, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat3IntFloat3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testLdexpFloat3IntFloat3(inX, out);
- verifyResultsLdexpFloat3IntFloat3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testLdexpFloat3IntFloat3(inMantissa, out);
+ verifyResultsLdexpFloat3IntFloat3(inMantissa, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat3IntFloat3: " + e.toString());
}
}
- private void verifyResultsLdexpFloat3IntFloat3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsLdexpFloat3IntFloat3(Allocation inMantissa, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInMantissa = new float[INPUTSIZE * 4];
+ inMantissa.copyTo(arrayInMantissa);
+ int[] arrayInExponent = new int[INPUTSIZE * 1];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i];
+ args.inMantissa = arrayInMantissa[i * 4 + j];
+ args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLdexp(args, target);
@@ -424,12 +424,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMantissa: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMantissa, Float.floatToRawIntBits(args.inMantissa), args.inMantissa));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -449,39 +449,39 @@
}
private void checkLdexpFloat4IntFloat4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf7d121c0fcaadc09l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xf7d121c0fcaadc0al, false);
+ Allocation inMantissa = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x2901c7a869e4b7a9l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x2901c5d0073508fel, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testLdexpFloat4IntFloat4(inX, out);
- verifyResultsLdexpFloat4IntFloat4(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testLdexpFloat4IntFloat4(inMantissa, out);
+ verifyResultsLdexpFloat4IntFloat4(inMantissa, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat4IntFloat4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testLdexpFloat4IntFloat4(inX, out);
- verifyResultsLdexpFloat4IntFloat4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testLdexpFloat4IntFloat4(inMantissa, out);
+ verifyResultsLdexpFloat4IntFloat4(inMantissa, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLdexpFloat4IntFloat4: " + e.toString());
}
}
- private void verifyResultsLdexpFloat4IntFloat4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsLdexpFloat4IntFloat4(Allocation inMantissa, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInMantissa = new float[INPUTSIZE * 4];
+ inMantissa.copyTo(arrayInMantissa);
+ int[] arrayInExponent = new int[INPUTSIZE * 1];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i];
+ args.inMantissa = arrayInMantissa[i * 4 + j];
+ args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLdexp(args, target);
@@ -492,12 +492,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inMantissa: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inMantissa, Float.floatToRawIntBits(args.inMantissa), args.inMantissa));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.rs
index e8b05f2..b08dee7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.rs
@@ -19,39 +19,39 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInExponent;
-float __attribute__((kernel)) testLdexpFloatIntFloat(float inX, unsigned int x) {
- int inY = rsGetElementAt_int(gAllocInY, x);
- return ldexp(inX, inY);
+float __attribute__((kernel)) testLdexpFloatIntFloat(float inMantissa, unsigned int x) {
+ int inExponent = rsGetElementAt_int(gAllocInExponent, x);
+ return ldexp(inMantissa, inExponent);
}
-float2 __attribute__((kernel)) testLdexpFloat2Int2Float2(float2 inX, unsigned int x) {
- int2 inY = rsGetElementAt_int2(gAllocInY, x);
- return ldexp(inX, inY);
+float2 __attribute__((kernel)) testLdexpFloat2Int2Float2(float2 inMantissa, unsigned int x) {
+ int2 inExponent = rsGetElementAt_int2(gAllocInExponent, x);
+ return ldexp(inMantissa, inExponent);
}
-float3 __attribute__((kernel)) testLdexpFloat3Int3Float3(float3 inX, unsigned int x) {
- int3 inY = rsGetElementAt_int3(gAllocInY, x);
- return ldexp(inX, inY);
+float3 __attribute__((kernel)) testLdexpFloat3Int3Float3(float3 inMantissa, unsigned int x) {
+ int3 inExponent = rsGetElementAt_int3(gAllocInExponent, x);
+ return ldexp(inMantissa, inExponent);
}
-float4 __attribute__((kernel)) testLdexpFloat4Int4Float4(float4 inX, unsigned int x) {
- int4 inY = rsGetElementAt_int4(gAllocInY, x);
- return ldexp(inX, inY);
+float4 __attribute__((kernel)) testLdexpFloat4Int4Float4(float4 inMantissa, unsigned int x) {
+ int4 inExponent = rsGetElementAt_int4(gAllocInExponent, x);
+ return ldexp(inMantissa, inExponent);
}
-float2 __attribute__((kernel)) testLdexpFloat2IntFloat2(float2 inX, unsigned int x) {
- int inY = rsGetElementAt_int(gAllocInY, x);
- return ldexp(inX, inY);
+float2 __attribute__((kernel)) testLdexpFloat2IntFloat2(float2 inMantissa, unsigned int x) {
+ int inExponent = rsGetElementAt_int(gAllocInExponent, x);
+ return ldexp(inMantissa, inExponent);
}
-float3 __attribute__((kernel)) testLdexpFloat3IntFloat3(float3 inX, unsigned int x) {
- int inY = rsGetElementAt_int(gAllocInY, x);
- return ldexp(inX, inY);
+float3 __attribute__((kernel)) testLdexpFloat3IntFloat3(float3 inMantissa, unsigned int x) {
+ int inExponent = rsGetElementAt_int(gAllocInExponent, x);
+ return ldexp(inMantissa, inExponent);
}
-float4 __attribute__((kernel)) testLdexpFloat4IntFloat4(float4 inX, unsigned int x) {
- int inY = rsGetElementAt_int(gAllocInY, x);
- return ldexp(inX, inY);
+float4 __attribute__((kernel)) testLdexpFloat4IntFloat4(float4 inMantissa, unsigned int x) {
+ int inExponent = rsGetElementAt_int(gAllocInExponent, x);
+ return ldexp(inMantissa, inExponent);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.java
index 113df19..faa2934 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkLgammaFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe748c67429cab138l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xd9395583050bc4bel, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testLgammaFloatFloat(in, out);
- verifyResultsLgammaFloatFloat(in, out, false);
+ script.forEach_testLgammaFloatFloat(inV, out);
+ verifyResultsLgammaFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testLgammaFloatFloat(in, out);
- verifyResultsLgammaFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testLgammaFloatFloat(inV, out);
+ verifyResultsLgammaFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloatFloat: " + e.toString());
}
}
- private void verifyResultsLgammaFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsLgammaFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLgamma(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkLgammaFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x7ca07efd8a327894l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xeef55496367a4132l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testLgammaFloat2Float2(in, out);
- verifyResultsLgammaFloat2Float2(in, out, false);
+ script.forEach_testLgammaFloat2Float2(inV, out);
+ verifyResultsLgammaFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testLgammaFloat2Float2(in, out);
- verifyResultsLgammaFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testLgammaFloat2Float2(inV, out);
+ verifyResultsLgammaFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat2Float2: " + e.toString());
}
}
- private void verifyResultsLgammaFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsLgammaFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLgamma(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkLgammaFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x7ca0899ee9390e2el, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xeef71db12c956210l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testLgammaFloat3Float3(in, out);
- verifyResultsLgammaFloat3Float3(in, out, false);
+ script.forEach_testLgammaFloat3Float3(inV, out);
+ verifyResultsLgammaFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testLgammaFloat3Float3(in, out);
- verifyResultsLgammaFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testLgammaFloat3Float3(inV, out);
+ verifyResultsLgammaFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat3Float3: " + e.toString());
}
}
- private void verifyResultsLgammaFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLgammaFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLgamma(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkLgammaFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x7ca09440483fa3c8l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xeef8e6cc22b082eel, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testLgammaFloat4Float4(in, out);
- verifyResultsLgammaFloat4Float4(in, out, false);
+ script.forEach_testLgammaFloat4Float4(inV, out);
+ verifyResultsLgammaFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testLgammaFloat4Float4(in, out);
- verifyResultsLgammaFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testLgammaFloat4Float4(inV, out);
+ verifyResultsLgammaFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat4Float4: " + e.toString());
}
}
- private void verifyResultsLgammaFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLgammaFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLgamma(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -276,47 +276,47 @@
}
public class ArgumentsFloatIntFloat {
- public float inX;
- public int outY;
+ public float inV;
+ public int outSignOfGamma;
public float out;
}
private void checkLgammaFloatIntFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2a62d992979c4bb9l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2a62d992979c4bb7l, false);
try {
- Allocation outY = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
+ Allocation outSignOfGamma = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocOutY(outY);
- script.forEach_testLgammaFloatIntFloat(inX, out);
- verifyResultsLgammaFloatIntFloat(inX, outY, out, false);
+ script.set_gAllocOutSignOfGamma(outSignOfGamma);
+ script.forEach_testLgammaFloatIntFloat(inV, out);
+ verifyResultsLgammaFloatIntFloat(inV, outSignOfGamma, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloatIntFloat: " + e.toString());
}
try {
- Allocation outY = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
+ Allocation outSignOfGamma = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocOutY(outY);
- scriptRelaxed.forEach_testLgammaFloatIntFloat(inX, out);
- verifyResultsLgammaFloatIntFloat(inX, outY, out, true);
+ scriptRelaxed.set_gAllocOutSignOfGamma(outSignOfGamma);
+ scriptRelaxed.forEach_testLgammaFloatIntFloat(inV, out);
+ verifyResultsLgammaFloatIntFloat(inV, outSignOfGamma, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloatIntFloat: " + e.toString());
}
}
- private void verifyResultsLgammaFloatIntFloat(Allocation inX, Allocation outY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- int[] arrayOutY = new int[INPUTSIZE * 1];
- outY.copyTo(arrayOutY);
+ private void verifyResultsLgammaFloatIntFloat(Allocation inV, Allocation outSignOfGamma, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
+ int[] arrayOutSignOfGamma = new int[INPUTSIZE * 1];
+ outSignOfGamma.copyTo(arrayOutSignOfGamma);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i];
+ args.inV = arrayInV[i];
// Extract the outputs.
- args.outY = arrayOutY[i * 1 + j];
+ args.outSignOfGamma = arrayOutSignOfGamma[i * 1 + j];
args.out = arrayOut[i * 1 + j];
// Ask the CoreMathVerifier to validate.
Target target = new Target(relaxed);
@@ -324,12 +324,12 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Output outY: ");
- message.append(String.format("%d", args.outY));
+ message.append("Output outSignOfGamma: ");
+ message.append(String.format("%d", args.outSignOfGamma));
message.append("\n");
message.append("Output out: ");
message.append(Float.toString(args.out));
@@ -343,41 +343,41 @@
}
private void checkLgammaFloat2Int2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x409fb9a5984bcf81l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x409fb9a5984bcf7fl, false);
try {
- Allocation outY = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
+ Allocation outSignOfGamma = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocOutY(outY);
- script.forEach_testLgammaFloat2Int2Float2(inX, out);
- verifyResultsLgammaFloat2Int2Float2(inX, outY, out, false);
+ script.set_gAllocOutSignOfGamma(outSignOfGamma);
+ script.forEach_testLgammaFloat2Int2Float2(inV, out);
+ verifyResultsLgammaFloat2Int2Float2(inV, outSignOfGamma, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat2Int2Float2: " + e.toString());
}
try {
- Allocation outY = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
+ Allocation outSignOfGamma = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocOutY(outY);
- scriptRelaxed.forEach_testLgammaFloat2Int2Float2(inX, out);
- verifyResultsLgammaFloat2Int2Float2(inX, outY, out, true);
+ scriptRelaxed.set_gAllocOutSignOfGamma(outSignOfGamma);
+ scriptRelaxed.forEach_testLgammaFloat2Int2Float2(inV, out);
+ verifyResultsLgammaFloat2Int2Float2(inV, outSignOfGamma, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat2Int2Float2: " + e.toString());
}
}
- private void verifyResultsLgammaFloat2Int2Float2(Allocation inX, Allocation outY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- int[] arrayOutY = new int[INPUTSIZE * 2];
- outY.copyTo(arrayOutY);
+ private void verifyResultsLgammaFloat2Int2Float2(Allocation inV, Allocation outSignOfGamma, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
+ int[] arrayOutSignOfGamma = new int[INPUTSIZE * 2];
+ outSignOfGamma.copyTo(arrayOutSignOfGamma);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Extract the outputs.
- args.outY = arrayOutY[i * 2 + j];
+ args.outSignOfGamma = arrayOutSignOfGamma[i * 2 + j];
args.out = arrayOut[i * 2 + j];
// Ask the CoreMathVerifier to validate.
Target target = new Target(relaxed);
@@ -385,12 +385,12 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Output outY: ");
- message.append(String.format("%d", args.outY));
+ message.append("Output outSignOfGamma: ");
+ message.append(String.format("%d", args.outSignOfGamma));
message.append("\n");
message.append("Output out: ");
message.append(Float.toString(args.out));
@@ -404,41 +404,41 @@
}
private void checkLgammaFloat3Int3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6655f8088dfe3c3al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6655f8088dfe3c38l, false);
try {
- Allocation outY = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
+ Allocation outSignOfGamma = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocOutY(outY);
- script.forEach_testLgammaFloat3Int3Float3(inX, out);
- verifyResultsLgammaFloat3Int3Float3(inX, outY, out, false);
+ script.set_gAllocOutSignOfGamma(outSignOfGamma);
+ script.forEach_testLgammaFloat3Int3Float3(inV, out);
+ verifyResultsLgammaFloat3Int3Float3(inV, outSignOfGamma, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat3Int3Float3: " + e.toString());
}
try {
- Allocation outY = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
+ Allocation outSignOfGamma = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocOutY(outY);
- scriptRelaxed.forEach_testLgammaFloat3Int3Float3(inX, out);
- verifyResultsLgammaFloat3Int3Float3(inX, outY, out, true);
+ scriptRelaxed.set_gAllocOutSignOfGamma(outSignOfGamma);
+ scriptRelaxed.forEach_testLgammaFloat3Int3Float3(inV, out);
+ verifyResultsLgammaFloat3Int3Float3(inV, outSignOfGamma, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat3Int3Float3: " + e.toString());
}
}
- private void verifyResultsLgammaFloat3Int3Float3(Allocation inX, Allocation outY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- int[] arrayOutY = new int[INPUTSIZE * 4];
- outY.copyTo(arrayOutY);
+ private void verifyResultsLgammaFloat3Int3Float3(Allocation inV, Allocation outSignOfGamma, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ int[] arrayOutSignOfGamma = new int[INPUTSIZE * 4];
+ outSignOfGamma.copyTo(arrayOutSignOfGamma);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Extract the outputs.
- args.outY = arrayOutY[i * 4 + j];
+ args.outSignOfGamma = arrayOutSignOfGamma[i * 4 + j];
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
Target target = new Target(relaxed);
@@ -446,12 +446,12 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Output outY: ");
- message.append(String.format("%d", args.outY));
+ message.append("Output outSignOfGamma: ");
+ message.append(String.format("%d", args.outSignOfGamma));
message.append("\n");
message.append("Output out: ");
message.append(Float.toString(args.out));
@@ -465,41 +465,41 @@
}
private void checkLgammaFloat4Int4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8c0c366b83b0a8f3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8c0c366b83b0a8f1l, false);
try {
- Allocation outY = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
+ Allocation outSignOfGamma = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocOutY(outY);
- script.forEach_testLgammaFloat4Int4Float4(inX, out);
- verifyResultsLgammaFloat4Int4Float4(inX, outY, out, false);
+ script.set_gAllocOutSignOfGamma(outSignOfGamma);
+ script.forEach_testLgammaFloat4Int4Float4(inV, out);
+ verifyResultsLgammaFloat4Int4Float4(inV, outSignOfGamma, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat4Int4Float4: " + e.toString());
}
try {
- Allocation outY = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
+ Allocation outSignOfGamma = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocOutY(outY);
- scriptRelaxed.forEach_testLgammaFloat4Int4Float4(inX, out);
- verifyResultsLgammaFloat4Int4Float4(inX, outY, out, true);
+ scriptRelaxed.set_gAllocOutSignOfGamma(outSignOfGamma);
+ scriptRelaxed.forEach_testLgammaFloat4Int4Float4(inV, out);
+ verifyResultsLgammaFloat4Int4Float4(inV, outSignOfGamma, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLgammaFloat4Int4Float4: " + e.toString());
}
}
- private void verifyResultsLgammaFloat4Int4Float4(Allocation inX, Allocation outY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- int[] arrayOutY = new int[INPUTSIZE * 4];
- outY.copyTo(arrayOutY);
+ private void verifyResultsLgammaFloat4Int4Float4(Allocation inV, Allocation outSignOfGamma, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ int[] arrayOutSignOfGamma = new int[INPUTSIZE * 4];
+ outSignOfGamma.copyTo(arrayOutSignOfGamma);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Extract the outputs.
- args.outY = arrayOutY[i * 4 + j];
+ args.outSignOfGamma = arrayOutSignOfGamma[i * 4 + j];
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
Target target = new Target(relaxed);
@@ -507,12 +507,12 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Output outY: ");
- message.append(String.format("%d", args.outY));
+ message.append("Output outSignOfGamma: ");
+ message.append(String.format("%d", args.outSignOfGamma));
message.append("\n");
message.append("Output out: ");
message.append(Float.toString(args.out));
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.rs
index b39e592..c07df46 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.rs
@@ -20,47 +20,47 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testLgammaFloatFloat(float in) {
- return lgamma(in);
+float __attribute__((kernel)) testLgammaFloatFloat(float inV) {
+ return lgamma(inV);
}
-float2 __attribute__((kernel)) testLgammaFloat2Float2(float2 in) {
- return lgamma(in);
+float2 __attribute__((kernel)) testLgammaFloat2Float2(float2 inV) {
+ return lgamma(inV);
}
-float3 __attribute__((kernel)) testLgammaFloat3Float3(float3 in) {
- return lgamma(in);
+float3 __attribute__((kernel)) testLgammaFloat3Float3(float3 inV) {
+ return lgamma(inV);
}
-float4 __attribute__((kernel)) testLgammaFloat4Float4(float4 in) {
- return lgamma(in);
+float4 __attribute__((kernel)) testLgammaFloat4Float4(float4 inV) {
+ return lgamma(inV);
}
-rs_allocation gAllocOutY;
+rs_allocation gAllocOutSignOfGamma;
-float __attribute__((kernel)) testLgammaFloatIntFloat(float inX, unsigned int x) {
- int outY = 0;
- float out = lgamma(inX, &outY);
- rsSetElementAt_int(gAllocOutY, outY, x);
+float __attribute__((kernel)) testLgammaFloatIntFloat(float inV, unsigned int x) {
+ int outSignOfGamma = 0;
+ float out = lgamma(inV, &outSignOfGamma);
+ rsSetElementAt_int(gAllocOutSignOfGamma, outSignOfGamma, x);
return out;
}
-float2 __attribute__((kernel)) testLgammaFloat2Int2Float2(float2 inX, unsigned int x) {
- int2 outY = 0;
- float2 out = lgamma(inX, &outY);
- rsSetElementAt_int2(gAllocOutY, outY, x);
+float2 __attribute__((kernel)) testLgammaFloat2Int2Float2(float2 inV, unsigned int x) {
+ int2 outSignOfGamma = 0;
+ float2 out = lgamma(inV, &outSignOfGamma);
+ rsSetElementAt_int2(gAllocOutSignOfGamma, outSignOfGamma, x);
return out;
}
-float3 __attribute__((kernel)) testLgammaFloat3Int3Float3(float3 inX, unsigned int x) {
- int3 outY = 0;
- float3 out = lgamma(inX, &outY);
- rsSetElementAt_int3(gAllocOutY, outY, x);
+float3 __attribute__((kernel)) testLgammaFloat3Int3Float3(float3 inV, unsigned int x) {
+ int3 outSignOfGamma = 0;
+ float3 out = lgamma(inV, &outSignOfGamma);
+ rsSetElementAt_int3(gAllocOutSignOfGamma, outSignOfGamma, x);
return out;
}
-float4 __attribute__((kernel)) testLgammaFloat4Int4Float4(float4 inX, unsigned int x) {
- int4 outY = 0;
- float4 out = lgamma(inX, &outY);
- rsSetElementAt_int4(gAllocOutY, outY, x);
+float4 __attribute__((kernel)) testLgammaFloat4Int4Float4(float4 inV, unsigned int x) {
+ int4 outSignOfGamma = 0;
+ float4 out = lgamma(inV, &outSignOfGamma);
+ rsSetElementAt_int4(gAllocOutSignOfGamma, outSignOfGamma, x);
return out;
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLog.java
index 8b4717c..07f1b93 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkLogFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x371a946136907325l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4176ec542a43578dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testLogFloatFloat(in, out);
- verifyResultsLogFloatFloat(in, out, false);
+ script.forEach_testLogFloatFloat(inV, out);
+ verifyResultsLogFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testLogFloatFloat(in, out);
- verifyResultsLogFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testLogFloatFloat(inV, out);
+ verifyResultsLogFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogFloatFloat: " + e.toString());
}
}
- private void verifyResultsLogFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsLogFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkLogFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xfef8d41eca882159l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd3cba12c04dd9a49l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testLogFloat2Float2(in, out);
- verifyResultsLogFloat2Float2(in, out, false);
+ script.forEach_testLogFloat2Float2(inV, out);
+ verifyResultsLogFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testLogFloat2Float2(in, out);
- verifyResultsLogFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testLogFloat2Float2(inV, out);
+ verifyResultsLogFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogFloat2Float2: " + e.toString());
}
}
- private void verifyResultsLogFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsLogFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkLogFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xfef8dec0298eb6f3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd3cd6a46faf8bb27l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testLogFloat3Float3(in, out);
- verifyResultsLogFloat3Float3(in, out, false);
+ script.forEach_testLogFloat3Float3(inV, out);
+ verifyResultsLogFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testLogFloat3Float3(in, out);
- verifyResultsLogFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testLogFloat3Float3(inV, out);
+ verifyResultsLogFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogFloat3Float3: " + e.toString());
}
}
- private void verifyResultsLogFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLogFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkLogFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xfef8e96188954c8dl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd3cf3361f113dc05l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testLogFloat4Float4(in, out);
- verifyResultsLogFloat4Float4(in, out, false);
+ script.forEach_testLogFloat4Float4(inV, out);
+ verifyResultsLogFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testLogFloat4Float4(in, out);
- verifyResultsLogFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testLogFloat4Float4(inV, out);
+ verifyResultsLogFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogFloat4Float4: " + e.toString());
}
}
- private void verifyResultsLogFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLogFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestLog.rs
index 4261b61..b228e97 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testLogFloatFloat(float in) {
- return log(in);
+float __attribute__((kernel)) testLogFloatFloat(float inV) {
+ return log(inV);
}
-float2 __attribute__((kernel)) testLogFloat2Float2(float2 in) {
- return log(in);
+float2 __attribute__((kernel)) testLogFloat2Float2(float2 inV) {
+ return log(inV);
}
-float3 __attribute__((kernel)) testLogFloat3Float3(float3 in) {
- return log(in);
+float3 __attribute__((kernel)) testLogFloat3Float3(float3 inV) {
+ return log(inV);
}
-float4 __attribute__((kernel)) testLogFloat4Float4(float4 in) {
- return log(in);
+float4 __attribute__((kernel)) testLogFloat4Float4(float4 inV) {
+ return log(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.java
index 5928090..d15d66c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkLog10FloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe09b228ed779b7a0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xba0ecdfe3171d836l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testLog10FloatFloat(in, out);
- verifyResultsLog10FloatFloat(in, out, false);
+ script.forEach_testLog10FloatFloat(inV, out);
+ verifyResultsLog10FloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog10FloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testLog10FloatFloat(in, out);
- verifyResultsLog10FloatFloat(in, out, true);
+ scriptRelaxed.forEach_testLog10FloatFloat(inV, out);
+ verifyResultsLog10FloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog10FloatFloat: " + e.toString());
}
}
- private void verifyResultsLog10FloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsLog10FloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog10(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkLog10Float2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x407bbbadff57bdbcl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd4c88639e3bcdeeal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testLog10Float2Float2(in, out);
- verifyResultsLog10Float2Float2(in, out, false);
+ script.forEach_testLog10Float2Float2(inV, out);
+ verifyResultsLog10Float2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog10Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testLog10Float2Float2(in, out);
- verifyResultsLog10Float2Float2(in, out, true);
+ scriptRelaxed.forEach_testLog10Float2Float2(inV, out);
+ verifyResultsLog10Float2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog10Float2Float2: " + e.toString());
}
}
- private void verifyResultsLog10Float2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsLog10Float2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog10(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkLog10Float3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x407bc64f5e5e5356l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd4ca4f54d9d7ffc8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testLog10Float3Float3(in, out);
- verifyResultsLog10Float3Float3(in, out, false);
+ script.forEach_testLog10Float3Float3(inV, out);
+ verifyResultsLog10Float3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog10Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testLog10Float3Float3(in, out);
- verifyResultsLog10Float3Float3(in, out, true);
+ scriptRelaxed.forEach_testLog10Float3Float3(inV, out);
+ verifyResultsLog10Float3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog10Float3Float3: " + e.toString());
}
}
- private void verifyResultsLog10Float3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLog10Float3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog10(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkLog10Float4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x407bd0f0bd64e8f0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd4cc186fcff320a6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testLog10Float4Float4(in, out);
- verifyResultsLog10Float4Float4(in, out, false);
+ script.forEach_testLog10Float4Float4(inV, out);
+ verifyResultsLog10Float4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog10Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testLog10Float4Float4(in, out);
- verifyResultsLog10Float4Float4(in, out, true);
+ scriptRelaxed.forEach_testLog10Float4Float4(inV, out);
+ verifyResultsLog10Float4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog10Float4Float4: " + e.toString());
}
}
- private void verifyResultsLog10Float4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLog10Float4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog10(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.rs
index 18fb3c3..601c02b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testLog10FloatFloat(float in) {
- return log10(in);
+float __attribute__((kernel)) testLog10FloatFloat(float inV) {
+ return log10(inV);
}
-float2 __attribute__((kernel)) testLog10Float2Float2(float2 in) {
- return log10(in);
+float2 __attribute__((kernel)) testLog10Float2Float2(float2 inV) {
+ return log10(inV);
}
-float3 __attribute__((kernel)) testLog10Float3Float3(float3 in) {
- return log10(in);
+float3 __attribute__((kernel)) testLog10Float3Float3(float3 inV) {
+ return log10(inV);
}
-float4 __attribute__((kernel)) testLog10Float4Float4(float4 in) {
- return log10(in);
+float4 __attribute__((kernel)) testLog10Float4Float4(float4 inV) {
+ return log10(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.java
index 019cffb..a4de01a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkLog1pFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x83e3423b7d907be0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x272c1ffe1744cef6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testLog1pFloatFloat(in, out);
- verifyResultsLog1pFloatFloat(in, out, false);
+ script.forEach_testLog1pFloatFloat(inV, out);
+ verifyResultsLog1pFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog1pFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testLog1pFloatFloat(in, out);
- verifyResultsLog1pFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testLog1pFloatFloat(inV, out);
+ verifyResultsLog1pFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog1pFloatFloat: " + e.toString());
}
}
- private void verifyResultsLog1pFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsLog1pFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog1p(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkLog1pFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x946881a999c72ffcl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xed8dc77cd4750faal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testLog1pFloat2Float2(in, out);
- verifyResultsLog1pFloat2Float2(in, out, false);
+ script.forEach_testLog1pFloat2Float2(inV, out);
+ verifyResultsLog1pFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog1pFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testLog1pFloat2Float2(in, out);
- verifyResultsLog1pFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testLog1pFloat2Float2(inV, out);
+ verifyResultsLog1pFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog1pFloat2Float2: " + e.toString());
}
}
- private void verifyResultsLog1pFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsLog1pFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog1p(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkLog1pFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x94688c4af8cdc596l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xed8f9097ca903088l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testLog1pFloat3Float3(in, out);
- verifyResultsLog1pFloat3Float3(in, out, false);
+ script.forEach_testLog1pFloat3Float3(inV, out);
+ verifyResultsLog1pFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog1pFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testLog1pFloat3Float3(in, out);
- verifyResultsLog1pFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testLog1pFloat3Float3(inV, out);
+ verifyResultsLog1pFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog1pFloat3Float3: " + e.toString());
}
}
- private void verifyResultsLog1pFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLog1pFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog1p(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkLog1pFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x946896ec57d45b30l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xed9159b2c0ab5166l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testLog1pFloat4Float4(in, out);
- verifyResultsLog1pFloat4Float4(in, out, false);
+ script.forEach_testLog1pFloat4Float4(inV, out);
+ verifyResultsLog1pFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog1pFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testLog1pFloat4Float4(in, out);
- verifyResultsLog1pFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testLog1pFloat4Float4(inV, out);
+ verifyResultsLog1pFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog1pFloat4Float4: " + e.toString());
}
}
- private void verifyResultsLog1pFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLog1pFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog1p(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.rs
index bc5577e..27ea4af 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testLog1pFloatFloat(float in) {
- return log1p(in);
+float __attribute__((kernel)) testLog1pFloatFloat(float inV) {
+ return log1p(inV);
}
-float2 __attribute__((kernel)) testLog1pFloat2Float2(float2 in) {
- return log1p(in);
+float2 __attribute__((kernel)) testLog1pFloat2Float2(float2 inV) {
+ return log1p(inV);
}
-float3 __attribute__((kernel)) testLog1pFloat3Float3(float3 in) {
- return log1p(in);
+float3 __attribute__((kernel)) testLog1pFloat3Float3(float3 inV) {
+ return log1p(inV);
}
-float4 __attribute__((kernel)) testLog1pFloat4Float4(float4 in) {
- return log1p(in);
+float4 __attribute__((kernel)) testLog1pFloat4Float4(float4 inV) {
+ return log1p(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.java
index 92a4985..a9de12a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkLog2FloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x390bea9a53d34bfl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x9950067ec147dc6bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testLog2FloatFloat(in, out);
- verifyResultsLog2FloatFloat(in, out, false);
+ script.forEach_testLog2FloatFloat(inV, out);
+ verifyResultsLog2FloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog2FloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testLog2FloatFloat(in, out);
- verifyResultsLog2FloatFloat(in, out, true);
+ scriptRelaxed.forEach_testLog2FloatFloat(inV, out);
+ verifyResultsLog2FloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog2FloatFloat: " + e.toString());
}
}
- private void verifyResultsLog2FloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsLog2FloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog2(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkLog2Float2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc0703946284a72a3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x52d99ec8c48141b7l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testLog2Float2Float2(in, out);
- verifyResultsLog2Float2Float2(in, out, false);
+ script.forEach_testLog2Float2Float2(inV, out);
+ verifyResultsLog2Float2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testLog2Float2Float2(in, out);
- verifyResultsLog2Float2Float2(in, out, true);
+ scriptRelaxed.forEach_testLog2Float2Float2(inV, out);
+ verifyResultsLog2Float2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog2Float2Float2: " + e.toString());
}
}
- private void verifyResultsLog2Float2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsLog2Float2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog2(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkLog2Float3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc07043e78751083dl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x52db67e3ba9c6295l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testLog2Float3Float3(in, out);
- verifyResultsLog2Float3Float3(in, out, false);
+ script.forEach_testLog2Float3Float3(inV, out);
+ verifyResultsLog2Float3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog2Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testLog2Float3Float3(in, out);
- verifyResultsLog2Float3Float3(in, out, true);
+ scriptRelaxed.forEach_testLog2Float3Float3(inV, out);
+ verifyResultsLog2Float3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog2Float3Float3: " + e.toString());
}
}
- private void verifyResultsLog2Float3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLog2Float3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog2(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkLog2Float4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc0704e88e6579dd7l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x52dd30feb0b78373l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testLog2Float4Float4(in, out);
- verifyResultsLog2Float4Float4(in, out, false);
+ script.forEach_testLog2Float4Float4(inV, out);
+ verifyResultsLog2Float4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog2Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testLog2Float4Float4(in, out);
- verifyResultsLog2Float4Float4(in, out, true);
+ scriptRelaxed.forEach_testLog2Float4Float4(inV, out);
+ verifyResultsLog2Float4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLog2Float4Float4: " + e.toString());
}
}
- private void verifyResultsLog2Float4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLog2Float4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLog2(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.rs
index 4cf8ef2..a9d6a06 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testLog2FloatFloat(float in) {
- return log2(in);
+float __attribute__((kernel)) testLog2FloatFloat(float inV) {
+ return log2(inV);
}
-float2 __attribute__((kernel)) testLog2Float2Float2(float2 in) {
- return log2(in);
+float2 __attribute__((kernel)) testLog2Float2Float2(float2 inV) {
+ return log2(inV);
}
-float3 __attribute__((kernel)) testLog2Float3Float3(float3 in) {
- return log2(in);
+float3 __attribute__((kernel)) testLog2Float3Float3(float3 inV) {
+ return log2(inV);
}
-float4 __attribute__((kernel)) testLog2Float4Float4(float4 in) {
- return log2(in);
+float4 __attribute__((kernel)) testLog2Float4Float4(float4 inV) {
+ return log2(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.java
index 8679aa0..1ef7918 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkLogbFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xfe06d66b21ce47efl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xab2603feada6157bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testLogbFloatFloat(in, out);
- verifyResultsLogbFloatFloat(in, out, false);
+ script.forEach_testLogbFloatFloat(inV, out);
+ verifyResultsLogbFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogbFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testLogbFloatFloat(in, out);
- verifyResultsLogbFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testLogbFloatFloat(inV, out);
+ verifyResultsLogbFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogbFloatFloat: " + e.toString());
}
}
- private void verifyResultsLogbFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsLogbFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLogb(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkLogbFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbf61cdc2dc1e0853l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x256d8fbaf90b6647l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testLogbFloat2Float2(in, out);
- verifyResultsLogbFloat2Float2(in, out, false);
+ script.forEach_testLogbFloat2Float2(inV, out);
+ verifyResultsLogbFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogbFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testLogbFloat2Float2(in, out);
- verifyResultsLogbFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testLogbFloat2Float2(inV, out);
+ verifyResultsLogbFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogbFloat2Float2: " + e.toString());
}
}
- private void verifyResultsLogbFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsLogbFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLogb(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkLogbFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xbf61d8643b249dedl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x256f58d5ef268725l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testLogbFloat3Float3(in, out);
- verifyResultsLogbFloat3Float3(in, out, false);
+ script.forEach_testLogbFloat3Float3(inV, out);
+ verifyResultsLogbFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogbFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testLogbFloat3Float3(in, out);
- verifyResultsLogbFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testLogbFloat3Float3(inV, out);
+ verifyResultsLogbFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogbFloat3Float3: " + e.toString());
}
}
- private void verifyResultsLogbFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLogbFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLogb(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkLogbFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xbf61e3059a2b3387l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x257121f0e541a803l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testLogbFloat4Float4(in, out);
- verifyResultsLogbFloat4Float4(in, out, false);
+ script.forEach_testLogbFloat4Float4(inV, out);
+ verifyResultsLogbFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogbFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testLogbFloat4Float4(in, out);
- verifyResultsLogbFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testLogbFloat4Float4(inV, out);
+ verifyResultsLogbFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testLogbFloat4Float4: " + e.toString());
}
}
- private void verifyResultsLogbFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsLogbFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeLogb(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.rs
index 8317a22..e0ca286 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testLogbFloatFloat(float in) {
- return logb(in);
+float __attribute__((kernel)) testLogbFloatFloat(float inV) {
+ return logb(inV);
}
-float2 __attribute__((kernel)) testLogbFloat2Float2(float2 in) {
- return logb(in);
+float2 __attribute__((kernel)) testLogbFloat2Float2(float2 inV) {
+ return logb(inV);
}
-float3 __attribute__((kernel)) testLogbFloat3Float3(float3 in) {
- return logb(in);
+float3 __attribute__((kernel)) testLogbFloat3Float3(float3 inV) {
+ return logb(inV);
}
-float4 __attribute__((kernel)) testLogbFloat4Float4(float4 in) {
- return logb(in);
+float4 __attribute__((kernel)) testLogbFloat4Float4(float4 inV) {
+ return logb(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMad.java b/tests/tests/renderscript/src/android/renderscript/cts/TestMad.java
index 0ac029c..e364999 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMad.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMad.java
@@ -35,52 +35,52 @@
}
public class ArgumentsFloatFloatFloatFloat {
- public float inA;
- public float inB;
- public float inC;
+ public float inMultiplicand1;
+ public float inMultiplicand2;
+ public float inOffset;
public Target.Floaty out;
}
private void checkMadFloatFloatFloatFloat() {
- Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb3b9b8429c37eacl, false);
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb3b9b8429c37eadl, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb3b9b8429c37eael, false);
+ Allocation inMultiplicand1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2a4461e340b4de48l, false);
+ Allocation inMultiplicand2 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2a4461e340b4de49l, false);
+ Allocation inOffset = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xcea3b86dc50ce0fcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInB(inB);
- script.set_gAllocInC(inC);
- script.forEach_testMadFloatFloatFloatFloat(inA, out);
- verifyResultsMadFloatFloatFloatFloat(inA, inB, inC, out, false);
+ script.set_gAllocInMultiplicand2(inMultiplicand2);
+ script.set_gAllocInOffset(inOffset);
+ script.forEach_testMadFloatFloatFloatFloat(inMultiplicand1, out);
+ verifyResultsMadFloatFloatFloatFloat(inMultiplicand1, inMultiplicand2, inOffset, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMadFloatFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInB(inB);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.forEach_testMadFloatFloatFloatFloat(inA, out);
- verifyResultsMadFloatFloatFloatFloat(inA, inB, inC, out, true);
+ scriptRelaxed.set_gAllocInMultiplicand2(inMultiplicand2);
+ scriptRelaxed.set_gAllocInOffset(inOffset);
+ scriptRelaxed.forEach_testMadFloatFloatFloatFloat(inMultiplicand1, out);
+ verifyResultsMadFloatFloatFloatFloat(inMultiplicand1, inMultiplicand2, inOffset, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMadFloatFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsMadFloatFloatFloatFloat(Allocation inA, Allocation inB, Allocation inC, Allocation out, boolean relaxed) {
- float[] arrayInA = new float[INPUTSIZE * 1];
- inA.copyTo(arrayInA);
- float[] arrayInB = new float[INPUTSIZE * 1];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 1];
- inC.copyTo(arrayInC);
+ private void verifyResultsMadFloatFloatFloatFloat(Allocation inMultiplicand1, Allocation inMultiplicand2, Allocation inOffset, Allocation out, boolean relaxed) {
+ float[] arrayInMultiplicand1 = new float[INPUTSIZE * 1];
+ inMultiplicand1.copyTo(arrayInMultiplicand1);
+ float[] arrayInMultiplicand2 = new float[INPUTSIZE * 1];
+ inMultiplicand2.copyTo(arrayInMultiplicand2);
+ float[] arrayInOffset = new float[INPUTSIZE * 1];
+ inOffset.copyTo(arrayInOffset);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
- args.inA = arrayInA[i];
- args.inB = arrayInB[i];
- args.inC = arrayInC[i];
+ args.inMultiplicand1 = arrayInMultiplicand1[i];
+ args.inMultiplicand2 = arrayInMultiplicand2[i];
+ args.inOffset = arrayInOffset[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMad(args, target);
@@ -91,17 +91,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inA: ");
+ message.append("Input inMultiplicand1: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inA, Float.floatToRawIntBits(args.inA), args.inA));
+ args.inMultiplicand1, Float.floatToRawIntBits(args.inMultiplicand1), args.inMultiplicand1));
message.append("\n");
- message.append("Input inB: ");
+ message.append("Input inMultiplicand2: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inMultiplicand2, Float.floatToRawIntBits(args.inMultiplicand2), args.inMultiplicand2));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inOffset: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inOffset, Float.floatToRawIntBits(args.inOffset), args.inOffset));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -121,45 +121,45 @@
}
private void checkMadFloat2Float2Float2Float2() {
- Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x44d6ec3d0f2030a4l, false);
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x44d6ec3d0f2030a5l, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x44d6ec3d0f2030a6l, false);
+ Allocation inMultiplicand1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdfffb28a8a5fd7c0l, false);
+ Allocation inMultiplicand2 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdfffb28a8a5fd7c1l, false);
+ Allocation inOffset = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3da8592f318f8924l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInB(inB);
- script.set_gAllocInC(inC);
- script.forEach_testMadFloat2Float2Float2Float2(inA, out);
- verifyResultsMadFloat2Float2Float2Float2(inA, inB, inC, out, false);
+ script.set_gAllocInMultiplicand2(inMultiplicand2);
+ script.set_gAllocInOffset(inOffset);
+ script.forEach_testMadFloat2Float2Float2Float2(inMultiplicand1, out);
+ verifyResultsMadFloat2Float2Float2Float2(inMultiplicand1, inMultiplicand2, inOffset, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMadFloat2Float2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInB(inB);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.forEach_testMadFloat2Float2Float2Float2(inA, out);
- verifyResultsMadFloat2Float2Float2Float2(inA, inB, inC, out, true);
+ scriptRelaxed.set_gAllocInMultiplicand2(inMultiplicand2);
+ scriptRelaxed.set_gAllocInOffset(inOffset);
+ scriptRelaxed.forEach_testMadFloat2Float2Float2Float2(inMultiplicand1, out);
+ verifyResultsMadFloat2Float2Float2Float2(inMultiplicand1, inMultiplicand2, inOffset, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMadFloat2Float2Float2Float2: " + e.toString());
}
}
- private void verifyResultsMadFloat2Float2Float2Float2(Allocation inA, Allocation inB, Allocation inC, Allocation out, boolean relaxed) {
- float[] arrayInA = new float[INPUTSIZE * 2];
- inA.copyTo(arrayInA);
- float[] arrayInB = new float[INPUTSIZE * 2];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 2];
- inC.copyTo(arrayInC);
+ private void verifyResultsMadFloat2Float2Float2Float2(Allocation inMultiplicand1, Allocation inMultiplicand2, Allocation inOffset, Allocation out, boolean relaxed) {
+ float[] arrayInMultiplicand1 = new float[INPUTSIZE * 2];
+ inMultiplicand1.copyTo(arrayInMultiplicand1);
+ float[] arrayInMultiplicand2 = new float[INPUTSIZE * 2];
+ inMultiplicand2.copyTo(arrayInMultiplicand2);
+ float[] arrayInOffset = new float[INPUTSIZE * 2];
+ inOffset.copyTo(arrayInOffset);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
- args.inA = arrayInA[i * 2 + j];
- args.inB = arrayInB[i * 2 + j];
- args.inC = arrayInC[i * 2 + j];
+ args.inMultiplicand1 = arrayInMultiplicand1[i * 2 + j];
+ args.inMultiplicand2 = arrayInMultiplicand2[i * 2 + j];
+ args.inOffset = arrayInOffset[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMad(args, target);
@@ -170,17 +170,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inA: ");
+ message.append("Input inMultiplicand1: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inA, Float.floatToRawIntBits(args.inA), args.inA));
+ args.inMultiplicand1, Float.floatToRawIntBits(args.inMultiplicand1), args.inMultiplicand1));
message.append("\n");
- message.append("Input inB: ");
+ message.append("Input inMultiplicand2: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inMultiplicand2, Float.floatToRawIntBits(args.inMultiplicand2), args.inMultiplicand2));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inOffset: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inOffset, Float.floatToRawIntBits(args.inOffset), args.inOffset));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -200,45 +200,45 @@
}
private void checkMadFloat3Float3Float3Float3() {
- Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1a508fd7e1876a40l, false);
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1a508fd7e1876a41l, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1a508fd7e1876a42l, false);
+ Allocation inMultiplicand1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xdd6226bde1551f1cl, false);
+ Allocation inMultiplicand2 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xdd6226bde1551f1dl, false);
+ Allocation inOffset = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x117f5b0bfb77d218l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInB(inB);
- script.set_gAllocInC(inC);
- script.forEach_testMadFloat3Float3Float3Float3(inA, out);
- verifyResultsMadFloat3Float3Float3Float3(inA, inB, inC, out, false);
+ script.set_gAllocInMultiplicand2(inMultiplicand2);
+ script.set_gAllocInOffset(inOffset);
+ script.forEach_testMadFloat3Float3Float3Float3(inMultiplicand1, out);
+ verifyResultsMadFloat3Float3Float3Float3(inMultiplicand1, inMultiplicand2, inOffset, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMadFloat3Float3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInB(inB);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.forEach_testMadFloat3Float3Float3Float3(inA, out);
- verifyResultsMadFloat3Float3Float3Float3(inA, inB, inC, out, true);
+ scriptRelaxed.set_gAllocInMultiplicand2(inMultiplicand2);
+ scriptRelaxed.set_gAllocInOffset(inOffset);
+ scriptRelaxed.forEach_testMadFloat3Float3Float3Float3(inMultiplicand1, out);
+ verifyResultsMadFloat3Float3Float3Float3(inMultiplicand1, inMultiplicand2, inOffset, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMadFloat3Float3Float3Float3: " + e.toString());
}
}
- private void verifyResultsMadFloat3Float3Float3Float3(Allocation inA, Allocation inB, Allocation inC, Allocation out, boolean relaxed) {
- float[] arrayInA = new float[INPUTSIZE * 4];
- inA.copyTo(arrayInA);
- float[] arrayInB = new float[INPUTSIZE * 4];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 4];
- inC.copyTo(arrayInC);
+ private void verifyResultsMadFloat3Float3Float3Float3(Allocation inMultiplicand1, Allocation inMultiplicand2, Allocation inOffset, Allocation out, boolean relaxed) {
+ float[] arrayInMultiplicand1 = new float[INPUTSIZE * 4];
+ inMultiplicand1.copyTo(arrayInMultiplicand1);
+ float[] arrayInMultiplicand2 = new float[INPUTSIZE * 4];
+ inMultiplicand2.copyTo(arrayInMultiplicand2);
+ float[] arrayInOffset = new float[INPUTSIZE * 4];
+ inOffset.copyTo(arrayInOffset);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
- args.inA = arrayInA[i * 4 + j];
- args.inB = arrayInB[i * 4 + j];
- args.inC = arrayInC[i * 4 + j];
+ args.inMultiplicand1 = arrayInMultiplicand1[i * 4 + j];
+ args.inMultiplicand2 = arrayInMultiplicand2[i * 4 + j];
+ args.inOffset = arrayInOffset[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMad(args, target);
@@ -249,17 +249,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inA: ");
+ message.append("Input inMultiplicand1: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inA, Float.floatToRawIntBits(args.inA), args.inA));
+ args.inMultiplicand1, Float.floatToRawIntBits(args.inMultiplicand1), args.inMultiplicand1));
message.append("\n");
- message.append("Input inB: ");
+ message.append("Input inMultiplicand2: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inMultiplicand2, Float.floatToRawIntBits(args.inMultiplicand2), args.inMultiplicand2));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inOffset: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inOffset, Float.floatToRawIntBits(args.inOffset), args.inOffset));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -279,45 +279,45 @@
}
private void checkMadFloat4Float4Float4Float4() {
- Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xefca3372b3eea3dcl, false);
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xefca3372b3eea3ddl, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xefca3372b3eea3del, false);
+ Allocation inMultiplicand1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xdac49af1384a6678l, false);
+ Allocation inMultiplicand2 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xdac49af1384a6679l, false);
+ Allocation inOffset = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe5565ce8c5601b0cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInB(inB);
- script.set_gAllocInC(inC);
- script.forEach_testMadFloat4Float4Float4Float4(inA, out);
- verifyResultsMadFloat4Float4Float4Float4(inA, inB, inC, out, false);
+ script.set_gAllocInMultiplicand2(inMultiplicand2);
+ script.set_gAllocInOffset(inOffset);
+ script.forEach_testMadFloat4Float4Float4Float4(inMultiplicand1, out);
+ verifyResultsMadFloat4Float4Float4Float4(inMultiplicand1, inMultiplicand2, inOffset, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMadFloat4Float4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInB(inB);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.forEach_testMadFloat4Float4Float4Float4(inA, out);
- verifyResultsMadFloat4Float4Float4Float4(inA, inB, inC, out, true);
+ scriptRelaxed.set_gAllocInMultiplicand2(inMultiplicand2);
+ scriptRelaxed.set_gAllocInOffset(inOffset);
+ scriptRelaxed.forEach_testMadFloat4Float4Float4Float4(inMultiplicand1, out);
+ verifyResultsMadFloat4Float4Float4Float4(inMultiplicand1, inMultiplicand2, inOffset, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMadFloat4Float4Float4Float4: " + e.toString());
}
}
- private void verifyResultsMadFloat4Float4Float4Float4(Allocation inA, Allocation inB, Allocation inC, Allocation out, boolean relaxed) {
- float[] arrayInA = new float[INPUTSIZE * 4];
- inA.copyTo(arrayInA);
- float[] arrayInB = new float[INPUTSIZE * 4];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 4];
- inC.copyTo(arrayInC);
+ private void verifyResultsMadFloat4Float4Float4Float4(Allocation inMultiplicand1, Allocation inMultiplicand2, Allocation inOffset, Allocation out, boolean relaxed) {
+ float[] arrayInMultiplicand1 = new float[INPUTSIZE * 4];
+ inMultiplicand1.copyTo(arrayInMultiplicand1);
+ float[] arrayInMultiplicand2 = new float[INPUTSIZE * 4];
+ inMultiplicand2.copyTo(arrayInMultiplicand2);
+ float[] arrayInOffset = new float[INPUTSIZE * 4];
+ inOffset.copyTo(arrayInOffset);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
- args.inA = arrayInA[i * 4 + j];
- args.inB = arrayInB[i * 4 + j];
- args.inC = arrayInC[i * 4 + j];
+ args.inMultiplicand1 = arrayInMultiplicand1[i * 4 + j];
+ args.inMultiplicand2 = arrayInMultiplicand2[i * 4 + j];
+ args.inOffset = arrayInOffset[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMad(args, target);
@@ -328,17 +328,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inA: ");
+ message.append("Input inMultiplicand1: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inA, Float.floatToRawIntBits(args.inA), args.inA));
+ args.inMultiplicand1, Float.floatToRawIntBits(args.inMultiplicand1), args.inMultiplicand1));
message.append("\n");
- message.append("Input inB: ");
+ message.append("Input inMultiplicand2: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inMultiplicand2, Float.floatToRawIntBits(args.inMultiplicand2), args.inMultiplicand2));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inOffset: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inOffset, Float.floatToRawIntBits(args.inOffset), args.inOffset));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMad.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestMad.rs
index bcf908b..3808b26 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMad.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMad.rs
@@ -19,29 +19,29 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInB;
-rs_allocation gAllocInC;
+rs_allocation gAllocInMultiplicand2;
+rs_allocation gAllocInOffset;
-float __attribute__((kernel)) testMadFloatFloatFloatFloat(float inA, unsigned int x) {
- float inB = rsGetElementAt_float(gAllocInB, x);
- float inC = rsGetElementAt_float(gAllocInC, x);
- return mad(inA, inB, inC);
+float __attribute__((kernel)) testMadFloatFloatFloatFloat(float inMultiplicand1, unsigned int x) {
+ float inMultiplicand2 = rsGetElementAt_float(gAllocInMultiplicand2, x);
+ float inOffset = rsGetElementAt_float(gAllocInOffset, x);
+ return mad(inMultiplicand1, inMultiplicand2, inOffset);
}
-float2 __attribute__((kernel)) testMadFloat2Float2Float2Float2(float2 inA, unsigned int x) {
- float2 inB = rsGetElementAt_float2(gAllocInB, x);
- float2 inC = rsGetElementAt_float2(gAllocInC, x);
- return mad(inA, inB, inC);
+float2 __attribute__((kernel)) testMadFloat2Float2Float2Float2(float2 inMultiplicand1, unsigned int x) {
+ float2 inMultiplicand2 = rsGetElementAt_float2(gAllocInMultiplicand2, x);
+ float2 inOffset = rsGetElementAt_float2(gAllocInOffset, x);
+ return mad(inMultiplicand1, inMultiplicand2, inOffset);
}
-float3 __attribute__((kernel)) testMadFloat3Float3Float3Float3(float3 inA, unsigned int x) {
- float3 inB = rsGetElementAt_float3(gAllocInB, x);
- float3 inC = rsGetElementAt_float3(gAllocInC, x);
- return mad(inA, inB, inC);
+float3 __attribute__((kernel)) testMadFloat3Float3Float3Float3(float3 inMultiplicand1, unsigned int x) {
+ float3 inMultiplicand2 = rsGetElementAt_float3(gAllocInMultiplicand2, x);
+ float3 inOffset = rsGetElementAt_float3(gAllocInOffset, x);
+ return mad(inMultiplicand1, inMultiplicand2, inOffset);
}
-float4 __attribute__((kernel)) testMadFloat4Float4Float4Float4(float4 inA, unsigned int x) {
- float4 inB = rsGetElementAt_float4(gAllocInB, x);
- float4 inC = rsGetElementAt_float4(gAllocInC, x);
- return mad(inA, inB, inC);
+float4 __attribute__((kernel)) testMadFloat4Float4Float4Float4(float4 inMultiplicand1, unsigned int x) {
+ float4 inMultiplicand2 = rsGetElementAt_float4(gAllocInMultiplicand2, x);
+ float4 inOffset = rsGetElementAt_float4(gAllocInOffset, x);
+ return mad(inMultiplicand1, inMultiplicand2, inOffset);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMax.java b/tests/tests/renderscript/src/android/renderscript/cts/TestMax.java
index e52ef48..55c2cb5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMax.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMax.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float in;
- public float in1;
+ public float inA;
+ public float inB;
public Target.Floaty out;
}
private void checkMaxFloatFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xfb01ed3804837dddl, false);
- Allocation in1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2952d868c2162450l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2952d868c2162460l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2952d868c2162461l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocIn1(in1);
- script.forEach_testMaxFloatFloatFloat(in, out);
- verifyResultsMaxFloatFloatFloat(in, in1, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxFloatFloatFloat(inA, out);
+ verifyResultsMaxFloatFloatFloat(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocIn1(in1);
- scriptRelaxed.forEach_testMaxFloatFloatFloat(in, out);
- verifyResultsMaxFloatFloatFloat(in, in1, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxFloatFloatFloat(inA, out);
+ verifyResultsMaxFloatFloatFloat(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsMaxFloatFloatFloat(Allocation in, Allocation in1, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
- float[] arrayIn1 = new float[INPUTSIZE * 1];
- in1.copyTo(arrayIn1);
+ private void verifyResultsMaxFloatFloatFloat(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.in = arrayIn[i];
- args.in1 = arrayIn1[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMax(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input in1: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in1, Float.floatToRawIntBits(args.in1), args.in1));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkMaxFloat2Float2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x63dc5a02b9d46a4bl, false);
- Allocation in1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc6031e7536addacal, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc6031e7536addadal, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc6031e7536addadbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocIn1(in1);
- script.forEach_testMaxFloat2Float2Float2(in, out);
- verifyResultsMaxFloat2Float2Float2(in, in1, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxFloat2Float2Float2(inA, out);
+ verifyResultsMaxFloat2Float2Float2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocIn1(in1);
- scriptRelaxed.forEach_testMaxFloat2Float2Float2(in, out);
- verifyResultsMaxFloat2Float2Float2(in, in1, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxFloat2Float2Float2(inA, out);
+ verifyResultsMaxFloat2Float2Float2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsMaxFloat2Float2Float2(Allocation in, Allocation in1, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
- float[] arrayIn1 = new float[INPUTSIZE * 2];
- in1.copyTo(arrayIn1);
+ private void verifyResultsMaxFloat2Float2Float2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.in = arrayIn[i * 2 + j];
- args.in1 = arrayIn1[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMax(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input in1: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in1, Float.floatToRawIntBits(args.in1), args.in1));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkMaxFloat3Float3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xb92c17bc0744bdael, false);
- Allocation in1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1a67fc95388bdc6bl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1a67fc95388bdc7bl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1a67fc95388bdc7cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocIn1(in1);
- script.forEach_testMaxFloat3Float3Float3(in, out);
- verifyResultsMaxFloat3Float3Float3(in, in1, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxFloat3Float3Float3(inA, out);
+ verifyResultsMaxFloat3Float3Float3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocIn1(in1);
- scriptRelaxed.forEach_testMaxFloat3Float3Float3(in, out);
- verifyResultsMaxFloat3Float3Float3(in, in1, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxFloat3Float3Float3(inA, out);
+ verifyResultsMaxFloat3Float3Float3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsMaxFloat3Float3Float3(Allocation in, Allocation in1, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
- float[] arrayIn1 = new float[INPUTSIZE * 4];
- in1.copyTo(arrayIn1);
+ private void verifyResultsMaxFloat3Float3Float3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.in = arrayIn[i * 4 + j];
- args.in1 = arrayIn1[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMax(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input in1: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in1, Float.floatToRawIntBits(args.in1), args.in1));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkMaxFloat4Float4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe7bd57554b51111l, false);
- Allocation in1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6eccdab53a69de0cl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6eccdab53a69de1cl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6eccdab53a69de1dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocIn1(in1);
- script.forEach_testMaxFloat4Float4Float4(in, out);
- verifyResultsMaxFloat4Float4Float4(in, in1, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxFloat4Float4Float4(inA, out);
+ verifyResultsMaxFloat4Float4Float4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocIn1(in1);
- scriptRelaxed.forEach_testMaxFloat4Float4Float4(in, out);
- verifyResultsMaxFloat4Float4Float4(in, in1, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxFloat4Float4Float4(inA, out);
+ verifyResultsMaxFloat4Float4Float4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsMaxFloat4Float4Float4(Allocation in, Allocation in1, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
- float[] arrayIn1 = new float[INPUTSIZE * 4];
- in1.copyTo(arrayIn1);
+ private void verifyResultsMaxFloat4Float4Float4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.in = arrayIn[i * 4 + j];
- args.in1 = arrayIn1[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMax(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input in1: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in1, Float.floatToRawIntBits(args.in1), args.in1));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -317,45 +317,45 @@
}
public class ArgumentsCharCharChar {
- public byte inV1;
- public byte inV2;
+ public byte inA;
+ public byte inB;
public byte out;
}
private void checkMaxCharCharChar() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x91fcf329ccedf8al, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x91fcf329ccedf8bl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x5f77cf3cb6405876l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x5f77cf3cb6405877l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxCharCharChar(inV1, out);
- verifyResultsMaxCharCharChar(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxCharCharChar(inA, out);
+ verifyResultsMaxCharCharChar(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxCharCharChar: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxCharCharChar(inV1, out);
- verifyResultsMaxCharCharChar(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxCharCharChar(inA, out);
+ verifyResultsMaxCharCharChar(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxCharCharChar: " + e.toString());
}
}
- private void verifyResultsMaxCharCharChar(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxCharCharChar(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsCharCharChar args = new ArgumentsCharCharChar();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -365,11 +365,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -388,39 +388,39 @@
}
private void checkMaxChar2Char2Char2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0x12084b25952bc64l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0x12084b25952bc65l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0x94dd090a19e42804l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0x94dd090a19e42805l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxChar2Char2Char2(inV1, out);
- verifyResultsMaxChar2Char2Char2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxChar2Char2Char2(inA, out);
+ verifyResultsMaxChar2Char2Char2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxChar2Char2Char2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxChar2Char2Char2(inV1, out);
- verifyResultsMaxChar2Char2Char2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxChar2Char2Char2(inA, out);
+ verifyResultsMaxChar2Char2Char2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxChar2Char2Char2: " + e.toString());
}
}
- private void verifyResultsMaxChar2Char2Char2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxChar2Char2Char2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsCharCharChar args = new ArgumentsCharCharChar();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -430,11 +430,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -453,39 +453,39 @@
}
private void checkMaxChar3Char3Char3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0x567200e53e0a8f29l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0x567200e53e0a8f2al, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0xba9188f3788338d3l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0xba9188f3788338d4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxChar3Char3Char3(inV1, out);
- verifyResultsMaxChar3Char3Char3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxChar3Char3Char3(inA, out);
+ verifyResultsMaxChar3Char3Char3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxChar3Char3Char3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxChar3Char3Char3(inV1, out);
- verifyResultsMaxChar3Char3Char3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxChar3Char3Char3(inA, out);
+ verifyResultsMaxChar3Char3Char3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxChar3Char3Char3: " + e.toString());
}
}
- private void verifyResultsMaxChar3Char3Char3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxChar3Char3Char3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsCharCharChar args = new ArgumentsCharCharChar();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -495,11 +495,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -518,39 +518,39 @@
}
private void checkMaxChar4Char4Char4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0xabc37d1822c261eel, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0xabc37d1822c261efl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0xe04608dcd72249a2l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0xe04608dcd72249a3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxChar4Char4Char4(inV1, out);
- verifyResultsMaxChar4Char4Char4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxChar4Char4Char4(inA, out);
+ verifyResultsMaxChar4Char4Char4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxChar4Char4Char4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxChar4Char4Char4(inV1, out);
- verifyResultsMaxChar4Char4Char4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxChar4Char4Char4(inA, out);
+ verifyResultsMaxChar4Char4Char4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxChar4Char4Char4: " + e.toString());
}
}
- private void verifyResultsMaxChar4Char4Char4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxChar4Char4Char4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsCharCharChar args = new ArgumentsCharCharChar();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -560,11 +560,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -583,45 +583,45 @@
}
public class ArgumentsUcharUcharUchar {
- public byte inV1;
- public byte inV2;
+ public byte inA;
+ public byte inB;
public byte out;
}
private void checkMaxUcharUcharUchar() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 1, 0x829ebf2e60c1bd47l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 1, 0x829ebf2e60c1bd48l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 1, 0x800f9948853a162dl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 1, 0x800f9948853a162el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUcharUcharUchar(inV1, out);
- verifyResultsMaxUcharUcharUchar(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUcharUcharUchar(inA, out);
+ verifyResultsMaxUcharUcharUchar(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUcharUcharUchar: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUcharUcharUchar(inV1, out);
- verifyResultsMaxUcharUcharUchar(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUcharUcharUchar(inA, out);
+ verifyResultsMaxUcharUcharUchar(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUcharUcharUchar: " + e.toString());
}
}
- private void verifyResultsMaxUcharUcharUchar(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUcharUcharUchar(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUcharUcharUchar args = new ArgumentsUcharUcharUchar();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -631,11 +631,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -654,39 +654,39 @@
}
private void checkMaxUchar2Uchar2Uchar2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 2, 0x75eda605e43f8b81l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 2, 0x75eda605e43f8b82l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 2, 0xd31d5735b7e9a9dbl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 2, 0xd31d5735b7e9a9dcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUchar2Uchar2Uchar2(inV1, out);
- verifyResultsMaxUchar2Uchar2Uchar2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUchar2Uchar2Uchar2(inA, out);
+ verifyResultsMaxUchar2Uchar2Uchar2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUchar2Uchar2Uchar2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUchar2Uchar2Uchar2(inV1, out);
- verifyResultsMaxUchar2Uchar2Uchar2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUchar2Uchar2Uchar2(inA, out);
+ verifyResultsMaxUchar2Uchar2Uchar2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUchar2Uchar2Uchar2: " + e.toString());
}
}
- private void verifyResultsMaxUchar2Uchar2Uchar2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUchar2Uchar2Uchar2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsUcharUcharUchar args = new ArgumentsUcharUcharUchar();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -696,11 +696,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -719,39 +719,39 @@
}
private void checkMaxUchar3Uchar3Uchar3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 3, 0xa2def5663489d18cl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 3, 0xa2def5663489d18dl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 3, 0x27823555b9c7ab7cl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 3, 0x27823555b9c7ab7dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUchar3Uchar3Uchar3(inV1, out);
- verifyResultsMaxUchar3Uchar3Uchar3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUchar3Uchar3Uchar3(inA, out);
+ verifyResultsMaxUchar3Uchar3Uchar3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUchar3Uchar3Uchar3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUchar3Uchar3Uchar3(inV1, out);
- verifyResultsMaxUchar3Uchar3Uchar3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUchar3Uchar3Uchar3(inA, out);
+ verifyResultsMaxUchar3Uchar3Uchar3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUchar3Uchar3Uchar3: " + e.toString());
}
}
- private void verifyResultsMaxUchar3Uchar3Uchar3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUchar3Uchar3Uchar3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsUcharUcharUchar args = new ArgumentsUcharUcharUchar();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -761,11 +761,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -784,39 +784,39 @@
}
private void checkMaxUchar4Uchar4Uchar4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 4, 0xcfd044c684d41797l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 4, 0xcfd044c684d41798l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 4, 0x7be71375bba5ad1dl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 4, 0x7be71375bba5ad1el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUchar4Uchar4Uchar4(inV1, out);
- verifyResultsMaxUchar4Uchar4Uchar4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUchar4Uchar4Uchar4(inA, out);
+ verifyResultsMaxUchar4Uchar4Uchar4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUchar4Uchar4Uchar4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUchar4Uchar4Uchar4(inV1, out);
- verifyResultsMaxUchar4Uchar4Uchar4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUchar4Uchar4Uchar4(inA, out);
+ verifyResultsMaxUchar4Uchar4Uchar4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUchar4Uchar4Uchar4: " + e.toString());
}
}
- private void verifyResultsMaxUchar4Uchar4Uchar4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUchar4Uchar4Uchar4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsUcharUcharUchar args = new ArgumentsUcharUcharUchar();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -826,11 +826,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -849,45 +849,45 @@
}
public class ArgumentsShortShortShort {
- public short inV1;
- public short inV2;
+ public short inA;
+ public short inB;
public short out;
}
private void checkMaxShortShortShort() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0x868a0cd65f7a4294l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0x868a0cd65f7a4295l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0x920335e143b57294l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0x920335e143b57295l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxShortShortShort(inV1, out);
- verifyResultsMaxShortShortShort(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxShortShortShort(inA, out);
+ verifyResultsMaxShortShortShort(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxShortShortShort: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxShortShortShort(inV1, out);
- verifyResultsMaxShortShortShort(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxShortShortShort(inA, out);
+ verifyResultsMaxShortShortShort(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxShortShortShort: " + e.toString());
}
}
- private void verifyResultsMaxShortShortShort(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxShortShortShort(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsShortShortShort args = new ArgumentsShortShortShort();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -897,11 +897,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -920,39 +920,39 @@
}
private void checkMaxShort2Short2Short2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0x3d46ae0799c33c02l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0x3d46ae0799c33c03l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0x42e9d46b56ecb9del, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0x42e9d46b56ecb9dfl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxShort2Short2Short2(inV1, out);
- verifyResultsMaxShort2Short2Short2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxShort2Short2Short2(inA, out);
+ verifyResultsMaxShort2Short2Short2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxShort2Short2Short2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxShort2Short2Short2(inV1, out);
- verifyResultsMaxShort2Short2Short2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxShort2Short2Short2(inA, out);
+ verifyResultsMaxShort2Short2Short2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxShort2Short2Short2: " + e.toString());
}
}
- private void verifyResultsMaxShort2Short2Short2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxShort2Short2Short2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsShortShortShort args = new ArgumentsShortShortShort();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -962,11 +962,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -985,39 +985,39 @@
}
private void checkMaxShort3Short3Short3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x6a37fd67ea0d820dl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x6a37fd67ea0d820el, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x974eb28b58cabb7fl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x974eb28b58cabb80l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxShort3Short3Short3(inV1, out);
- verifyResultsMaxShort3Short3Short3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxShort3Short3Short3(inA, out);
+ verifyResultsMaxShort3Short3Short3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxShort3Short3Short3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxShort3Short3Short3(inV1, out);
- verifyResultsMaxShort3Short3Short3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxShort3Short3Short3(inA, out);
+ verifyResultsMaxShort3Short3Short3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxShort3Short3Short3: " + e.toString());
}
}
- private void verifyResultsMaxShort3Short3Short3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxShort3Short3Short3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsShortShortShort args = new ArgumentsShortShortShort();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1027,11 +1027,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1050,39 +1050,39 @@
}
private void checkMaxShort4Short4Short4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0x97294cc83a57c818l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0x97294cc83a57c819l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0xebb390ab5aa8bd20l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0xebb390ab5aa8bd21l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxShort4Short4Short4(inV1, out);
- verifyResultsMaxShort4Short4Short4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxShort4Short4Short4(inA, out);
+ verifyResultsMaxShort4Short4Short4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxShort4Short4Short4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxShort4Short4Short4(inV1, out);
- verifyResultsMaxShort4Short4Short4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxShort4Short4Short4(inA, out);
+ verifyResultsMaxShort4Short4Short4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxShort4Short4Short4: " + e.toString());
}
}
- private void verifyResultsMaxShort4Short4Short4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxShort4Short4Short4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsShortShortShort args = new ArgumentsShortShortShort();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1092,11 +1092,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1115,45 +1115,45 @@
}
public class ArgumentsUshortUshortUshort {
- public short inV1;
- public short inV2;
+ public short inA;
+ public short inB;
public short out;
}
private void checkMaxUshortUshortUshort() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 1, 0x1b9c47701effe051l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 1, 0x1b9c47701effe052l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 1, 0x8f869c73b947704bl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 1, 0x8f869c73b947704cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUshortUshortUshort(inV1, out);
- verifyResultsMaxUshortUshortUshort(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUshortUshortUshort(inA, out);
+ verifyResultsMaxUshortUshortUshort(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUshortUshortUshort: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUshortUshortUshort(inV1, out);
- verifyResultsMaxUshortUshortUshort(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUshortUshortUshort(inA, out);
+ verifyResultsMaxUshortUshortUshort(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUshortUshortUshort: " + e.toString());
}
}
- private void verifyResultsMaxUshortUshortUshort(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUshortUshortUshort(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUshortUshortUshort args = new ArgumentsUshortUshortUshort();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1163,11 +1163,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1186,39 +1186,39 @@
}
private void checkMaxUshort2Ushort2Ushort2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 2, 0xf42196a588de51bfl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 2, 0xf42196a588de51c0l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 2, 0xbe3c50e6150b1f95l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 2, 0xbe3c50e6150b1f96l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUshort2Ushort2Ushort2(inV1, out);
- verifyResultsMaxUshort2Ushort2Ushort2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUshort2Ushort2Ushort2(inA, out);
+ verifyResultsMaxUshort2Ushort2Ushort2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUshort2Ushort2Ushort2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUshort2Ushort2Ushort2(inV1, out);
- verifyResultsMaxUshort2Ushort2Ushort2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUshort2Ushort2Ushort2(inA, out);
+ verifyResultsMaxUshort2Ushort2Ushort2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUshort2Ushort2Ushort2: " + e.toString());
}
}
- private void verifyResultsMaxUshort2Ushort2Ushort2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUshort2Ushort2Ushort2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsUshortUshortUshort args = new ArgumentsUshortUshortUshort();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1228,11 +1228,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1251,39 +1251,39 @@
}
private void checkMaxUshort3Ushort3Ushort3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 3, 0x71604884c752e61cl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 3, 0x71604884c752e61dl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 3, 0x3e2be9df5df0112cl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 3, 0x3e2be9df5df0112dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUshort3Ushort3Ushort3(inV1, out);
- verifyResultsMaxUshort3Ushort3Ushort3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUshort3Ushort3Ushort3(inA, out);
+ verifyResultsMaxUshort3Ushort3Ushort3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUshort3Ushort3Ushort3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUshort3Ushort3Ushort3(inV1, out);
- verifyResultsMaxUshort3Ushort3Ushort3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUshort3Ushort3Ushort3(inA, out);
+ verifyResultsMaxUshort3Ushort3Ushort3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUshort3Ushort3Ushort3: " + e.toString());
}
}
- private void verifyResultsMaxUshort3Ushort3Ushort3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUshort3Ushort3Ushort3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsUshortUshortUshort args = new ArgumentsUshortUshortUshort();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1293,11 +1293,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1316,39 +1316,39 @@
}
private void checkMaxUshort4Ushort4Ushort4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 4, 0xee9efa6405c77a79l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 4, 0xee9efa6405c77a7al, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 4, 0xbe1b82d8a6d502c3l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 4, 0xbe1b82d8a6d502c4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUshort4Ushort4Ushort4(inV1, out);
- verifyResultsMaxUshort4Ushort4Ushort4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUshort4Ushort4Ushort4(inA, out);
+ verifyResultsMaxUshort4Ushort4Ushort4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUshort4Ushort4Ushort4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUshort4Ushort4Ushort4(inV1, out);
- verifyResultsMaxUshort4Ushort4Ushort4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUshort4Ushort4Ushort4(inA, out);
+ verifyResultsMaxUshort4Ushort4Ushort4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUshort4Ushort4Ushort4: " + e.toString());
}
}
- private void verifyResultsMaxUshort4Ushort4Ushort4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUshort4Ushort4Ushort4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsUshortUshortUshort args = new ArgumentsUshortUshortUshort();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1358,11 +1358,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1381,45 +1381,45 @@
}
public class ArgumentsIntIntInt {
- public int inV1;
- public int inV2;
+ public int inA;
+ public int inB;
public int out;
}
private void checkMaxIntIntInt() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x7413f465641a51bl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x7413f465641a51cl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x773d0d60e43d0fa9l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x773d0d60e43d0faal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxIntIntInt(inV1, out);
- verifyResultsMaxIntIntInt(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxIntIntInt(inA, out);
+ verifyResultsMaxIntIntInt(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxIntIntInt: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxIntIntInt(inV1, out);
- verifyResultsMaxIntIntInt(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxIntIntInt(inA, out);
+ verifyResultsMaxIntIntInt(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxIntIntInt: " + e.toString());
}
}
- private void verifyResultsMaxIntIntInt(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxIntIntInt(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsIntIntInt args = new ArgumentsIntIntInt();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1429,11 +1429,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1452,39 +1452,39 @@
}
private void checkMaxInt2Int2Int2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x7bba1e4a83816bd5l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x7bba1e4a83816bd6l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x32815a01bb9dccd7l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x32815a01bb9dccd8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxInt2Int2Int2(inV1, out);
- verifyResultsMaxInt2Int2Int2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxInt2Int2Int2(inA, out);
+ verifyResultsMaxInt2Int2Int2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxInt2Int2Int2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxInt2Int2Int2(inV1, out);
- verifyResultsMaxInt2Int2Int2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxInt2Int2Int2(inA, out);
+ verifyResultsMaxInt2Int2Int2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxInt2Int2Int2: " + e.toString());
}
}
- private void verifyResultsMaxInt2Int2Int2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxInt2Int2Int2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsIntIntInt args = new ArgumentsIntIntInt();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1494,11 +1494,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1517,39 +1517,39 @@
}
private void checkMaxInt3Int3Int3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0xa647496a95547ff8l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0xa647496a95547ff9l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x3f66ddfc867314c0l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x3f66ddfc867314c1l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxInt3Int3Int3(inV1, out);
- verifyResultsMaxInt3Int3Int3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxInt3Int3Int3(inA, out);
+ verifyResultsMaxInt3Int3Int3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxInt3Int3Int3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxInt3Int3Int3(inV1, out);
- verifyResultsMaxInt3Int3Int3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxInt3Int3Int3(inA, out);
+ verifyResultsMaxInt3Int3Int3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxInt3Int3Int3: " + e.toString());
}
}
- private void verifyResultsMaxInt3Int3Int3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxInt3Int3Int3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsIntIntInt args = new ArgumentsIntIntInt();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1559,11 +1559,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1582,39 +1582,39 @@
}
private void checkMaxInt4Int4Int4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0xd0d4748aa727941bl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0xd0d4748aa727941cl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x4c4c61f751485ca9l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x4c4c61f751485caal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxInt4Int4Int4(inV1, out);
- verifyResultsMaxInt4Int4Int4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxInt4Int4Int4(inA, out);
+ verifyResultsMaxInt4Int4Int4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxInt4Int4Int4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxInt4Int4Int4(inV1, out);
- verifyResultsMaxInt4Int4Int4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxInt4Int4Int4(inA, out);
+ verifyResultsMaxInt4Int4Int4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxInt4Int4Int4: " + e.toString());
}
}
- private void verifyResultsMaxInt4Int4Int4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxInt4Int4Int4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsIntIntInt args = new ArgumentsIntIntInt();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1624,11 +1624,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1647,45 +1647,45 @@
}
public class ArgumentsUintUintUint {
- public int inV1;
- public int inV2;
+ public int inA;
+ public int inB;
public int out;
}
private void checkMaxUintUintUint() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0x75328d17808776cal, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0x75328d17808776cbl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0xcd24e58385f73e36l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0xcd24e58385f73e37l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUintUintUint(inV1, out);
- verifyResultsMaxUintUintUint(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUintUintUint(inA, out);
+ verifyResultsMaxUintUintUint(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUintUintUint: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUintUintUint(inV1, out);
- verifyResultsMaxUintUintUint(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUintUintUint(inA, out);
+ verifyResultsMaxUintUintUint(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUintUintUint: " + e.toString());
}
}
- private void verifyResultsMaxUintUintUint(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUintUintUint(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUintUintUint args = new ArgumentsUintUintUint();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1695,11 +1695,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1718,39 +1718,39 @@
}
private void checkMaxUint2Uint2Uint2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 2, 0xcda90384705016a4l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 2, 0xcda90384705016a5l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 2, 0xbd5747860e84d6c4l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 2, 0xbd5747860e84d6c5l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUint2Uint2Uint2(inV1, out);
- verifyResultsMaxUint2Uint2Uint2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUint2Uint2Uint2(inA, out);
+ verifyResultsMaxUint2Uint2Uint2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUint2Uint2Uint2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUint2Uint2Uint2(inV1, out);
- verifyResultsMaxUint2Uint2Uint2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUint2Uint2Uint2(inA, out);
+ verifyResultsMaxUint2Uint2Uint2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUint2Uint2Uint2: " + e.toString());
}
}
- private void verifyResultsMaxUint2Uint2Uint2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUint2Uint2Uint2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsUintUintUint args = new ArgumentsUintUintUint();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1760,11 +1760,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1783,39 +1783,39 @@
}
private void checkMaxUint3Uint3Uint3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 3, 0x22fa7fb75507e969l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 3, 0x22fa7fb75507e96al, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 3, 0xe30bc76f6d23e793l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 3, 0xe30bc76f6d23e794l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUint3Uint3Uint3(inV1, out);
- verifyResultsMaxUint3Uint3Uint3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUint3Uint3Uint3(inA, out);
+ verifyResultsMaxUint3Uint3Uint3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUint3Uint3Uint3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUint3Uint3Uint3(inV1, out);
- verifyResultsMaxUint3Uint3Uint3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUint3Uint3Uint3(inA, out);
+ verifyResultsMaxUint3Uint3Uint3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUint3Uint3Uint3: " + e.toString());
}
}
- private void verifyResultsMaxUint3Uint3Uint3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUint3Uint3Uint3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsUintUintUint args = new ArgumentsUintUintUint();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1825,11 +1825,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1848,39 +1848,39 @@
}
private void checkMaxUint4Uint4Uint4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 4, 0x784bfbea39bfbc2el, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 4, 0x784bfbea39bfbc2fl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 4, 0x8c04758cbc2f862l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 4, 0x8c04758cbc2f863l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUint4Uint4Uint4(inV1, out);
- verifyResultsMaxUint4Uint4Uint4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUint4Uint4Uint4(inA, out);
+ verifyResultsMaxUint4Uint4Uint4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUint4Uint4Uint4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUint4Uint4Uint4(inV1, out);
- verifyResultsMaxUint4Uint4Uint4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUint4Uint4Uint4(inA, out);
+ verifyResultsMaxUint4Uint4Uint4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUint4Uint4Uint4: " + e.toString());
}
}
- private void verifyResultsMaxUint4Uint4Uint4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUint4Uint4Uint4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsUintUintUint args = new ArgumentsUintUintUint();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1890,11 +1890,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1913,45 +1913,45 @@
}
public class ArgumentsLongLongLong {
- public long inV1;
- public long inV2;
+ public long inA;
+ public long inB;
public long out;
}
private void checkMaxLongLongLong() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 1, 0xe224db3c7ecb92e4l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 1, 0xe224db3c7ecb92e5l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 1, 0x542587285eceb84l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 1, 0x542587285eceb85l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxLongLongLong(inV1, out);
- verifyResultsMaxLongLongLong(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxLongLongLong(inA, out);
+ verifyResultsMaxLongLongLong(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxLongLongLong: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxLongLongLong(inV1, out);
- verifyResultsMaxLongLongLong(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxLongLongLong(inA, out);
+ verifyResultsMaxLongLongLong(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxLongLongLong: " + e.toString());
}
}
- private void verifyResultsMaxLongLongLong(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxLongLongLong(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsLongLongLong args = new ArgumentsLongLongLong();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -1961,11 +1961,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1984,39 +1984,39 @@
}
private void checkMaxLong2Long2Long2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 2, 0x375f5f0ca264eb56l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 2, 0x375f5f0ca264eb57l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 2, 0xc5c0bac4c249c9dal, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 2, 0xc5c0bac4c249c9dbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxLong2Long2Long2(inV1, out);
- verifyResultsMaxLong2Long2Long2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxLong2Long2Long2(inA, out);
+ verifyResultsMaxLong2Long2Long2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxLong2Long2Long2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxLong2Long2Long2(inV1, out);
- verifyResultsMaxLong2Long2Long2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxLong2Long2Long2(inA, out);
+ verifyResultsMaxLong2Long2Long2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxLong2Long2Long2: " + e.toString());
}
}
- private void verifyResultsMaxLong2Long2Long2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxLong2Long2Long2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsLongLongLong args = new ArgumentsLongLongLong();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -2026,11 +2026,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -2049,39 +2049,39 @@
}
private void checkMaxLong3Long3Long3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 3, 0x8cb0db3f871cbe1bl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 3, 0x8cb0db3f871cbe1cl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 3, 0xeb753aae20e8daa9l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 3, 0xeb753aae20e8daaal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxLong3Long3Long3(inV1, out);
- verifyResultsMaxLong3Long3Long3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxLong3Long3Long3(inA, out);
+ verifyResultsMaxLong3Long3Long3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxLong3Long3Long3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxLong3Long3Long3(inV1, out);
- verifyResultsMaxLong3Long3Long3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxLong3Long3Long3(inA, out);
+ verifyResultsMaxLong3Long3Long3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxLong3Long3Long3: " + e.toString());
}
}
- private void verifyResultsMaxLong3Long3Long3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxLong3Long3Long3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsLongLongLong args = new ArgumentsLongLongLong();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -2091,11 +2091,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -2114,39 +2114,39 @@
}
private void checkMaxLong4Long4Long4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 4, 0xe20257726bd490e0l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 4, 0xe20257726bd490e1l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 4, 0x1129ba977f87eb78l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 4, 0x1129ba977f87eb79l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxLong4Long4Long4(inV1, out);
- verifyResultsMaxLong4Long4Long4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxLong4Long4Long4(inA, out);
+ verifyResultsMaxLong4Long4Long4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxLong4Long4Long4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxLong4Long4Long4(inV1, out);
- verifyResultsMaxLong4Long4Long4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxLong4Long4Long4(inA, out);
+ verifyResultsMaxLong4Long4Long4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxLong4Long4Long4: " + e.toString());
}
}
- private void verifyResultsMaxLong4Long4Long4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxLong4Long4Long4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsLongLongLong args = new ArgumentsLongLongLong();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -2156,11 +2156,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -2179,45 +2179,45 @@
}
public class ArgumentsUlongUlongUlong {
- public long inV1;
- public long inV2;
+ public long inA;
+ public long inB;
public long out;
}
private void checkMaxUlongUlongUlong() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 1, 0xb38270e909275f1dl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 1, 0xb38270e909275f1el, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 1, 0x8d1ad8f38f18baafl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 1, 0x8d1ad8f38f18bab0l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUlongUlongUlong(inV1, out);
- verifyResultsMaxUlongUlongUlong(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUlongUlongUlong(inA, out);
+ verifyResultsMaxUlongUlongUlong(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUlongUlongUlong: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUlongUlongUlong(inV1, out);
- verifyResultsMaxUlongUlongUlong(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUlongUlongUlong(inA, out);
+ verifyResultsMaxUlongUlongUlong(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUlongUlongUlong: " + e.toString());
}
}
- private void verifyResultsMaxUlongUlongUlong(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUlongUlongUlong(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUlongUlongUlong args = new ArgumentsUlongUlongUlong();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -2227,11 +2227,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -2250,39 +2250,39 @@
}
private void checkMaxUlong2Ulong2Ulong2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 2, 0x7f6c5ec5fee1a8afl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 2, 0x7f6c5ec5fee1a8b0l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 2, 0x6e2049a55946bc65l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 2, 0x6e2049a55946bc66l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUlong2Ulong2Ulong2(inV1, out);
- verifyResultsMaxUlong2Ulong2Ulong2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUlong2Ulong2Ulong2(inA, out);
+ verifyResultsMaxUlong2Ulong2Ulong2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUlong2Ulong2Ulong2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUlong2Ulong2Ulong2(inV1, out);
- verifyResultsMaxUlong2Ulong2Ulong2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUlong2Ulong2Ulong2(inA, out);
+ verifyResultsMaxUlong2Ulong2Ulong2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUlong2Ulong2Ulong2: " + e.toString());
}
}
- private void verifyResultsMaxUlong2Ulong2Ulong2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUlong2Ulong2Ulong2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsUlongUlongUlong args = new ArgumentsUlongUlongUlong();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -2292,11 +2292,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -2315,39 +2315,39 @@
}
private void checkMaxUlong3Ulong3Ulong3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 3, 0xac5dae264f2beebal, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 3, 0xac5dae264f2beebbl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 3, 0xc28527c55b24be06l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 3, 0xc28527c55b24be07l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUlong3Ulong3Ulong3(inV1, out);
- verifyResultsMaxUlong3Ulong3Ulong3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUlong3Ulong3Ulong3(inA, out);
+ verifyResultsMaxUlong3Ulong3Ulong3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUlong3Ulong3Ulong3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUlong3Ulong3Ulong3(inV1, out);
- verifyResultsMaxUlong3Ulong3Ulong3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUlong3Ulong3Ulong3(inA, out);
+ verifyResultsMaxUlong3Ulong3Ulong3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUlong3Ulong3Ulong3: " + e.toString());
}
}
- private void verifyResultsMaxUlong3Ulong3Ulong3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUlong3Ulong3Ulong3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsUlongUlongUlong args = new ArgumentsUlongUlongUlong();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -2357,11 +2357,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -2380,39 +2380,39 @@
}
private void checkMaxUlong4Ulong4Ulong4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 4, 0xd94efd869f7634c5l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 4, 0xd94efd869f7634c6l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 4, 0x16ea05e55d02bfa7l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 4, 0x16ea05e55d02bfa8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMaxUlong4Ulong4Ulong4(inV1, out);
- verifyResultsMaxUlong4Ulong4Ulong4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMaxUlong4Ulong4Ulong4(inA, out);
+ verifyResultsMaxUlong4Ulong4Ulong4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUlong4Ulong4Ulong4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMaxUlong4Ulong4Ulong4(inV1, out);
- verifyResultsMaxUlong4Ulong4Ulong4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMaxUlong4Ulong4Ulong4(inA, out);
+ verifyResultsMaxUlong4Ulong4Ulong4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMaxUlong4Ulong4Ulong4: " + e.toString());
}
}
- private void verifyResultsMaxUlong4Ulong4Ulong4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMaxUlong4Ulong4Ulong4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsUlongUlongUlong args = new ArgumentsUlongUlongUlong();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMax(args);
// Validate the outputs.
@@ -2422,11 +2422,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMax.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestMax.rs
index dff7927..ae8dd6a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMax.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMax.rs
@@ -19,185 +19,184 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocIn1;
+rs_allocation gAllocInB;
-float __attribute__((kernel)) testMaxFloatFloatFloat(float in, unsigned int x) {
- float in1 = rsGetElementAt_float(gAllocIn1, x);
- return max(in, in1);
+float __attribute__((kernel)) testMaxFloatFloatFloat(float inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return max(inA, inB);
}
-float2 __attribute__((kernel)) testMaxFloat2Float2Float2(float2 in, unsigned int x) {
- float2 in1 = rsGetElementAt_float2(gAllocIn1, x);
- return max(in, in1);
+float2 __attribute__((kernel)) testMaxFloat2Float2Float2(float2 inA, unsigned int x) {
+ float2 inB = rsGetElementAt_float2(gAllocInB, x);
+ return max(inA, inB);
}
-float3 __attribute__((kernel)) testMaxFloat3Float3Float3(float3 in, unsigned int x) {
- float3 in1 = rsGetElementAt_float3(gAllocIn1, x);
- return max(in, in1);
+float3 __attribute__((kernel)) testMaxFloat3Float3Float3(float3 inA, unsigned int x) {
+ float3 inB = rsGetElementAt_float3(gAllocInB, x);
+ return max(inA, inB);
}
-float4 __attribute__((kernel)) testMaxFloat4Float4Float4(float4 in, unsigned int x) {
- float4 in1 = rsGetElementAt_float4(gAllocIn1, x);
- return max(in, in1);
-}
-rs_allocation gAllocInV2;
-
-char __attribute__((kernel)) testMaxCharCharChar(char inV1, unsigned int x) {
- char inV2 = rsGetElementAt_char(gAllocInV2, x);
- return max(inV1, inV2);
+float4 __attribute__((kernel)) testMaxFloat4Float4Float4(float4 inA, unsigned int x) {
+ float4 inB = rsGetElementAt_float4(gAllocInB, x);
+ return max(inA, inB);
}
-char2 __attribute__((kernel)) testMaxChar2Char2Char2(char2 inV1, unsigned int x) {
- char2 inV2 = rsGetElementAt_char2(gAllocInV2, x);
- return max(inV1, inV2);
+char __attribute__((kernel)) testMaxCharCharChar(char inA, unsigned int x) {
+ char inB = rsGetElementAt_char(gAllocInB, x);
+ return max(inA, inB);
}
-char3 __attribute__((kernel)) testMaxChar3Char3Char3(char3 inV1, unsigned int x) {
- char3 inV2 = rsGetElementAt_char3(gAllocInV2, x);
- return max(inV1, inV2);
+char2 __attribute__((kernel)) testMaxChar2Char2Char2(char2 inA, unsigned int x) {
+ char2 inB = rsGetElementAt_char2(gAllocInB, x);
+ return max(inA, inB);
}
-char4 __attribute__((kernel)) testMaxChar4Char4Char4(char4 inV1, unsigned int x) {
- char4 inV2 = rsGetElementAt_char4(gAllocInV2, x);
- return max(inV1, inV2);
+char3 __attribute__((kernel)) testMaxChar3Char3Char3(char3 inA, unsigned int x) {
+ char3 inB = rsGetElementAt_char3(gAllocInB, x);
+ return max(inA, inB);
}
-uchar __attribute__((kernel)) testMaxUcharUcharUchar(uchar inV1, unsigned int x) {
- uchar inV2 = rsGetElementAt_uchar(gAllocInV2, x);
- return max(inV1, inV2);
+char4 __attribute__((kernel)) testMaxChar4Char4Char4(char4 inA, unsigned int x) {
+ char4 inB = rsGetElementAt_char4(gAllocInB, x);
+ return max(inA, inB);
}
-uchar2 __attribute__((kernel)) testMaxUchar2Uchar2Uchar2(uchar2 inV1, unsigned int x) {
- uchar2 inV2 = rsGetElementAt_uchar2(gAllocInV2, x);
- return max(inV1, inV2);
+uchar __attribute__((kernel)) testMaxUcharUcharUchar(uchar inA, unsigned int x) {
+ uchar inB = rsGetElementAt_uchar(gAllocInB, x);
+ return max(inA, inB);
}
-uchar3 __attribute__((kernel)) testMaxUchar3Uchar3Uchar3(uchar3 inV1, unsigned int x) {
- uchar3 inV2 = rsGetElementAt_uchar3(gAllocInV2, x);
- return max(inV1, inV2);
+uchar2 __attribute__((kernel)) testMaxUchar2Uchar2Uchar2(uchar2 inA, unsigned int x) {
+ uchar2 inB = rsGetElementAt_uchar2(gAllocInB, x);
+ return max(inA, inB);
}
-uchar4 __attribute__((kernel)) testMaxUchar4Uchar4Uchar4(uchar4 inV1, unsigned int x) {
- uchar4 inV2 = rsGetElementAt_uchar4(gAllocInV2, x);
- return max(inV1, inV2);
+uchar3 __attribute__((kernel)) testMaxUchar3Uchar3Uchar3(uchar3 inA, unsigned int x) {
+ uchar3 inB = rsGetElementAt_uchar3(gAllocInB, x);
+ return max(inA, inB);
}
-short __attribute__((kernel)) testMaxShortShortShort(short inV1, unsigned int x) {
- short inV2 = rsGetElementAt_short(gAllocInV2, x);
- return max(inV1, inV2);
+uchar4 __attribute__((kernel)) testMaxUchar4Uchar4Uchar4(uchar4 inA, unsigned int x) {
+ uchar4 inB = rsGetElementAt_uchar4(gAllocInB, x);
+ return max(inA, inB);
}
-short2 __attribute__((kernel)) testMaxShort2Short2Short2(short2 inV1, unsigned int x) {
- short2 inV2 = rsGetElementAt_short2(gAllocInV2, x);
- return max(inV1, inV2);
+short __attribute__((kernel)) testMaxShortShortShort(short inA, unsigned int x) {
+ short inB = rsGetElementAt_short(gAllocInB, x);
+ return max(inA, inB);
}
-short3 __attribute__((kernel)) testMaxShort3Short3Short3(short3 inV1, unsigned int x) {
- short3 inV2 = rsGetElementAt_short3(gAllocInV2, x);
- return max(inV1, inV2);
+short2 __attribute__((kernel)) testMaxShort2Short2Short2(short2 inA, unsigned int x) {
+ short2 inB = rsGetElementAt_short2(gAllocInB, x);
+ return max(inA, inB);
}
-short4 __attribute__((kernel)) testMaxShort4Short4Short4(short4 inV1, unsigned int x) {
- short4 inV2 = rsGetElementAt_short4(gAllocInV2, x);
- return max(inV1, inV2);
+short3 __attribute__((kernel)) testMaxShort3Short3Short3(short3 inA, unsigned int x) {
+ short3 inB = rsGetElementAt_short3(gAllocInB, x);
+ return max(inA, inB);
}
-ushort __attribute__((kernel)) testMaxUshortUshortUshort(ushort inV1, unsigned int x) {
- ushort inV2 = rsGetElementAt_ushort(gAllocInV2, x);
- return max(inV1, inV2);
+short4 __attribute__((kernel)) testMaxShort4Short4Short4(short4 inA, unsigned int x) {
+ short4 inB = rsGetElementAt_short4(gAllocInB, x);
+ return max(inA, inB);
}
-ushort2 __attribute__((kernel)) testMaxUshort2Ushort2Ushort2(ushort2 inV1, unsigned int x) {
- ushort2 inV2 = rsGetElementAt_ushort2(gAllocInV2, x);
- return max(inV1, inV2);
+ushort __attribute__((kernel)) testMaxUshortUshortUshort(ushort inA, unsigned int x) {
+ ushort inB = rsGetElementAt_ushort(gAllocInB, x);
+ return max(inA, inB);
}
-ushort3 __attribute__((kernel)) testMaxUshort3Ushort3Ushort3(ushort3 inV1, unsigned int x) {
- ushort3 inV2 = rsGetElementAt_ushort3(gAllocInV2, x);
- return max(inV1, inV2);
+ushort2 __attribute__((kernel)) testMaxUshort2Ushort2Ushort2(ushort2 inA, unsigned int x) {
+ ushort2 inB = rsGetElementAt_ushort2(gAllocInB, x);
+ return max(inA, inB);
}
-ushort4 __attribute__((kernel)) testMaxUshort4Ushort4Ushort4(ushort4 inV1, unsigned int x) {
- ushort4 inV2 = rsGetElementAt_ushort4(gAllocInV2, x);
- return max(inV1, inV2);
+ushort3 __attribute__((kernel)) testMaxUshort3Ushort3Ushort3(ushort3 inA, unsigned int x) {
+ ushort3 inB = rsGetElementAt_ushort3(gAllocInB, x);
+ return max(inA, inB);
}
-int __attribute__((kernel)) testMaxIntIntInt(int inV1, unsigned int x) {
- int inV2 = rsGetElementAt_int(gAllocInV2, x);
- return max(inV1, inV2);
+ushort4 __attribute__((kernel)) testMaxUshort4Ushort4Ushort4(ushort4 inA, unsigned int x) {
+ ushort4 inB = rsGetElementAt_ushort4(gAllocInB, x);
+ return max(inA, inB);
}
-int2 __attribute__((kernel)) testMaxInt2Int2Int2(int2 inV1, unsigned int x) {
- int2 inV2 = rsGetElementAt_int2(gAllocInV2, x);
- return max(inV1, inV2);
+int __attribute__((kernel)) testMaxIntIntInt(int inA, unsigned int x) {
+ int inB = rsGetElementAt_int(gAllocInB, x);
+ return max(inA, inB);
}
-int3 __attribute__((kernel)) testMaxInt3Int3Int3(int3 inV1, unsigned int x) {
- int3 inV2 = rsGetElementAt_int3(gAllocInV2, x);
- return max(inV1, inV2);
+int2 __attribute__((kernel)) testMaxInt2Int2Int2(int2 inA, unsigned int x) {
+ int2 inB = rsGetElementAt_int2(gAllocInB, x);
+ return max(inA, inB);
}
-int4 __attribute__((kernel)) testMaxInt4Int4Int4(int4 inV1, unsigned int x) {
- int4 inV2 = rsGetElementAt_int4(gAllocInV2, x);
- return max(inV1, inV2);
+int3 __attribute__((kernel)) testMaxInt3Int3Int3(int3 inA, unsigned int x) {
+ int3 inB = rsGetElementAt_int3(gAllocInB, x);
+ return max(inA, inB);
}
-uint __attribute__((kernel)) testMaxUintUintUint(uint inV1, unsigned int x) {
- uint inV2 = rsGetElementAt_uint(gAllocInV2, x);
- return max(inV1, inV2);
+int4 __attribute__((kernel)) testMaxInt4Int4Int4(int4 inA, unsigned int x) {
+ int4 inB = rsGetElementAt_int4(gAllocInB, x);
+ return max(inA, inB);
}
-uint2 __attribute__((kernel)) testMaxUint2Uint2Uint2(uint2 inV1, unsigned int x) {
- uint2 inV2 = rsGetElementAt_uint2(gAllocInV2, x);
- return max(inV1, inV2);
+uint __attribute__((kernel)) testMaxUintUintUint(uint inA, unsigned int x) {
+ uint inB = rsGetElementAt_uint(gAllocInB, x);
+ return max(inA, inB);
}
-uint3 __attribute__((kernel)) testMaxUint3Uint3Uint3(uint3 inV1, unsigned int x) {
- uint3 inV2 = rsGetElementAt_uint3(gAllocInV2, x);
- return max(inV1, inV2);
+uint2 __attribute__((kernel)) testMaxUint2Uint2Uint2(uint2 inA, unsigned int x) {
+ uint2 inB = rsGetElementAt_uint2(gAllocInB, x);
+ return max(inA, inB);
}
-uint4 __attribute__((kernel)) testMaxUint4Uint4Uint4(uint4 inV1, unsigned int x) {
- uint4 inV2 = rsGetElementAt_uint4(gAllocInV2, x);
- return max(inV1, inV2);
+uint3 __attribute__((kernel)) testMaxUint3Uint3Uint3(uint3 inA, unsigned int x) {
+ uint3 inB = rsGetElementAt_uint3(gAllocInB, x);
+ return max(inA, inB);
}
-long __attribute__((kernel)) testMaxLongLongLong(long inV1, unsigned int x) {
- long inV2 = rsGetElementAt_long(gAllocInV2, x);
- return max(inV1, inV2);
+uint4 __attribute__((kernel)) testMaxUint4Uint4Uint4(uint4 inA, unsigned int x) {
+ uint4 inB = rsGetElementAt_uint4(gAllocInB, x);
+ return max(inA, inB);
}
-long2 __attribute__((kernel)) testMaxLong2Long2Long2(long2 inV1, unsigned int x) {
- long2 inV2 = rsGetElementAt_long2(gAllocInV2, x);
- return max(inV1, inV2);
+long __attribute__((kernel)) testMaxLongLongLong(long inA, unsigned int x) {
+ long inB = rsGetElementAt_long(gAllocInB, x);
+ return max(inA, inB);
}
-long3 __attribute__((kernel)) testMaxLong3Long3Long3(long3 inV1, unsigned int x) {
- long3 inV2 = rsGetElementAt_long3(gAllocInV2, x);
- return max(inV1, inV2);
+long2 __attribute__((kernel)) testMaxLong2Long2Long2(long2 inA, unsigned int x) {
+ long2 inB = rsGetElementAt_long2(gAllocInB, x);
+ return max(inA, inB);
}
-long4 __attribute__((kernel)) testMaxLong4Long4Long4(long4 inV1, unsigned int x) {
- long4 inV2 = rsGetElementAt_long4(gAllocInV2, x);
- return max(inV1, inV2);
+long3 __attribute__((kernel)) testMaxLong3Long3Long3(long3 inA, unsigned int x) {
+ long3 inB = rsGetElementAt_long3(gAllocInB, x);
+ return max(inA, inB);
}
-ulong __attribute__((kernel)) testMaxUlongUlongUlong(ulong inV1, unsigned int x) {
- ulong inV2 = rsGetElementAt_ulong(gAllocInV2, x);
- return max(inV1, inV2);
+long4 __attribute__((kernel)) testMaxLong4Long4Long4(long4 inA, unsigned int x) {
+ long4 inB = rsGetElementAt_long4(gAllocInB, x);
+ return max(inA, inB);
}
-ulong2 __attribute__((kernel)) testMaxUlong2Ulong2Ulong2(ulong2 inV1, unsigned int x) {
- ulong2 inV2 = rsGetElementAt_ulong2(gAllocInV2, x);
- return max(inV1, inV2);
+ulong __attribute__((kernel)) testMaxUlongUlongUlong(ulong inA, unsigned int x) {
+ ulong inB = rsGetElementAt_ulong(gAllocInB, x);
+ return max(inA, inB);
}
-ulong3 __attribute__((kernel)) testMaxUlong3Ulong3Ulong3(ulong3 inV1, unsigned int x) {
- ulong3 inV2 = rsGetElementAt_ulong3(gAllocInV2, x);
- return max(inV1, inV2);
+ulong2 __attribute__((kernel)) testMaxUlong2Ulong2Ulong2(ulong2 inA, unsigned int x) {
+ ulong2 inB = rsGetElementAt_ulong2(gAllocInB, x);
+ return max(inA, inB);
}
-ulong4 __attribute__((kernel)) testMaxUlong4Ulong4Ulong4(ulong4 inV1, unsigned int x) {
- ulong4 inV2 = rsGetElementAt_ulong4(gAllocInV2, x);
- return max(inV1, inV2);
+ulong3 __attribute__((kernel)) testMaxUlong3Ulong3Ulong3(ulong3 inA, unsigned int x) {
+ ulong3 inB = rsGetElementAt_ulong3(gAllocInB, x);
+ return max(inA, inB);
+}
+
+ulong4 __attribute__((kernel)) testMaxUlong4Ulong4Ulong4(ulong4 inA, unsigned int x) {
+ ulong4 inB = rsGetElementAt_ulong4(gAllocInB, x);
+ return max(inA, inB);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestMin.java
index a04ef55..fa6aea0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMin.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float in;
- public float in1;
+ public float inA;
+ public float inB;
public Target.Floaty out;
}
private void checkMinFloatFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x816f2fe273bf4977l, false);
- Allocation in1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xbdad0b097121572el, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xbdad0b097121573el, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xbdad0b097121573fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocIn1(in1);
- script.forEach_testMinFloatFloatFloat(in, out);
- verifyResultsMinFloatFloatFloat(in, in1, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinFloatFloatFloat(inA, out);
+ verifyResultsMinFloatFloatFloat(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocIn1(in1);
- scriptRelaxed.forEach_testMinFloatFloatFloat(in, out);
- verifyResultsMinFloatFloatFloat(in, in1, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinFloatFloatFloat(inA, out);
+ verifyResultsMinFloatFloatFloat(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsMinFloatFloatFloat(Allocation in, Allocation in1, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
- float[] arrayIn1 = new float[INPUTSIZE * 1];
- in1.copyTo(arrayIn1);
+ private void verifyResultsMinFloatFloatFloat(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.in = arrayIn[i];
- args.in1 = arrayIn1[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMin(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input in1: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in1, Float.floatToRawIntBits(args.in1), args.in1));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkMinFloat2Float2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xe354049301b6cfb9l, false);
- Allocation in1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2f1cc4b149b4e444l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2f1cc4b149b4e454l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2f1cc4b149b4e455l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocIn1(in1);
- script.forEach_testMinFloat2Float2Float2(in, out);
- verifyResultsMinFloat2Float2Float2(in, in1, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinFloat2Float2Float2(inA, out);
+ verifyResultsMinFloat2Float2Float2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocIn1(in1);
- scriptRelaxed.forEach_testMinFloat2Float2Float2(in, out);
- verifyResultsMinFloat2Float2Float2(in, in1, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinFloat2Float2Float2(inA, out);
+ verifyResultsMinFloat2Float2Float2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsMinFloat2Float2Float2(Allocation in, Allocation in1, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
- float[] arrayIn1 = new float[INPUTSIZE * 2];
- in1.copyTo(arrayIn1);
+ private void verifyResultsMinFloat2Float2Float2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.in = arrayIn[i * 2 + j];
- args.in1 = arrayIn1[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMin(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input in1: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in1, Float.floatToRawIntBits(args.in1), args.in1));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkMinFloat3Float3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x38a3c24c4f27231cl, false);
- Allocation in1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8381a2d14b92e5e5l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8381a2d14b92e5f5l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8381a2d14b92e5f6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocIn1(in1);
- script.forEach_testMinFloat3Float3Float3(in, out);
- verifyResultsMinFloat3Float3Float3(in, in1, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinFloat3Float3Float3(inA, out);
+ verifyResultsMinFloat3Float3Float3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocIn1(in1);
- scriptRelaxed.forEach_testMinFloat3Float3Float3(in, out);
- verifyResultsMinFloat3Float3Float3(in, in1, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinFloat3Float3Float3(inA, out);
+ verifyResultsMinFloat3Float3Float3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsMinFloat3Float3Float3(Allocation in, Allocation in1, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
- float[] arrayIn1 = new float[INPUTSIZE * 4];
- in1.copyTo(arrayIn1);
+ private void verifyResultsMinFloat3Float3Float3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.in = arrayIn[i * 4 + j];
- args.in1 = arrayIn1[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMin(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input in1: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in1, Float.floatToRawIntBits(args.in1), args.in1));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkMinFloat4Float4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8df380059c97767fl, false);
- Allocation in1 = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd7e680f14d70e786l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd7e680f14d70e796l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd7e680f14d70e797l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocIn1(in1);
- script.forEach_testMinFloat4Float4Float4(in, out);
- verifyResultsMinFloat4Float4Float4(in, in1, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinFloat4Float4Float4(inA, out);
+ verifyResultsMinFloat4Float4Float4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocIn1(in1);
- scriptRelaxed.forEach_testMinFloat4Float4Float4(in, out);
- verifyResultsMinFloat4Float4Float4(in, in1, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinFloat4Float4Float4(inA, out);
+ verifyResultsMinFloat4Float4Float4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsMinFloat4Float4Float4(Allocation in, Allocation in1, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
- float[] arrayIn1 = new float[INPUTSIZE * 4];
- in1.copyTo(arrayIn1);
+ private void verifyResultsMinFloat4Float4Float4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.in = arrayIn[i * 4 + j];
- args.in1 = arrayIn1[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMin(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input in1: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in1, Float.floatToRawIntBits(args.in1), args.in1));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -317,45 +317,45 @@
}
public class ArgumentsCharCharChar {
- public byte inV1;
- public byte inV2;
+ public byte inA;
+ public byte inB;
public byte out;
}
private void checkMinCharCharChar() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x47c90c486fc45b58l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x47c90c486fc45b59l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x78bd3bd20e8196e0l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 1, 0x78bd3bd20e8196e1l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinCharCharChar(inV1, out);
- verifyResultsMinCharCharChar(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinCharCharChar(inA, out);
+ verifyResultsMinCharCharChar(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinCharCharChar: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinCharCharChar(inV1, out);
- verifyResultsMinCharCharChar(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinCharCharChar(inA, out);
+ verifyResultsMinCharCharChar(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinCharCharChar: " + e.toString());
}
}
- private void verifyResultsMinCharCharChar(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinCharCharChar(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsCharCharChar args = new ArgumentsCharCharChar();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -365,11 +365,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -388,39 +388,39 @@
}
private void checkMinChar2Char2Char2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0xec4705afc03447ael, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0xec4705afc03447afl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0x29373baac8ef5ae2l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 2, 0x29373baac8ef5ae3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinChar2Char2Char2(inV1, out);
- verifyResultsMinChar2Char2Char2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinChar2Char2Char2(inA, out);
+ verifyResultsMinChar2Char2Char2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinChar2Char2Char2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinChar2Char2Char2(inV1, out);
- verifyResultsMinChar2Char2Char2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinChar2Char2Char2(inA, out);
+ verifyResultsMinChar2Char2Char2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinChar2Char2Char2: " + e.toString());
}
}
- private void verifyResultsMinChar2Char2Char2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinChar2Char2Char2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsCharCharChar args = new ArgumentsCharCharChar();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -430,11 +430,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -453,39 +453,39 @@
}
private void checkMinChar3Char3Char3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0x419881e2a4ec1a73l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0x419881e2a4ec1a74l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0x4eebbb94278e6bb1l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 3, 0x4eebbb94278e6bb2l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinChar3Char3Char3(inV1, out);
- verifyResultsMinChar3Char3Char3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinChar3Char3Char3(inA, out);
+ verifyResultsMinChar3Char3Char3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinChar3Char3Char3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinChar3Char3Char3(inV1, out);
- verifyResultsMinChar3Char3Char3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinChar3Char3Char3(inA, out);
+ verifyResultsMinChar3Char3Char3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinChar3Char3Char3: " + e.toString());
}
}
- private void verifyResultsMinChar3Char3Char3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinChar3Char3Char3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsCharCharChar args = new ArgumentsCharCharChar();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -495,11 +495,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -518,39 +518,39 @@
}
private void checkMinChar4Char4Char4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0x96e9fe1589a3ed38l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0x96e9fe1589a3ed39l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0x74a03b7d862d7c80l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_8, 4, 0x74a03b7d862d7c81l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinChar4Char4Char4(inV1, out);
- verifyResultsMinChar4Char4Char4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinChar4Char4Char4(inA, out);
+ verifyResultsMinChar4Char4Char4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinChar4Char4Char4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_8, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinChar4Char4Char4(inV1, out);
- verifyResultsMinChar4Char4Char4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinChar4Char4Char4(inA, out);
+ verifyResultsMinChar4Char4Char4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinChar4Char4Char4: " + e.toString());
}
}
- private void verifyResultsMinChar4Char4Char4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinChar4Char4Char4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsCharCharChar args = new ArgumentsCharCharChar();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -560,11 +560,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -583,45 +583,45 @@
}
public class ArgumentsUcharUcharUchar {
- public byte inV1;
- public byte inV2;
+ public byte inA;
+ public byte inB;
public byte out;
}
private void checkMinUcharUcharUchar() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 1, 0x6dc5402bc7a34891l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 1, 0x6dc5402bc7a34892l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 1, 0x1469cbe93445490bl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 1, 0x1469cbe93445490cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUcharUcharUchar(inV1, out);
- verifyResultsMinUcharUcharUchar(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUcharUcharUchar(inA, out);
+ verifyResultsMinUcharUcharUchar(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUcharUcharUchar: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUcharUcharUchar(inV1, out);
- verifyResultsMinUcharUcharUchar(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUcharUcharUchar(inA, out);
+ verifyResultsMinUcharUcharUchar(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUcharUcharUchar: " + e.toString());
}
}
- private void verifyResultsMinUcharUcharUchar(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUcharUcharUchar(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUcharUcharUchar args = new ArgumentsUcharUcharUchar();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -631,11 +631,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -654,39 +654,39 @@
}
private void checkMinUchar2Uchar2Uchar2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 2, 0x1d3c921d166e22ffl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 2, 0x1d3c921d166e2300l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 2, 0x3c36fd71caf0b355l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 2, 0x3c36fd71caf0b356l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUchar2Uchar2Uchar2(inV1, out);
- verifyResultsMinUchar2Uchar2Uchar2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUchar2Uchar2Uchar2(inA, out);
+ verifyResultsMinUchar2Uchar2Uchar2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUchar2Uchar2Uchar2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUchar2Uchar2Uchar2(inV1, out);
- verifyResultsMinUchar2Uchar2Uchar2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUchar2Uchar2Uchar2(inA, out);
+ verifyResultsMinUchar2Uchar2Uchar2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUchar2Uchar2Uchar2: " + e.toString());
}
}
- private void verifyResultsMinUchar2Uchar2Uchar2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUchar2Uchar2Uchar2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsUcharUcharUchar args = new ArgumentsUcharUcharUchar();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -696,11 +696,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -719,39 +719,39 @@
}
private void checkMinUchar3Uchar3Uchar3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 3, 0x4a2de17d66b8690al, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 3, 0x4a2de17d66b8690bl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 3, 0x909bdb91ccceb4f6l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 3, 0x909bdb91ccceb4f7l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUchar3Uchar3Uchar3(inV1, out);
- verifyResultsMinUchar3Uchar3Uchar3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUchar3Uchar3Uchar3(inA, out);
+ verifyResultsMinUchar3Uchar3Uchar3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUchar3Uchar3Uchar3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUchar3Uchar3Uchar3(inV1, out);
- verifyResultsMinUchar3Uchar3Uchar3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUchar3Uchar3Uchar3(inA, out);
+ verifyResultsMinUchar3Uchar3Uchar3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUchar3Uchar3Uchar3: " + e.toString());
}
}
- private void verifyResultsMinUchar3Uchar3Uchar3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUchar3Uchar3Uchar3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsUcharUcharUchar args = new ArgumentsUcharUcharUchar();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -761,11 +761,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -784,39 +784,39 @@
}
private void checkMinUchar4Uchar4Uchar4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 4, 0x771f30ddb702af15l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 4, 0x771f30ddb702af16l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 4, 0xe500b9b1ceacb697l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_8, 4, 0xe500b9b1ceacb698l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUchar4Uchar4Uchar4(inV1, out);
- verifyResultsMinUchar4Uchar4Uchar4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUchar4Uchar4Uchar4(inA, out);
+ verifyResultsMinUchar4Uchar4Uchar4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUchar4Uchar4Uchar4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_8, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUchar4Uchar4Uchar4(inV1, out);
- verifyResultsMinUchar4Uchar4Uchar4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUchar4Uchar4Uchar4(inA, out);
+ verifyResultsMinUchar4Uchar4Uchar4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUchar4Uchar4Uchar4: " + e.toString());
}
}
- private void verifyResultsMinUchar4Uchar4Uchar4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- byte[] arrayInV1 = new byte[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- byte[] arrayInV2 = new byte[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUchar4Uchar4Uchar4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ byte[] arrayInA = new byte[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ byte[] arrayInB = new byte[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
byte[] arrayOut = new byte[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsUcharUcharUchar args = new ArgumentsUcharUcharUchar();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -826,11 +826,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -849,45 +849,45 @@
}
public class ArgumentsShortShortShort {
- public short inV1;
- public short inV2;
+ public short inA;
+ public short inB;
public short out;
}
private void checkMinShortShortShort() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0x71b08dd3c65bcddel, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0x71b08dd3c65bcddfl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0x265d6881f2c0a572l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 1, 0x265d6881f2c0a573l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinShortShortShort(inV1, out);
- verifyResultsMinShortShortShort(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinShortShortShort(inA, out);
+ verifyResultsMinShortShortShort(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinShortShortShort: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinShortShortShort(inV1, out);
- verifyResultsMinShortShortShort(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinShortShortShort(inA, out);
+ verifyResultsMinShortShortShort(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinShortShortShort: " + e.toString());
}
}
- private void verifyResultsMinShortShortShort(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinShortShortShort(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsShortShortShort args = new ArgumentsShortShortShort();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -897,11 +897,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -920,39 +920,39 @@
}
private void checkMinShort2Short2Short2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0xe4959a1ecbf1d380l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0xe4959a1ecbf1d381l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0xac037aa769f3c358l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 2, 0xac037aa769f3c359l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinShort2Short2Short2(inV1, out);
- verifyResultsMinShort2Short2Short2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinShort2Short2Short2(inA, out);
+ verifyResultsMinShort2Short2Short2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinShort2Short2Short2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinShort2Short2Short2(inV1, out);
- verifyResultsMinShort2Short2Short2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinShort2Short2Short2(inA, out);
+ verifyResultsMinShort2Short2Short2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinShort2Short2Short2: " + e.toString());
}
}
- private void verifyResultsMinShort2Short2Short2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinShort2Short2Short2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsShortShortShort args = new ArgumentsShortShortShort();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -962,11 +962,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -985,39 +985,39 @@
}
private void checkMinShort3Short3Short3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x1186e97f1c3c198bl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x1186e97f1c3c198cl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x6858c76bd1c4f9l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 3, 0x6858c76bd1c4fal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinShort3Short3Short3(inV1, out);
- verifyResultsMinShort3Short3Short3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinShort3Short3Short3(inA, out);
+ verifyResultsMinShort3Short3Short3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinShort3Short3Short3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinShort3Short3Short3(inV1, out);
- verifyResultsMinShort3Short3Short3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinShort3Short3Short3(inA, out);
+ verifyResultsMinShort3Short3Short3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinShort3Short3Short3: " + e.toString());
}
}
- private void verifyResultsMinShort3Short3Short3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinShort3Short3Short3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsShortShortShort args = new ArgumentsShortShortShort();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1027,11 +1027,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1050,39 +1050,39 @@
}
private void checkMinShort4Short4Short4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0x3e7838df6c865f96l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0x3e7838df6c865f97l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0x54cd36e76dafc69al, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_16, 4, 0x54cd36e76dafc69bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinShort4Short4Short4(inV1, out);
- verifyResultsMinShort4Short4Short4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinShort4Short4Short4(inA, out);
+ verifyResultsMinShort4Short4Short4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinShort4Short4Short4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_16, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinShort4Short4Short4(inV1, out);
- verifyResultsMinShort4Short4Short4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinShort4Short4Short4(inA, out);
+ verifyResultsMinShort4Short4Short4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinShort4Short4Short4: " + e.toString());
}
}
- private void verifyResultsMinShort4Short4Short4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinShort4Short4Short4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsShortShortShort args = new ArgumentsShortShortShort();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1092,11 +1092,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1115,45 +1115,45 @@
}
public class ArgumentsUshortUshortUshort {
- public short inV1;
- public short inV2;
+ public short inA;
+ public short inB;
public short out;
}
private void checkMinUshortUshortUshort() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 1, 0xc2eb3387512e77cfl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 1, 0xc2eb3387512e77d0l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 1, 0xf8a042afcc4e79c5l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 1, 0xf8a042afcc4e79c6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUshortUshortUshort(inV1, out);
- verifyResultsMinUshortUshortUshort(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUshortUshortUshort(inA, out);
+ verifyResultsMinUshortUshortUshort(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUshortUshortUshort: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUshortUshortUshort(inV1, out);
- verifyResultsMinUshortUshortUshort(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUshortUshortUshort(inA, out);
+ verifyResultsMinUshortUshortUshort(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUshortUshortUshort: " + e.toString());
}
}
- private void verifyResultsMinUshortUshortUshort(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUshortUshortUshort(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUshortUshortUshort args = new ArgumentsUshortUshortUshort();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1163,11 +1163,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1186,39 +1186,39 @@
}
private void checkMinUshort2Ushort2Ushort2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 2, 0x98573ebbc511e319l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 2, 0x98573ebbc511e31al, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 2, 0x2743846f878f4ca3l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 2, 0x2743846f878f4ca4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUshort2Ushort2Ushort2(inV1, out);
- verifyResultsMinUshort2Ushort2Ushort2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUshort2Ushort2Ushort2(inA, out);
+ verifyResultsMinUshort2Ushort2Ushort2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUshort2Ushort2Ushort2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUshort2Ushort2Ushort2(inV1, out);
- verifyResultsMinUshort2Ushort2Ushort2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUshort2Ushort2Ushort2(inA, out);
+ verifyResultsMinUshort2Ushort2Ushort2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUshort2Ushort2Ushort2: " + e.toString());
}
}
- private void verifyResultsMinUshort2Ushort2Ushort2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUshort2Ushort2Ushort2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsUshortUshortUshort args = new ArgumentsUshortUshortUshort();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1228,11 +1228,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1251,39 +1251,39 @@
}
private void checkMinUshort3Ushort3Ushort3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 3, 0x1595f09b03867776l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 3, 0x1595f09b03867777l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 3, 0xa7331d68d0743e3al, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 3, 0xa7331d68d0743e3bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUshort3Ushort3Ushort3(inV1, out);
- verifyResultsMinUshort3Ushort3Ushort3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUshort3Ushort3Ushort3(inA, out);
+ verifyResultsMinUshort3Ushort3Ushort3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUshort3Ushort3Ushort3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUshort3Ushort3Ushort3(inV1, out);
- verifyResultsMinUshort3Ushort3Ushort3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUshort3Ushort3Ushort3(inA, out);
+ verifyResultsMinUshort3Ushort3Ushort3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUshort3Ushort3Ushort3: " + e.toString());
}
}
- private void verifyResultsMinUshort3Ushort3Ushort3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUshort3Ushort3Ushort3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsUshortUshortUshort args = new ArgumentsUshortUshortUshort();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1293,11 +1293,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1316,39 +1316,39 @@
}
private void checkMinUshort4Ushort4Ushort4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 4, 0x92d4a27a41fb0bd3l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 4, 0x92d4a27a41fb0bd4l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 4, 0x2722b66219592fd1l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_16, 4, 0x2722b66219592fd2l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUshort4Ushort4Ushort4(inV1, out);
- verifyResultsMinUshort4Ushort4Ushort4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUshort4Ushort4Ushort4(inA, out);
+ verifyResultsMinUshort4Ushort4Ushort4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUshort4Ushort4Ushort4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_16, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUshort4Ushort4Ushort4(inV1, out);
- verifyResultsMinUshort4Ushort4Ushort4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUshort4Ushort4Ushort4(inA, out);
+ verifyResultsMinUshort4Ushort4Ushort4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUshort4Ushort4Ushort4: " + e.toString());
}
}
- private void verifyResultsMinUshort4Ushort4Ushort4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- short[] arrayInV1 = new short[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- short[] arrayInV2 = new short[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUshort4Ushort4Ushort4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ short[] arrayInA = new short[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ short[] arrayInB = new short[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
short[] arrayOut = new short[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsUshortUshortUshort args = new ArgumentsUshortUshortUshort();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1358,11 +1358,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1381,45 +1381,45 @@
}
public class ArgumentsIntIntInt {
- public int inV1;
- public int inV2;
+ public int inA;
+ public int inB;
public int out;
}
private void checkMinIntIntInt() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x38b24335cda69cd5l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x38b24335cda69cd6l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xfb5d72ade703dfd7l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xfb5d72ade703dfd8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinIntIntInt(inV1, out);
- verifyResultsMinIntIntInt(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinIntIntInt(inA, out);
+ verifyResultsMinIntIntInt(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinIntIntInt: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinIntIntInt(inV1, out);
- verifyResultsMinIntIntInt(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinIntIntInt(inA, out);
+ verifyResultsMinIntIntInt(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinIntIntInt: " + e.toString());
}
}
- private void verifyResultsMinIntIntInt(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinIntIntInt(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsIntIntInt args = new ArgumentsIntIntInt();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1429,11 +1429,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1452,39 +1452,39 @@
}
private void checkMinInt2Int2Int2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0xba635b605676e7a3l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0xba635b605676e7a4l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x4bc6c69713df0b41l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x4bc6c69713df0b42l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinInt2Int2Int2(inV1, out);
- verifyResultsMinInt2Int2Int2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinInt2Int2Int2(inA, out);
+ verifyResultsMinInt2Int2Int2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinInt2Int2Int2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinInt2Int2Int2(inV1, out);
- verifyResultsMinInt2Int2Int2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinInt2Int2Int2(inA, out);
+ verifyResultsMinInt2Int2Int2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinInt2Int2Int2: " + e.toString());
}
}
- private void verifyResultsMinInt2Int2Int2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinInt2Int2Int2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsIntIntInt args = new ArgumentsIntIntInt();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1494,11 +1494,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1517,39 +1517,39 @@
}
private void checkMinInt3Int3Int3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0xe4f086806849fbc6l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0xe4f086806849fbc7l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x58ac4a91deb4532al, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x58ac4a91deb4532bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinInt3Int3Int3(inV1, out);
- verifyResultsMinInt3Int3Int3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinInt3Int3Int3(inA, out);
+ verifyResultsMinInt3Int3Int3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinInt3Int3Int3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinInt3Int3Int3(inV1, out);
- verifyResultsMinInt3Int3Int3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinInt3Int3Int3(inA, out);
+ verifyResultsMinInt3Int3Int3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinInt3Int3Int3: " + e.toString());
}
}
- private void verifyResultsMinInt3Int3Int3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinInt3Int3Int3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsIntIntInt args = new ArgumentsIntIntInt();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1559,11 +1559,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1582,39 +1582,39 @@
}
private void checkMinInt4Int4Int4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0xf7db1a07a1d0fe9l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0xf7db1a07a1d0feal, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x6591ce8ca9899b13l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x6591ce8ca9899b14l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinInt4Int4Int4(inV1, out);
- verifyResultsMinInt4Int4Int4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinInt4Int4Int4(inA, out);
+ verifyResultsMinInt4Int4Int4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinInt4Int4Int4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinInt4Int4Int4(inV1, out);
- verifyResultsMinInt4Int4Int4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinInt4Int4Int4(inA, out);
+ verifyResultsMinInt4Int4Int4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinInt4Int4Int4: " + e.toString());
}
}
- private void verifyResultsMinInt4Int4Int4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinInt4Int4Int4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsIntIntInt args = new ArgumentsIntIntInt();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1624,11 +1624,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1647,45 +1647,45 @@
}
public class ArgumentsUintUintUint {
- public int inV1;
- public int inV2;
+ public int inA;
+ public int inB;
public int out;
}
private void checkMinUintUintUint() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0xb3dbca2d537cf298l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0xb3dbca2d537cf299l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0xe66a5218de387ca0l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0xe66a5218de387ca1l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUintUintUint(inV1, out);
- verifyResultsMinUintUintUint(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUintUintUint(inA, out);
+ verifyResultsMinUintUintUint(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUintUintUint: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUintUintUint(inV1, out);
- verifyResultsMinUintUintUint(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUintUintUint(inA, out);
+ verifyResultsMinUintUintUint(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUintUintUint: " + e.toString());
}
}
- private void verifyResultsMinUintUintUint(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUintUintUint(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUintUintUint args = new ArgumentsUintUintUint();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1695,11 +1695,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1718,39 +1718,39 @@
}
private void checkMinUint2Uint2Uint2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 2, 0xb8cf8481d731a1eel, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 2, 0xb8cf8481d731a1efl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 2, 0x51b17a26bd9009a2l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 2, 0x51b17a26bd9009a3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUint2Uint2Uint2(inV1, out);
- verifyResultsMinUint2Uint2Uint2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUint2Uint2Uint2(inA, out);
+ verifyResultsMinUint2Uint2Uint2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUint2Uint2Uint2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUint2Uint2Uint2(inV1, out);
- verifyResultsMinUint2Uint2Uint2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUint2Uint2Uint2(inA, out);
+ verifyResultsMinUint2Uint2Uint2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUint2Uint2Uint2: " + e.toString());
}
}
- private void verifyResultsMinUint2Uint2Uint2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUint2Uint2Uint2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsUintUintUint args = new ArgumentsUintUintUint();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1760,11 +1760,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1783,39 +1783,39 @@
}
private void checkMinUint3Uint3Uint3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 3, 0xe2100b4bbe974b3l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 3, 0xe2100b4bbe974b4l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 3, 0x7765fa101c2f1a71l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 3, 0x7765fa101c2f1a72l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUint3Uint3Uint3(inV1, out);
- verifyResultsMinUint3Uint3Uint3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUint3Uint3Uint3(inA, out);
+ verifyResultsMinUint3Uint3Uint3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUint3Uint3Uint3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUint3Uint3Uint3(inV1, out);
- verifyResultsMinUint3Uint3Uint3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUint3Uint3Uint3(inA, out);
+ verifyResultsMinUint3Uint3Uint3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUint3Uint3Uint3: " + e.toString());
}
}
- private void verifyResultsMinUint3Uint3Uint3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUint3Uint3Uint3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsUintUintUint args = new ArgumentsUintUintUint();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1825,11 +1825,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1848,39 +1848,39 @@
}
private void checkMinUint4Uint4Uint4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 4, 0x63727ce7a0a14778l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 4, 0x63727ce7a0a14779l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 4, 0x9d1a79f97ace2b40l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 4, 0x9d1a79f97ace2b41l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUint4Uint4Uint4(inV1, out);
- verifyResultsMinUint4Uint4Uint4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUint4Uint4Uint4(inA, out);
+ verifyResultsMinUint4Uint4Uint4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUint4Uint4Uint4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUint4Uint4Uint4(inV1, out);
- verifyResultsMinUint4Uint4Uint4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUint4Uint4Uint4(inA, out);
+ verifyResultsMinUint4Uint4Uint4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUint4Uint4Uint4: " + e.toString());
}
}
- private void verifyResultsMinUint4Uint4Uint4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- int[] arrayInV1 = new int[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- int[] arrayInV2 = new int[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUint4Uint4Uint4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ int[] arrayInA = new int[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ int[] arrayInB = new int[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
int[] arrayOut = new int[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsUintUintUint args = new ArgumentsUintUintUint();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1890,11 +1890,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -1913,45 +1913,45 @@
}
public class ArgumentsLongLongLong {
- public long inV1;
- public long inV2;
+ public long inA;
+ public long inB;
public long out;
}
private void checkMinLongLongLong() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 1, 0x20ce185251c10eb2l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 1, 0x20ce185251c10eb3l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 1, 0x1e87c507de2e29eel, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 1, 0x1e87c507de2e29efl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinLongLongLong(inV1, out);
- verifyResultsMinLongLongLong(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinLongLongLong(inA, out);
+ verifyResultsMinLongLongLong(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinLongLongLong: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinLongLongLong(inV1, out);
- verifyResultsMinLongLongLong(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinLongLongLong(inA, out);
+ verifyResultsMinLongLongLong(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinLongLongLong: " + e.toString());
}
}
- private void verifyResultsMinLongLongLong(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinLongLongLong(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsLongLongLong args = new ArgumentsLongLongLong();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -1961,11 +1961,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -1984,39 +1984,39 @@
}
private void checkMinLong2Long2Long2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 2, 0x2285e00a094676a0l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 2, 0x2285e00a094676a1l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 2, 0x5a1aed657154fcb8l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 2, 0x5a1aed657154fcb9l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinLong2Long2Long2(inV1, out);
- verifyResultsMinLong2Long2Long2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinLong2Long2Long2(inA, out);
+ verifyResultsMinLong2Long2Long2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinLong2Long2Long2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinLong2Long2Long2(inV1, out);
- verifyResultsMinLong2Long2Long2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinLong2Long2Long2(inA, out);
+ verifyResultsMinLong2Long2Long2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinLong2Long2Long2: " + e.toString());
}
}
- private void verifyResultsMinLong2Long2Long2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinLong2Long2Long2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsLongLongLong args = new ArgumentsLongLongLong();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -2026,11 +2026,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -2049,39 +2049,39 @@
}
private void checkMinLong3Long3Long3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 3, 0x77d75c3cedfe4965l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 3, 0x77d75c3cedfe4966l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 3, 0x7fcf6d4ecff40d87l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 3, 0x7fcf6d4ecff40d88l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinLong3Long3Long3(inV1, out);
- verifyResultsMinLong3Long3Long3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinLong3Long3Long3(inA, out);
+ verifyResultsMinLong3Long3Long3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinLong3Long3Long3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinLong3Long3Long3(inV1, out);
- verifyResultsMinLong3Long3Long3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinLong3Long3Long3(inA, out);
+ verifyResultsMinLong3Long3Long3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinLong3Long3Long3: " + e.toString());
}
}
- private void verifyResultsMinLong3Long3Long3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinLong3Long3Long3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsLongLongLong args = new ArgumentsLongLongLong();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -2091,11 +2091,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -2114,39 +2114,39 @@
}
private void checkMinLong4Long4Long4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 4, 0xcd28d86fd2b61c2al, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 4, 0xcd28d86fd2b61c2bl, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 4, 0xa583ed382e931e56l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.SIGNED_64, 4, 0xa583ed382e931e57l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinLong4Long4Long4(inV1, out);
- verifyResultsMinLong4Long4Long4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinLong4Long4Long4(inA, out);
+ verifyResultsMinLong4Long4Long4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinLong4Long4Long4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_64, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinLong4Long4Long4(inV1, out);
- verifyResultsMinLong4Long4Long4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinLong4Long4Long4(inA, out);
+ verifyResultsMinLong4Long4Long4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinLong4Long4Long4: " + e.toString());
}
}
- private void verifyResultsMinLong4Long4Long4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinLong4Long4Long4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsLongLongLong args = new ArgumentsLongLongLong();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -2156,11 +2156,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("%d", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("%d", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("%d", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("%d", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("%d", args.out));
@@ -2179,45 +2179,45 @@
}
public class ArgumentsUlongUlongUlong {
- public long inV1;
- public long inV2;
+ public long inA;
+ public long inB;
public long out;
}
private void checkMinUlongUlongUlong() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 1, 0x9ea8f1e67008ea67l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 1, 0x9ea8f1e67008ea68l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 1, 0x21750b943e23ed8dl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 1, 0x21750b943e23ed8el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 1), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUlongUlongUlong(inV1, out);
- verifyResultsMinUlongUlongUlong(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUlongUlongUlong(inA, out);
+ verifyResultsMinUlongUlongUlong(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUlongUlongUlong: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUlongUlongUlong(inV1, out);
- verifyResultsMinUlongUlongUlong(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUlongUlongUlong(inA, out);
+ verifyResultsMinUlongUlongUlong(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUlongUlongUlong: " + e.toString());
}
}
- private void verifyResultsMinUlongUlongUlong(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 1];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 1];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUlongUlongUlong(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUlongUlongUlong args = new ArgumentsUlongUlongUlong();
- args.inV1 = arrayInV1[i];
- args.inV2 = arrayInV2[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -2227,11 +2227,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -2250,39 +2250,39 @@
}
private void checkMinUlong2Ulong2Ulong2() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 2, 0x26bb4add3110402dl, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 2, 0x26bb4add3110402el, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 2, 0xd739efe16c4dc5dfl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 2, 0xd739efe16c4dc5e0l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 2), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUlong2Ulong2Ulong2(inV1, out);
- verifyResultsMinUlong2Ulong2Ulong2(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUlong2Ulong2Ulong2(inA, out);
+ verifyResultsMinUlong2Ulong2Ulong2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUlong2Ulong2Ulong2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUlong2Ulong2Ulong2(inV1, out);
- verifyResultsMinUlong2Ulong2Ulong2(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUlong2Ulong2Ulong2(inA, out);
+ verifyResultsMinUlong2Ulong2Ulong2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUlong2Ulong2Ulong2: " + e.toString());
}
}
- private void verifyResultsMinUlong2Ulong2Ulong2(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 2];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 2];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUlong2Ulong2Ulong2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsUlongUlongUlong args = new ArgumentsUlongUlongUlong();
- args.inV1 = arrayInV1[i * 2 + j];
- args.inV2 = arrayInV2[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -2292,11 +2292,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -2315,39 +2315,39 @@
}
private void checkMinUlong3Ulong3Ulong3() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 3, 0x53ac9a3d815a8638l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 3, 0x53ac9a3d815a8639l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 3, 0x2b9ece016e2bc780l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 3, 0x2b9ece016e2bc781l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 3), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUlong3Ulong3Ulong3(inV1, out);
- verifyResultsMinUlong3Ulong3Ulong3(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUlong3Ulong3Ulong3(inA, out);
+ verifyResultsMinUlong3Ulong3Ulong3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUlong3Ulong3Ulong3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUlong3Ulong3Ulong3(inV1, out);
- verifyResultsMinUlong3Ulong3Ulong3(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUlong3Ulong3Ulong3(inA, out);
+ verifyResultsMinUlong3Ulong3Ulong3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUlong3Ulong3Ulong3: " + e.toString());
}
}
- private void verifyResultsMinUlong3Ulong3Ulong3(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUlong3Ulong3Ulong3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsUlongUlongUlong args = new ArgumentsUlongUlongUlong();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -2357,11 +2357,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
@@ -2380,39 +2380,39 @@
}
private void checkMinUlong4Ulong4Ulong4() {
- Allocation inV1 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 4, 0x809de99dd1a4cc43l, false);
- Allocation inV2 = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 4, 0x809de99dd1a4cc44l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 4, 0x8003ac217009c921l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.UNSIGNED_64, 4, 0x8003ac217009c922l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 4), INPUTSIZE);
- script.set_gAllocInV2(inV2);
- script.forEach_testMinUlong4Ulong4Ulong4(inV1, out);
- verifyResultsMinUlong4Ulong4Ulong4(inV1, inV2, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testMinUlong4Ulong4Ulong4(inA, out);
+ verifyResultsMinUlong4Ulong4Ulong4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUlong4Ulong4Ulong4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.UNSIGNED_64, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInV2(inV2);
- scriptRelaxed.forEach_testMinUlong4Ulong4Ulong4(inV1, out);
- verifyResultsMinUlong4Ulong4Ulong4(inV1, inV2, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testMinUlong4Ulong4Ulong4(inA, out);
+ verifyResultsMinUlong4Ulong4Ulong4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMinUlong4Ulong4Ulong4: " + e.toString());
}
}
- private void verifyResultsMinUlong4Ulong4Ulong4(Allocation inV1, Allocation inV2, Allocation out, boolean relaxed) {
- long[] arrayInV1 = new long[INPUTSIZE * 4];
- inV1.copyTo(arrayInV1);
- long[] arrayInV2 = new long[INPUTSIZE * 4];
- inV2.copyTo(arrayInV2);
+ private void verifyResultsMinUlong4Ulong4Ulong4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ long[] arrayInA = new long[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ long[] arrayInB = new long[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
long[] arrayOut = new long[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsUlongUlongUlong args = new ArgumentsUlongUlongUlong();
- args.inV1 = arrayInV1[i * 4 + j];
- args.inV2 = arrayInV2[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
CoreMathVerifier.computeMin(args);
// Validate the outputs.
@@ -2422,11 +2422,11 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV1: ");
- message.append(String.format("0x%x", args.inV1));
+ message.append("Input inA: ");
+ message.append(String.format("0x%x", args.inA));
message.append("\n");
- message.append("Input inV2: ");
- message.append(String.format("0x%x", args.inV2));
+ message.append("Input inB: ");
+ message.append(String.format("0x%x", args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(String.format("0x%x", args.out));
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMin.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestMin.rs
index 29a9aeb..4242cf2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMin.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMin.rs
@@ -19,185 +19,184 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocIn1;
+rs_allocation gAllocInB;
-float __attribute__((kernel)) testMinFloatFloatFloat(float in, unsigned int x) {
- float in1 = rsGetElementAt_float(gAllocIn1, x);
- return min(in, in1);
+float __attribute__((kernel)) testMinFloatFloatFloat(float inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return min(inA, inB);
}
-float2 __attribute__((kernel)) testMinFloat2Float2Float2(float2 in, unsigned int x) {
- float2 in1 = rsGetElementAt_float2(gAllocIn1, x);
- return min(in, in1);
+float2 __attribute__((kernel)) testMinFloat2Float2Float2(float2 inA, unsigned int x) {
+ float2 inB = rsGetElementAt_float2(gAllocInB, x);
+ return min(inA, inB);
}
-float3 __attribute__((kernel)) testMinFloat3Float3Float3(float3 in, unsigned int x) {
- float3 in1 = rsGetElementAt_float3(gAllocIn1, x);
- return min(in, in1);
+float3 __attribute__((kernel)) testMinFloat3Float3Float3(float3 inA, unsigned int x) {
+ float3 inB = rsGetElementAt_float3(gAllocInB, x);
+ return min(inA, inB);
}
-float4 __attribute__((kernel)) testMinFloat4Float4Float4(float4 in, unsigned int x) {
- float4 in1 = rsGetElementAt_float4(gAllocIn1, x);
- return min(in, in1);
-}
-rs_allocation gAllocInV2;
-
-char __attribute__((kernel)) testMinCharCharChar(char inV1, unsigned int x) {
- char inV2 = rsGetElementAt_char(gAllocInV2, x);
- return min(inV1, inV2);
+float4 __attribute__((kernel)) testMinFloat4Float4Float4(float4 inA, unsigned int x) {
+ float4 inB = rsGetElementAt_float4(gAllocInB, x);
+ return min(inA, inB);
}
-char2 __attribute__((kernel)) testMinChar2Char2Char2(char2 inV1, unsigned int x) {
- char2 inV2 = rsGetElementAt_char2(gAllocInV2, x);
- return min(inV1, inV2);
+char __attribute__((kernel)) testMinCharCharChar(char inA, unsigned int x) {
+ char inB = rsGetElementAt_char(gAllocInB, x);
+ return min(inA, inB);
}
-char3 __attribute__((kernel)) testMinChar3Char3Char3(char3 inV1, unsigned int x) {
- char3 inV2 = rsGetElementAt_char3(gAllocInV2, x);
- return min(inV1, inV2);
+char2 __attribute__((kernel)) testMinChar2Char2Char2(char2 inA, unsigned int x) {
+ char2 inB = rsGetElementAt_char2(gAllocInB, x);
+ return min(inA, inB);
}
-char4 __attribute__((kernel)) testMinChar4Char4Char4(char4 inV1, unsigned int x) {
- char4 inV2 = rsGetElementAt_char4(gAllocInV2, x);
- return min(inV1, inV2);
+char3 __attribute__((kernel)) testMinChar3Char3Char3(char3 inA, unsigned int x) {
+ char3 inB = rsGetElementAt_char3(gAllocInB, x);
+ return min(inA, inB);
}
-uchar __attribute__((kernel)) testMinUcharUcharUchar(uchar inV1, unsigned int x) {
- uchar inV2 = rsGetElementAt_uchar(gAllocInV2, x);
- return min(inV1, inV2);
+char4 __attribute__((kernel)) testMinChar4Char4Char4(char4 inA, unsigned int x) {
+ char4 inB = rsGetElementAt_char4(gAllocInB, x);
+ return min(inA, inB);
}
-uchar2 __attribute__((kernel)) testMinUchar2Uchar2Uchar2(uchar2 inV1, unsigned int x) {
- uchar2 inV2 = rsGetElementAt_uchar2(gAllocInV2, x);
- return min(inV1, inV2);
+uchar __attribute__((kernel)) testMinUcharUcharUchar(uchar inA, unsigned int x) {
+ uchar inB = rsGetElementAt_uchar(gAllocInB, x);
+ return min(inA, inB);
}
-uchar3 __attribute__((kernel)) testMinUchar3Uchar3Uchar3(uchar3 inV1, unsigned int x) {
- uchar3 inV2 = rsGetElementAt_uchar3(gAllocInV2, x);
- return min(inV1, inV2);
+uchar2 __attribute__((kernel)) testMinUchar2Uchar2Uchar2(uchar2 inA, unsigned int x) {
+ uchar2 inB = rsGetElementAt_uchar2(gAllocInB, x);
+ return min(inA, inB);
}
-uchar4 __attribute__((kernel)) testMinUchar4Uchar4Uchar4(uchar4 inV1, unsigned int x) {
- uchar4 inV2 = rsGetElementAt_uchar4(gAllocInV2, x);
- return min(inV1, inV2);
+uchar3 __attribute__((kernel)) testMinUchar3Uchar3Uchar3(uchar3 inA, unsigned int x) {
+ uchar3 inB = rsGetElementAt_uchar3(gAllocInB, x);
+ return min(inA, inB);
}
-short __attribute__((kernel)) testMinShortShortShort(short inV1, unsigned int x) {
- short inV2 = rsGetElementAt_short(gAllocInV2, x);
- return min(inV1, inV2);
+uchar4 __attribute__((kernel)) testMinUchar4Uchar4Uchar4(uchar4 inA, unsigned int x) {
+ uchar4 inB = rsGetElementAt_uchar4(gAllocInB, x);
+ return min(inA, inB);
}
-short2 __attribute__((kernel)) testMinShort2Short2Short2(short2 inV1, unsigned int x) {
- short2 inV2 = rsGetElementAt_short2(gAllocInV2, x);
- return min(inV1, inV2);
+short __attribute__((kernel)) testMinShortShortShort(short inA, unsigned int x) {
+ short inB = rsGetElementAt_short(gAllocInB, x);
+ return min(inA, inB);
}
-short3 __attribute__((kernel)) testMinShort3Short3Short3(short3 inV1, unsigned int x) {
- short3 inV2 = rsGetElementAt_short3(gAllocInV2, x);
- return min(inV1, inV2);
+short2 __attribute__((kernel)) testMinShort2Short2Short2(short2 inA, unsigned int x) {
+ short2 inB = rsGetElementAt_short2(gAllocInB, x);
+ return min(inA, inB);
}
-short4 __attribute__((kernel)) testMinShort4Short4Short4(short4 inV1, unsigned int x) {
- short4 inV2 = rsGetElementAt_short4(gAllocInV2, x);
- return min(inV1, inV2);
+short3 __attribute__((kernel)) testMinShort3Short3Short3(short3 inA, unsigned int x) {
+ short3 inB = rsGetElementAt_short3(gAllocInB, x);
+ return min(inA, inB);
}
-ushort __attribute__((kernel)) testMinUshortUshortUshort(ushort inV1, unsigned int x) {
- ushort inV2 = rsGetElementAt_ushort(gAllocInV2, x);
- return min(inV1, inV2);
+short4 __attribute__((kernel)) testMinShort4Short4Short4(short4 inA, unsigned int x) {
+ short4 inB = rsGetElementAt_short4(gAllocInB, x);
+ return min(inA, inB);
}
-ushort2 __attribute__((kernel)) testMinUshort2Ushort2Ushort2(ushort2 inV1, unsigned int x) {
- ushort2 inV2 = rsGetElementAt_ushort2(gAllocInV2, x);
- return min(inV1, inV2);
+ushort __attribute__((kernel)) testMinUshortUshortUshort(ushort inA, unsigned int x) {
+ ushort inB = rsGetElementAt_ushort(gAllocInB, x);
+ return min(inA, inB);
}
-ushort3 __attribute__((kernel)) testMinUshort3Ushort3Ushort3(ushort3 inV1, unsigned int x) {
- ushort3 inV2 = rsGetElementAt_ushort3(gAllocInV2, x);
- return min(inV1, inV2);
+ushort2 __attribute__((kernel)) testMinUshort2Ushort2Ushort2(ushort2 inA, unsigned int x) {
+ ushort2 inB = rsGetElementAt_ushort2(gAllocInB, x);
+ return min(inA, inB);
}
-ushort4 __attribute__((kernel)) testMinUshort4Ushort4Ushort4(ushort4 inV1, unsigned int x) {
- ushort4 inV2 = rsGetElementAt_ushort4(gAllocInV2, x);
- return min(inV1, inV2);
+ushort3 __attribute__((kernel)) testMinUshort3Ushort3Ushort3(ushort3 inA, unsigned int x) {
+ ushort3 inB = rsGetElementAt_ushort3(gAllocInB, x);
+ return min(inA, inB);
}
-int __attribute__((kernel)) testMinIntIntInt(int inV1, unsigned int x) {
- int inV2 = rsGetElementAt_int(gAllocInV2, x);
- return min(inV1, inV2);
+ushort4 __attribute__((kernel)) testMinUshort4Ushort4Ushort4(ushort4 inA, unsigned int x) {
+ ushort4 inB = rsGetElementAt_ushort4(gAllocInB, x);
+ return min(inA, inB);
}
-int2 __attribute__((kernel)) testMinInt2Int2Int2(int2 inV1, unsigned int x) {
- int2 inV2 = rsGetElementAt_int2(gAllocInV2, x);
- return min(inV1, inV2);
+int __attribute__((kernel)) testMinIntIntInt(int inA, unsigned int x) {
+ int inB = rsGetElementAt_int(gAllocInB, x);
+ return min(inA, inB);
}
-int3 __attribute__((kernel)) testMinInt3Int3Int3(int3 inV1, unsigned int x) {
- int3 inV2 = rsGetElementAt_int3(gAllocInV2, x);
- return min(inV1, inV2);
+int2 __attribute__((kernel)) testMinInt2Int2Int2(int2 inA, unsigned int x) {
+ int2 inB = rsGetElementAt_int2(gAllocInB, x);
+ return min(inA, inB);
}
-int4 __attribute__((kernel)) testMinInt4Int4Int4(int4 inV1, unsigned int x) {
- int4 inV2 = rsGetElementAt_int4(gAllocInV2, x);
- return min(inV1, inV2);
+int3 __attribute__((kernel)) testMinInt3Int3Int3(int3 inA, unsigned int x) {
+ int3 inB = rsGetElementAt_int3(gAllocInB, x);
+ return min(inA, inB);
}
-uint __attribute__((kernel)) testMinUintUintUint(uint inV1, unsigned int x) {
- uint inV2 = rsGetElementAt_uint(gAllocInV2, x);
- return min(inV1, inV2);
+int4 __attribute__((kernel)) testMinInt4Int4Int4(int4 inA, unsigned int x) {
+ int4 inB = rsGetElementAt_int4(gAllocInB, x);
+ return min(inA, inB);
}
-uint2 __attribute__((kernel)) testMinUint2Uint2Uint2(uint2 inV1, unsigned int x) {
- uint2 inV2 = rsGetElementAt_uint2(gAllocInV2, x);
- return min(inV1, inV2);
+uint __attribute__((kernel)) testMinUintUintUint(uint inA, unsigned int x) {
+ uint inB = rsGetElementAt_uint(gAllocInB, x);
+ return min(inA, inB);
}
-uint3 __attribute__((kernel)) testMinUint3Uint3Uint3(uint3 inV1, unsigned int x) {
- uint3 inV2 = rsGetElementAt_uint3(gAllocInV2, x);
- return min(inV1, inV2);
+uint2 __attribute__((kernel)) testMinUint2Uint2Uint2(uint2 inA, unsigned int x) {
+ uint2 inB = rsGetElementAt_uint2(gAllocInB, x);
+ return min(inA, inB);
}
-uint4 __attribute__((kernel)) testMinUint4Uint4Uint4(uint4 inV1, unsigned int x) {
- uint4 inV2 = rsGetElementAt_uint4(gAllocInV2, x);
- return min(inV1, inV2);
+uint3 __attribute__((kernel)) testMinUint3Uint3Uint3(uint3 inA, unsigned int x) {
+ uint3 inB = rsGetElementAt_uint3(gAllocInB, x);
+ return min(inA, inB);
}
-long __attribute__((kernel)) testMinLongLongLong(long inV1, unsigned int x) {
- long inV2 = rsGetElementAt_long(gAllocInV2, x);
- return min(inV1, inV2);
+uint4 __attribute__((kernel)) testMinUint4Uint4Uint4(uint4 inA, unsigned int x) {
+ uint4 inB = rsGetElementAt_uint4(gAllocInB, x);
+ return min(inA, inB);
}
-long2 __attribute__((kernel)) testMinLong2Long2Long2(long2 inV1, unsigned int x) {
- long2 inV2 = rsGetElementAt_long2(gAllocInV2, x);
- return min(inV1, inV2);
+long __attribute__((kernel)) testMinLongLongLong(long inA, unsigned int x) {
+ long inB = rsGetElementAt_long(gAllocInB, x);
+ return min(inA, inB);
}
-long3 __attribute__((kernel)) testMinLong3Long3Long3(long3 inV1, unsigned int x) {
- long3 inV2 = rsGetElementAt_long3(gAllocInV2, x);
- return min(inV1, inV2);
+long2 __attribute__((kernel)) testMinLong2Long2Long2(long2 inA, unsigned int x) {
+ long2 inB = rsGetElementAt_long2(gAllocInB, x);
+ return min(inA, inB);
}
-long4 __attribute__((kernel)) testMinLong4Long4Long4(long4 inV1, unsigned int x) {
- long4 inV2 = rsGetElementAt_long4(gAllocInV2, x);
- return min(inV1, inV2);
+long3 __attribute__((kernel)) testMinLong3Long3Long3(long3 inA, unsigned int x) {
+ long3 inB = rsGetElementAt_long3(gAllocInB, x);
+ return min(inA, inB);
}
-ulong __attribute__((kernel)) testMinUlongUlongUlong(ulong inV1, unsigned int x) {
- ulong inV2 = rsGetElementAt_ulong(gAllocInV2, x);
- return min(inV1, inV2);
+long4 __attribute__((kernel)) testMinLong4Long4Long4(long4 inA, unsigned int x) {
+ long4 inB = rsGetElementAt_long4(gAllocInB, x);
+ return min(inA, inB);
}
-ulong2 __attribute__((kernel)) testMinUlong2Ulong2Ulong2(ulong2 inV1, unsigned int x) {
- ulong2 inV2 = rsGetElementAt_ulong2(gAllocInV2, x);
- return min(inV1, inV2);
+ulong __attribute__((kernel)) testMinUlongUlongUlong(ulong inA, unsigned int x) {
+ ulong inB = rsGetElementAt_ulong(gAllocInB, x);
+ return min(inA, inB);
}
-ulong3 __attribute__((kernel)) testMinUlong3Ulong3Ulong3(ulong3 inV1, unsigned int x) {
- ulong3 inV2 = rsGetElementAt_ulong3(gAllocInV2, x);
- return min(inV1, inV2);
+ulong2 __attribute__((kernel)) testMinUlong2Ulong2Ulong2(ulong2 inA, unsigned int x) {
+ ulong2 inB = rsGetElementAt_ulong2(gAllocInB, x);
+ return min(inA, inB);
}
-ulong4 __attribute__((kernel)) testMinUlong4Ulong4Ulong4(ulong4 inV1, unsigned int x) {
- ulong4 inV2 = rsGetElementAt_ulong4(gAllocInV2, x);
- return min(inV1, inV2);
+ulong3 __attribute__((kernel)) testMinUlong3Ulong3Ulong3(ulong3 inA, unsigned int x) {
+ ulong3 inB = rsGetElementAt_ulong3(gAllocInB, x);
+ return min(inA, inB);
+}
+
+ulong4 __attribute__((kernel)) testMinUlong4Ulong4Ulong4(ulong4 inA, unsigned int x) {
+ ulong4 inB = rsGetElementAt_ulong4(gAllocInB, x);
+ return min(inA, inB);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMix.java b/tests/tests/renderscript/src/android/renderscript/cts/TestMix.java
index 3500e41..7385efa 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMix.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMix.java
@@ -37,41 +37,41 @@
public class ArgumentsFloatFloatFloatFloat {
public float inStart;
public float inStop;
- public float inAmount;
+ public float inFraction;
public Target.Floaty out;
}
private void checkMixFloatFloatFloatFloat() {
Allocation inStart = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x9f4beff6471d6db1l, false);
Allocation inStop = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x6ede0b88b4422e8fl, false);
- Allocation inAmount = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xc1c14e5d52dc3fe5l, false);
+ Allocation inFraction = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x6d2f014ec6a51d9fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
script.set_gAllocInStop(inStop);
- script.set_gAllocInAmount(inAmount);
+ script.set_gAllocInFraction(inFraction);
script.forEach_testMixFloatFloatFloatFloat(inStart, out);
- verifyResultsMixFloatFloatFloatFloat(inStart, inStop, inAmount, out, false);
+ verifyResultsMixFloatFloatFloatFloat(inStart, inStop, inFraction, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloatFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
scriptRelaxed.set_gAllocInStop(inStop);
- scriptRelaxed.set_gAllocInAmount(inAmount);
+ scriptRelaxed.set_gAllocInFraction(inFraction);
scriptRelaxed.forEach_testMixFloatFloatFloatFloat(inStart, out);
- verifyResultsMixFloatFloatFloatFloat(inStart, inStop, inAmount, out, true);
+ verifyResultsMixFloatFloatFloatFloat(inStart, inStop, inFraction, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloatFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsMixFloatFloatFloatFloat(Allocation inStart, Allocation inStop, Allocation inAmount, Allocation out, boolean relaxed) {
+ private void verifyResultsMixFloatFloatFloatFloat(Allocation inStart, Allocation inStop, Allocation inFraction, Allocation out, boolean relaxed) {
float[] arrayInStart = new float[INPUTSIZE * 1];
inStart.copyTo(arrayInStart);
float[] arrayInStop = new float[INPUTSIZE * 1];
inStop.copyTo(arrayInStop);
- float[] arrayInAmount = new float[INPUTSIZE * 1];
- inAmount.copyTo(arrayInAmount);
+ float[] arrayInFraction = new float[INPUTSIZE * 1];
+ inFraction.copyTo(arrayInFraction);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -80,7 +80,7 @@
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
args.inStart = arrayInStart[i];
args.inStop = arrayInStop[i];
- args.inAmount = arrayInAmount[i];
+ args.inFraction = arrayInFraction[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMix(args, target);
@@ -99,9 +99,9 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
- message.append("Input inAmount: ");
+ message.append("Input inFraction: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
+ args.inFraction, Float.floatToRawIntBits(args.inFraction), args.inFraction));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -123,34 +123,34 @@
private void checkMixFloat2Float2Float2Float2() {
Allocation inStart = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x45502e8f0a2d9ce9l, false);
Allocation inStop = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xba2b8a035395e837l, false);
- Allocation inAmount = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xa477d20616942e4dl, false);
+ Allocation inFraction = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xe56bef3c621e0ac7l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
script.set_gAllocInStop(inStop);
- script.set_gAllocInAmount(inAmount);
+ script.set_gAllocInFraction(inFraction);
script.forEach_testMixFloat2Float2Float2Float2(inStart, out);
- verifyResultsMixFloat2Float2Float2Float2(inStart, inStop, inAmount, out, false);
+ verifyResultsMixFloat2Float2Float2Float2(inStart, inStop, inFraction, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat2Float2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
scriptRelaxed.set_gAllocInStop(inStop);
- scriptRelaxed.set_gAllocInAmount(inAmount);
+ scriptRelaxed.set_gAllocInFraction(inFraction);
scriptRelaxed.forEach_testMixFloat2Float2Float2Float2(inStart, out);
- verifyResultsMixFloat2Float2Float2Float2(inStart, inStop, inAmount, out, true);
+ verifyResultsMixFloat2Float2Float2Float2(inStart, inStop, inFraction, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat2Float2Float2Float2: " + e.toString());
}
}
- private void verifyResultsMixFloat2Float2Float2Float2(Allocation inStart, Allocation inStop, Allocation inAmount, Allocation out, boolean relaxed) {
+ private void verifyResultsMixFloat2Float2Float2Float2(Allocation inStart, Allocation inStop, Allocation inFraction, Allocation out, boolean relaxed) {
float[] arrayInStart = new float[INPUTSIZE * 2];
inStart.copyTo(arrayInStart);
float[] arrayInStop = new float[INPUTSIZE * 2];
inStop.copyTo(arrayInStop);
- float[] arrayInAmount = new float[INPUTSIZE * 2];
- inAmount.copyTo(arrayInAmount);
+ float[] arrayInFraction = new float[INPUTSIZE * 2];
+ inFraction.copyTo(arrayInFraction);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -159,7 +159,7 @@
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
args.inStart = arrayInStart[i * 2 + j];
args.inStop = arrayInStop[i * 2 + j];
- args.inAmount = arrayInAmount[i * 2 + j];
+ args.inFraction = arrayInFraction[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMix(args, target);
@@ -178,9 +178,9 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
- message.append("Input inAmount: ");
+ message.append("Input inFraction: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
+ args.inFraction, Float.floatToRawIntBits(args.inFraction), args.inFraction));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -202,34 +202,34 @@
private void checkMixFloat3Float3Float3Float3() {
Allocation inStart = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xeb4701726b009c5l, false);
Allocation inStop = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x9b21f6b3249ee4cbl, false);
- Allocation inAmount = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x784ed3e2e07c7741l, false);
+ Allocation inFraction = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf15862eab0d4f51bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
script.set_gAllocInStop(inStop);
- script.set_gAllocInAmount(inAmount);
+ script.set_gAllocInFraction(inFraction);
script.forEach_testMixFloat3Float3Float3Float3(inStart, out);
- verifyResultsMixFloat3Float3Float3Float3(inStart, inStop, inAmount, out, false);
+ verifyResultsMixFloat3Float3Float3Float3(inStart, inStop, inFraction, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat3Float3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
scriptRelaxed.set_gAllocInStop(inStop);
- scriptRelaxed.set_gAllocInAmount(inAmount);
+ scriptRelaxed.set_gAllocInFraction(inFraction);
scriptRelaxed.forEach_testMixFloat3Float3Float3Float3(inStart, out);
- verifyResultsMixFloat3Float3Float3Float3(inStart, inStop, inAmount, out, true);
+ verifyResultsMixFloat3Float3Float3Float3(inStart, inStop, inFraction, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat3Float3Float3Float3: " + e.toString());
}
}
- private void verifyResultsMixFloat3Float3Float3Float3(Allocation inStart, Allocation inStop, Allocation inAmount, Allocation out, boolean relaxed) {
+ private void verifyResultsMixFloat3Float3Float3Float3(Allocation inStart, Allocation inStop, Allocation inFraction, Allocation out, boolean relaxed) {
float[] arrayInStart = new float[INPUTSIZE * 4];
inStart.copyTo(arrayInStart);
float[] arrayInStop = new float[INPUTSIZE * 4];
inStop.copyTo(arrayInStop);
- float[] arrayInAmount = new float[INPUTSIZE * 4];
- inAmount.copyTo(arrayInAmount);
+ float[] arrayInFraction = new float[INPUTSIZE * 4];
+ inFraction.copyTo(arrayInFraction);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -238,7 +238,7 @@
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
args.inStart = arrayInStart[i * 4 + j];
args.inStop = arrayInStop[i * 4 + j];
- args.inAmount = arrayInAmount[i * 4 + j];
+ args.inFraction = arrayInFraction[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMix(args, target);
@@ -257,9 +257,9 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
- message.append("Input inAmount: ");
+ message.append("Input inFraction: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
+ args.inFraction, Float.floatToRawIntBits(args.inFraction), args.inFraction));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -281,34 +281,34 @@
private void checkMixFloat4Float4Float4Float4() {
Allocation inStart = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd818b19f433276a1l, false);
Allocation inStop = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x7c186362f5a7e15fl, false);
- Allocation inAmount = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4c25d5bfaa64c035l, false);
+ Allocation inFraction = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xfd44d698ff8bdf6fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
script.set_gAllocInStop(inStop);
- script.set_gAllocInAmount(inAmount);
+ script.set_gAllocInFraction(inFraction);
script.forEach_testMixFloat4Float4Float4Float4(inStart, out);
- verifyResultsMixFloat4Float4Float4Float4(inStart, inStop, inAmount, out, false);
+ verifyResultsMixFloat4Float4Float4Float4(inStart, inStop, inFraction, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat4Float4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
scriptRelaxed.set_gAllocInStop(inStop);
- scriptRelaxed.set_gAllocInAmount(inAmount);
+ scriptRelaxed.set_gAllocInFraction(inFraction);
scriptRelaxed.forEach_testMixFloat4Float4Float4Float4(inStart, out);
- verifyResultsMixFloat4Float4Float4Float4(inStart, inStop, inAmount, out, true);
+ verifyResultsMixFloat4Float4Float4Float4(inStart, inStop, inFraction, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat4Float4Float4Float4: " + e.toString());
}
}
- private void verifyResultsMixFloat4Float4Float4Float4(Allocation inStart, Allocation inStop, Allocation inAmount, Allocation out, boolean relaxed) {
+ private void verifyResultsMixFloat4Float4Float4Float4(Allocation inStart, Allocation inStop, Allocation inFraction, Allocation out, boolean relaxed) {
float[] arrayInStart = new float[INPUTSIZE * 4];
inStart.copyTo(arrayInStart);
float[] arrayInStop = new float[INPUTSIZE * 4];
inStop.copyTo(arrayInStop);
- float[] arrayInAmount = new float[INPUTSIZE * 4];
- inAmount.copyTo(arrayInAmount);
+ float[] arrayInFraction = new float[INPUTSIZE * 4];
+ inFraction.copyTo(arrayInFraction);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -317,7 +317,7 @@
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
args.inStart = arrayInStart[i * 4 + j];
args.inStop = arrayInStop[i * 4 + j];
- args.inAmount = arrayInAmount[i * 4 + j];
+ args.inFraction = arrayInFraction[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMix(args, target);
@@ -336,9 +336,9 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
- message.append("Input inAmount: ");
+ message.append("Input inFraction: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
+ args.inFraction, Float.floatToRawIntBits(args.inFraction), args.inFraction));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -360,34 +360,34 @@
private void checkMixFloat2Float2FloatFloat2() {
Allocation inStart = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xf811b2d52bd1d7c3l, false);
Allocation inStop = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x17a127e13c8dd1c5l, false);
- Allocation inAmount = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xaaf909cdbd2a10ebl, false);
+ Allocation inFraction = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe0b7d03e92afd1f5l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
script.set_gAllocInStop(inStop);
- script.set_gAllocInAmount(inAmount);
+ script.set_gAllocInFraction(inFraction);
script.forEach_testMixFloat2Float2FloatFloat2(inStart, out);
- verifyResultsMixFloat2Float2FloatFloat2(inStart, inStop, inAmount, out, false);
+ verifyResultsMixFloat2Float2FloatFloat2(inStart, inStop, inFraction, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat2Float2FloatFloat2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
scriptRelaxed.set_gAllocInStop(inStop);
- scriptRelaxed.set_gAllocInAmount(inAmount);
+ scriptRelaxed.set_gAllocInFraction(inFraction);
scriptRelaxed.forEach_testMixFloat2Float2FloatFloat2(inStart, out);
- verifyResultsMixFloat2Float2FloatFloat2(inStart, inStop, inAmount, out, true);
+ verifyResultsMixFloat2Float2FloatFloat2(inStart, inStop, inFraction, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat2Float2FloatFloat2: " + e.toString());
}
}
- private void verifyResultsMixFloat2Float2FloatFloat2(Allocation inStart, Allocation inStop, Allocation inAmount, Allocation out, boolean relaxed) {
+ private void verifyResultsMixFloat2Float2FloatFloat2(Allocation inStart, Allocation inStop, Allocation inFraction, Allocation out, boolean relaxed) {
float[] arrayInStart = new float[INPUTSIZE * 2];
inStart.copyTo(arrayInStart);
float[] arrayInStop = new float[INPUTSIZE * 2];
inStop.copyTo(arrayInStop);
- float[] arrayInAmount = new float[INPUTSIZE * 1];
- inAmount.copyTo(arrayInAmount);
+ float[] arrayInFraction = new float[INPUTSIZE * 1];
+ inFraction.copyTo(arrayInFraction);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -396,7 +396,7 @@
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
args.inStart = arrayInStart[i * 2 + j];
args.inStop = arrayInStop[i * 2 + j];
- args.inAmount = arrayInAmount[i];
+ args.inFraction = arrayInFraction[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMix(args, target);
@@ -415,9 +415,9 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
- message.append("Input inAmount: ");
+ message.append("Input inFraction: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
+ args.inFraction, Float.floatToRawIntBits(args.inFraction), args.inFraction));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -439,34 +439,34 @@
private void checkMixFloat3Float3FloatFloat3() {
Allocation inStart = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xae7aff441b20fa80l, false);
Allocation inStop = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe64a4d60d6f4de7cl, false);
- Allocation inAmount = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4ea8e06fef74e6aal, false);
+ Allocation inFraction = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x21bd09bbd131a27cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
script.set_gAllocInStop(inStop);
- script.set_gAllocInAmount(inAmount);
+ script.set_gAllocInFraction(inFraction);
script.forEach_testMixFloat3Float3FloatFloat3(inStart, out);
- verifyResultsMixFloat3Float3FloatFloat3(inStart, inStop, inAmount, out, false);
+ verifyResultsMixFloat3Float3FloatFloat3(inStart, inStop, inFraction, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat3Float3FloatFloat3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
scriptRelaxed.set_gAllocInStop(inStop);
- scriptRelaxed.set_gAllocInAmount(inAmount);
+ scriptRelaxed.set_gAllocInFraction(inFraction);
scriptRelaxed.forEach_testMixFloat3Float3FloatFloat3(inStart, out);
- verifyResultsMixFloat3Float3FloatFloat3(inStart, inStop, inAmount, out, true);
+ verifyResultsMixFloat3Float3FloatFloat3(inStart, inStop, inFraction, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat3Float3FloatFloat3: " + e.toString());
}
}
- private void verifyResultsMixFloat3Float3FloatFloat3(Allocation inStart, Allocation inStop, Allocation inAmount, Allocation out, boolean relaxed) {
+ private void verifyResultsMixFloat3Float3FloatFloat3(Allocation inStart, Allocation inStop, Allocation inFraction, Allocation out, boolean relaxed) {
float[] arrayInStart = new float[INPUTSIZE * 4];
inStart.copyTo(arrayInStart);
float[] arrayInStop = new float[INPUTSIZE * 4];
inStop.copyTo(arrayInStop);
- float[] arrayInAmount = new float[INPUTSIZE * 1];
- inAmount.copyTo(arrayInAmount);
+ float[] arrayInFraction = new float[INPUTSIZE * 1];
+ inFraction.copyTo(arrayInFraction);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -475,7 +475,7 @@
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
args.inStart = arrayInStart[i * 4 + j];
args.inStop = arrayInStop[i * 4 + j];
- args.inAmount = arrayInAmount[i];
+ args.inFraction = arrayInFraction[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMix(args, target);
@@ -494,9 +494,9 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
- message.append("Input inAmount: ");
+ message.append("Input inFraction: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
+ args.inFraction, Float.floatToRawIntBits(args.inFraction), args.inFraction));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -518,34 +518,34 @@
private void checkMixFloat4Float4FloatFloat4() {
Allocation inStart = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x64e44bb30a701d3dl, false);
Allocation inStop = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xb4f372e0715beb33l, false);
- Allocation inAmount = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf258b71221bfbc69l, false);
+ Allocation inFraction = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x62c243390fb37303l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
script.set_gAllocInStop(inStop);
- script.set_gAllocInAmount(inAmount);
+ script.set_gAllocInFraction(inFraction);
script.forEach_testMixFloat4Float4FloatFloat4(inStart, out);
- verifyResultsMixFloat4Float4FloatFloat4(inStart, inStop, inAmount, out, false);
+ verifyResultsMixFloat4Float4FloatFloat4(inStart, inStop, inFraction, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat4Float4FloatFloat4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
scriptRelaxed.set_gAllocInStop(inStop);
- scriptRelaxed.set_gAllocInAmount(inAmount);
+ scriptRelaxed.set_gAllocInFraction(inFraction);
scriptRelaxed.forEach_testMixFloat4Float4FloatFloat4(inStart, out);
- verifyResultsMixFloat4Float4FloatFloat4(inStart, inStop, inAmount, out, true);
+ verifyResultsMixFloat4Float4FloatFloat4(inStart, inStop, inFraction, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testMixFloat4Float4FloatFloat4: " + e.toString());
}
}
- private void verifyResultsMixFloat4Float4FloatFloat4(Allocation inStart, Allocation inStop, Allocation inAmount, Allocation out, boolean relaxed) {
+ private void verifyResultsMixFloat4Float4FloatFloat4(Allocation inStart, Allocation inStop, Allocation inFraction, Allocation out, boolean relaxed) {
float[] arrayInStart = new float[INPUTSIZE * 4];
inStart.copyTo(arrayInStart);
float[] arrayInStop = new float[INPUTSIZE * 4];
inStop.copyTo(arrayInStop);
- float[] arrayInAmount = new float[INPUTSIZE * 1];
- inAmount.copyTo(arrayInAmount);
+ float[] arrayInFraction = new float[INPUTSIZE * 1];
+ inFraction.copyTo(arrayInFraction);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -554,7 +554,7 @@
ArgumentsFloatFloatFloatFloat args = new ArgumentsFloatFloatFloatFloat();
args.inStart = arrayInStart[i * 4 + j];
args.inStop = arrayInStop[i * 4 + j];
- args.inAmount = arrayInAmount[i];
+ args.inFraction = arrayInFraction[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeMix(args, target);
@@ -573,9 +573,9 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
- message.append("Input inAmount: ");
+ message.append("Input inFraction: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
+ args.inFraction, Float.floatToRawIntBits(args.inFraction), args.inFraction));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMix.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestMix.rs
index c2ebcb3..bb4e2dc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMix.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMix.rs
@@ -20,46 +20,46 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
rs_allocation gAllocInStop;
-rs_allocation gAllocInAmount;
+rs_allocation gAllocInFraction;
float __attribute__((kernel)) testMixFloatFloatFloatFloat(float inStart, unsigned int x) {
float inStop = rsGetElementAt_float(gAllocInStop, x);
- float inAmount = rsGetElementAt_float(gAllocInAmount, x);
- return mix(inStart, inStop, inAmount);
+ float inFraction = rsGetElementAt_float(gAllocInFraction, x);
+ return mix(inStart, inStop, inFraction);
}
float2 __attribute__((kernel)) testMixFloat2Float2Float2Float2(float2 inStart, unsigned int x) {
float2 inStop = rsGetElementAt_float2(gAllocInStop, x);
- float2 inAmount = rsGetElementAt_float2(gAllocInAmount, x);
- return mix(inStart, inStop, inAmount);
+ float2 inFraction = rsGetElementAt_float2(gAllocInFraction, x);
+ return mix(inStart, inStop, inFraction);
}
float3 __attribute__((kernel)) testMixFloat3Float3Float3Float3(float3 inStart, unsigned int x) {
float3 inStop = rsGetElementAt_float3(gAllocInStop, x);
- float3 inAmount = rsGetElementAt_float3(gAllocInAmount, x);
- return mix(inStart, inStop, inAmount);
+ float3 inFraction = rsGetElementAt_float3(gAllocInFraction, x);
+ return mix(inStart, inStop, inFraction);
}
float4 __attribute__((kernel)) testMixFloat4Float4Float4Float4(float4 inStart, unsigned int x) {
float4 inStop = rsGetElementAt_float4(gAllocInStop, x);
- float4 inAmount = rsGetElementAt_float4(gAllocInAmount, x);
- return mix(inStart, inStop, inAmount);
+ float4 inFraction = rsGetElementAt_float4(gAllocInFraction, x);
+ return mix(inStart, inStop, inFraction);
}
float2 __attribute__((kernel)) testMixFloat2Float2FloatFloat2(float2 inStart, unsigned int x) {
float2 inStop = rsGetElementAt_float2(gAllocInStop, x);
- float inAmount = rsGetElementAt_float(gAllocInAmount, x);
- return mix(inStart, inStop, inAmount);
+ float inFraction = rsGetElementAt_float(gAllocInFraction, x);
+ return mix(inStart, inStop, inFraction);
}
float3 __attribute__((kernel)) testMixFloat3Float3FloatFloat3(float3 inStart, unsigned int x) {
float3 inStop = rsGetElementAt_float3(gAllocInStop, x);
- float inAmount = rsGetElementAt_float(gAllocInAmount, x);
- return mix(inStart, inStop, inAmount);
+ float inFraction = rsGetElementAt_float(gAllocInFraction, x);
+ return mix(inStart, inStop, inFraction);
}
float4 __attribute__((kernel)) testMixFloat4Float4FloatFloat4(float4 inStart, unsigned int x) {
float4 inStop = rsGetElementAt_float4(gAllocInStop, x);
- float inAmount = rsGetElementAt_float(gAllocInAmount, x);
- return mix(inStart, inStop, inAmount);
+ float inFraction = rsGetElementAt_float(gAllocInFraction, x);
+ return mix(inStart, inStop, inFraction);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestModf.java b/tests/tests/renderscript/src/android/renderscript/cts/TestModf.java
index 25d7765..e10085a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestModf.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestModf.java
@@ -35,51 +35,51 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public Target.Floaty outIret;
+ public float inV;
+ public Target.Floaty outIntegralPart;
public Target.Floaty out;
}
private void checkModfFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xd655dc05ccaef47l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xd655dc05ccaef45l, false);
try {
- Allocation outIret = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
+ Allocation outIntegralPart = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocOutIret(outIret);
- script.forEach_testModfFloatFloatFloat(inX, out);
- verifyResultsModfFloatFloatFloat(inX, outIret, out, false);
+ script.set_gAllocOutIntegralPart(outIntegralPart);
+ script.forEach_testModfFloatFloatFloat(inV, out);
+ verifyResultsModfFloatFloatFloat(inV, outIntegralPart, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testModfFloatFloatFloat: " + e.toString());
}
try {
- Allocation outIret = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
+ Allocation outIntegralPart = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocOutIret(outIret);
- scriptRelaxed.forEach_testModfFloatFloatFloat(inX, out);
- verifyResultsModfFloatFloatFloat(inX, outIret, out, true);
+ scriptRelaxed.set_gAllocOutIntegralPart(outIntegralPart);
+ scriptRelaxed.forEach_testModfFloatFloatFloat(inV, out);
+ verifyResultsModfFloatFloatFloat(inV, outIntegralPart, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testModfFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsModfFloatFloatFloat(Allocation inX, Allocation outIret, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayOutIret = new float[INPUTSIZE * 1];
- outIret.copyTo(arrayOutIret);
+ private void verifyResultsModfFloatFloatFloat(Allocation inV, Allocation outIntegralPart, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
+ float[] arrayOutIntegralPart = new float[INPUTSIZE * 1];
+ outIntegralPart.copyTo(arrayOutIntegralPart);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outIret.couldBe(arrayOutIret[i * 1 + j])) {
+ if (!args.outIntegralPart.couldBe(arrayOutIntegralPart[i * 1 + j])) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -87,17 +87,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outIret: ");
- message.append(args.outIret.toString());
+ message.append("Expected output outIntegralPart: ");
+ message.append(args.outIntegralPart.toString());
message.append("\n");
- message.append("Actual output outIret: ");
+ message.append("Actual output outIntegralPart: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutIret[i * 1 + j], Float.floatToRawIntBits(arrayOutIret[i * 1 + j]), arrayOutIret[i * 1 + j]));
- if (!args.outIret.couldBe(arrayOutIret[i * 1 + j])) {
+ arrayOutIntegralPart[i * 1 + j], Float.floatToRawIntBits(arrayOutIntegralPart[i * 1 + j]), arrayOutIntegralPart[i * 1 + j]));
+ if (!args.outIntegralPart.couldBe(arrayOutIntegralPart[i * 1 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -119,45 +119,45 @@
}
private void checkModfFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2a1dc519fa163061l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2a1dc519fa16305fl, false);
try {
- Allocation outIret = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
+ Allocation outIntegralPart = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocOutIret(outIret);
- script.forEach_testModfFloat2Float2Float2(inX, out);
- verifyResultsModfFloat2Float2Float2(inX, outIret, out, false);
+ script.set_gAllocOutIntegralPart(outIntegralPart);
+ script.forEach_testModfFloat2Float2Float2(inV, out);
+ verifyResultsModfFloat2Float2Float2(inV, outIntegralPart, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testModfFloat2Float2Float2: " + e.toString());
}
try {
- Allocation outIret = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
+ Allocation outIntegralPart = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocOutIret(outIret);
- scriptRelaxed.forEach_testModfFloat2Float2Float2(inX, out);
- verifyResultsModfFloat2Float2Float2(inX, outIret, out, true);
+ scriptRelaxed.set_gAllocOutIntegralPart(outIntegralPart);
+ scriptRelaxed.forEach_testModfFloat2Float2Float2(inV, out);
+ verifyResultsModfFloat2Float2Float2(inV, outIntegralPart, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testModfFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsModfFloat2Float2Float2(Allocation inX, Allocation outIret, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayOutIret = new float[INPUTSIZE * 2];
- outIret.copyTo(arrayOutIret);
+ private void verifyResultsModfFloat2Float2Float2(Allocation inV, Allocation outIntegralPart, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
+ float[] arrayOutIntegralPart = new float[INPUTSIZE * 2];
+ outIntegralPart.copyTo(arrayOutIntegralPart);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outIret.couldBe(arrayOutIret[i * 2 + j])) {
+ if (!args.outIntegralPart.couldBe(arrayOutIntegralPart[i * 2 + j])) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -165,17 +165,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outIret: ");
- message.append(args.outIret.toString());
+ message.append("Expected output outIntegralPart: ");
+ message.append(args.outIntegralPart.toString());
message.append("\n");
- message.append("Actual output outIret: ");
+ message.append("Actual output outIntegralPart: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutIret[i * 2 + j], Float.floatToRawIntBits(arrayOutIret[i * 2 + j]), arrayOutIret[i * 2 + j]));
- if (!args.outIret.couldBe(arrayOutIret[i * 2 + j])) {
+ arrayOutIntegralPart[i * 2 + j], Float.floatToRawIntBits(arrayOutIntegralPart[i * 2 + j]), arrayOutIntegralPart[i * 2 + j]));
+ if (!args.outIntegralPart.couldBe(arrayOutIntegralPart[i * 2 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -197,45 +197,45 @@
}
private void checkModfFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x7e82a339fbf43202l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x7e82a339fbf43200l, false);
try {
- Allocation outIret = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
+ Allocation outIntegralPart = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocOutIret(outIret);
- script.forEach_testModfFloat3Float3Float3(inX, out);
- verifyResultsModfFloat3Float3Float3(inX, outIret, out, false);
+ script.set_gAllocOutIntegralPart(outIntegralPart);
+ script.forEach_testModfFloat3Float3Float3(inV, out);
+ verifyResultsModfFloat3Float3Float3(inV, outIntegralPart, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testModfFloat3Float3Float3: " + e.toString());
}
try {
- Allocation outIret = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
+ Allocation outIntegralPart = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocOutIret(outIret);
- scriptRelaxed.forEach_testModfFloat3Float3Float3(inX, out);
- verifyResultsModfFloat3Float3Float3(inX, outIret, out, true);
+ scriptRelaxed.set_gAllocOutIntegralPart(outIntegralPart);
+ scriptRelaxed.forEach_testModfFloat3Float3Float3(inV, out);
+ verifyResultsModfFloat3Float3Float3(inV, outIntegralPart, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testModfFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsModfFloat3Float3Float3(Allocation inX, Allocation outIret, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayOutIret = new float[INPUTSIZE * 4];
- outIret.copyTo(arrayOutIret);
+ private void verifyResultsModfFloat3Float3Float3(Allocation inV, Allocation outIntegralPart, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ float[] arrayOutIntegralPart = new float[INPUTSIZE * 4];
+ outIntegralPart.copyTo(arrayOutIntegralPart);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outIret.couldBe(arrayOutIret[i * 4 + j])) {
+ if (!args.outIntegralPart.couldBe(arrayOutIntegralPart[i * 4 + j])) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -243,17 +243,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outIret: ");
- message.append(args.outIret.toString());
+ message.append("Expected output outIntegralPart: ");
+ message.append(args.outIntegralPart.toString());
message.append("\n");
- message.append("Actual output outIret: ");
+ message.append("Actual output outIntegralPart: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutIret[i * 4 + j], Float.floatToRawIntBits(arrayOutIret[i * 4 + j]), arrayOutIret[i * 4 + j]));
- if (!args.outIret.couldBe(arrayOutIret[i * 4 + j])) {
+ arrayOutIntegralPart[i * 4 + j], Float.floatToRawIntBits(arrayOutIntegralPart[i * 4 + j]), arrayOutIntegralPart[i * 4 + j]));
+ if (!args.outIntegralPart.couldBe(arrayOutIntegralPart[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -275,45 +275,45 @@
}
private void checkModfFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd2e78159fdd233a3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd2e78159fdd233a1l, false);
try {
- Allocation outIret = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
+ Allocation outIntegralPart = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocOutIret(outIret);
- script.forEach_testModfFloat4Float4Float4(inX, out);
- verifyResultsModfFloat4Float4Float4(inX, outIret, out, false);
+ script.set_gAllocOutIntegralPart(outIntegralPart);
+ script.forEach_testModfFloat4Float4Float4(inV, out);
+ verifyResultsModfFloat4Float4Float4(inV, outIntegralPart, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testModfFloat4Float4Float4: " + e.toString());
}
try {
- Allocation outIret = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
+ Allocation outIntegralPart = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocOutIret(outIret);
- scriptRelaxed.forEach_testModfFloat4Float4Float4(inX, out);
- verifyResultsModfFloat4Float4Float4(inX, outIret, out, true);
+ scriptRelaxed.set_gAllocOutIntegralPart(outIntegralPart);
+ scriptRelaxed.forEach_testModfFloat4Float4Float4(inV, out);
+ verifyResultsModfFloat4Float4Float4(inV, outIntegralPart, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testModfFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsModfFloat4Float4Float4(Allocation inX, Allocation outIret, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayOutIret = new float[INPUTSIZE * 4];
- outIret.copyTo(arrayOutIret);
+ private void verifyResultsModfFloat4Float4Float4(Allocation inV, Allocation outIntegralPart, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ float[] arrayOutIntegralPart = new float[INPUTSIZE * 4];
+ outIntegralPart.copyTo(arrayOutIntegralPart);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outIret.couldBe(arrayOutIret[i * 4 + j])) {
+ if (!args.outIntegralPart.couldBe(arrayOutIntegralPart[i * 4 + j])) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -321,17 +321,17 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outIret: ");
- message.append(args.outIret.toString());
+ message.append("Expected output outIntegralPart: ");
+ message.append(args.outIntegralPart.toString());
message.append("\n");
- message.append("Actual output outIret: ");
+ message.append("Actual output outIntegralPart: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutIret[i * 4 + j], Float.floatToRawIntBits(arrayOutIret[i * 4 + j]), arrayOutIret[i * 4 + j]));
- if (!args.outIret.couldBe(arrayOutIret[i * 4 + j])) {
+ arrayOutIntegralPart[i * 4 + j], Float.floatToRawIntBits(arrayOutIntegralPart[i * 4 + j]), arrayOutIntegralPart[i * 4 + j]));
+ if (!args.outIntegralPart.couldBe(arrayOutIntegralPart[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestModf.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestModf.rs
index be10983..3e7aa15 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestModf.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestModf.rs
@@ -19,32 +19,32 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocOutIret;
+rs_allocation gAllocOutIntegralPart;
-float __attribute__((kernel)) testModfFloatFloatFloat(float inX, unsigned int x) {
- float outIret = 0;
- float out = modf(inX, &outIret);
- rsSetElementAt_float(gAllocOutIret, outIret, x);
+float __attribute__((kernel)) testModfFloatFloatFloat(float inV, unsigned int x) {
+ float outIntegralPart = 0;
+ float out = modf(inV, &outIntegralPart);
+ rsSetElementAt_float(gAllocOutIntegralPart, outIntegralPart, x);
return out;
}
-float2 __attribute__((kernel)) testModfFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 outIret = 0;
- float2 out = modf(inX, &outIret);
- rsSetElementAt_float2(gAllocOutIret, outIret, x);
+float2 __attribute__((kernel)) testModfFloat2Float2Float2(float2 inV, unsigned int x) {
+ float2 outIntegralPart = 0;
+ float2 out = modf(inV, &outIntegralPart);
+ rsSetElementAt_float2(gAllocOutIntegralPart, outIntegralPart, x);
return out;
}
-float3 __attribute__((kernel)) testModfFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 outIret = 0;
- float3 out = modf(inX, &outIret);
- rsSetElementAt_float3(gAllocOutIret, outIret, x);
+float3 __attribute__((kernel)) testModfFloat3Float3Float3(float3 inV, unsigned int x) {
+ float3 outIntegralPart = 0;
+ float3 out = modf(inV, &outIntegralPart);
+ rsSetElementAt_float3(gAllocOutIntegralPart, outIntegralPart, x);
return out;
}
-float4 __attribute__((kernel)) testModfFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 outIret = 0;
- float4 out = modf(inX, &outIret);
- rsSetElementAt_float4(gAllocOutIret, outIret, x);
+float4 __attribute__((kernel)) testModfFloat4Float4Float4(float4 inV, unsigned int x) {
+ float4 outIntegralPart = 0;
+ float4 out = modf(inV, &outIntegralPart);
+ rsSetElementAt_float4(gAllocOutIntegralPart, outIntegralPart, x);
return out;
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNan.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNan.java
index 1be946d..d20630a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNan.java
@@ -35,38 +35,38 @@
}
public class ArgumentsUintFloat {
- public int in;
+ public int inV;
public Target.Floaty out;
}
private void checkNanUintFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0x757e939c0e627774l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.UNSIGNED_32, 1, 0xbc42cb366a8a10d2l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNanUintFloat(in, out);
- verifyResultsNanUintFloat(in, out, false);
+ script.forEach_testNanUintFloat(inV, out);
+ verifyResultsNanUintFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNanUintFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNanUintFloat(in, out);
- verifyResultsNanUintFloat(in, out, true);
+ scriptRelaxed.forEach_testNanUintFloat(inV, out);
+ verifyResultsNanUintFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNanUintFloat: " + e.toString());
}
}
- private void verifyResultsNanUintFloat(Allocation in, Allocation out, boolean relaxed) {
- int[] arrayIn = new int[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNanUintFloat(Allocation inV, Allocation out, boolean relaxed) {
+ int[] arrayInV = new int[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsUintFloat args = new ArgumentsUintFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNan(args, target);
@@ -77,8 +77,8 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("0x%x", args.in));
+ message.append("Input inV: ");
+ message.append(String.format("0x%x", args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNan.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNan.rs
index bb434d6..0e9ab96 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNan.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNan.rs
@@ -20,6 +20,6 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNanUintFloat(uint in) {
- return nan(in);
+float __attribute__((kernel)) testNanUintFloat(uint inV) {
+ return nan(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.java
index d4a840a..f4072d3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeAcoshFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x332857238c9c505cl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x97c6a2f89e417fcal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeAcoshFloatFloat(in, out);
- verifyResultsNativeAcoshFloatFloat(in, out, false);
+ script.forEach_testNativeAcoshFloatFloat(inV, out);
+ verifyResultsNativeAcoshFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAcoshFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAcoshFloatFloat(in, out);
- verifyResultsNativeAcoshFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeAcoshFloatFloat(inV, out);
+ verifyResultsNativeAcoshFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAcoshFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeAcoshFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAcoshFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAcosh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeAcoshFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x7e5c81be4638e398l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3989caf5cb8e3adel, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeAcoshFloat2Float2(in, out);
- verifyResultsNativeAcoshFloat2Float2(in, out, false);
+ script.forEach_testNativeAcoshFloat2Float2(inV, out);
+ verifyResultsNativeAcoshFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAcoshFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAcoshFloat2Float2(in, out);
- verifyResultsNativeAcoshFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeAcoshFloat2Float2(inV, out);
+ verifyResultsNativeAcoshFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAcoshFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeAcoshFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAcoshFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAcosh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeAcoshFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x7e5c8c5fa53f7932l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x398b9410c1a95bbcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeAcoshFloat3Float3(in, out);
- verifyResultsNativeAcoshFloat3Float3(in, out, false);
+ script.forEach_testNativeAcoshFloat3Float3(inV, out);
+ verifyResultsNativeAcoshFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAcoshFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAcoshFloat3Float3(in, out);
- verifyResultsNativeAcoshFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeAcoshFloat3Float3(inV, out);
+ verifyResultsNativeAcoshFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAcoshFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeAcoshFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAcoshFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAcosh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeAcoshFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x7e5c970104460eccl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x398d5d2bb7c47c9al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeAcoshFloat4Float4(in, out);
- verifyResultsNativeAcoshFloat4Float4(in, out, false);
+ script.forEach_testNativeAcoshFloat4Float4(inV, out);
+ verifyResultsNativeAcoshFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAcoshFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAcoshFloat4Float4(in, out);
- verifyResultsNativeAcoshFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeAcoshFloat4Float4(inV, out);
+ verifyResultsNativeAcoshFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAcoshFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeAcoshFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAcoshFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAcosh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.rs
index 370f4ed..9e48292 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeAcoshFloatFloat(float in) {
- return native_acosh(in);
+float __attribute__((kernel)) testNativeAcoshFloatFloat(float inV) {
+ return native_acosh(inV);
}
-float2 __attribute__((kernel)) testNativeAcoshFloat2Float2(float2 in) {
- return native_acosh(in);
+float2 __attribute__((kernel)) testNativeAcoshFloat2Float2(float2 inV) {
+ return native_acosh(inV);
}
-float3 __attribute__((kernel)) testNativeAcoshFloat3Float3(float3 in) {
- return native_acosh(in);
+float3 __attribute__((kernel)) testNativeAcoshFloat3Float3(float3 inV) {
+ return native_acosh(inV);
}
-float4 __attribute__((kernel)) testNativeAcoshFloat4Float4(float4 in) {
- return native_acosh(in);
+float4 __attribute__((kernel)) testNativeAcoshFloat4Float4(float4 inV) {
+ return native_acosh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.java
index f8382a8..f5d67e7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeAsinhFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xbcf52a7cb45b6e8fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xbd2e22f24b5b925bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeAsinhFloatFloat(in, out);
- verifyResultsNativeAsinhFloatFloat(in, out, false);
+ script.forEach_testNativeAsinhFloatFloat(inV, out);
+ verifyResultsNativeAsinhFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAsinhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAsinhFloatFloat(in, out);
- verifyResultsNativeAsinhFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeAsinhFloatFloat(inV, out);
+ verifyResultsNativeAsinhFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAsinhFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeAsinhFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAsinhFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAsinh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeAsinhFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc6bf00ae599a01f3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x62151d490cde5427l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeAsinhFloat2Float2(in, out);
- verifyResultsNativeAsinhFloat2Float2(in, out, false);
+ script.forEach_testNativeAsinhFloat2Float2(inV, out);
+ verifyResultsNativeAsinhFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAsinhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAsinhFloat2Float2(in, out);
- verifyResultsNativeAsinhFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeAsinhFloat2Float2(inV, out);
+ verifyResultsNativeAsinhFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAsinhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeAsinhFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAsinhFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAsinh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeAsinhFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc6bf0b4fb8a0978dl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6216e66402f97505l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeAsinhFloat3Float3(in, out);
- verifyResultsNativeAsinhFloat3Float3(in, out, false);
+ script.forEach_testNativeAsinhFloat3Float3(inV, out);
+ verifyResultsNativeAsinhFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAsinhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAsinhFloat3Float3(in, out);
- verifyResultsNativeAsinhFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeAsinhFloat3Float3(inV, out);
+ verifyResultsNativeAsinhFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAsinhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeAsinhFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAsinhFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAsinh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeAsinhFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc6bf15f117a72d27l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6218af7ef91495e3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeAsinhFloat4Float4(in, out);
- verifyResultsNativeAsinhFloat4Float4(in, out, false);
+ script.forEach_testNativeAsinhFloat4Float4(inV, out);
+ verifyResultsNativeAsinhFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAsinhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAsinhFloat4Float4(in, out);
- verifyResultsNativeAsinhFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeAsinhFloat4Float4(inV, out);
+ verifyResultsNativeAsinhFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAsinhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeAsinhFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAsinhFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAsinh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.rs
index 2c40a7a..8e9ac3c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeAsinhFloatFloat(float in) {
- return native_asinh(in);
+float __attribute__((kernel)) testNativeAsinhFloatFloat(float inV) {
+ return native_asinh(inV);
}
-float2 __attribute__((kernel)) testNativeAsinhFloat2Float2(float2 in) {
- return native_asinh(in);
+float2 __attribute__((kernel)) testNativeAsinhFloat2Float2(float2 inV) {
+ return native_asinh(inV);
}
-float3 __attribute__((kernel)) testNativeAsinhFloat3Float3(float3 in) {
- return native_asinh(in);
+float3 __attribute__((kernel)) testNativeAsinhFloat3Float3(float3 inV) {
+ return native_asinh(inV);
}
-float4 __attribute__((kernel)) testNativeAsinhFloat4Float4(float4 in) {
- return native_asinh(in);
+float4 __attribute__((kernel)) testNativeAsinhFloat4Float4(float4 inV) {
+ return native_asinh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.java
index c33523c..5422796 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inY;
- public float inX;
+ public float inNumerator;
+ public float inDenominator;
public Target.Floaty out;
}
private void checkNativeAtan2FloatFloatFloat() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4ecf7d3b9e2a276fl, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4ecf7d3b9e2a276el, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2139aa61fb6dcb4fl, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf6634dcb634c16d0l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testNativeAtan2FloatFloatFloat(inY, out);
- verifyResultsNativeAtan2FloatFloatFloat(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testNativeAtan2FloatFloatFloat(inNumerator, out);
+ verifyResultsNativeAtan2FloatFloatFloat(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2FloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testNativeAtan2FloatFloatFloat(inY, out);
- verifyResultsNativeAtan2FloatFloatFloat(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testNativeAtan2FloatFloatFloat(inNumerator, out);
+ verifyResultsNativeAtan2FloatFloatFloat(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2FloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeAtan2FloatFloatFloat(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
+ private void verifyResultsNativeAtan2FloatFloatFloat(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 1];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 1];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i];
- args.inX = arrayInX[i];
+ args.inNumerator = arrayInNumerator[i];
+ args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtan2(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkNativeAtan2Float2Float2Float2() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3c2d1a09d1c2a8c7l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3c2d1a09d1c2a8c6l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x989e0b0cd0059da7l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4a617fa4dfda5468l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testNativeAtan2Float2Float2Float2(inY, out);
- verifyResultsNativeAtan2Float2Float2Float2(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testNativeAtan2Float2Float2Float2(inNumerator, out);
+ verifyResultsNativeAtan2Float2Float2Float2(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2Float2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testNativeAtan2Float2Float2Float2(inY, out);
- verifyResultsNativeAtan2Float2Float2Float2(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testNativeAtan2Float2Float2Float2(inNumerator, out);
+ verifyResultsNativeAtan2Float2Float2Float2(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2Float2Float2Float2: " + e.toString());
}
}
- private void verifyResultsNativeAtan2Float2Float2Float2(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
+ private void verifyResultsNativeAtan2Float2Float2Float2(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 2];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 2];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 2 + j];
- args.inX = arrayInX[i * 2 + j];
+ args.inNumerator = arrayInNumerator[i * 2 + j];
+ args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtan2(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkNativeAtan2Float3Float3Float3() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x9091f829d3a0aa68l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x9091f829d3a0aa67l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x742cb44672d189a8l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x13c5c0edb2b5e7a1l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testNativeAtan2Float3Float3Float3(inY, out);
- verifyResultsNativeAtan2Float3Float3Float3(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testNativeAtan2Float3Float3Float3(inNumerator, out);
+ verifyResultsNativeAtan2Float3Float3Float3(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2Float3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testNativeAtan2Float3Float3Float3(inY, out);
- verifyResultsNativeAtan2Float3Float3Float3(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testNativeAtan2Float3Float3Float3(inNumerator, out);
+ verifyResultsNativeAtan2Float3Float3Float3(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2Float3Float3Float3: " + e.toString());
}
}
- private void verifyResultsNativeAtan2Float3Float3Float3(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
+ private void verifyResultsNativeAtan2Float3Float3Float3(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 4 + j];
- args.inX = arrayInX[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtan2(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkNativeAtan2Float4Float4Float4() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe4f6d649d57eac09l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe4f6d649d57eac08l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4fbb5d80159d75a9l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xdd2a023685917adal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testNativeAtan2Float4Float4Float4(inY, out);
- verifyResultsNativeAtan2Float4Float4Float4(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testNativeAtan2Float4Float4Float4(inNumerator, out);
+ verifyResultsNativeAtan2Float4Float4Float4(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2Float4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testNativeAtan2Float4Float4Float4(inY, out);
- verifyResultsNativeAtan2Float4Float4Float4(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testNativeAtan2Float4Float4Float4(inNumerator, out);
+ verifyResultsNativeAtan2Float4Float4Float4(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2Float4Float4Float4: " + e.toString());
}
}
- private void verifyResultsNativeAtan2Float4Float4Float4(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
+ private void verifyResultsNativeAtan2Float4Float4Float4(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 4 + j];
- args.inX = arrayInX[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtan2(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.rs
index 3ab222c..0443b0f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInX;
+rs_allocation gAllocInDenominator;
-float __attribute__((kernel)) testNativeAtan2FloatFloatFloat(float inY, unsigned int x) {
- float inX = rsGetElementAt_float(gAllocInX, x);
- return native_atan2(inY, inX);
+float __attribute__((kernel)) testNativeAtan2FloatFloatFloat(float inNumerator, unsigned int x) {
+ float inDenominator = rsGetElementAt_float(gAllocInDenominator, x);
+ return native_atan2(inNumerator, inDenominator);
}
-float2 __attribute__((kernel)) testNativeAtan2Float2Float2Float2(float2 inY, unsigned int x) {
- float2 inX = rsGetElementAt_float2(gAllocInX, x);
- return native_atan2(inY, inX);
+float2 __attribute__((kernel)) testNativeAtan2Float2Float2Float2(float2 inNumerator, unsigned int x) {
+ float2 inDenominator = rsGetElementAt_float2(gAllocInDenominator, x);
+ return native_atan2(inNumerator, inDenominator);
}
-float3 __attribute__((kernel)) testNativeAtan2Float3Float3Float3(float3 inY, unsigned int x) {
- float3 inX = rsGetElementAt_float3(gAllocInX, x);
- return native_atan2(inY, inX);
+float3 __attribute__((kernel)) testNativeAtan2Float3Float3Float3(float3 inNumerator, unsigned int x) {
+ float3 inDenominator = rsGetElementAt_float3(gAllocInDenominator, x);
+ return native_atan2(inNumerator, inDenominator);
}
-float4 __attribute__((kernel)) testNativeAtan2Float4Float4Float4(float4 inY, unsigned int x) {
- float4 inX = rsGetElementAt_float4(gAllocInX, x);
- return native_atan2(inY, inX);
+float4 __attribute__((kernel)) testNativeAtan2Float4Float4Float4(float4 inNumerator, unsigned int x) {
+ float4 inDenominator = rsGetElementAt_float4(gAllocInDenominator, x);
+ return native_atan2(inNumerator, inDenominator);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.java
index dd62b78..7065764 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inY;
- public float inX;
+ public float inNumerator;
+ public float inDenominator;
public Target.Floaty out;
}
private void checkNativeAtan2piFloatFloatFloat() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x39c4f8fd35fc5dc8l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x39c4f8fd35fc5dc7l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xc2172a04694fc108l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xd63229f70853dc01l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testNativeAtan2piFloatFloatFloat(inY, out);
- verifyResultsNativeAtan2piFloatFloatFloat(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testNativeAtan2piFloatFloatFloat(inNumerator, out);
+ verifyResultsNativeAtan2piFloatFloatFloat(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2piFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testNativeAtan2piFloatFloatFloat(inY, out);
- verifyResultsNativeAtan2piFloatFloatFloat(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testNativeAtan2piFloatFloatFloat(inNumerator, out);
+ verifyResultsNativeAtan2piFloatFloatFloat(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2piFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeAtan2piFloatFloatFloat(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
+ private void verifyResultsNativeAtan2piFloatFloatFloat(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 1];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 1];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i];
- args.inX = arrayInX[i];
+ args.inNumerator = arrayInNumerator[i];
+ args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtan2pi(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkNativeAtan2piFloat2Float2Float2() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x6aff980c8d47a3e2l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x6aff980c8d47a3e1l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x305d06618853bce2l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4cc6c68c0c19e58bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testNativeAtan2piFloat2Float2Float2(inY, out);
- verifyResultsNativeAtan2piFloat2Float2Float2(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testNativeAtan2piFloat2Float2Float2(inNumerator, out);
+ verifyResultsNativeAtan2piFloat2Float2Float2(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2piFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testNativeAtan2piFloat2Float2Float2(inY, out);
- verifyResultsNativeAtan2piFloat2Float2Float2(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testNativeAtan2piFloat2Float2Float2(inNumerator, out);
+ verifyResultsNativeAtan2piFloat2Float2Float2(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2piFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsNativeAtan2piFloat2Float2Float2(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
+ private void verifyResultsNativeAtan2piFloat2Float2Float2(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 2];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 2];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 2 + j];
- args.inX = arrayInX[i * 2 + j];
+ args.inNumerator = arrayInNumerator[i * 2 + j];
+ args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtan2pi(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkNativeAtan2piFloat3Float3Float3() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xbf64762c8f25a583l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xbf64762c8f25a582l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xbebaf9b2b1fa8e3l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x162b07d4def578c4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testNativeAtan2piFloat3Float3Float3(inY, out);
- verifyResultsNativeAtan2piFloat3Float3Float3(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testNativeAtan2piFloat3Float3Float3(inNumerator, out);
+ verifyResultsNativeAtan2piFloat3Float3Float3(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2piFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testNativeAtan2piFloat3Float3Float3(inY, out);
- verifyResultsNativeAtan2piFloat3Float3Float3(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testNativeAtan2piFloat3Float3Float3(inNumerator, out);
+ verifyResultsNativeAtan2piFloat3Float3Float3(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2piFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsNativeAtan2piFloat3Float3Float3(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
+ private void verifyResultsNativeAtan2piFloat3Float3Float3(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 4 + j];
- args.inX = arrayInX[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtan2pi(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkNativeAtan2piFloat4Float4Float4() {
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x13c9544c9103a724l, false);
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x13c9544c9103a723l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe77a58d4cdeb94e4l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xdf8f491db1d10bfdl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInX(inX);
- script.forEach_testNativeAtan2piFloat4Float4Float4(inY, out);
- verifyResultsNativeAtan2piFloat4Float4Float4(inY, inX, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testNativeAtan2piFloat4Float4Float4(inNumerator, out);
+ verifyResultsNativeAtan2piFloat4Float4Float4(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2piFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInX(inX);
- scriptRelaxed.forEach_testNativeAtan2piFloat4Float4Float4(inY, out);
- verifyResultsNativeAtan2piFloat4Float4Float4(inY, inX, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testNativeAtan2piFloat4Float4Float4(inNumerator, out);
+ verifyResultsNativeAtan2piFloat4Float4Float4(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtan2piFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsNativeAtan2piFloat4Float4Float4(Allocation inY, Allocation inX, Allocation out, boolean relaxed) {
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
+ private void verifyResultsNativeAtan2piFloat4Float4Float4(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inY = arrayInY[i * 4 + j];
- args.inX = arrayInX[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtan2pi(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inY: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inX: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.rs
index ea3e3f9..7637041 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInX;
+rs_allocation gAllocInDenominator;
-float __attribute__((kernel)) testNativeAtan2piFloatFloatFloat(float inY, unsigned int x) {
- float inX = rsGetElementAt_float(gAllocInX, x);
- return native_atan2pi(inY, inX);
+float __attribute__((kernel)) testNativeAtan2piFloatFloatFloat(float inNumerator, unsigned int x) {
+ float inDenominator = rsGetElementAt_float(gAllocInDenominator, x);
+ return native_atan2pi(inNumerator, inDenominator);
}
-float2 __attribute__((kernel)) testNativeAtan2piFloat2Float2Float2(float2 inY, unsigned int x) {
- float2 inX = rsGetElementAt_float2(gAllocInX, x);
- return native_atan2pi(inY, inX);
+float2 __attribute__((kernel)) testNativeAtan2piFloat2Float2Float2(float2 inNumerator, unsigned int x) {
+ float2 inDenominator = rsGetElementAt_float2(gAllocInDenominator, x);
+ return native_atan2pi(inNumerator, inDenominator);
}
-float3 __attribute__((kernel)) testNativeAtan2piFloat3Float3Float3(float3 inY, unsigned int x) {
- float3 inX = rsGetElementAt_float3(gAllocInX, x);
- return native_atan2pi(inY, inX);
+float3 __attribute__((kernel)) testNativeAtan2piFloat3Float3Float3(float3 inNumerator, unsigned int x) {
+ float3 inDenominator = rsGetElementAt_float3(gAllocInDenominator, x);
+ return native_atan2pi(inNumerator, inDenominator);
}
-float4 __attribute__((kernel)) testNativeAtan2piFloat4Float4Float4(float4 inY, unsigned int x) {
- float4 inX = rsGetElementAt_float4(gAllocInX, x);
- return native_atan2pi(inY, inX);
+float4 __attribute__((kernel)) testNativeAtan2piFloat4Float4Float4(float4 inNumerator, unsigned int x) {
+ float4 inDenominator = rsGetElementAt_float4(gAllocInDenominator, x);
+ return native_atan2pi(inNumerator, inDenominator);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.java
index 6161483..9f4afb2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float inIn;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeAtanhFloatFloat() {
- Allocation inIn = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe13e715ccd0cedebl, -1, 1);
+ Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x46ba02a2e7004d04l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeAtanhFloatFloat(inIn, out);
- verifyResultsNativeAtanhFloatFloat(inIn, out, false);
+ script.forEach_testNativeAtanhFloatFloat(inV, out);
+ verifyResultsNativeAtanhFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAtanhFloatFloat(inIn, out);
- verifyResultsNativeAtanhFloatFloat(inIn, out, true);
+ scriptRelaxed.forEach_testNativeAtanhFloatFloat(inV, out);
+ verifyResultsNativeAtanhFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeAtanhFloatFloat(Allocation inIn, Allocation out, boolean relaxed) {
- float[] arrayInIn = new float[INPUTSIZE * 1];
- inIn.copyTo(arrayInIn);
+ private void verifyResultsNativeAtanhFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inIn = arrayInIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtanh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inIn: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inIn, Float.floatToRawIntBits(args.inIn), args.inIn));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeAtanhFloat2Float2() {
- Allocation inIn = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd5bd3a2802f7f5d7l, -1, 1);
+ Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd557bfdd35a682c8l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeAtanhFloat2Float2(inIn, out);
- verifyResultsNativeAtanhFloat2Float2(inIn, out, false);
+ script.forEach_testNativeAtanhFloat2Float2(inV, out);
+ verifyResultsNativeAtanhFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAtanhFloat2Float2(inIn, out);
- verifyResultsNativeAtanhFloat2Float2(inIn, out, true);
+ scriptRelaxed.forEach_testNativeAtanhFloat2Float2(inV, out);
+ verifyResultsNativeAtanhFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeAtanhFloat2Float2(Allocation inIn, Allocation out, boolean relaxed) {
- float[] arrayInIn = new float[INPUTSIZE * 2];
- inIn.copyTo(arrayInIn);
+ private void verifyResultsNativeAtanhFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inIn = arrayInIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtanh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inIn: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inIn, Float.floatToRawIntBits(args.inIn), args.inIn));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeAtanhFloat3Float3() {
- Allocation inIn = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd60a01af59867b21l, -1, 1);
+ Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd55988f82bc1a3a6l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeAtanhFloat3Float3(inIn, out);
- verifyResultsNativeAtanhFloat3Float3(inIn, out, false);
+ script.forEach_testNativeAtanhFloat3Float3(inV, out);
+ verifyResultsNativeAtanhFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAtanhFloat3Float3(inIn, out);
- verifyResultsNativeAtanhFloat3Float3(inIn, out, true);
+ scriptRelaxed.forEach_testNativeAtanhFloat3Float3(inV, out);
+ verifyResultsNativeAtanhFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeAtanhFloat3Float3(Allocation inIn, Allocation out, boolean relaxed) {
- float[] arrayInIn = new float[INPUTSIZE * 4];
- inIn.copyTo(arrayInIn);
+ private void verifyResultsNativeAtanhFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inIn = arrayInIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtanh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inIn: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inIn, Float.floatToRawIntBits(args.inIn), args.inIn));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeAtanhFloat4Float4() {
- Allocation inIn = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd656c936b015006bl, -1, 1);
+ Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd55b521321dcc484l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeAtanhFloat4Float4(inIn, out);
- verifyResultsNativeAtanhFloat4Float4(inIn, out, false);
+ script.forEach_testNativeAtanhFloat4Float4(inV, out);
+ verifyResultsNativeAtanhFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAtanhFloat4Float4(inIn, out);
- verifyResultsNativeAtanhFloat4Float4(inIn, out, true);
+ scriptRelaxed.forEach_testNativeAtanhFloat4Float4(inV, out);
+ verifyResultsNativeAtanhFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeAtanhFloat4Float4(Allocation inIn, Allocation out, boolean relaxed) {
- float[] arrayInIn = new float[INPUTSIZE * 4];
- inIn.copyTo(arrayInIn);
+ private void verifyResultsNativeAtanhFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inIn = arrayInIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeAtanh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inIn: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inIn, Float.floatToRawIntBits(args.inIn), args.inIn));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.rs
index de772e7..7c20382 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeAtanhFloatFloat(float inIn) {
- return native_atanh(inIn);
+float __attribute__((kernel)) testNativeAtanhFloatFloat(float inV) {
+ return native_atanh(inV);
}
-float2 __attribute__((kernel)) testNativeAtanhFloat2Float2(float2 inIn) {
- return native_atanh(inIn);
+float2 __attribute__((kernel)) testNativeAtanhFloat2Float2(float2 inV) {
+ return native_atanh(inV);
}
-float3 __attribute__((kernel)) testNativeAtanhFloat3Float3(float3 inIn) {
- return native_atanh(inIn);
+float3 __attribute__((kernel)) testNativeAtanhFloat3Float3(float3 inV) {
+ return native_atanh(inV);
}
-float4 __attribute__((kernel)) testNativeAtanhFloat4Float4(float4 inIn) {
- return native_atanh(inIn);
+float4 __attribute__((kernel)) testNativeAtanhFloat4Float4(float4 inV) {
+ return native_atanh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.java
index cd6a030..50abeaf 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeCbrtFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x6eed1901e2ca9d19l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa1d3335118086389l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeCbrtFloatFloat(in, out);
- verifyResultsNativeCbrtFloatFloat(in, out, false);
+ script.forEach_testNativeCbrtFloatFloat(inV, out);
+ verifyResultsNativeCbrtFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCbrtFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCbrtFloatFloat(in, out);
- verifyResultsNativeCbrtFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeCbrtFloatFloat(inV, out);
+ verifyResultsNativeCbrtFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCbrtFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeCbrtFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCbrtFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCbrt(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeCbrtFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2e78c09abaa124adl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xce4859fd59112965l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeCbrtFloat2Float2(in, out);
- verifyResultsNativeCbrtFloat2Float2(in, out, false);
+ script.forEach_testNativeCbrtFloat2Float2(inV, out);
+ verifyResultsNativeCbrtFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCbrtFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCbrtFloat2Float2(in, out);
- verifyResultsNativeCbrtFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeCbrtFloat2Float2(inV, out);
+ verifyResultsNativeCbrtFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCbrtFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeCbrtFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCbrtFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCbrt(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeCbrtFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x2e78cb3c19a7ba47l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xce4a23184f2c4a43l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeCbrtFloat3Float3(in, out);
- verifyResultsNativeCbrtFloat3Float3(in, out, false);
+ script.forEach_testNativeCbrtFloat3Float3(inV, out);
+ verifyResultsNativeCbrtFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCbrtFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCbrtFloat3Float3(in, out);
- verifyResultsNativeCbrtFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeCbrtFloat3Float3(inV, out);
+ verifyResultsNativeCbrtFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCbrtFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeCbrtFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCbrtFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCbrt(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeCbrtFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x2e78d5dd78ae4fe1l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xce4bec3345476b21l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeCbrtFloat4Float4(in, out);
- verifyResultsNativeCbrtFloat4Float4(in, out, false);
+ script.forEach_testNativeCbrtFloat4Float4(inV, out);
+ verifyResultsNativeCbrtFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCbrtFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCbrtFloat4Float4(in, out);
- verifyResultsNativeCbrtFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeCbrtFloat4Float4(inV, out);
+ verifyResultsNativeCbrtFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCbrtFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeCbrtFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCbrtFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCbrt(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.rs
index 828214b..9b8e4e9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeCbrtFloatFloat(float in) {
- return native_cbrt(in);
+float __attribute__((kernel)) testNativeCbrtFloatFloat(float inV) {
+ return native_cbrt(inV);
}
-float2 __attribute__((kernel)) testNativeCbrtFloat2Float2(float2 in) {
- return native_cbrt(in);
+float2 __attribute__((kernel)) testNativeCbrtFloat2Float2(float2 inV) {
+ return native_cbrt(inV);
}
-float3 __attribute__((kernel)) testNativeCbrtFloat3Float3(float3 in) {
- return native_cbrt(in);
+float3 __attribute__((kernel)) testNativeCbrtFloat3Float3(float3 inV) {
+ return native_cbrt(inV);
}
-float4 __attribute__((kernel)) testNativeCbrtFloat4Float4(float4 in) {
- return native_cbrt(in);
+float4 __attribute__((kernel)) testNativeCbrtFloat4Float4(float4 inV) {
+ return native_cbrt(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.java
index d7c9ebf..71df032 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeCosFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x95ef4a20c73e7e3dl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2f317381777f3495l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeCosFloatFloat(in, out);
- verifyResultsNativeCosFloatFloat(in, out, false);
+ script.forEach_testNativeCosFloatFloat(inV, out);
+ verifyResultsNativeCosFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCosFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCosFloatFloat(in, out);
- verifyResultsNativeCosFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeCosFloatFloat(inV, out);
+ verifyResultsNativeCosFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCosFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeCosFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCosFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCos(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeCosFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xed4d88bac39641b1l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdc05f75eda3d0911l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeCosFloat2Float2(in, out);
- verifyResultsNativeCosFloat2Float2(in, out, false);
+ script.forEach_testNativeCosFloat2Float2(inV, out);
+ verifyResultsNativeCosFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCosFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCosFloat2Float2(in, out);
- verifyResultsNativeCosFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeCosFloat2Float2(inV, out);
+ verifyResultsNativeCosFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCosFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeCosFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCosFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCos(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeCosFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xed4d935c229cd74bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xdc07c079d05829efl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeCosFloat3Float3(in, out);
- verifyResultsNativeCosFloat3Float3(in, out, false);
+ script.forEach_testNativeCosFloat3Float3(inV, out);
+ verifyResultsNativeCosFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCosFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCosFloat3Float3(in, out);
- verifyResultsNativeCosFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeCosFloat3Float3(inV, out);
+ verifyResultsNativeCosFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCosFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeCosFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCosFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCos(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeCosFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xed4d9dfd81a36ce5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xdc098994c6734acdl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeCosFloat4Float4(in, out);
- verifyResultsNativeCosFloat4Float4(in, out, false);
+ script.forEach_testNativeCosFloat4Float4(inV, out);
+ verifyResultsNativeCosFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCosFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCosFloat4Float4(in, out);
- verifyResultsNativeCosFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeCosFloat4Float4(inV, out);
+ verifyResultsNativeCosFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCosFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeCosFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCosFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCos(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.rs
index 212c12e..d608991 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeCosFloatFloat(float in) {
- return native_cos(in);
+float __attribute__((kernel)) testNativeCosFloatFloat(float inV) {
+ return native_cos(inV);
}
-float2 __attribute__((kernel)) testNativeCosFloat2Float2(float2 in) {
- return native_cos(in);
+float2 __attribute__((kernel)) testNativeCosFloat2Float2(float2 inV) {
+ return native_cos(inV);
}
-float3 __attribute__((kernel)) testNativeCosFloat3Float3(float3 in) {
- return native_cos(in);
+float3 __attribute__((kernel)) testNativeCosFloat3Float3(float3 inV) {
+ return native_cos(inV);
}
-float4 __attribute__((kernel)) testNativeCosFloat4Float4(float4 in) {
- return native_cos(in);
+float4 __attribute__((kernel)) testNativeCosFloat4Float4(float4 inV) {
+ return native_cos(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.java
index 4e841c6..c7d66c6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeCoshFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xeb1020909e9c475dl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7bb5784aa43ffcf5l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeCoshFloatFloat(in, out);
- verifyResultsNativeCoshFloatFloat(in, out, false);
+ script.forEach_testNativeCoshFloatFloat(inV, out);
+ verifyResultsNativeCoshFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCoshFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCoshFloatFloat(in, out);
- verifyResultsNativeCoshFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeCoshFloatFloat(inV, out);
+ verifyResultsNativeCoshFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCoshFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeCoshFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCoshFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCosh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeCoshFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc77a568547f7e9d1l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x818c886316a44671l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeCoshFloat2Float2(in, out);
- verifyResultsNativeCoshFloat2Float2(in, out, false);
+ script.forEach_testNativeCoshFloat2Float2(inV, out);
+ verifyResultsNativeCoshFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCoshFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCoshFloat2Float2(in, out);
- verifyResultsNativeCoshFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeCoshFloat2Float2(inV, out);
+ verifyResultsNativeCoshFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCoshFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeCoshFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCoshFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCosh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeCoshFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc77a6126a6fe7f6bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x818e517e0cbf674fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeCoshFloat3Float3(in, out);
- verifyResultsNativeCoshFloat3Float3(in, out, false);
+ script.forEach_testNativeCoshFloat3Float3(inV, out);
+ verifyResultsNativeCoshFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCoshFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCoshFloat3Float3(in, out);
- verifyResultsNativeCoshFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeCoshFloat3Float3(inV, out);
+ verifyResultsNativeCoshFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCoshFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeCoshFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCoshFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCosh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeCoshFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc77a6bc806051505l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x81901a9902da882dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeCoshFloat4Float4(in, out);
- verifyResultsNativeCoshFloat4Float4(in, out, false);
+ script.forEach_testNativeCoshFloat4Float4(inV, out);
+ verifyResultsNativeCoshFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCoshFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCoshFloat4Float4(in, out);
- verifyResultsNativeCoshFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeCoshFloat4Float4(inV, out);
+ verifyResultsNativeCoshFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCoshFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeCoshFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCoshFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCosh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.rs
index f3635d8..665e915 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeCoshFloatFloat(float in) {
- return native_cosh(in);
+float __attribute__((kernel)) testNativeCoshFloatFloat(float inV) {
+ return native_cosh(inV);
}
-float2 __attribute__((kernel)) testNativeCoshFloat2Float2(float2 in) {
- return native_cosh(in);
+float2 __attribute__((kernel)) testNativeCoshFloat2Float2(float2 inV) {
+ return native_cosh(inV);
}
-float3 __attribute__((kernel)) testNativeCoshFloat3Float3(float3 in) {
- return native_cosh(in);
+float3 __attribute__((kernel)) testNativeCoshFloat3Float3(float3 inV) {
+ return native_cosh(inV);
}
-float4 __attribute__((kernel)) testNativeCoshFloat4Float4(float4 in) {
- return native_cosh(in);
+float4 __attribute__((kernel)) testNativeCoshFloat4Float4(float4 inV) {
+ return native_cosh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.java
index ab5065b..5592583 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeCospiFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x8fc4f0187aafc9a6l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2614541c9b86df38l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeCospiFloatFloat(in, out);
- verifyResultsNativeCospiFloatFloat(in, out, false);
+ script.forEach_testNativeCospiFloatFloat(inV, out);
+ verifyResultsNativeCospiFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCospiFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCospiFloatFloat(in, out);
- verifyResultsNativeCospiFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeCospiFloatFloat(inV, out);
+ verifyResultsNativeCospiFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCospiFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeCospiFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCospiFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCospi(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeCospiFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x656942c9d0dfeb12l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8ae37e6159c7c5cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeCospiFloat2Float2(in, out);
- verifyResultsNativeCospiFloat2Float2(in, out, false);
+ script.forEach_testNativeCospiFloat2Float2(inV, out);
+ verifyResultsNativeCospiFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCospiFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCospiFloat2Float2(in, out);
- verifyResultsNativeCospiFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeCospiFloat2Float2(inV, out);
+ verifyResultsNativeCospiFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCospiFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeCospiFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCospiFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCospi(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeCospiFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x65694d6b2fe680acl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8b001010bb79d3al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeCospiFloat3Float3(in, out);
- verifyResultsNativeCospiFloat3Float3(in, out, false);
+ script.forEach_testNativeCospiFloat3Float3(inV, out);
+ verifyResultsNativeCospiFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCospiFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCospiFloat3Float3(in, out);
- verifyResultsNativeCospiFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeCospiFloat3Float3(inV, out);
+ verifyResultsNativeCospiFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCospiFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeCospiFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCospiFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCospi(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeCospiFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6569580c8eed1646l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8b1ca1c01d2be18l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeCospiFloat4Float4(in, out);
- verifyResultsNativeCospiFloat4Float4(in, out, false);
+ script.forEach_testNativeCospiFloat4Float4(inV, out);
+ verifyResultsNativeCospiFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCospiFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeCospiFloat4Float4(in, out);
- verifyResultsNativeCospiFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeCospiFloat4Float4(inV, out);
+ verifyResultsNativeCospiFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeCospiFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeCospiFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeCospiFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeCospi(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.rs
index 471403f..dab1603 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeCospiFloatFloat(float in) {
- return native_cospi(in);
+float __attribute__((kernel)) testNativeCospiFloatFloat(float inV) {
+ return native_cospi(inV);
}
-float2 __attribute__((kernel)) testNativeCospiFloat2Float2(float2 in) {
- return native_cospi(in);
+float2 __attribute__((kernel)) testNativeCospiFloat2Float2(float2 inV) {
+ return native_cospi(inV);
}
-float3 __attribute__((kernel)) testNativeCospiFloat3Float3(float3 in) {
- return native_cospi(in);
+float3 __attribute__((kernel)) testNativeCospiFloat3Float3(float3 inV) {
+ return native_cospi(inV);
}
-float4 __attribute__((kernel)) testNativeCospiFloat4Float4(float4 in) {
- return native_cospi(in);
+float4 __attribute__((kernel)) testNativeCospiFloat4Float4(float4 inV) {
+ return native_cospi(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.java
index 360da34..0355d31 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inLhs;
- public float inRhs;
+ public float inLeftVector;
+ public float inRightVector;
public Target.Floaty out;
}
private void checkNativeDistanceFloatFloatFloat() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe0fd4252f8556ff6l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe0fd4252f8559b4cl, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb61d5ec530ae2337l, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x98c2c48c9b58b3c2l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testNativeDistanceFloatFloatFloat(inLhs, out);
- verifyResultsNativeDistanceFloatFloatFloat(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testNativeDistanceFloatFloatFloat(inLeftVector, out);
+ verifyResultsNativeDistanceFloatFloatFloat(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDistanceFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testNativeDistanceFloatFloatFloat(inLhs, out);
- verifyResultsNativeDistanceFloatFloatFloat(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testNativeDistanceFloatFloatFloat(inLeftVector, out);
+ verifyResultsNativeDistanceFloatFloatFloat(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDistanceFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeDistanceFloatFloatFloat(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 1];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 1];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsNativeDistanceFloatFloatFloat(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 1];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 1];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
// Create the appropriate sized arrays in args
// Fill args with the input values
- args.inLhs = arrayInLhs[i];
- args.inRhs = arrayInRhs[i];
+ args.inLeftVector = arrayInLeftVector[i];
+ args.inRightVector = arrayInRightVector[i];
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeDistance(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i], Float.floatToRawIntBits(arrayInLhs[i]), arrayInLhs[i]));
+ arrayInLeftVector[i], Float.floatToRawIntBits(arrayInLeftVector[i]), arrayInLeftVector[i]));
message.append("\n");
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i], Float.floatToRawIntBits(arrayInRhs[i]), arrayInRhs[i]));
+ arrayInRightVector[i], Float.floatToRawIntBits(arrayInRightVector[i]), arrayInRightVector[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -109,50 +109,50 @@
}
public class ArgumentsFloatNFloatNFloat {
- public float[] inLhs;
- public float[] inRhs;
+ public float[] inLeftVector;
+ public float[] inRightVector;
public Target.Floaty out;
}
private void checkNativeDistanceFloat2Float2Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x28a9ea2ea1fd926al, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x28a9ea2ea1fdbdc0l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xef86e1d727286713l, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3d7bc89101e219b6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testNativeDistanceFloat2Float2Float(inLhs, out);
- verifyResultsNativeDistanceFloat2Float2Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testNativeDistanceFloat2Float2Float(inLeftVector, out);
+ verifyResultsNativeDistanceFloat2Float2Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDistanceFloat2Float2Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testNativeDistanceFloat2Float2Float(inLhs, out);
- verifyResultsNativeDistanceFloat2Float2Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testNativeDistanceFloat2Float2Float(inLeftVector, out);
+ verifyResultsNativeDistanceFloat2Float2Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDistanceFloat2Float2Float: " + e.toString());
}
}
- private void verifyResultsNativeDistanceFloat2Float2Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 2];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 2];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsNativeDistanceFloat2Float2Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 2];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 2];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[2];
- args.inRhs = new float[2];
+ args.inLeftVector = new float[2];
+ args.inRightVector = new float[2];
// Fill args with the input values
for (int j = 0; j < 2 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 2 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 2 + j];
}
for (int j = 0; j < 2 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 2 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 2 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeDistance(args, target);
@@ -165,15 +165,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 2 + j], Float.floatToRawIntBits(arrayInLhs[i * 2 + j]), arrayInLhs[i * 2 + j]));
+ arrayInLeftVector[i * 2 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 2 + j]), arrayInLeftVector[i * 2 + j]));
message.append("\n");
}
for (int j = 0; j < 2 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 2 + j], Float.floatToRawIntBits(arrayInRhs[i * 2 + j]), arrayInRhs[i * 2 + j]));
+ arrayInRightVector[i * 2 + j], Float.floatToRawIntBits(arrayInRightVector[i * 2 + j]), arrayInRightVector[i * 2 + j]));
message.append("\n");
}
message.append("Expected output out: ");
@@ -193,44 +193,44 @@
}
private void checkNativeDistanceFloat3Float3Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x559b398ef213adc4l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x559b398ef213d91al, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xbe30075548c71b61l, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf3e514c0a78a62d0l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testNativeDistanceFloat3Float3Float(inLhs, out);
- verifyResultsNativeDistanceFloat3Float3Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testNativeDistanceFloat3Float3Float(inLeftVector, out);
+ verifyResultsNativeDistanceFloat3Float3Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDistanceFloat3Float3Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testNativeDistanceFloat3Float3Float(inLhs, out);
- verifyResultsNativeDistanceFloat3Float3Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testNativeDistanceFloat3Float3Float(inLeftVector, out);
+ verifyResultsNativeDistanceFloat3Float3Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDistanceFloat3Float3Float: " + e.toString());
}
}
- private void verifyResultsNativeDistanceFloat3Float3Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsNativeDistanceFloat3Float3Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[3];
- args.inRhs = new float[3];
+ args.inLeftVector = new float[3];
+ args.inRightVector = new float[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 3 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeDistance(args, target);
@@ -243,15 +243,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
message.append("Expected output out: ");
@@ -271,44 +271,44 @@
}
private void checkNativeDistanceFloat4Float4Float() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x828c88ef4229c91el, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x828c88ef4229f474l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8cd92cd36a65cfafl, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xaa4e60f04d32abeal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testNativeDistanceFloat4Float4Float(inLhs, out);
- verifyResultsNativeDistanceFloat4Float4Float(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testNativeDistanceFloat4Float4Float(inLeftVector, out);
+ verifyResultsNativeDistanceFloat4Float4Float(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDistanceFloat4Float4Float: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testNativeDistanceFloat4Float4Float(inLhs, out);
- verifyResultsNativeDistanceFloat4Float4Float(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testNativeDistanceFloat4Float4Float(inLeftVector, out);
+ verifyResultsNativeDistanceFloat4Float4Float(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDistanceFloat4Float4Float: " + e.toString());
}
}
- private void verifyResultsNativeDistanceFloat4Float4Float(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsNativeDistanceFloat4Float4Float(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
ArgumentsFloatNFloatNFloat args = new ArgumentsFloatNFloatNFloat();
// Create the appropriate sized arrays in args
- args.inLhs = new float[4];
- args.inRhs = new float[4];
+ args.inLeftVector = new float[4];
+ args.inRightVector = new float[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
- args.inLhs[j] = arrayInLhs[i * 4 + j];
+ args.inLeftVector[j] = arrayInLeftVector[i * 4 + j];
}
for (int j = 0; j < 4 ; j++) {
- args.inRhs[j] = arrayInRhs[i * 4 + j];
+ args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeDistance(args, target);
@@ -321,15 +321,15 @@
if (!valid) {
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
+ arrayInLeftVector[i * 4 + j], Float.floatToRawIntBits(arrayInLeftVector[i * 4 + j]), arrayInLeftVector[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
+ arrayInRightVector[i * 4 + j], Float.floatToRawIntBits(arrayInRightVector[i * 4 + j]), arrayInRightVector[i * 4 + j]));
message.append("\n");
}
message.append("Expected output out: ");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.rs
index d9c215c..872db3e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInRhs;
+rs_allocation gAllocInRightVector;
-float __attribute__((kernel)) testNativeDistanceFloatFloatFloat(float inLhs, unsigned int x) {
- float inRhs = rsGetElementAt_float(gAllocInRhs, x);
- return native_distance(inLhs, inRhs);
+float __attribute__((kernel)) testNativeDistanceFloatFloatFloat(float inLeftVector, unsigned int x) {
+ float inRightVector = rsGetElementAt_float(gAllocInRightVector, x);
+ return native_distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testNativeDistanceFloat2Float2Float(float2 inLhs, unsigned int x) {
- float2 inRhs = rsGetElementAt_float2(gAllocInRhs, x);
- return native_distance(inLhs, inRhs);
+float __attribute__((kernel)) testNativeDistanceFloat2Float2Float(float2 inLeftVector, unsigned int x) {
+ float2 inRightVector = rsGetElementAt_float2(gAllocInRightVector, x);
+ return native_distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testNativeDistanceFloat3Float3Float(float3 inLhs, unsigned int x) {
- float3 inRhs = rsGetElementAt_float3(gAllocInRhs, x);
- return native_distance(inLhs, inRhs);
+float __attribute__((kernel)) testNativeDistanceFloat3Float3Float(float3 inLeftVector, unsigned int x) {
+ float3 inRightVector = rsGetElementAt_float3(gAllocInRightVector, x);
+ return native_distance(inLeftVector, inRightVector);
}
-float __attribute__((kernel)) testNativeDistanceFloat4Float4Float(float4 inLhs, unsigned int x) {
- float4 inRhs = rsGetElementAt_float4(gAllocInRhs, x);
- return native_distance(inLhs, inRhs);
+float __attribute__((kernel)) testNativeDistanceFloat4Float4Float(float4 inLeftVector, unsigned int x) {
+ float4 inRightVector = rsGetElementAt_float4(gAllocInRightVector, x);
+ return native_distance(inLeftVector, inRightVector);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.java
index c546724..05afe88 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inLhs;
- public float inRhs;
+ public float inLeftVector;
+ public float inRightVector;
public Target.Floaty out;
}
private void checkNativeDivideFloatFloatFloat() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe2845ef0c23d02del, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe2845ef0c23d2e34l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x73477387751754efl, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5ed4412e19040daal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testNativeDivideFloatFloatFloat(inLhs, out);
- verifyResultsNativeDivideFloatFloatFloat(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testNativeDivideFloatFloatFloat(inLeftVector, out);
+ verifyResultsNativeDivideFloatFloatFloat(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDivideFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testNativeDivideFloatFloatFloat(inLhs, out);
- verifyResultsNativeDivideFloatFloatFloat(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testNativeDivideFloatFloatFloat(inLeftVector, out);
+ verifyResultsNativeDivideFloatFloatFloat(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDivideFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeDivideFloatFloatFloat(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 1];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 1];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsNativeDivideFloatFloatFloat(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 1];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 1];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inLhs = arrayInLhs[i];
- args.inRhs = arrayInRhs[i];
+ args.inLeftVector = arrayInLeftVector[i];
+ args.inRightVector = arrayInRightVector[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeDivide(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inLhs, Float.floatToRawIntBits(args.inLhs), args.inLhs));
+ args.inLeftVector, Float.floatToRawIntBits(args.inLeftVector), args.inLeftVector));
message.append("\n");
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inRhs, Float.floatToRawIntBits(args.inRhs), args.inRhs));
+ args.inRightVector, Float.floatToRawIntBits(args.inRightVector), args.inRightVector));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkNativeDivideFloat2Float2Float2() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x51c6d6ecaeab1c48l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x51c6d6ecaeab479el, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x752d5a1207785d6dl, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xb071fa74af507ad4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testNativeDivideFloat2Float2Float2(inLhs, out);
- verifyResultsNativeDivideFloat2Float2Float2(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testNativeDivideFloat2Float2Float2(inLeftVector, out);
+ verifyResultsNativeDivideFloat2Float2Float2(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDivideFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testNativeDivideFloat2Float2Float2(inLhs, out);
- verifyResultsNativeDivideFloat2Float2Float2(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testNativeDivideFloat2Float2Float2(inLeftVector, out);
+ verifyResultsNativeDivideFloat2Float2Float2(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDivideFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsNativeDivideFloat2Float2Float2(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 2];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 2];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsNativeDivideFloat2Float2Float2(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 2];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 2];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inLhs = arrayInLhs[i * 2 + j];
- args.inRhs = arrayInRhs[i * 2 + j];
+ args.inLeftVector = arrayInLeftVector[i * 2 + j];
+ args.inRightVector = arrayInRightVector[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeDivide(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inLhs, Float.floatToRawIntBits(args.inLhs), args.inLhs));
+ args.inLeftVector, Float.floatToRawIntBits(args.inLeftVector), args.inLeftVector));
message.append("\n");
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inRhs, Float.floatToRawIntBits(args.inRhs), args.inRhs));
+ args.inRightVector, Float.floatToRawIntBits(args.inRightVector), args.inRightVector));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkNativeDivideFloat3Float3Float3() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xde4f2c1a2b24e021l, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xde4f2c1a2b250b77l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x5623c6c05fb90198l, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x79d63bbd822c0e0dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testNativeDivideFloat3Float3Float3(inLhs, out);
- verifyResultsNativeDivideFloat3Float3Float3(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testNativeDivideFloat3Float3Float3(inLeftVector, out);
+ verifyResultsNativeDivideFloat3Float3Float3(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDivideFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testNativeDivideFloat3Float3Float3(inLhs, out);
- verifyResultsNativeDivideFloat3Float3Float3(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testNativeDivideFloat3Float3Float3(inLeftVector, out);
+ verifyResultsNativeDivideFloat3Float3Float3(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDivideFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsNativeDivideFloat3Float3Float3(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsNativeDivideFloat3Float3Float3(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inLhs = arrayInLhs[i * 4 + j];
- args.inRhs = arrayInRhs[i * 4 + j];
+ args.inLeftVector = arrayInLeftVector[i * 4 + j];
+ args.inRightVector = arrayInRightVector[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeDivide(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inLhs, Float.floatToRawIntBits(args.inLhs), args.inLhs));
+ args.inLeftVector, Float.floatToRawIntBits(args.inLeftVector), args.inLeftVector));
message.append("\n");
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inRhs, Float.floatToRawIntBits(args.inRhs), args.inRhs));
+ args.inRightVector, Float.floatToRawIntBits(args.inRightVector), args.inRightVector));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkNativeDivideFloat4Float4Float4() {
- Allocation inLhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6ad78147a79ea3fal, false);
- Allocation inRhs = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6ad78147a79ecf50l, false);
+ Allocation inLeftVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x371a336eb7f9a5c3l, false);
+ Allocation inRightVector = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x433a7d065507a146l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInRhs(inRhs);
- script.forEach_testNativeDivideFloat4Float4Float4(inLhs, out);
- verifyResultsNativeDivideFloat4Float4Float4(inLhs, inRhs, out, false);
+ script.set_gAllocInRightVector(inRightVector);
+ script.forEach_testNativeDivideFloat4Float4Float4(inLeftVector, out);
+ verifyResultsNativeDivideFloat4Float4Float4(inLeftVector, inRightVector, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDivideFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInRhs(inRhs);
- scriptRelaxed.forEach_testNativeDivideFloat4Float4Float4(inLhs, out);
- verifyResultsNativeDivideFloat4Float4Float4(inLhs, inRhs, out, true);
+ scriptRelaxed.set_gAllocInRightVector(inRightVector);
+ scriptRelaxed.forEach_testNativeDivideFloat4Float4Float4(inLeftVector, out);
+ verifyResultsNativeDivideFloat4Float4Float4(inLeftVector, inRightVector, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeDivideFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsNativeDivideFloat4Float4Float4(Allocation inLhs, Allocation inRhs, Allocation out, boolean relaxed) {
- float[] arrayInLhs = new float[INPUTSIZE * 4];
- inLhs.copyTo(arrayInLhs);
- float[] arrayInRhs = new float[INPUTSIZE * 4];
- inRhs.copyTo(arrayInRhs);
+ private void verifyResultsNativeDivideFloat4Float4Float4(Allocation inLeftVector, Allocation inRightVector, Allocation out, boolean relaxed) {
+ float[] arrayInLeftVector = new float[INPUTSIZE * 4];
+ inLeftVector.copyTo(arrayInLeftVector);
+ float[] arrayInRightVector = new float[INPUTSIZE * 4];
+ inRightVector.copyTo(arrayInRightVector);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inLhs = arrayInLhs[i * 4 + j];
- args.inRhs = arrayInRhs[i * 4 + j];
+ args.inLeftVector = arrayInLeftVector[i * 4 + j];
+ args.inRightVector = arrayInRightVector[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeDivide(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inLhs: ");
+ message.append("Input inLeftVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inLhs, Float.floatToRawIntBits(args.inLhs), args.inLhs));
+ args.inLeftVector, Float.floatToRawIntBits(args.inLeftVector), args.inLeftVector));
message.append("\n");
- message.append("Input inRhs: ");
+ message.append("Input inRightVector: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inRhs, Float.floatToRawIntBits(args.inRhs), args.inRhs));
+ args.inRightVector, Float.floatToRawIntBits(args.inRightVector), args.inRightVector));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.rs
index ee36b50..db501c5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInRhs;
+rs_allocation gAllocInRightVector;
-float __attribute__((kernel)) testNativeDivideFloatFloatFloat(float inLhs, unsigned int x) {
- float inRhs = rsGetElementAt_float(gAllocInRhs, x);
- return native_divide(inLhs, inRhs);
+float __attribute__((kernel)) testNativeDivideFloatFloatFloat(float inLeftVector, unsigned int x) {
+ float inRightVector = rsGetElementAt_float(gAllocInRightVector, x);
+ return native_divide(inLeftVector, inRightVector);
}
-float2 __attribute__((kernel)) testNativeDivideFloat2Float2Float2(float2 inLhs, unsigned int x) {
- float2 inRhs = rsGetElementAt_float2(gAllocInRhs, x);
- return native_divide(inLhs, inRhs);
+float2 __attribute__((kernel)) testNativeDivideFloat2Float2Float2(float2 inLeftVector, unsigned int x) {
+ float2 inRightVector = rsGetElementAt_float2(gAllocInRightVector, x);
+ return native_divide(inLeftVector, inRightVector);
}
-float3 __attribute__((kernel)) testNativeDivideFloat3Float3Float3(float3 inLhs, unsigned int x) {
- float3 inRhs = rsGetElementAt_float3(gAllocInRhs, x);
- return native_divide(inLhs, inRhs);
+float3 __attribute__((kernel)) testNativeDivideFloat3Float3Float3(float3 inLeftVector, unsigned int x) {
+ float3 inRightVector = rsGetElementAt_float3(gAllocInRightVector, x);
+ return native_divide(inLeftVector, inRightVector);
}
-float4 __attribute__((kernel)) testNativeDivideFloat4Float4Float4(float4 inLhs, unsigned int x) {
- float4 inRhs = rsGetElementAt_float4(gAllocInRhs, x);
- return native_divide(inLhs, inRhs);
+float4 __attribute__((kernel)) testNativeDivideFloat4Float4Float4(float4 inLeftVector, unsigned int x) {
+ float4 inRightVector = rsGetElementAt_float4(gAllocInRightVector, x);
+ return native_divide(inLeftVector, inRightVector);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.java
index 3eecc32..09c5635 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeExpm1FloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x209e2820fcaa295fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7a90bd8a7094f34bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeExpm1FloatFloat(in, out);
- verifyResultsNativeExpm1FloatFloat(in, out, false);
+ script.forEach_testNativeExpm1FloatFloat(inV, out);
+ verifyResultsNativeExpm1FloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeExpm1FloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeExpm1FloatFloat(in, out);
- verifyResultsNativeExpm1FloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeExpm1FloatFloat(inV, out);
+ verifyResultsNativeExpm1FloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeExpm1FloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeExpm1FloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeExpm1FloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeExpm1(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeExpm1Float2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x964ef83c9a3d4a43l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3f43b22de84b7997l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeExpm1Float2Float2(in, out);
- verifyResultsNativeExpm1Float2Float2(in, out, false);
+ script.forEach_testNativeExpm1Float2Float2(inV, out);
+ verifyResultsNativeExpm1Float2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeExpm1Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeExpm1Float2Float2(in, out);
- verifyResultsNativeExpm1Float2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeExpm1Float2Float2(inV, out);
+ verifyResultsNativeExpm1Float2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeExpm1Float2Float2: " + e.toString());
}
}
- private void verifyResultsNativeExpm1Float2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeExpm1Float2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeExpm1(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeExpm1Float3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x964f02ddf943dfddl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3f457b48de669a75l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeExpm1Float3Float3(in, out);
- verifyResultsNativeExpm1Float3Float3(in, out, false);
+ script.forEach_testNativeExpm1Float3Float3(inV, out);
+ verifyResultsNativeExpm1Float3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeExpm1Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeExpm1Float3Float3(in, out);
- verifyResultsNativeExpm1Float3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeExpm1Float3Float3(inV, out);
+ verifyResultsNativeExpm1Float3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeExpm1Float3Float3: " + e.toString());
}
}
- private void verifyResultsNativeExpm1Float3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeExpm1Float3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeExpm1(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeExpm1Float4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x964f0d7f584a7577l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3f474463d481bb53l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeExpm1Float4Float4(in, out);
- verifyResultsNativeExpm1Float4Float4(in, out, false);
+ script.forEach_testNativeExpm1Float4Float4(inV, out);
+ verifyResultsNativeExpm1Float4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeExpm1Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeExpm1Float4Float4(in, out);
- verifyResultsNativeExpm1Float4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeExpm1Float4Float4(inV, out);
+ verifyResultsNativeExpm1Float4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeExpm1Float4Float4: " + e.toString());
}
}
- private void verifyResultsNativeExpm1Float4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeExpm1Float4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeExpm1(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.rs
index 6d265d6..aca1745 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeExpm1FloatFloat(float in) {
- return native_expm1(in);
+float __attribute__((kernel)) testNativeExpm1FloatFloat(float inV) {
+ return native_expm1(inV);
}
-float2 __attribute__((kernel)) testNativeExpm1Float2Float2(float2 in) {
- return native_expm1(in);
+float2 __attribute__((kernel)) testNativeExpm1Float2Float2(float2 inV) {
+ return native_expm1(inV);
}
-float3 __attribute__((kernel)) testNativeExpm1Float3Float3(float3 in) {
- return native_expm1(in);
+float3 __attribute__((kernel)) testNativeExpm1Float3Float3(float3 inV) {
+ return native_expm1(inV);
}
-float4 __attribute__((kernel)) testNativeExpm1Float4Float4(float4 in) {
- return native_expm1(in);
+float4 __attribute__((kernel)) testNativeExpm1Float4Float4(float4 inV) {
+ return native_expm1(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.java
index 0a50675..73d2b58 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inA;
+ public float inB;
public Target.Floaty out;
}
private void checkNativeHypotFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3d61f129bdf66018l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3d61f129bdf66019l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3d61f129bdf66001l, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3d61f129bdf66002l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNativeHypotFloatFloatFloat(inX, out);
- verifyResultsNativeHypotFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testNativeHypotFloatFloatFloat(inA, out);
+ verifyResultsNativeHypotFloatFloatFloat(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeHypotFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNativeHypotFloatFloatFloat(inX, out);
- verifyResultsNativeHypotFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testNativeHypotFloatFloatFloat(inA, out);
+ verifyResultsNativeHypotFloatFloatFloat(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeHypotFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeHypotFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsNativeHypotFloatFloatFloat(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 1];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 1];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inA = arrayInA[i];
+ args.inB = arrayInB[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeHypot(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkNativeHypotFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x92a8064760a50e64l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x92a8064760a50e65l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x92a8064760a50e4dl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x92a8064760a50e4el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNativeHypotFloat2Float2Float2(inX, out);
- verifyResultsNativeHypotFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testNativeHypotFloat2Float2Float2(inA, out);
+ verifyResultsNativeHypotFloat2Float2Float2(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeHypotFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNativeHypotFloat2Float2Float2(inX, out);
- verifyResultsNativeHypotFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testNativeHypotFloat2Float2Float2(inA, out);
+ verifyResultsNativeHypotFloat2Float2Float2(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeHypotFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsNativeHypotFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsNativeHypotFloat2Float2Float2(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 2];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 2];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inA = arrayInA[i * 2 + j];
+ args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeHypot(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkNativeHypotFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe70ce46762831005l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe70ce46762831006l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe70ce46762830feel, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe70ce46762830fefl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNativeHypotFloat3Float3Float3(inX, out);
- verifyResultsNativeHypotFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testNativeHypotFloat3Float3Float3(inA, out);
+ verifyResultsNativeHypotFloat3Float3Float3(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeHypotFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNativeHypotFloat3Float3Float3(inX, out);
- verifyResultsNativeHypotFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testNativeHypotFloat3Float3Float3(inA, out);
+ verifyResultsNativeHypotFloat3Float3Float3(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeHypotFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsNativeHypotFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsNativeHypotFloat3Float3Float3(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeHypot(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkNativeHypotFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3b71c287646111a6l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3b71c287646111a7l, false);
+ Allocation inA = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3b71c2876461118fl, false);
+ Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3b71c28764611190l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNativeHypotFloat4Float4Float4(inX, out);
- verifyResultsNativeHypotFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInB(inB);
+ script.forEach_testNativeHypotFloat4Float4Float4(inA, out);
+ verifyResultsNativeHypotFloat4Float4Float4(inA, inB, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeHypotFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNativeHypotFloat4Float4Float4(inX, out);
- verifyResultsNativeHypotFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInB(inB);
+ scriptRelaxed.forEach_testNativeHypotFloat4Float4Float4(inA, out);
+ verifyResultsNativeHypotFloat4Float4Float4(inA, inB, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeHypotFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsNativeHypotFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsNativeHypotFloat4Float4Float4(Allocation inA, Allocation inB, Allocation out, boolean relaxed) {
+ float[] arrayInA = new float[INPUTSIZE * 4];
+ inA.copyTo(arrayInA);
+ float[] arrayInB = new float[INPUTSIZE * 4];
+ inB.copyTo(arrayInB);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inA = arrayInA[i * 4 + j];
+ args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeHypot(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inA: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inB: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.rs
index b4e8a7c..70fb23d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInB;
-float __attribute__((kernel)) testNativeHypotFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return native_hypot(inX, inY);
+float __attribute__((kernel)) testNativeHypotFloatFloatFloat(float inA, unsigned int x) {
+ float inB = rsGetElementAt_float(gAllocInB, x);
+ return native_hypot(inA, inB);
}
-float2 __attribute__((kernel)) testNativeHypotFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return native_hypot(inX, inY);
+float2 __attribute__((kernel)) testNativeHypotFloat2Float2Float2(float2 inA, unsigned int x) {
+ float2 inB = rsGetElementAt_float2(gAllocInB, x);
+ return native_hypot(inA, inB);
}
-float3 __attribute__((kernel)) testNativeHypotFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return native_hypot(inX, inY);
+float3 __attribute__((kernel)) testNativeHypotFloat3Float3Float3(float3 inA, unsigned int x) {
+ float3 inB = rsGetElementAt_float3(gAllocInB, x);
+ return native_hypot(inA, inB);
}
-float4 __attribute__((kernel)) testNativeHypotFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return native_hypot(inX, inY);
+float4 __attribute__((kernel)) testNativeHypotFloat4Float4Float4(float4 inA, unsigned int x) {
+ float4 inB = rsGetElementAt_float4(gAllocInB, x);
+ return native_hypot(inA, inB);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.java
index 0d88a75..b358ad6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeLog1pFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x444585911437d95l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb77ad6f5e656185dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeLog1pFloatFloat(in, out);
- verifyResultsNativeLog1pFloatFloat(in, out, false);
+ script.forEach_testNativeLog1pFloatFloat(inV, out);
+ verifyResultsNativeLog1pFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeLog1pFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeLog1pFloatFloat(in, out);
- verifyResultsNativeLog1pFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeLog1pFloatFloat(inV, out);
+ verifyResultsNativeLog1pFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeLog1pFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeLog1pFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeLog1pFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeLog1p(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeLog1pFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd1a13d4961ae8449l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x36154b5368503899l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeLog1pFloat2Float2(in, out);
- verifyResultsNativeLog1pFloat2Float2(in, out, false);
+ script.forEach_testNativeLog1pFloat2Float2(inV, out);
+ verifyResultsNativeLog1pFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeLog1pFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeLog1pFloat2Float2(in, out);
- verifyResultsNativeLog1pFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeLog1pFloat2Float2(inV, out);
+ verifyResultsNativeLog1pFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeLog1pFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeLog1pFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeLog1pFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeLog1p(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeLog1pFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd1a147eac0b519e3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3617146e5e6b5977l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeLog1pFloat3Float3(in, out);
- verifyResultsNativeLog1pFloat3Float3(in, out, false);
+ script.forEach_testNativeLog1pFloat3Float3(inV, out);
+ verifyResultsNativeLog1pFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeLog1pFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeLog1pFloat3Float3(in, out);
- verifyResultsNativeLog1pFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeLog1pFloat3Float3(inV, out);
+ verifyResultsNativeLog1pFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeLog1pFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeLog1pFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeLog1pFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeLog1p(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeLog1pFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd1a1528c1fbbaf7dl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3618dd8954867a55l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeLog1pFloat4Float4(in, out);
- verifyResultsNativeLog1pFloat4Float4(in, out, false);
+ script.forEach_testNativeLog1pFloat4Float4(inV, out);
+ verifyResultsNativeLog1pFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeLog1pFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeLog1pFloat4Float4(in, out);
- verifyResultsNativeLog1pFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeLog1pFloat4Float4(inV, out);
+ verifyResultsNativeLog1pFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeLog1pFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeLog1pFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeLog1pFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeLog1p(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.rs
index 8d9cdd2..4fdcd2f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeLog1pFloatFloat(float in) {
- return native_log1p(in);
+float __attribute__((kernel)) testNativeLog1pFloatFloat(float inV) {
+ return native_log1p(inV);
}
-float2 __attribute__((kernel)) testNativeLog1pFloat2Float2(float2 in) {
- return native_log1p(in);
+float2 __attribute__((kernel)) testNativeLog1pFloat2Float2(float2 inV) {
+ return native_log1p(inV);
}
-float3 __attribute__((kernel)) testNativeLog1pFloat3Float3(float3 in) {
- return native_log1p(in);
+float3 __attribute__((kernel)) testNativeLog1pFloat3Float3(float3 inV) {
+ return native_log1p(inV);
}
-float4 __attribute__((kernel)) testNativeLog1pFloat4Float4(float4 in) {
- return native_log1p(in);
+float4 __attribute__((kernel)) testNativeLog1pFloat4Float4(float4 inV) {
+ return native_log1p(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.java
index f19d80c..6448a67 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inV;
- public float inY;
+ public float inBase;
+ public float inExponent;
public Target.Floaty out;
}
private void checkNativePowrFloatFloatFloat() {
- Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3c3550bdff7a10c2l, 0, 256);
- Allocation inY = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3c3550bdff7a10c5l, -15, 15);
+ Allocation inBase = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x22637077834d1839l, 0, 256);
+ Allocation inExponent = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xef7b0ab4f9181f0fl, -15, 15);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNativePowrFloatFloatFloat(inV, out);
- verifyResultsNativePowrFloatFloatFloat(inV, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testNativePowrFloatFloatFloat(inBase, out);
+ verifyResultsNativePowrFloatFloatFloat(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNativePowrFloatFloatFloat(inV, out);
- verifyResultsNativePowrFloatFloatFloat(inV, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testNativePowrFloatFloatFloat(inBase, out);
+ verifyResultsNativePowrFloatFloatFloat(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativePowrFloatFloatFloat(Allocation inV, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInV = new float[INPUTSIZE * 1];
- inV.copyTo(arrayInV);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsNativePowrFloatFloatFloat(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 1];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 1];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inV = arrayInV[i];
- args.inY = arrayInY[i];
+ args.inBase = arrayInBase[i];
+ args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativePowr(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkNativePowrFloat2Float2Float2() {
- Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdbc56fbe7733c926l, 0, 256);
- Allocation inY = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdbc56fbe7733c929l, -15, 15);
+ Allocation inBase = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x47afceb7283b11a5l, 0, 256);
+ Allocation inExponent = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x65ac261bb67d4abbl, -15, 15);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNativePowrFloat2Float2Float2(inV, out);
- verifyResultsNativePowrFloat2Float2Float2(inV, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testNativePowrFloat2Float2Float2(inBase, out);
+ verifyResultsNativePowrFloat2Float2Float2(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNativePowrFloat2Float2Float2(inV, out);
- verifyResultsNativePowrFloat2Float2Float2(inV, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testNativePowrFloat2Float2Float2(inBase, out);
+ verifyResultsNativePowrFloat2Float2Float2(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsNativePowrFloat2Float2Float2(Allocation inV, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInV = new float[INPUTSIZE * 2];
- inV.copyTo(arrayInV);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsNativePowrFloat2Float2Float2(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 2];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 2];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inV = arrayInV[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inBase = arrayInBase[i * 2 + j];
+ args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativePowr(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkNativePowrFloat3Float3Float3() {
- Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x302a4dde7911cac7l, 0, 256);
- Allocation inY = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x302a4dde7911cacal, -15, 15);
+ Allocation inBase = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe2961d5b10aef718l, 0, 256);
+ Allocation inExponent = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x411aa11d0d9fcd3el, -15, 15);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNativePowrFloat3Float3Float3(inV, out);
- verifyResultsNativePowrFloat3Float3Float3(inV, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testNativePowrFloat3Float3Float3(inBase, out);
+ verifyResultsNativePowrFloat3Float3Float3(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNativePowrFloat3Float3Float3(inV, out);
- verifyResultsNativePowrFloat3Float3Float3(inV, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testNativePowrFloat3Float3Float3(inBase, out);
+ verifyResultsNativePowrFloat3Float3Float3(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsNativePowrFloat3Float3Float3(Allocation inV, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInV = new float[INPUTSIZE * 4];
- inV.copyTo(arrayInV);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsNativePowrFloat3Float3Float3(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 4];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inV = arrayInV[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inBase = arrayInBase[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativePowr(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkNativePowrFloat4Float4Float4() {
- Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x848f2bfe7aefcc68l, 0, 256);
- Allocation inY = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x848f2bfe7aefcc6bl, -15, 15);
+ Allocation inBase = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x7d7c6bfef922dc8bl, 0, 256);
+ Allocation inExponent = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x1c891c1e64c24fc1l, -15, 15);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNativePowrFloat4Float4Float4(inV, out);
- verifyResultsNativePowrFloat4Float4Float4(inV, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testNativePowrFloat4Float4Float4(inBase, out);
+ verifyResultsNativePowrFloat4Float4Float4(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNativePowrFloat4Float4Float4(inV, out);
- verifyResultsNativePowrFloat4Float4Float4(inV, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testNativePowrFloat4Float4Float4(inBase, out);
+ verifyResultsNativePowrFloat4Float4Float4(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsNativePowrFloat4Float4Float4(Allocation inV, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInV = new float[INPUTSIZE * 4];
- inV.copyTo(arrayInV);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsNativePowrFloat4Float4Float4(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 4];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inV = arrayInV[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inBase = arrayInBase[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativePowr(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inV: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.rs
index 06de2f9..8adc2d2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInExponent;
-float __attribute__((kernel)) testNativePowrFloatFloatFloat(float inV, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return native_powr(inV, inY);
+float __attribute__((kernel)) testNativePowrFloatFloatFloat(float inBase, unsigned int x) {
+ float inExponent = rsGetElementAt_float(gAllocInExponent, x);
+ return native_powr(inBase, inExponent);
}
-float2 __attribute__((kernel)) testNativePowrFloat2Float2Float2(float2 inV, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return native_powr(inV, inY);
+float2 __attribute__((kernel)) testNativePowrFloat2Float2Float2(float2 inBase, unsigned int x) {
+ float2 inExponent = rsGetElementAt_float2(gAllocInExponent, x);
+ return native_powr(inBase, inExponent);
}
-float3 __attribute__((kernel)) testNativePowrFloat3Float3Float3(float3 inV, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return native_powr(inV, inY);
+float3 __attribute__((kernel)) testNativePowrFloat3Float3Float3(float3 inBase, unsigned int x) {
+ float3 inExponent = rsGetElementAt_float3(gAllocInExponent, x);
+ return native_powr(inBase, inExponent);
}
-float4 __attribute__((kernel)) testNativePowrFloat4Float4Float4(float4 inV, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return native_powr(inV, inY);
+float4 __attribute__((kernel)) testNativePowrFloat4Float4Float4(float4 inBase, unsigned int x) {
+ float4 inExponent = rsGetElementAt_float4(gAllocInExponent, x);
+ return native_powr(inBase, inExponent);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.java
index fc2549d..78379b3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeRsqrtFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf3cf23b51aa29de0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf3caff6b795084f6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeRsqrtFloatFloat(in, out);
- verifyResultsNativeRsqrtFloatFloat(in, out, false);
+ script.forEach_testNativeRsqrtFloatFloat(inV, out);
+ verifyResultsNativeRsqrtFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRsqrtFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeRsqrtFloatFloat(in, out);
- verifyResultsNativeRsqrtFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeRsqrtFloatFloat(inV, out);
+ verifyResultsNativeRsqrtFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRsqrtFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeRsqrtFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeRsqrtFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeRsqrt(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeRsqrtFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xf318090911bec1fcl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd5098485fb0a95aal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeRsqrtFloat2Float2(in, out);
- verifyResultsNativeRsqrtFloat2Float2(in, out, false);
+ script.forEach_testNativeRsqrtFloat2Float2(inV, out);
+ verifyResultsNativeRsqrtFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRsqrtFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeRsqrtFloat2Float2(in, out);
- verifyResultsNativeRsqrtFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeRsqrtFloat2Float2(inV, out);
+ verifyResultsNativeRsqrtFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRsqrtFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeRsqrtFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeRsqrtFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeRsqrt(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeRsqrtFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf31813aa70c55796l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd50b4da0f125b688l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeRsqrtFloat3Float3(in, out);
- verifyResultsNativeRsqrtFloat3Float3(in, out, false);
+ script.forEach_testNativeRsqrtFloat3Float3(inV, out);
+ verifyResultsNativeRsqrtFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRsqrtFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeRsqrtFloat3Float3(in, out);
- verifyResultsNativeRsqrtFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeRsqrtFloat3Float3(inV, out);
+ verifyResultsNativeRsqrtFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRsqrtFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeRsqrtFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeRsqrtFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeRsqrt(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeRsqrtFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf3181e4bcfcbed30l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd50d16bbe740d766l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeRsqrtFloat4Float4(in, out);
- verifyResultsNativeRsqrtFloat4Float4(in, out, false);
+ script.forEach_testNativeRsqrtFloat4Float4(inV, out);
+ verifyResultsNativeRsqrtFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRsqrtFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeRsqrtFloat4Float4(in, out);
- verifyResultsNativeRsqrtFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeRsqrtFloat4Float4(inV, out);
+ verifyResultsNativeRsqrtFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRsqrtFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeRsqrtFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeRsqrtFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeRsqrt(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.rs
index af291cb..b7c3173 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeRsqrtFloatFloat(float in) {
- return native_rsqrt(in);
+float __attribute__((kernel)) testNativeRsqrtFloatFloat(float inV) {
+ return native_rsqrt(inV);
}
-float2 __attribute__((kernel)) testNativeRsqrtFloat2Float2(float2 in) {
- return native_rsqrt(in);
+float2 __attribute__((kernel)) testNativeRsqrtFloat2Float2(float2 inV) {
+ return native_rsqrt(inV);
}
-float3 __attribute__((kernel)) testNativeRsqrtFloat3Float3(float3 in) {
- return native_rsqrt(in);
+float3 __attribute__((kernel)) testNativeRsqrtFloat3Float3(float3 inV) {
+ return native_rsqrt(inV);
}
-float4 __attribute__((kernel)) testNativeRsqrtFloat4Float4(float4 in) {
- return native_rsqrt(in);
+float4 __attribute__((kernel)) testNativeRsqrtFloat4Float4(float4 inV) {
+ return native_rsqrt(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.java
index 1637326..0856d55 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeSinFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x33ee19763354cc56l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb8fe46da9f3e52c8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeSinFloatFloat(in, out);
- verifyResultsNativeSinFloatFloat(in, out, false);
+ script.forEach_testNativeSinFloatFloat(inV, out);
+ verifyResultsNativeSinFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinFloatFloat(in, out);
- verifyResultsNativeSinFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeSinFloatFloat(inV, out);
+ verifyResultsNativeSinFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeSinFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSin(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeSinFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x12b508b470b05442l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2468764eed9e276cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeSinFloat2Float2(in, out);
- verifyResultsNativeSinFloat2Float2(in, out, false);
+ script.forEach_testNativeSinFloat2Float2(inV, out);
+ verifyResultsNativeSinFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinFloat2Float2(in, out);
- verifyResultsNativeSinFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeSinFloat2Float2(inV, out);
+ verifyResultsNativeSinFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeSinFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSin(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeSinFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x12b51355cfb6e9dcl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x246a3f69e3b9484al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeSinFloat3Float3(in, out);
- verifyResultsNativeSinFloat3Float3(in, out, false);
+ script.forEach_testNativeSinFloat3Float3(inV, out);
+ verifyResultsNativeSinFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinFloat3Float3(in, out);
- verifyResultsNativeSinFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeSinFloat3Float3(inV, out);
+ verifyResultsNativeSinFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeSinFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSin(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeSinFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x12b51df72ebd7f76l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x246c0884d9d46928l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeSinFloat4Float4(in, out);
- verifyResultsNativeSinFloat4Float4(in, out, false);
+ script.forEach_testNativeSinFloat4Float4(inV, out);
+ verifyResultsNativeSinFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinFloat4Float4(in, out);
- verifyResultsNativeSinFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeSinFloat4Float4(inV, out);
+ verifyResultsNativeSinFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeSinFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSin(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.rs
index 1af8929..dacc15e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeSinFloatFloat(float in) {
- return native_sin(in);
+float __attribute__((kernel)) testNativeSinFloatFloat(float inV) {
+ return native_sin(inV);
}
-float2 __attribute__((kernel)) testNativeSinFloat2Float2(float2 in) {
- return native_sin(in);
+float2 __attribute__((kernel)) testNativeSinFloat2Float2(float2 inV) {
+ return native_sin(inV);
}
-float3 __attribute__((kernel)) testNativeSinFloat3Float3(float3 in) {
- return native_sin(in);
+float3 __attribute__((kernel)) testNativeSinFloat3Float3(float3 inV) {
+ return native_sin(inV);
}
-float4 __attribute__((kernel)) testNativeSinFloat4Float4(float4 in) {
- return native_sin(in);
+float4 __attribute__((kernel)) testNativeSinFloat4Float4(float4 inV) {
+ return native_sin(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.java
index 380f2b4..c1b1018 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.java
@@ -36,37 +36,37 @@
public class ArgumentsFloatFloatFloat {
public float inV;
- public Target.Floaty outCosptr;
+ public Target.Floaty outCos;
public Target.Floaty out;
}
private void checkNativeSincosFloatFloatFloat() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe15df2366436cc13l, false);
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocOutCosptr(outCosptr);
+ script.set_gAllocOutCos(outCos);
script.forEach_testNativeSincosFloatFloatFloat(inV, out);
- verifyResultsNativeSincosFloatFloatFloat(inV, outCosptr, out, false);
+ verifyResultsNativeSincosFloatFloatFloat(inV, outCos, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSincosFloatFloatFloat: " + e.toString());
}
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocOutCosptr(outCosptr);
+ scriptRelaxed.set_gAllocOutCos(outCos);
scriptRelaxed.forEach_testNativeSincosFloatFloatFloat(inV, out);
- verifyResultsNativeSincosFloatFloatFloat(inV, outCosptr, out, true);
+ verifyResultsNativeSincosFloatFloatFloat(inV, outCos, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSincosFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeSincosFloatFloatFloat(Allocation inV, Allocation outCosptr, Allocation out, boolean relaxed) {
+ private void verifyResultsNativeSincosFloatFloatFloat(Allocation inV, Allocation outCos, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 1];
inV.copyTo(arrayInV);
- float[] arrayOutCosptr = new float[INPUTSIZE * 1];
- outCosptr.copyTo(arrayOutCosptr);
+ float[] arrayOutCos = new float[INPUTSIZE * 1];
+ outCos.copyTo(arrayOutCos);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -79,7 +79,7 @@
CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 1 + j], 0.0005)) {
+ if (!args.outCos.couldBe(arrayOutCos[i * 1 + j], 0.0005)) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 1 + j], 0.0005)) {
@@ -91,13 +91,13 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outCosptr: ");
- message.append(args.outCosptr.toString());
+ message.append("Expected output outCos: ");
+ message.append(args.outCos.toString());
message.append("\n");
- message.append("Actual output outCosptr: ");
+ message.append("Actual output outCos: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutCosptr[i * 1 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 1 + j]), arrayOutCosptr[i * 1 + j]));
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 1 + j], 0.0005)) {
+ arrayOutCos[i * 1 + j], Float.floatToRawIntBits(arrayOutCos[i * 1 + j]), arrayOutCos[i * 1 + j]));
+ if (!args.outCos.couldBe(arrayOutCos[i * 1 + j], 0.0005)) {
message.append(" FAIL");
}
message.append("\n");
@@ -121,30 +121,30 @@
private void checkNativeSincosFloat2Float2Float2() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xe5a1f1dcda676ea9l, false);
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocOutCosptr(outCosptr);
+ script.set_gAllocOutCos(outCos);
script.forEach_testNativeSincosFloat2Float2Float2(inV, out);
- verifyResultsNativeSincosFloat2Float2Float2(inV, outCosptr, out, false);
+ verifyResultsNativeSincosFloat2Float2Float2(inV, outCos, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSincosFloat2Float2Float2: " + e.toString());
}
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocOutCosptr(outCosptr);
+ scriptRelaxed.set_gAllocOutCos(outCos);
scriptRelaxed.forEach_testNativeSincosFloat2Float2Float2(inV, out);
- verifyResultsNativeSincosFloat2Float2Float2(inV, outCosptr, out, true);
+ verifyResultsNativeSincosFloat2Float2Float2(inV, outCos, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSincosFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsNativeSincosFloat2Float2Float2(Allocation inV, Allocation outCosptr, Allocation out, boolean relaxed) {
+ private void verifyResultsNativeSincosFloat2Float2Float2(Allocation inV, Allocation outCos, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 2];
inV.copyTo(arrayInV);
- float[] arrayOutCosptr = new float[INPUTSIZE * 2];
- outCosptr.copyTo(arrayOutCosptr);
+ float[] arrayOutCos = new float[INPUTSIZE * 2];
+ outCos.copyTo(arrayOutCos);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -157,7 +157,7 @@
CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 2 + j], 0.0005)) {
+ if (!args.outCos.couldBe(arrayOutCos[i * 2 + j], 0.0005)) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 2 + j], 0.0005)) {
@@ -169,13 +169,13 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outCosptr: ");
- message.append(args.outCosptr.toString());
+ message.append("Expected output outCos: ");
+ message.append(args.outCos.toString());
message.append("\n");
- message.append("Actual output outCosptr: ");
+ message.append("Actual output outCos: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutCosptr[i * 2 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 2 + j]), arrayOutCosptr[i * 2 + j]));
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 2 + j], 0.0005)) {
+ arrayOutCos[i * 2 + j], Float.floatToRawIntBits(arrayOutCos[i * 2 + j]), arrayOutCos[i * 2 + j]));
+ if (!args.outCos.couldBe(arrayOutCos[i * 2 + j], 0.0005)) {
message.append(" FAIL");
}
message.append("\n");
@@ -199,30 +199,30 @@
private void checkNativeSincosFloat3Float3Float3() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3a06cffcdc45704al, false);
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocOutCosptr(outCosptr);
+ script.set_gAllocOutCos(outCos);
script.forEach_testNativeSincosFloat3Float3Float3(inV, out);
- verifyResultsNativeSincosFloat3Float3Float3(inV, outCosptr, out, false);
+ verifyResultsNativeSincosFloat3Float3Float3(inV, outCos, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSincosFloat3Float3Float3: " + e.toString());
}
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocOutCosptr(outCosptr);
+ scriptRelaxed.set_gAllocOutCos(outCos);
scriptRelaxed.forEach_testNativeSincosFloat3Float3Float3(inV, out);
- verifyResultsNativeSincosFloat3Float3Float3(inV, outCosptr, out, true);
+ verifyResultsNativeSincosFloat3Float3Float3(inV, outCos, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSincosFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsNativeSincosFloat3Float3Float3(Allocation inV, Allocation outCosptr, Allocation out, boolean relaxed) {
+ private void verifyResultsNativeSincosFloat3Float3Float3(Allocation inV, Allocation outCos, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 4];
inV.copyTo(arrayInV);
- float[] arrayOutCosptr = new float[INPUTSIZE * 4];
- outCosptr.copyTo(arrayOutCosptr);
+ float[] arrayOutCos = new float[INPUTSIZE * 4];
+ outCos.copyTo(arrayOutCos);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -235,7 +235,7 @@
CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j], 0.0005)) {
+ if (!args.outCos.couldBe(arrayOutCos[i * 4 + j], 0.0005)) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0005)) {
@@ -247,13 +247,13 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outCosptr: ");
- message.append(args.outCosptr.toString());
+ message.append("Expected output outCos: ");
+ message.append(args.outCos.toString());
message.append("\n");
- message.append("Actual output outCosptr: ");
+ message.append("Actual output outCos: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutCosptr[i * 4 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 4 + j]), arrayOutCosptr[i * 4 + j]));
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j], 0.0005)) {
+ arrayOutCos[i * 4 + j], Float.floatToRawIntBits(arrayOutCos[i * 4 + j]), arrayOutCos[i * 4 + j]));
+ if (!args.outCos.couldBe(arrayOutCos[i * 4 + j], 0.0005)) {
message.append(" FAIL");
}
message.append("\n");
@@ -277,30 +277,30 @@
private void checkNativeSincosFloat4Float4Float4() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8e6bae1cde2371ebl, false);
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocOutCosptr(outCosptr);
+ script.set_gAllocOutCos(outCos);
script.forEach_testNativeSincosFloat4Float4Float4(inV, out);
- verifyResultsNativeSincosFloat4Float4Float4(inV, outCosptr, out, false);
+ verifyResultsNativeSincosFloat4Float4Float4(inV, outCos, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSincosFloat4Float4Float4: " + e.toString());
}
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocOutCosptr(outCosptr);
+ scriptRelaxed.set_gAllocOutCos(outCos);
scriptRelaxed.forEach_testNativeSincosFloat4Float4Float4(inV, out);
- verifyResultsNativeSincosFloat4Float4Float4(inV, outCosptr, out, true);
+ verifyResultsNativeSincosFloat4Float4Float4(inV, outCos, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSincosFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsNativeSincosFloat4Float4Float4(Allocation inV, Allocation outCosptr, Allocation out, boolean relaxed) {
+ private void verifyResultsNativeSincosFloat4Float4Float4(Allocation inV, Allocation outCos, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 4];
inV.copyTo(arrayInV);
- float[] arrayOutCosptr = new float[INPUTSIZE * 4];
- outCosptr.copyTo(arrayOutCosptr);
+ float[] arrayOutCos = new float[INPUTSIZE * 4];
+ outCos.copyTo(arrayOutCos);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -313,7 +313,7 @@
CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j], 0.0005)) {
+ if (!args.outCos.couldBe(arrayOutCos[i * 4 + j], 0.0005)) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0005)) {
@@ -325,13 +325,13 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outCosptr: ");
- message.append(args.outCosptr.toString());
+ message.append("Expected output outCos: ");
+ message.append(args.outCos.toString());
message.append("\n");
- message.append("Actual output outCosptr: ");
+ message.append("Actual output outCos: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutCosptr[i * 4 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 4 + j]), arrayOutCosptr[i * 4 + j]));
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j], 0.0005)) {
+ arrayOutCos[i * 4 + j], Float.floatToRawIntBits(arrayOutCos[i * 4 + j]), arrayOutCos[i * 4 + j]));
+ if (!args.outCos.couldBe(arrayOutCos[i * 4 + j], 0.0005)) {
message.append(" FAIL");
}
message.append("\n");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.rs
index 8148c67..741a49b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.rs
@@ -19,32 +19,32 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocOutCosptr;
+rs_allocation gAllocOutCos;
float __attribute__((kernel)) testNativeSincosFloatFloatFloat(float inV, unsigned int x) {
- float outCosptr = 0;
- float out = native_sincos(inV, &outCosptr);
- rsSetElementAt_float(gAllocOutCosptr, outCosptr, x);
+ float outCos = 0;
+ float out = native_sincos(inV, &outCos);
+ rsSetElementAt_float(gAllocOutCos, outCos, x);
return out;
}
float2 __attribute__((kernel)) testNativeSincosFloat2Float2Float2(float2 inV, unsigned int x) {
- float2 outCosptr = 0;
- float2 out = native_sincos(inV, &outCosptr);
- rsSetElementAt_float2(gAllocOutCosptr, outCosptr, x);
+ float2 outCos = 0;
+ float2 out = native_sincos(inV, &outCos);
+ rsSetElementAt_float2(gAllocOutCos, outCos, x);
return out;
}
float3 __attribute__((kernel)) testNativeSincosFloat3Float3Float3(float3 inV, unsigned int x) {
- float3 outCosptr = 0;
- float3 out = native_sincos(inV, &outCosptr);
- rsSetElementAt_float3(gAllocOutCosptr, outCosptr, x);
+ float3 outCos = 0;
+ float3 out = native_sincos(inV, &outCos);
+ rsSetElementAt_float3(gAllocOutCos, outCos, x);
return out;
}
float4 __attribute__((kernel)) testNativeSincosFloat4Float4Float4(float4 inV, unsigned int x) {
- float4 outCosptr = 0;
- float4 out = native_sincos(inV, &outCosptr);
- rsSetElementAt_float4(gAllocOutCosptr, outCosptr, x);
+ float4 outCos = 0;
+ float4 out = native_sincos(inV, &outCos);
+ rsSetElementAt_float4(gAllocOutCos, outCos, x);
return out;
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.java
index 9c2edc7..cbe19cd 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeSinhFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x74dcf3e9c65b6590l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa11cf844515a0f86l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeSinhFloatFloat(in, out);
- verifyResultsNativeSinhFloatFloat(in, out, false);
+ script.forEach_testNativeSinhFloatFloat(inV, out);
+ verifyResultsNativeSinhFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinhFloatFloat(in, out);
- verifyResultsNativeSinhFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeSinhFloatFloat(inV, out);
+ verifyResultsNativeSinhFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinhFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeSinhFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinhFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSinh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeSinhFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xfdcd5755b59082cl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xaa17dab657f45fbal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeSinhFloat2Float2(in, out);
- verifyResultsNativeSinhFloat2Float2(in, out, false);
+ script.forEach_testNativeSinhFloat2Float2(inV, out);
+ verifyResultsNativeSinhFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinhFloat2Float2(in, out);
- verifyResultsNativeSinhFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeSinhFloat2Float2(inV, out);
+ verifyResultsNativeSinhFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeSinhFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinhFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSinh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeSinhFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xfdce016ba5f9dc6l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xaa19a3d14e0f8098l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeSinhFloat3Float3(in, out);
- verifyResultsNativeSinhFloat3Float3(in, out, false);
+ script.forEach_testNativeSinhFloat3Float3(inV, out);
+ verifyResultsNativeSinhFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinhFloat3Float3(in, out);
- verifyResultsNativeSinhFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeSinhFloat3Float3(inV, out);
+ verifyResultsNativeSinhFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeSinhFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinhFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSinh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeSinhFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xfdceab819663360l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xaa1b6cec442aa176l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeSinhFloat4Float4(in, out);
- verifyResultsNativeSinhFloat4Float4(in, out, false);
+ script.forEach_testNativeSinhFloat4Float4(inV, out);
+ verifyResultsNativeSinhFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinhFloat4Float4(in, out);
- verifyResultsNativeSinhFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeSinhFloat4Float4(inV, out);
+ verifyResultsNativeSinhFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeSinhFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinhFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSinh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.rs
index 20728d5..8eecf7c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeSinhFloatFloat(float in) {
- return native_sinh(in);
+float __attribute__((kernel)) testNativeSinhFloatFloat(float inV) {
+ return native_sinh(inV);
}
-float2 __attribute__((kernel)) testNativeSinhFloat2Float2(float2 in) {
- return native_sinh(in);
+float2 __attribute__((kernel)) testNativeSinhFloat2Float2(float2 inV) {
+ return native_sinh(inV);
}
-float3 __attribute__((kernel)) testNativeSinhFloat3Float3(float3 in) {
- return native_sinh(in);
+float3 __attribute__((kernel)) testNativeSinhFloat3Float3(float3 inV) {
+ return native_sinh(inV);
}
-float4 __attribute__((kernel)) testNativeSinhFloat4Float4(float4 in) {
- return native_sinh(in);
+float4 __attribute__((kernel)) testNativeSinhFloat4Float4(float4 inV) {
+ return native_sinh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.java
index 2f67e8e..93bb490 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeSinpiFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb52c701227c9dc37l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x6e76d30caee7fd93l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeSinpiFloatFloat(in, out);
- verifyResultsNativeSinpiFloatFloat(in, out, false);
+ script.forEach_testNativeSinpiFloatFloat(inV, out);
+ verifyResultsNativeSinpiFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinpiFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinpiFloatFloat(in, out);
- verifyResultsNativeSinpiFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeSinpiFloatFloat(inV, out);
+ verifyResultsNativeSinpiFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinpiFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeSinpiFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinpiFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSinpi(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeSinpiFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8df4951d1230045bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd8150be20e10bb9fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeSinpiFloat2Float2(in, out);
- verifyResultsNativeSinpiFloat2Float2(in, out, false);
+ script.forEach_testNativeSinpiFloat2Float2(inV, out);
+ verifyResultsNativeSinpiFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinpiFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinpiFloat2Float2(in, out);
- verifyResultsNativeSinpiFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeSinpiFloat2Float2(inV, out);
+ verifyResultsNativeSinpiFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinpiFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeSinpiFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinpiFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSinpi(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeSinpiFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8df49fbe713699f5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd816d4fd042bdc7dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeSinpiFloat3Float3(in, out);
- verifyResultsNativeSinpiFloat3Float3(in, out, false);
+ script.forEach_testNativeSinpiFloat3Float3(inV, out);
+ verifyResultsNativeSinpiFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinpiFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinpiFloat3Float3(in, out);
- verifyResultsNativeSinpiFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeSinpiFloat3Float3(inV, out);
+ verifyResultsNativeSinpiFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinpiFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeSinpiFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinpiFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSinpi(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeSinpiFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8df4aa5fd03d2f8fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd8189e17fa46fd5bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeSinpiFloat4Float4(in, out);
- verifyResultsNativeSinpiFloat4Float4(in, out, false);
+ script.forEach_testNativeSinpiFloat4Float4(inV, out);
+ verifyResultsNativeSinpiFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinpiFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSinpiFloat4Float4(in, out);
- verifyResultsNativeSinpiFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeSinpiFloat4Float4(inV, out);
+ verifyResultsNativeSinpiFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSinpiFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeSinpiFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSinpiFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSinpi(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.rs
index 1b17471..7d88eb6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeSinpiFloatFloat(float in) {
- return native_sinpi(in);
+float __attribute__((kernel)) testNativeSinpiFloatFloat(float inV) {
+ return native_sinpi(inV);
}
-float2 __attribute__((kernel)) testNativeSinpiFloat2Float2(float2 in) {
- return native_sinpi(in);
+float2 __attribute__((kernel)) testNativeSinpiFloat2Float2(float2 inV) {
+ return native_sinpi(inV);
}
-float3 __attribute__((kernel)) testNativeSinpiFloat3Float3(float3 in) {
- return native_sinpi(in);
+float3 __attribute__((kernel)) testNativeSinpiFloat3Float3(float3 inV) {
+ return native_sinpi(inV);
}
-float4 __attribute__((kernel)) testNativeSinpiFloat4Float4(float4 in) {
- return native_sinpi(in);
+float4 __attribute__((kernel)) testNativeSinpiFloat4Float4(float4 inV) {
+ return native_sinpi(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.java
index edb07bc..bd23002 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeSqrtFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb4c9e7b9972ac810l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5de9ec2c642f9b06l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeSqrtFloatFloat(in, out);
- verifyResultsNativeSqrtFloatFloat(in, out, false);
+ script.forEach_testNativeSqrtFloatFloat(inV, out);
+ verifyResultsNativeSqrtFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSqrtFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSqrtFloatFloat(in, out);
- verifyResultsNativeSqrtFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeSqrtFloatFloat(inV, out);
+ verifyResultsNativeSqrtFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSqrtFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeSqrtFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSqrtFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSqrt(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeSqrtFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc649cd70853776acl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x4e6581e66050ef3al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeSqrtFloat2Float2(in, out);
- verifyResultsNativeSqrtFloat2Float2(in, out, false);
+ script.forEach_testNativeSqrtFloat2Float2(inV, out);
+ verifyResultsNativeSqrtFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSqrtFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSqrtFloat2Float2(in, out);
- verifyResultsNativeSqrtFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeSqrtFloat2Float2(inV, out);
+ verifyResultsNativeSqrtFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSqrtFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeSqrtFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSqrtFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSqrt(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeSqrtFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc649d811e43e0c46l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x4e674b01566c1018l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeSqrtFloat3Float3(in, out);
- verifyResultsNativeSqrtFloat3Float3(in, out, false);
+ script.forEach_testNativeSqrtFloat3Float3(inV, out);
+ verifyResultsNativeSqrtFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSqrtFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSqrtFloat3Float3(in, out);
- verifyResultsNativeSqrtFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeSqrtFloat3Float3(inV, out);
+ verifyResultsNativeSqrtFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSqrtFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeSqrtFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSqrtFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSqrt(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeSqrtFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc649e2b34344a1e0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4e69141c4c8730f6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeSqrtFloat4Float4(in, out);
- verifyResultsNativeSqrtFloat4Float4(in, out, false);
+ script.forEach_testNativeSqrtFloat4Float4(inV, out);
+ verifyResultsNativeSqrtFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSqrtFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeSqrtFloat4Float4(in, out);
- verifyResultsNativeSqrtFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeSqrtFloat4Float4(inV, out);
+ verifyResultsNativeSqrtFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeSqrtFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeSqrtFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeSqrtFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeSqrt(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.rs
index 2ed1cc8..c312e6a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeSqrtFloatFloat(float in) {
- return native_sqrt(in);
+float __attribute__((kernel)) testNativeSqrtFloatFloat(float inV) {
+ return native_sqrt(inV);
}
-float2 __attribute__((kernel)) testNativeSqrtFloat2Float2(float2 in) {
- return native_sqrt(in);
+float2 __attribute__((kernel)) testNativeSqrtFloat2Float2(float2 inV) {
+ return native_sqrt(inV);
}
-float3 __attribute__((kernel)) testNativeSqrtFloat3Float3(float3 in) {
- return native_sqrt(in);
+float3 __attribute__((kernel)) testNativeSqrtFloat3Float3(float3 inV) {
+ return native_sqrt(inV);
}
-float4 __attribute__((kernel)) testNativeSqrtFloat4Float4(float4 in) {
- return native_sqrt(in);
+float4 __attribute__((kernel)) testNativeSqrtFloat4Float4(float4 inV) {
+ return native_sqrt(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.java
index cd51a53..cd4f814 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeTanFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5b9a224e25042b47l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x62e3c32037b34543l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeTanFloatFloat(in, out);
- verifyResultsNativeTanFloatFloat(in, out, false);
+ script.forEach_testNativeTanFloatFloat(inV, out);
+ verifyResultsNativeTanFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanFloatFloat(in, out);
- verifyResultsNativeTanFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeTanFloatFloat(inV, out);
+ verifyResultsNativeTanFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeTanFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTan(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeTanFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x9c40e8650c550eebl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x3ee708f9124981cfl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeTanFloat2Float2(in, out);
- verifyResultsNativeTanFloat2Float2(in, out, false);
+ script.forEach_testNativeTanFloat2Float2(inV, out);
+ verifyResultsNativeTanFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanFloat2Float2(in, out);
- verifyResultsNativeTanFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeTanFloat2Float2(inV, out);
+ verifyResultsNativeTanFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeTanFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTan(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeTanFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x9c40f3066b5ba485l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3ee8d2140864a2adl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeTanFloat3Float3(in, out);
- verifyResultsNativeTanFloat3Float3(in, out, false);
+ script.forEach_testNativeTanFloat3Float3(inV, out);
+ verifyResultsNativeTanFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanFloat3Float3(in, out);
- verifyResultsNativeTanFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeTanFloat3Float3(inV, out);
+ verifyResultsNativeTanFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeTanFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTan(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeTanFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x9c40fda7ca623a1fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3eea9b2efe7fc38bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeTanFloat4Float4(in, out);
- verifyResultsNativeTanFloat4Float4(in, out, false);
+ script.forEach_testNativeTanFloat4Float4(inV, out);
+ verifyResultsNativeTanFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanFloat4Float4(in, out);
- verifyResultsNativeTanFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeTanFloat4Float4(inV, out);
+ verifyResultsNativeTanFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeTanFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTan(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.rs
index 000bc74..004ffc5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeTanFloatFloat(float in) {
- return native_tan(in);
+float __attribute__((kernel)) testNativeTanFloatFloat(float inV) {
+ return native_tan(inV);
}
-float2 __attribute__((kernel)) testNativeTanFloat2Float2(float2 in) {
- return native_tan(in);
+float2 __attribute__((kernel)) testNativeTanFloat2Float2(float2 inV) {
+ return native_tan(inV);
}
-float3 __attribute__((kernel)) testNativeTanFloat3Float3(float3 in) {
- return native_tan(in);
+float3 __attribute__((kernel)) testNativeTanFloat3Float3(float3 inV) {
+ return native_tan(inV);
}
-float4 __attribute__((kernel)) testNativeTanFloat4Float4(float4 in) {
- return native_tan(in);
+float4 __attribute__((kernel)) testNativeTanFloat4Float4(float4 inV) {
+ return native_tan(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.java
index 0b69e5f..8072b2c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeTanhFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x1ec2702f5ed0580bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x2aa8d7f4ecfeca2fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeTanhFloatFloat(in, out);
- verifyResultsNativeTanhFloatFloat(in, out, false);
+ script.forEach_testNativeTanhFloatFloat(inV, out);
+ verifyResultsNativeTanhFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanhFloatFloat(in, out);
- verifyResultsNativeTanhFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeTanhFloatFloat(inV, out);
+ verifyResultsNativeTanhFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanhFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeTanhFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanhFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTanh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeTanhFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2a5b681f8004628fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x1d5a7d4a80bc8e5bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeTanhFloat2Float2(in, out);
- verifyResultsNativeTanhFloat2Float2(in, out, false);
+ script.forEach_testNativeTanhFloat2Float2(inV, out);
+ verifyResultsNativeTanhFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanhFloat2Float2(in, out);
- verifyResultsNativeTanhFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeTanhFloat2Float2(inV, out);
+ verifyResultsNativeTanhFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeTanhFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanhFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTanh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeTanhFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x2a5b72c0df0af829l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1d5c466576d7af39l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeTanhFloat3Float3(in, out);
- verifyResultsNativeTanhFloat3Float3(in, out, false);
+ script.forEach_testNativeTanhFloat3Float3(inV, out);
+ verifyResultsNativeTanhFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanhFloat3Float3(in, out);
- verifyResultsNativeTanhFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeTanhFloat3Float3(inV, out);
+ verifyResultsNativeTanhFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeTanhFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanhFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTanh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeTanhFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x2a5b7d623e118dc3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x1d5e0f806cf2d017l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeTanhFloat4Float4(in, out);
- verifyResultsNativeTanhFloat4Float4(in, out, false);
+ script.forEach_testNativeTanhFloat4Float4(inV, out);
+ verifyResultsNativeTanhFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanhFloat4Float4(in, out);
- verifyResultsNativeTanhFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeTanhFloat4Float4(inV, out);
+ verifyResultsNativeTanhFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeTanhFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanhFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTanh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.rs
index a7bfcfd..03fed50 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeTanhFloatFloat(float in) {
- return native_tanh(in);
+float __attribute__((kernel)) testNativeTanhFloatFloat(float inV) {
+ return native_tanh(inV);
}
-float2 __attribute__((kernel)) testNativeTanhFloat2Float2(float2 in) {
- return native_tanh(in);
+float2 __attribute__((kernel)) testNativeTanhFloat2Float2(float2 inV) {
+ return native_tanh(inV);
}
-float3 __attribute__((kernel)) testNativeTanhFloat3Float3(float3 in) {
- return native_tanh(in);
+float3 __attribute__((kernel)) testNativeTanhFloat3Float3(float3 inV) {
+ return native_tanh(inV);
}
-float4 __attribute__((kernel)) testNativeTanhFloat4Float4(float4 in) {
- return native_tanh(in);
+float4 __attribute__((kernel)) testNativeTanhFloat4Float4(float4 inV) {
+ return native_tanh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.java
index 1d9b538..6c6fdd9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkNativeTanpiFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3eb84fc2c36e96e0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x88f565b6d39357f6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeTanpiFloatFloat(in, out);
- verifyResultsNativeTanpiFloatFloat(in, out, false);
+ script.forEach_testNativeTanpiFloatFloat(inV, out);
+ verifyResultsNativeTanpiFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanpiFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanpiFloatFloat(in, out);
- verifyResultsNativeTanpiFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeTanpiFloatFloat(inV, out);
+ verifyResultsNativeTanpiFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanpiFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeTanpiFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanpiFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTanpi(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkNativeTanpiFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x13737b13af832fcl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x34465ac4e7b090aal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeTanpiFloat2Float2(in, out);
- verifyResultsNativeTanpiFloat2Float2(in, out, false);
+ script.forEach_testNativeTanpiFloat2Float2(inV, out);
+ verifyResultsNativeTanpiFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanpiFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanpiFloat2Float2(in, out);
- verifyResultsNativeTanpiFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeTanpiFloat2Float2(inV, out);
+ verifyResultsNativeTanpiFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanpiFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeTanpiFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanpiFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTanpi(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkNativeTanpiFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x137425299fec896l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x344823dfddcbb188l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeTanpiFloat3Float3(in, out);
- verifyResultsNativeTanpiFloat3Float3(in, out, false);
+ script.forEach_testNativeTanpiFloat3Float3(inV, out);
+ verifyResultsNativeTanpiFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanpiFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanpiFloat3Float3(in, out);
- verifyResultsNativeTanpiFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeTanpiFloat3Float3(inV, out);
+ verifyResultsNativeTanpiFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanpiFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeTanpiFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanpiFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTanpi(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkNativeTanpiFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x1374cf3f9055e30l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x3449ecfad3e6d266l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeTanpiFloat4Float4(in, out);
- verifyResultsNativeTanpiFloat4Float4(in, out, false);
+ script.forEach_testNativeTanpiFloat4Float4(inV, out);
+ verifyResultsNativeTanpiFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanpiFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeTanpiFloat4Float4(in, out);
- verifyResultsNativeTanpiFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeTanpiFloat4Float4(inV, out);
+ verifyResultsNativeTanpiFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeTanpiFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeTanpiFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeTanpiFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNativeTanpi(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.rs
index ae1f633..c553315 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeTanpiFloatFloat(float in) {
- return native_tanpi(in);
+float __attribute__((kernel)) testNativeTanpiFloatFloat(float inV) {
+ return native_tanpi(inV);
}
-float2 __attribute__((kernel)) testNativeTanpiFloat2Float2(float2 in) {
- return native_tanpi(in);
+float2 __attribute__((kernel)) testNativeTanpiFloat2Float2(float2 inV) {
+ return native_tanpi(inV);
}
-float3 __attribute__((kernel)) testNativeTanpiFloat3Float3(float3 in) {
- return native_tanpi(in);
+float3 __attribute__((kernel)) testNativeTanpiFloat3Float3(float3 inV) {
+ return native_tanpi(inV);
}
-float4 __attribute__((kernel)) testNativeTanpiFloat4Float4(float4 in) {
- return native_tanpi(in);
+float4 __attribute__((kernel)) testNativeTanpiFloat4Float4(float4 inV) {
+ return native_tanpi(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.java
index df69e42..1d19784 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inV;
+ public float inTarget;
public Target.Floaty out;
}
private void checkNextafterFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa3b02393ad412958l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa3b02393ad412959l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xa3b02393ad412956l, false);
+ Allocation inTarget = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xde8acce6afd7c03dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNextafterFloatFloatFloat(inX, out);
- verifyResultsNextafterFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInTarget(inTarget);
+ script.forEach_testNextafterFloatFloatFloat(inV, out);
+ verifyResultsNextafterFloatFloatFloat(inV, inTarget, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNextafterFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNextafterFloatFloatFloat(inX, out);
- verifyResultsNextafterFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInTarget(inTarget);
+ scriptRelaxed.forEach_testNextafterFloatFloatFloat(inV, out);
+ verifyResultsNextafterFloatFloatFloat(inV, inTarget, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNextafterFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsNextafterFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsNextafterFloatFloatFloat(Allocation inV, Allocation inTarget, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
+ float[] arrayInTarget = new float[INPUTSIZE * 1];
+ inTarget.copyTo(arrayInTarget);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inV = arrayInV[i];
+ args.inTarget = arrayInTarget[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNextafter(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inTarget: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inTarget, Float.floatToRawIntBits(args.inTarget), args.inTarget));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkNextafterFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x29b40e0584a1e24l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x29b40e0584a1e25l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x29b40e0584a1e22l, false);
+ Allocation inTarget = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x68f3a41af7e4d541l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNextafterFloat2Float2Float2(inX, out);
- verifyResultsNextafterFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInTarget(inTarget);
+ script.forEach_testNextafterFloat2Float2Float2(inV, out);
+ verifyResultsNextafterFloat2Float2Float2(inV, inTarget, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNextafterFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNextafterFloat2Float2Float2(inX, out);
- verifyResultsNextafterFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInTarget(inTarget);
+ scriptRelaxed.forEach_testNextafterFloat2Float2Float2(inV, out);
+ verifyResultsNextafterFloat2Float2Float2(inV, inTarget, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNextafterFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsNextafterFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsNextafterFloat2Float2Float2(Allocation inV, Allocation inTarget, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
+ float[] arrayInTarget = new float[INPUTSIZE * 2];
+ inTarget.copyTo(arrayInTarget);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
+ args.inTarget = arrayInTarget[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNextafter(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inTarget: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inTarget, Float.floatToRawIntBits(args.inTarget), args.inTarget));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkNextafterFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x57001f005a281fc5l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x57001f005a281fc6l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x57001f005a281fc3l, false);
+ Allocation inTarget = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3261a1f4e4f910dcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNextafterFloat3Float3Float3(inX, out);
- verifyResultsNextafterFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInTarget(inTarget);
+ script.forEach_testNextafterFloat3Float3Float3(inV, out);
+ verifyResultsNextafterFloat3Float3Float3(inV, inTarget, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNextafterFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNextafterFloat3Float3Float3(inX, out);
- verifyResultsNextafterFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInTarget(inTarget);
+ scriptRelaxed.forEach_testNextafterFloat3Float3Float3(inV, out);
+ verifyResultsNextafterFloat3Float3Float3(inV, inTarget, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNextafterFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsNextafterFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsNextafterFloat3Float3Float3(Allocation inV, Allocation inTarget, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ float[] arrayInTarget = new float[INPUTSIZE * 4];
+ inTarget.copyTo(arrayInTarget);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
+ args.inTarget = arrayInTarget[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNextafter(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inTarget: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inTarget, Float.floatToRawIntBits(args.inTarget), args.inTarget));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkNextafterFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xab64fd205c062166l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xab64fd205c062167l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xab64fd205c062164l, false);
+ Allocation inTarget = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xfbcf9fced20d4c77l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testNextafterFloat4Float4Float4(inX, out);
- verifyResultsNextafterFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInTarget(inTarget);
+ script.forEach_testNextafterFloat4Float4Float4(inV, out);
+ verifyResultsNextafterFloat4Float4Float4(inV, inTarget, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNextafterFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testNextafterFloat4Float4Float4(inX, out);
- verifyResultsNextafterFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInTarget(inTarget);
+ scriptRelaxed.forEach_testNextafterFloat4Float4Float4(inV, out);
+ verifyResultsNextafterFloat4Float4Float4(inV, inTarget, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNextafterFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsNextafterFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsNextafterFloat4Float4Float4(Allocation inV, Allocation inTarget, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ float[] arrayInTarget = new float[INPUTSIZE * 4];
+ inTarget.copyTo(arrayInTarget);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
+ args.inTarget = arrayInTarget[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeNextafter(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inTarget: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inTarget, Float.floatToRawIntBits(args.inTarget), args.inTarget));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.rs
index a7ae02d..b7c57f6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInTarget;
-float __attribute__((kernel)) testNextafterFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return nextafter(inX, inY);
+float __attribute__((kernel)) testNextafterFloatFloatFloat(float inV, unsigned int x) {
+ float inTarget = rsGetElementAt_float(gAllocInTarget, x);
+ return nextafter(inV, inTarget);
}
-float2 __attribute__((kernel)) testNextafterFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return nextafter(inX, inY);
+float2 __attribute__((kernel)) testNextafterFloat2Float2Float2(float2 inV, unsigned int x) {
+ float2 inTarget = rsGetElementAt_float2(gAllocInTarget, x);
+ return nextafter(inV, inTarget);
}
-float3 __attribute__((kernel)) testNextafterFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return nextafter(inX, inY);
+float3 __attribute__((kernel)) testNextafterFloat3Float3Float3(float3 inV, unsigned int x) {
+ float3 inTarget = rsGetElementAt_float3(gAllocInTarget, x);
+ return nextafter(inV, inTarget);
}
-float4 __attribute__((kernel)) testNextafterFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return nextafter(inX, inY);
+float4 __attribute__((kernel)) testNextafterFloat4Float4Float4(float4 inV, unsigned int x) {
+ float4 inTarget = rsGetElementAt_float4(gAllocInTarget, x);
+ return nextafter(inV, inTarget);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPow.java b/tests/tests/renderscript/src/android/renderscript/cts/TestPow.java
index 39369c4..ae5a796 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPow.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPow.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inBase;
+ public float inExponent;
public Target.Floaty out;
}
private void checkPowFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x470aeab18312445bl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x470aeab18312445cl, false);
+ Allocation inBase = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x377b8a6622b91eel, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x8bdde8de49a5f734l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPowFloatFloatFloat(inX, out);
- verifyResultsPowFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPowFloatFloatFloat(inBase, out);
+ verifyResultsPowFloatFloatFloat(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPowFloatFloatFloat(inX, out);
- verifyResultsPowFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPowFloatFloatFloat(inBase, out);
+ verifyResultsPowFloatFloatFloat(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsPowFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsPowFloatFloatFloat(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 1];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 1];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inBase = arrayInBase[i];
+ args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePow(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkPowFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbcd9b7ed561242ddl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xbcd9b7ed561242del, false);
+ Allocation inBase = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x15be0382895c2294l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xeb77bf60bbad35fal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPowFloat2Float2Float2(inX, out);
- verifyResultsPowFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPowFloat2Float2Float2(inBase, out);
+ verifyResultsPowFloat2Float2Float2(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPowFloat2Float2Float2(inX, out);
- verifyResultsPowFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPowFloat2Float2Float2(inBase, out);
+ verifyResultsPowFloat2Float2Float2(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsPowFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsPowFloat2Float2Float2(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 2];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 2];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inBase = arrayInBase[i * 2 + j];
+ args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePow(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkPowFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x113e960d57f0447el, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x113e960d57f0447fl, false);
+ Allocation inBase = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xb0a4522671d00807l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc6e63a6212cfb87dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPowFloat3Float3Float3(inX, out);
- verifyResultsPowFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPowFloat3Float3Float3(inBase, out);
+ verifyResultsPowFloat3Float3Float3(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPowFloat3Float3Float3(inX, out);
- verifyResultsPowFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPowFloat3Float3Float3(inBase, out);
+ verifyResultsPowFloat3Float3Float3(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsPowFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsPowFloat3Float3Float3(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 4];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inBase = arrayInBase[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePow(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkPowFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x65a3742d59ce461fl, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x65a3742d59ce4620l, false);
+ Allocation inBase = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4b8aa0ca5a43ed7al, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa254b56369f23b00l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPowFloat4Float4Float4(inX, out);
- verifyResultsPowFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPowFloat4Float4Float4(inBase, out);
+ verifyResultsPowFloat4Float4Float4(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPowFloat4Float4Float4(inX, out);
- verifyResultsPowFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPowFloat4Float4Float4(inBase, out);
+ verifyResultsPowFloat4Float4Float4(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsPowFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsPowFloat4Float4Float4(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 4];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inBase = arrayInBase[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePow(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPow.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestPow.rs
index 855419a..1033d0e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPow.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPow.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInExponent;
-float __attribute__((kernel)) testPowFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return pow(inX, inY);
+float __attribute__((kernel)) testPowFloatFloatFloat(float inBase, unsigned int x) {
+ float inExponent = rsGetElementAt_float(gAllocInExponent, x);
+ return pow(inBase, inExponent);
}
-float2 __attribute__((kernel)) testPowFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return pow(inX, inY);
+float2 __attribute__((kernel)) testPowFloat2Float2Float2(float2 inBase, unsigned int x) {
+ float2 inExponent = rsGetElementAt_float2(gAllocInExponent, x);
+ return pow(inBase, inExponent);
}
-float3 __attribute__((kernel)) testPowFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return pow(inX, inY);
+float3 __attribute__((kernel)) testPowFloat3Float3Float3(float3 inBase, unsigned int x) {
+ float3 inExponent = rsGetElementAt_float3(gAllocInExponent, x);
+ return pow(inBase, inExponent);
}
-float4 __attribute__((kernel)) testPowFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return pow(inX, inY);
+float4 __attribute__((kernel)) testPowFloat4Float4Float4(float4 inBase, unsigned int x) {
+ float4 inExponent = rsGetElementAt_float4(gAllocInExponent, x);
+ return pow(inBase, inExponent);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPown.java b/tests/tests/renderscript/src/android/renderscript/cts/TestPown.java
index 14a09e1..833685d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPown.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPown.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatIntFloat {
- public float inX;
- public int inY;
+ public float inBase;
+ public int inExponent;
public Target.Floaty out;
}
private void checkPownFloatIntFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xde633e0d2c462948l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0xde633e0d2c462949l, false);
+ Allocation inBase = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe020952d622f0405l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x9c3888e9096b9f1bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPownFloatIntFloat(inX, out);
- verifyResultsPownFloatIntFloat(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPownFloatIntFloat(inBase, out);
+ verifyResultsPownFloatIntFloat(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPownFloatIntFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPownFloatIntFloat(inX, out);
- verifyResultsPownFloatIntFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPownFloatIntFloat(inBase, out);
+ verifyResultsPownFloatIntFloat(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPownFloatIntFloat: " + e.toString());
}
}
- private void verifyResultsPownFloatIntFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsPownFloatIntFloat(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 1];
+ inBase.copyTo(arrayInBase);
+ int[] arrayInExponent = new int[INPUTSIZE * 1];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inBase = arrayInBase[i];
+ args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePown(args, target);
@@ -84,12 +84,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -109,39 +109,39 @@
}
private void checkPownFloat2Int2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x1685dc0ea821329el, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x1685dc0ea821329fl, false);
+ Allocation inBase = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x7571c02be438467l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0xe6177b3249076ddl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPownFloat2Int2Float2(inX, out);
- verifyResultsPownFloat2Int2Float2(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPownFloat2Int2Float2(inBase, out);
+ verifyResultsPownFloat2Int2Float2(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPownFloat2Int2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPownFloat2Int2Float2(inX, out);
- verifyResultsPownFloat2Int2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPownFloat2Int2Float2(inBase, out);
+ verifyResultsPownFloat2Int2Float2(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPownFloat2Int2Float2: " + e.toString());
}
}
- private void verifyResultsPownFloat2Int2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsPownFloat2Int2Float2(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 2];
+ inBase.copyTo(arrayInBase);
+ int[] arrayInExponent = new int[INPUTSIZE * 2];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inBase = arrayInBase[i * 2 + j];
+ args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePown(args, target);
@@ -152,12 +152,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -177,39 +177,39 @@
}
private void checkPownFloat3Int3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3c3c1a719dd39f57l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x3c3c1a719dd39f58l, false);
+ Allocation inBase = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x5e88c45be35ff8a2l, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0xaf710734144a81a8l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPownFloat3Int3Float3(inX, out);
- verifyResultsPownFloat3Int3Float3(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPownFloat3Int3Float3(inBase, out);
+ verifyResultsPownFloat3Int3Float3(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPownFloat3Int3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPownFloat3Int3Float3(inX, out);
- verifyResultsPownFloat3Int3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPownFloat3Int3Float3(inBase, out);
+ verifyResultsPownFloat3Int3Float3(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPownFloat3Int3Float3: " + e.toString());
}
}
- private void verifyResultsPownFloat3Int3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsPownFloat3Int3Float3(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 4];
+ inBase.copyTo(arrayInBase);
+ int[] arrayInExponent = new int[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inBase = arrayInBase[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePown(args, target);
@@ -220,12 +220,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -245,39 +245,39 @@
}
private void checkPownFloat4Int4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x61f258d493860c10l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x61f258d493860c11l, false);
+ Allocation inBase = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xb5ba6cb5087c6cddl, false);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x508096b504048c73l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPownFloat4Int4Float4(inX, out);
- verifyResultsPownFloat4Int4Float4(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPownFloat4Int4Float4(inBase, out);
+ verifyResultsPownFloat4Int4Float4(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPownFloat4Int4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPownFloat4Int4Float4(inX, out);
- verifyResultsPownFloat4Int4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPownFloat4Int4Float4(inBase, out);
+ verifyResultsPownFloat4Int4Float4(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPownFloat4Int4Float4: " + e.toString());
}
}
- private void verifyResultsPownFloat4Int4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- int[] arrayInY = new int[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsPownFloat4Int4Float4(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 4];
+ inBase.copyTo(arrayInBase);
+ int[] arrayInExponent = new int[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inBase = arrayInBase[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePown(args, target);
@@ -288,12 +288,12 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
- message.append(String.format("%d", args.inY));
+ message.append("Input inExponent: ");
+ message.append(String.format("%d", args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPown.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestPown.rs
index 3ee4fc0..f4fa3d8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPown.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPown.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInExponent;
-float __attribute__((kernel)) testPownFloatIntFloat(float inX, unsigned int x) {
- int inY = rsGetElementAt_int(gAllocInY, x);
- return pown(inX, inY);
+float __attribute__((kernel)) testPownFloatIntFloat(float inBase, unsigned int x) {
+ int inExponent = rsGetElementAt_int(gAllocInExponent, x);
+ return pown(inBase, inExponent);
}
-float2 __attribute__((kernel)) testPownFloat2Int2Float2(float2 inX, unsigned int x) {
- int2 inY = rsGetElementAt_int2(gAllocInY, x);
- return pown(inX, inY);
+float2 __attribute__((kernel)) testPownFloat2Int2Float2(float2 inBase, unsigned int x) {
+ int2 inExponent = rsGetElementAt_int2(gAllocInExponent, x);
+ return pown(inBase, inExponent);
}
-float3 __attribute__((kernel)) testPownFloat3Int3Float3(float3 inX, unsigned int x) {
- int3 inY = rsGetElementAt_int3(gAllocInY, x);
- return pown(inX, inY);
+float3 __attribute__((kernel)) testPownFloat3Int3Float3(float3 inBase, unsigned int x) {
+ int3 inExponent = rsGetElementAt_int3(gAllocInExponent, x);
+ return pown(inBase, inExponent);
}
-float4 __attribute__((kernel)) testPownFloat4Int4Float4(float4 inX, unsigned int x) {
- int4 inY = rsGetElementAt_int4(gAllocInY, x);
- return pown(inX, inY);
+float4 __attribute__((kernel)) testPownFloat4Int4Float4(float4 inBase, unsigned int x) {
+ int4 inExponent = rsGetElementAt_int4(gAllocInExponent, x);
+ return pown(inBase, inExponent);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.java b/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.java
index b1f281b..378c918 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inBase;
+ public float inExponent;
public Target.Floaty out;
}
private void checkPowrFloatFloatFloat() {
- Allocation inX = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x616e17ec158f6a8dl, 0, 3000);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x616e17ec158f6a8el, false);
+ Allocation inBase = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x432f9eac0c490ca4l, 0, 3000);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x7ee76eaeab21ab0al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPowrFloatFloatFloat(inX, out);
- verifyResultsPowrFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPowrFloatFloatFloat(inBase, out);
+ verifyResultsPowrFloatFloatFloat(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowrFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPowrFloatFloatFloat(inX, out);
- verifyResultsPowrFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPowrFloatFloatFloat(inBase, out);
+ verifyResultsPowrFloatFloatFloat(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowrFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsPowrFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsPowrFloatFloatFloat(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 1];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 1];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inBase = arrayInBase[i];
+ args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePowr(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkPowrFloat2Float2Float2() {
- Allocation inX = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xfc919df3002fbd93l, 0, 3000);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xfc919df3002fbd94l, false);
+ Allocation inBase = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x5ce1f4c2eae1fd16l, 0, 3000);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x1f9ec14817a9ddcl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPowrFloat2Float2Float2(inX, out);
- verifyResultsPowrFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPowrFloat2Float2Float2(inBase, out);
+ verifyResultsPowrFloat2Float2Float2(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowrFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPowrFloat2Float2Float2(inX, out);
- verifyResultsPowrFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPowrFloat2Float2Float2(inBase, out);
+ verifyResultsPowrFloat2Float2Float2(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowrFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsPowrFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsPowrFloat2Float2Float2(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 2];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 2];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inBase = arrayInBase[i * 2 + j];
+ args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePowr(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkPowrFloat3Float3Float3() {
- Allocation inX = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x50f67c13020dbf34l, 0, 3000);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x50f67c13020dbf35l, false);
+ Allocation inBase = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf7c84366d355e289l, 0, 3000);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xdd686715d89d205fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPowrFloat3Float3Float3(inX, out);
- verifyResultsPowrFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPowrFloat3Float3Float3(inBase, out);
+ verifyResultsPowrFloat3Float3Float3(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowrFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPowrFloat3Float3Float3(inX, out);
- verifyResultsPowrFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPowrFloat3Float3Float3(inBase, out);
+ verifyResultsPowrFloat3Float3Float3(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowrFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsPowrFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsPowrFloat3Float3Float3(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 4];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inBase = arrayInBase[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePowr(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkPowrFloat4Float4Float4() {
- Allocation inX = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa55b5a3303ebc0d5l, 0, 3000);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa55b5a3303ebc0d6l, false);
+ Allocation inBase = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x92ae920abbc9c7fcl, 0, 3000);
+ Allocation inExponent = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xb8d6e2172fbfa2e2l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testPowrFloat4Float4Float4(inX, out);
- verifyResultsPowrFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInExponent(inExponent);
+ script.forEach_testPowrFloat4Float4Float4(inBase, out);
+ verifyResultsPowrFloat4Float4Float4(inBase, inExponent, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowrFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testPowrFloat4Float4Float4(inX, out);
- verifyResultsPowrFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInExponent(inExponent);
+ scriptRelaxed.forEach_testPowrFloat4Float4Float4(inBase, out);
+ verifyResultsPowrFloat4Float4Float4(inBase, inExponent, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testPowrFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsPowrFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsPowrFloat4Float4Float4(Allocation inBase, Allocation inExponent, Allocation out, boolean relaxed) {
+ float[] arrayInBase = new float[INPUTSIZE * 4];
+ inBase.copyTo(arrayInBase);
+ float[] arrayInExponent = new float[INPUTSIZE * 4];
+ inExponent.copyTo(arrayInExponent);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inBase = arrayInBase[i * 4 + j];
+ args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computePowr(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inBase: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inBase, Float.floatToRawIntBits(args.inBase), args.inBase));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inExponent: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inExponent, Float.floatToRawIntBits(args.inExponent), args.inExponent));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.rs
index 0fd603e..9cd9da0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInExponent;
-float __attribute__((kernel)) testPowrFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return powr(inX, inY);
+float __attribute__((kernel)) testPowrFloatFloatFloat(float inBase, unsigned int x) {
+ float inExponent = rsGetElementAt_float(gAllocInExponent, x);
+ return powr(inBase, inExponent);
}
-float2 __attribute__((kernel)) testPowrFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return powr(inX, inY);
+float2 __attribute__((kernel)) testPowrFloat2Float2Float2(float2 inBase, unsigned int x) {
+ float2 inExponent = rsGetElementAt_float2(gAllocInExponent, x);
+ return powr(inBase, inExponent);
}
-float3 __attribute__((kernel)) testPowrFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return powr(inX, inY);
+float3 __attribute__((kernel)) testPowrFloat3Float3Float3(float3 inBase, unsigned int x) {
+ float3 inExponent = rsGetElementAt_float3(gAllocInExponent, x);
+ return powr(inBase, inExponent);
}
-float4 __attribute__((kernel)) testPowrFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return powr(inX, inY);
+float4 __attribute__((kernel)) testPowrFloat4Float4Float4(float4 inBase, unsigned int x) {
+ float4 inExponent = rsGetElementAt_float4(gAllocInExponent, x);
+ return powr(inBase, inExponent);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.java
index 2707ac2..6be2194 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float inValue;
+ public float inV;
public Target.Floaty out;
}
private void checkRadiansFloatFloat() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xaa72f227598b8106l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x6e5054c0042adfabl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testRadiansFloatFloat(inValue, out);
- verifyResultsRadiansFloatFloat(inValue, out, false);
+ script.forEach_testRadiansFloatFloat(inV, out);
+ verifyResultsRadiansFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRadiansFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testRadiansFloatFloat(inValue, out);
- verifyResultsRadiansFloatFloat(inValue, out, true);
+ scriptRelaxed.forEach_testRadiansFloatFloat(inV, out);
+ verifyResultsRadiansFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRadiansFloatFloat: " + e.toString());
}
}
- private void verifyResultsRadiansFloatFloat(Allocation inValue, Allocation out, boolean relaxed) {
- float[] arrayInValue = new float[INPUTSIZE * 1];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsRadiansFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inValue = arrayInValue[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRadians(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkRadiansFloat2Float2() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xb28bd9316e059892l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc20ed424de23baf7l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testRadiansFloat2Float2(inValue, out);
- verifyResultsRadiansFloat2Float2(inValue, out, false);
+ script.forEach_testRadiansFloat2Float2(inV, out);
+ verifyResultsRadiansFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRadiansFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testRadiansFloat2Float2(inValue, out);
- verifyResultsRadiansFloat2Float2(inValue, out, true);
+ scriptRelaxed.forEach_testRadiansFloat2Float2(inV, out);
+ verifyResultsRadiansFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRadiansFloat2Float2: " + e.toString());
}
}
- private void verifyResultsRadiansFloat2Float2(Allocation inValue, Allocation out, boolean relaxed) {
- float[] arrayInValue = new float[INPUTSIZE * 2];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsRadiansFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inValue = arrayInValue[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRadians(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkRadiansFloat3Float3() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd8404eb8b743be10l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc2109d3fd43edbd5l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testRadiansFloat3Float3(inValue, out);
- verifyResultsRadiansFloat3Float3(inValue, out, false);
+ script.forEach_testRadiansFloat3Float3(inV, out);
+ verifyResultsRadiansFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRadiansFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testRadiansFloat3Float3(inValue, out);
- verifyResultsRadiansFloat3Float3(inValue, out, true);
+ scriptRelaxed.forEach_testRadiansFloat3Float3(inV, out);
+ verifyResultsRadiansFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRadiansFloat3Float3: " + e.toString());
}
}
- private void verifyResultsRadiansFloat3Float3(Allocation inValue, Allocation out, boolean relaxed) {
- float[] arrayInValue = new float[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsRadiansFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRadians(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkRadiansFloat4Float4() {
- Allocation inValue = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xfdf4c4400081e38el, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc212665aca59fcb3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testRadiansFloat4Float4(inValue, out);
- verifyResultsRadiansFloat4Float4(inValue, out, false);
+ script.forEach_testRadiansFloat4Float4(inV, out);
+ verifyResultsRadiansFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRadiansFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testRadiansFloat4Float4(inValue, out);
- verifyResultsRadiansFloat4Float4(inValue, out, true);
+ scriptRelaxed.forEach_testRadiansFloat4Float4(inV, out);
+ verifyResultsRadiansFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRadiansFloat4Float4: " + e.toString());
}
}
- private void verifyResultsRadiansFloat4Float4(Allocation inValue, Allocation out, boolean relaxed) {
- float[] arrayInValue = new float[INPUTSIZE * 4];
- inValue.copyTo(arrayInValue);
+ private void verifyResultsRadiansFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.inValue = arrayInValue[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRadians(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inValue: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.rs
index 09aa9a0..035a936 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testRadiansFloatFloat(float inValue) {
- return radians(inValue);
+float __attribute__((kernel)) testRadiansFloatFloat(float inV) {
+ return radians(inV);
}
-float2 __attribute__((kernel)) testRadiansFloat2Float2(float2 inValue) {
- return radians(inValue);
+float2 __attribute__((kernel)) testRadiansFloat2Float2(float2 inV) {
+ return radians(inV);
}
-float3 __attribute__((kernel)) testRadiansFloat3Float3(float3 inValue) {
- return radians(inValue);
+float3 __attribute__((kernel)) testRadiansFloat3Float3(float3 inV) {
+ return radians(inV);
}
-float4 __attribute__((kernel)) testRadiansFloat4Float4(float4 inValue) {
- return radians(inValue);
+float4 __attribute__((kernel)) testRadiansFloat4Float4(float4 inV) {
+ return radians(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.java
index 8208d23..9cf9726 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.java
@@ -35,45 +35,45 @@
}
public class ArgumentsFloatFloatFloat {
- public float inX;
- public float inY;
+ public float inNumerator;
+ public float inDenominator;
public Target.Floaty out;
}
private void checkRemainderFloatFloatFloat() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x27d6330966022888l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x27d6330966022889l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xd47c3f07317ea229l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb246eb0ee2ebe35al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testRemainderFloatFloatFloat(inX, out);
- verifyResultsRemainderFloatFloatFloat(inX, inY, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testRemainderFloatFloatFloat(inNumerator, out);
+ verifyResultsRemainderFloatFloatFloat(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemainderFloatFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testRemainderFloatFloatFloat(inX, out);
- verifyResultsRemainderFloatFloatFloat(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testRemainderFloatFloatFloat(inNumerator, out);
+ verifyResultsRemainderFloatFloatFloat(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemainderFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsRemainderFloatFloatFloat(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 1];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 1];
- inY.copyTo(arrayInY);
+ private void verifyResultsRemainderFloatFloatFloat(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 1];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 1];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i];
- args.inY = arrayInY[i];
+ args.inNumerator = arrayInNumerator[i];
+ args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRemainder(args, target);
@@ -84,13 +84,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -110,39 +110,39 @@
}
private void checkRemainderFloat2Float2Float2() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xfb2eaf332420c6b4l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xfb2eaf332420c6b5l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x27d975633fdcf8d5l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xce8489f2aa4be3a6l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testRemainderFloat2Float2Float2(inX, out);
- verifyResultsRemainderFloat2Float2Float2(inX, inY, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testRemainderFloat2Float2Float2(inNumerator, out);
+ verifyResultsRemainderFloat2Float2Float2(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemainderFloat2Float2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testRemainderFloat2Float2Float2(inX, out);
- verifyResultsRemainderFloat2Float2Float2(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testRemainderFloat2Float2Float2(inNumerator, out);
+ verifyResultsRemainderFloat2Float2Float2(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemainderFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsRemainderFloat2Float2Float2(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 2];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 2];
- inY.copyTo(arrayInY);
+ private void verifyResultsRemainderFloat2Float2Float2(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 2];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 2];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 2 + j];
- args.inY = arrayInY[i * 2 + j];
+ args.inNumerator = arrayInNumerator[i * 2 + j];
+ args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRemainder(args, target);
@@ -153,13 +153,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -179,39 +179,39 @@
}
private void checkRemainderFloat3Float3Float3() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x4f938d5325fec855l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x4f938d5325fec856l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x3681e9ce2a8e4d6l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x97e8cb3b7d2776dfl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testRemainderFloat3Float3Float3(inX, out);
- verifyResultsRemainderFloat3Float3Float3(inX, inY, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testRemainderFloat3Float3Float3(inNumerator, out);
+ verifyResultsRemainderFloat3Float3Float3(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemainderFloat3Float3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testRemainderFloat3Float3Float3(inX, out);
- verifyResultsRemainderFloat3Float3Float3(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testRemainderFloat3Float3Float3(inNumerator, out);
+ verifyResultsRemainderFloat3Float3Float3(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemainderFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsRemainderFloat3Float3Float3(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsRemainderFloat3Float3Float3(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRemainder(args, target);
@@ -222,13 +222,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -248,39 +248,39 @@
}
private void checkRemainderFloat4Float4Float4() {
- Allocation inX = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa3f86b7327dcc9f6l, false);
- Allocation inY = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa3f86b7327dcc9f7l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xdef6c7d68574d0d7l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x614d0c8450030a18l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInY(inY);
- script.forEach_testRemainderFloat4Float4Float4(inX, out);
- verifyResultsRemainderFloat4Float4Float4(inX, inY, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.forEach_testRemainderFloat4Float4Float4(inNumerator, out);
+ verifyResultsRemainderFloat4Float4Float4(inNumerator, inDenominator, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemainderFloat4Float4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInY(inY);
- scriptRelaxed.forEach_testRemainderFloat4Float4Float4(inX, out);
- verifyResultsRemainderFloat4Float4Float4(inX, inY, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.forEach_testRemainderFloat4Float4Float4(inNumerator, out);
+ verifyResultsRemainderFloat4Float4Float4(inNumerator, inDenominator, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemainderFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsRemainderFloat4Float4Float4(Allocation inX, Allocation inY, Allocation out, boolean relaxed) {
- float[] arrayInX = new float[INPUTSIZE * 4];
- inX.copyTo(arrayInX);
- float[] arrayInY = new float[INPUTSIZE * 4];
- inY.copyTo(arrayInY);
+ private void verifyResultsRemainderFloat4Float4Float4(Allocation inNumerator, Allocation inDenominator, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
- args.inX = arrayInX[i * 4 + j];
- args.inY = arrayInY[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRemainder(args, target);
@@ -291,13 +291,13 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inX: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inX, Float.floatToRawIntBits(args.inX), args.inX));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inY: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.rs
index 86f2030..a0aa809 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.rs
@@ -19,24 +19,24 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInY;
+rs_allocation gAllocInDenominator;
-float __attribute__((kernel)) testRemainderFloatFloatFloat(float inX, unsigned int x) {
- float inY = rsGetElementAt_float(gAllocInY, x);
- return remainder(inX, inY);
+float __attribute__((kernel)) testRemainderFloatFloatFloat(float inNumerator, unsigned int x) {
+ float inDenominator = rsGetElementAt_float(gAllocInDenominator, x);
+ return remainder(inNumerator, inDenominator);
}
-float2 __attribute__((kernel)) testRemainderFloat2Float2Float2(float2 inX, unsigned int x) {
- float2 inY = rsGetElementAt_float2(gAllocInY, x);
- return remainder(inX, inY);
+float2 __attribute__((kernel)) testRemainderFloat2Float2Float2(float2 inNumerator, unsigned int x) {
+ float2 inDenominator = rsGetElementAt_float2(gAllocInDenominator, x);
+ return remainder(inNumerator, inDenominator);
}
-float3 __attribute__((kernel)) testRemainderFloat3Float3Float3(float3 inX, unsigned int x) {
- float3 inY = rsGetElementAt_float3(gAllocInY, x);
- return remainder(inX, inY);
+float3 __attribute__((kernel)) testRemainderFloat3Float3Float3(float3 inNumerator, unsigned int x) {
+ float3 inDenominator = rsGetElementAt_float3(gAllocInDenominator, x);
+ return remainder(inNumerator, inDenominator);
}
-float4 __attribute__((kernel)) testRemainderFloat4Float4Float4(float4 inX, unsigned int x) {
- float4 inY = rsGetElementAt_float4(gAllocInY, x);
- return remainder(inX, inY);
+float4 __attribute__((kernel)) testRemainderFloat4Float4Float4(float4 inNumerator, unsigned int x) {
+ float4 inDenominator = rsGetElementAt_float4(gAllocInDenominator, x);
+ return remainder(inNumerator, inDenominator);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.java
index 7052dd1..5c7e8b0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.java
@@ -35,54 +35,54 @@
}
public class ArgumentsFloatFloatIntFloat {
- public float inB;
- public float inC;
- public int outD;
+ public float inNumerator;
+ public float inDenominator;
+ public int outQuotient;
public float out;
}
private void checkRemquoFloatFloatIntFloat() {
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x118af9b82db63b13l, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x118af9b82db63b14l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xcd5efc69edd4ff2al, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4ff0c9312eb19f93l, false);
try {
- Allocation outD = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
+ Allocation outQuotient = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocInC(inC);
- script.set_gAllocOutD(outD);
- script.forEach_testRemquoFloatFloatIntFloat(inB, out);
- verifyResultsRemquoFloatFloatIntFloat(inB, inC, outD, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.set_gAllocOutQuotient(outQuotient);
+ script.forEach_testRemquoFloatFloatIntFloat(inNumerator, out);
+ verifyResultsRemquoFloatFloatIntFloat(inNumerator, inDenominator, outQuotient, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemquoFloatFloatIntFloat: " + e.toString());
}
try {
- Allocation outD = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
+ Allocation outQuotient = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.set_gAllocOutD(outD);
- scriptRelaxed.forEach_testRemquoFloatFloatIntFloat(inB, out);
- verifyResultsRemquoFloatFloatIntFloat(inB, inC, outD, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.set_gAllocOutQuotient(outQuotient);
+ scriptRelaxed.forEach_testRemquoFloatFloatIntFloat(inNumerator, out);
+ verifyResultsRemquoFloatFloatIntFloat(inNumerator, inDenominator, outQuotient, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemquoFloatFloatIntFloat: " + e.toString());
}
}
- private void verifyResultsRemquoFloatFloatIntFloat(Allocation inB, Allocation inC, Allocation outD, Allocation out, boolean relaxed) {
- float[] arrayInB = new float[INPUTSIZE * 1];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 1];
- inC.copyTo(arrayInC);
- int[] arrayOutD = new int[INPUTSIZE * 1];
- outD.copyTo(arrayOutD);
+ private void verifyResultsRemquoFloatFloatIntFloat(Allocation inNumerator, Allocation inDenominator, Allocation outQuotient, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 1];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 1];
+ inDenominator.copyTo(arrayInDenominator);
+ int[] arrayOutQuotient = new int[INPUTSIZE * 1];
+ outQuotient.copyTo(arrayOutQuotient);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatIntFloat args = new ArgumentsFloatFloatIntFloat();
- args.inB = arrayInB[i];
- args.inC = arrayInC[i];
+ args.inNumerator = arrayInNumerator[i];
+ args.inDenominator = arrayInDenominator[i];
// Extract the outputs.
- args.outD = arrayOutD[i * 1 + j];
+ args.outQuotient = arrayOutQuotient[i * 1 + j];
args.out = arrayOut[i * 1 + j];
// Ask the CoreMathVerifier to validate.
Target target = new Target(relaxed);
@@ -90,16 +90,16 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inB: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
- message.append("Output outD: ");
- message.append(String.format("%d", args.outD));
+ message.append("Output outQuotient: ");
+ message.append(String.format("%d", args.outQuotient));
message.append("\n");
message.append("Output out: ");
message.append(Float.toString(args.out));
@@ -113,47 +113,47 @@
}
private void checkRemquoFloat2Float2Int2Float2() {
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x9b98a1a6b125f903l, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x9b98a1a6b125f904l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x28c14abc3a27171al, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x58f8799a6ba08403l, false);
try {
- Allocation outD = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
+ Allocation outQuotient = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocInC(inC);
- script.set_gAllocOutD(outD);
- script.forEach_testRemquoFloat2Float2Int2Float2(inB, out);
- verifyResultsRemquoFloat2Float2Int2Float2(inB, inC, outD, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.set_gAllocOutQuotient(outQuotient);
+ script.forEach_testRemquoFloat2Float2Int2Float2(inNumerator, out);
+ verifyResultsRemquoFloat2Float2Int2Float2(inNumerator, inDenominator, outQuotient, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemquoFloat2Float2Int2Float2: " + e.toString());
}
try {
- Allocation outD = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
+ Allocation outQuotient = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.set_gAllocOutD(outD);
- scriptRelaxed.forEach_testRemquoFloat2Float2Int2Float2(inB, out);
- verifyResultsRemquoFloat2Float2Int2Float2(inB, inC, outD, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.set_gAllocOutQuotient(outQuotient);
+ scriptRelaxed.forEach_testRemquoFloat2Float2Int2Float2(inNumerator, out);
+ verifyResultsRemquoFloat2Float2Int2Float2(inNumerator, inDenominator, outQuotient, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemquoFloat2Float2Int2Float2: " + e.toString());
}
}
- private void verifyResultsRemquoFloat2Float2Int2Float2(Allocation inB, Allocation inC, Allocation outD, Allocation out, boolean relaxed) {
- float[] arrayInB = new float[INPUTSIZE * 2];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 2];
- inC.copyTo(arrayInC);
- int[] arrayOutD = new int[INPUTSIZE * 2];
- outD.copyTo(arrayOutD);
+ private void verifyResultsRemquoFloat2Float2Int2Float2(Allocation inNumerator, Allocation inDenominator, Allocation outQuotient, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 2];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 2];
+ inDenominator.copyTo(arrayInDenominator);
+ int[] arrayOutQuotient = new int[INPUTSIZE * 2];
+ outQuotient.copyTo(arrayOutQuotient);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatIntFloat args = new ArgumentsFloatFloatIntFloat();
- args.inB = arrayInB[i * 2 + j];
- args.inC = arrayInC[i * 2 + j];
+ args.inNumerator = arrayInNumerator[i * 2 + j];
+ args.inDenominator = arrayInDenominator[i * 2 + j];
// Extract the outputs.
- args.outD = arrayOutD[i * 2 + j];
+ args.outQuotient = arrayOutQuotient[i * 2 + j];
args.out = arrayOut[i * 2 + j];
// Ask the CoreMathVerifier to validate.
Target target = new Target(relaxed);
@@ -161,16 +161,16 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inB: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
- message.append("Output outD: ");
- message.append(String.format("%d", args.outD));
+ message.append("Output outQuotient: ");
+ message.append(String.format("%d", args.outQuotient));
message.append("\n");
message.append("Output out: ");
message.append(Float.toString(args.out));
@@ -184,47 +184,47 @@
}
private void checkRemquoFloat3Float3Int3Float3() {
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xa049a00a6911ca8fl, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xa049a00a6911ca90l, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf60211df96052526l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd1d6c7fcf273f8afl, false);
try {
- Allocation outD = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
+ Allocation outQuotient = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocInC(inC);
- script.set_gAllocOutD(outD);
- script.forEach_testRemquoFloat3Float3Int3Float3(inB, out);
- verifyResultsRemquoFloat3Float3Int3Float3(inB, inC, outD, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.set_gAllocOutQuotient(outQuotient);
+ script.forEach_testRemquoFloat3Float3Int3Float3(inNumerator, out);
+ verifyResultsRemquoFloat3Float3Int3Float3(inNumerator, inDenominator, outQuotient, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemquoFloat3Float3Int3Float3: " + e.toString());
}
try {
- Allocation outD = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
+ Allocation outQuotient = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.set_gAllocOutD(outD);
- scriptRelaxed.forEach_testRemquoFloat3Float3Int3Float3(inB, out);
- verifyResultsRemquoFloat3Float3Int3Float3(inB, inC, outD, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.set_gAllocOutQuotient(outQuotient);
+ scriptRelaxed.forEach_testRemquoFloat3Float3Int3Float3(inNumerator, out);
+ verifyResultsRemquoFloat3Float3Int3Float3(inNumerator, inDenominator, outQuotient, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemquoFloat3Float3Int3Float3: " + e.toString());
}
}
- private void verifyResultsRemquoFloat3Float3Int3Float3(Allocation inB, Allocation inC, Allocation outD, Allocation out, boolean relaxed) {
- float[] arrayInB = new float[INPUTSIZE * 4];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 4];
- inC.copyTo(arrayInC);
- int[] arrayOutD = new int[INPUTSIZE * 4];
- outD.copyTo(arrayOutD);
+ private void verifyResultsRemquoFloat3Float3Int3Float3(Allocation inNumerator, Allocation inDenominator, Allocation outQuotient, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
+ int[] arrayOutQuotient = new int[INPUTSIZE * 4];
+ outQuotient.copyTo(arrayOutQuotient);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatIntFloat args = new ArgumentsFloatFloatIntFloat();
- args.inB = arrayInB[i * 4 + j];
- args.inC = arrayInC[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Extract the outputs.
- args.outD = arrayOutD[i * 4 + j];
+ args.outQuotient = arrayOutQuotient[i * 4 + j];
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
Target target = new Target(relaxed);
@@ -232,16 +232,16 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inB: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
- message.append("Output outD: ");
- message.append(String.format("%d", args.outD));
+ message.append("Output outQuotient: ");
+ message.append(String.format("%d", args.outQuotient));
message.append("\n");
message.append("Output out: ");
message.append(Float.toString(args.out));
@@ -255,47 +255,47 @@
}
private void checkRemquoFloat4Float4Int4Float4() {
- Allocation inB = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa4fa9e6e20fd9c1bl, false);
- Allocation inC = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa4fa9e6e20fd9c1cl, false);
+ Allocation inNumerator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc342d902f1e33332l, false);
+ Allocation inDenominator = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x4ab5165f79476d5bl, false);
try {
- Allocation outD = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
+ Allocation outQuotient = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocInC(inC);
- script.set_gAllocOutD(outD);
- script.forEach_testRemquoFloat4Float4Int4Float4(inB, out);
- verifyResultsRemquoFloat4Float4Int4Float4(inB, inC, outD, out, false);
+ script.set_gAllocInDenominator(inDenominator);
+ script.set_gAllocOutQuotient(outQuotient);
+ script.forEach_testRemquoFloat4Float4Int4Float4(inNumerator, out);
+ verifyResultsRemquoFloat4Float4Int4Float4(inNumerator, inDenominator, outQuotient, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemquoFloat4Float4Int4Float4: " + e.toString());
}
try {
- Allocation outD = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
+ Allocation outQuotient = Allocation.createSized(mRS, getElement(mRS, Element.DataType.SIGNED_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocInC(inC);
- scriptRelaxed.set_gAllocOutD(outD);
- scriptRelaxed.forEach_testRemquoFloat4Float4Int4Float4(inB, out);
- verifyResultsRemquoFloat4Float4Int4Float4(inB, inC, outD, out, true);
+ scriptRelaxed.set_gAllocInDenominator(inDenominator);
+ scriptRelaxed.set_gAllocOutQuotient(outQuotient);
+ scriptRelaxed.forEach_testRemquoFloat4Float4Int4Float4(inNumerator, out);
+ verifyResultsRemquoFloat4Float4Int4Float4(inNumerator, inDenominator, outQuotient, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRemquoFloat4Float4Int4Float4: " + e.toString());
}
}
- private void verifyResultsRemquoFloat4Float4Int4Float4(Allocation inB, Allocation inC, Allocation outD, Allocation out, boolean relaxed) {
- float[] arrayInB = new float[INPUTSIZE * 4];
- inB.copyTo(arrayInB);
- float[] arrayInC = new float[INPUTSIZE * 4];
- inC.copyTo(arrayInC);
- int[] arrayOutD = new int[INPUTSIZE * 4];
- outD.copyTo(arrayOutD);
+ private void verifyResultsRemquoFloat4Float4Int4Float4(Allocation inNumerator, Allocation inDenominator, Allocation outQuotient, Allocation out, boolean relaxed) {
+ float[] arrayInNumerator = new float[INPUTSIZE * 4];
+ inNumerator.copyTo(arrayInNumerator);
+ float[] arrayInDenominator = new float[INPUTSIZE * 4];
+ inDenominator.copyTo(arrayInDenominator);
+ int[] arrayOutQuotient = new int[INPUTSIZE * 4];
+ outQuotient.copyTo(arrayOutQuotient);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloatIntFloat args = new ArgumentsFloatFloatIntFloat();
- args.inB = arrayInB[i * 4 + j];
- args.inC = arrayInC[i * 4 + j];
+ args.inNumerator = arrayInNumerator[i * 4 + j];
+ args.inDenominator = arrayInDenominator[i * 4 + j];
// Extract the outputs.
- args.outD = arrayOutD[i * 4 + j];
+ args.outQuotient = arrayOutQuotient[i * 4 + j];
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
Target target = new Target(relaxed);
@@ -303,16 +303,16 @@
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input inB: ");
+ message.append("Input inNumerator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inB, Float.floatToRawIntBits(args.inB), args.inB));
+ args.inNumerator, Float.floatToRawIntBits(args.inNumerator), args.inNumerator));
message.append("\n");
- message.append("Input inC: ");
+ message.append("Input inDenominator: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.inC, Float.floatToRawIntBits(args.inC), args.inC));
+ args.inDenominator, Float.floatToRawIntBits(args.inDenominator), args.inDenominator));
message.append("\n");
- message.append("Output outD: ");
- message.append(String.format("%d", args.outD));
+ message.append("Output outQuotient: ");
+ message.append(String.format("%d", args.outQuotient));
message.append("\n");
message.append("Output out: ");
message.append(Float.toString(args.out));
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.rs
index 032e6c0..fada6c1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.rs
@@ -19,37 +19,37 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocInC;
-rs_allocation gAllocOutD;
+rs_allocation gAllocInDenominator;
+rs_allocation gAllocOutQuotient;
-float __attribute__((kernel)) testRemquoFloatFloatIntFloat(float inB, unsigned int x) {
- float inC = rsGetElementAt_float(gAllocInC, x);
- int outD = 0;
- float out = remquo(inB, inC, &outD);
- rsSetElementAt_int(gAllocOutD, outD, x);
+float __attribute__((kernel)) testRemquoFloatFloatIntFloat(float inNumerator, unsigned int x) {
+ float inDenominator = rsGetElementAt_float(gAllocInDenominator, x);
+ int outQuotient = 0;
+ float out = remquo(inNumerator, inDenominator, &outQuotient);
+ rsSetElementAt_int(gAllocOutQuotient, outQuotient, x);
return out;
}
-float2 __attribute__((kernel)) testRemquoFloat2Float2Int2Float2(float2 inB, unsigned int x) {
- float2 inC = rsGetElementAt_float2(gAllocInC, x);
- int2 outD = 0;
- float2 out = remquo(inB, inC, &outD);
- rsSetElementAt_int2(gAllocOutD, outD, x);
+float2 __attribute__((kernel)) testRemquoFloat2Float2Int2Float2(float2 inNumerator, unsigned int x) {
+ float2 inDenominator = rsGetElementAt_float2(gAllocInDenominator, x);
+ int2 outQuotient = 0;
+ float2 out = remquo(inNumerator, inDenominator, &outQuotient);
+ rsSetElementAt_int2(gAllocOutQuotient, outQuotient, x);
return out;
}
-float3 __attribute__((kernel)) testRemquoFloat3Float3Int3Float3(float3 inB, unsigned int x) {
- float3 inC = rsGetElementAt_float3(gAllocInC, x);
- int3 outD = 0;
- float3 out = remquo(inB, inC, &outD);
- rsSetElementAt_int3(gAllocOutD, outD, x);
+float3 __attribute__((kernel)) testRemquoFloat3Float3Int3Float3(float3 inNumerator, unsigned int x) {
+ float3 inDenominator = rsGetElementAt_float3(gAllocInDenominator, x);
+ int3 outQuotient = 0;
+ float3 out = remquo(inNumerator, inDenominator, &outQuotient);
+ rsSetElementAt_int3(gAllocOutQuotient, outQuotient, x);
return out;
}
-float4 __attribute__((kernel)) testRemquoFloat4Float4Int4Float4(float4 inB, unsigned int x) {
- float4 inC = rsGetElementAt_float4(gAllocInC, x);
- int4 outD = 0;
- float4 out = remquo(inB, inC, &outD);
- rsSetElementAt_int4(gAllocOutD, outD, x);
+float4 __attribute__((kernel)) testRemquoFloat4Float4Int4Float4(float4 inNumerator, unsigned int x) {
+ float4 inDenominator = rsGetElementAt_float4(gAllocInDenominator, x);
+ int4 outQuotient = 0;
+ float4 out = remquo(inNumerator, inDenominator, &outQuotient);
+ rsSetElementAt_int4(gAllocOutQuotient, outQuotient, x);
return out;
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRint.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRint.java
index 6d42aeb..5f84bb4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRint.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRint.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkRintFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xfe569fda5dbe93fal, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb88cd9adbf02db54l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testRintFloatFloat(in, out);
- verifyResultsRintFloatFloat(in, out, false);
+ script.forEach_testRintFloatFloat(inV, out);
+ verifyResultsRintFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRintFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testRintFloatFloat(in, out);
- verifyResultsRintFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testRintFloatFloat(inV, out);
+ verifyResultsRintFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRintFloatFloat: " + e.toString());
}
}
- private void verifyResultsRintFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsRintFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRint(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkRintFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xffa7b22ac6b343c6l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xf12aed2f601c6298l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testRintFloat2Float2(in, out);
- verifyResultsRintFloat2Float2(in, out, false);
+ script.forEach_testRintFloat2Float2(inV, out);
+ verifyResultsRintFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRintFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testRintFloat2Float2(in, out);
- verifyResultsRintFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testRintFloat2Float2(inV, out);
+ verifyResultsRintFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRintFloat2Float2: " + e.toString());
}
}
- private void verifyResultsRintFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsRintFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRint(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkRintFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xffa7bccc25b9d960l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xf12cb64a56378376l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testRintFloat3Float3(in, out);
- verifyResultsRintFloat3Float3(in, out, false);
+ script.forEach_testRintFloat3Float3(inV, out);
+ verifyResultsRintFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRintFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testRintFloat3Float3(in, out);
- verifyResultsRintFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testRintFloat3Float3(inV, out);
+ verifyResultsRintFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRintFloat3Float3: " + e.toString());
}
}
- private void verifyResultsRintFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsRintFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRint(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkRintFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xffa7c76d84c06efal, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xf12e7f654c52a454l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testRintFloat4Float4(in, out);
- verifyResultsRintFloat4Float4(in, out, false);
+ script.forEach_testRintFloat4Float4(inV, out);
+ verifyResultsRintFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRintFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testRintFloat4Float4(in, out);
- verifyResultsRintFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testRintFloat4Float4(inV, out);
+ verifyResultsRintFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRintFloat4Float4: " + e.toString());
}
}
- private void verifyResultsRintFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsRintFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRint(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRint.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestRint.rs
index a551d68..937d1a4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRint.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRint.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testRintFloatFloat(float in) {
- return rint(in);
+float __attribute__((kernel)) testRintFloatFloat(float inV) {
+ return rint(inV);
}
-float2 __attribute__((kernel)) testRintFloat2Float2(float2 in) {
- return rint(in);
+float2 __attribute__((kernel)) testRintFloat2Float2(float2 inV) {
+ return rint(inV);
}
-float3 __attribute__((kernel)) testRintFloat3Float3(float3 in) {
- return rint(in);
+float3 __attribute__((kernel)) testRintFloat3Float3(float3 inV) {
+ return rint(inV);
}
-float4 __attribute__((kernel)) testRintFloat4Float4(float4 in) {
- return rint(in);
+float4 __attribute__((kernel)) testRintFloat4Float4(float4 inV) {
+ return rint(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRound.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRound.java
index f9c9a9d..79036ea 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRound.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRound.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkRoundFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x377ca8d7e9a82fc7l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x51f05c443f4006c3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testRoundFloatFloat(in, out);
- verifyResultsRoundFloatFloat(in, out, false);
+ script.forEach_testRoundFloatFloat(inV, out);
+ verifyResultsRoundFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRoundFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testRoundFloatFloat(in, out);
- verifyResultsRoundFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testRoundFloatFloat(inV, out);
+ verifyResultsRoundFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRoundFloatFloat: " + e.toString());
}
}
- private void verifyResultsRoundFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsRoundFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRound(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkRoundFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc35ea17250f98f6bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd0e51e3399eb174fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testRoundFloat2Float2(in, out);
- verifyResultsRoundFloat2Float2(in, out, false);
+ script.forEach_testRoundFloat2Float2(inV, out);
+ verifyResultsRoundFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRoundFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testRoundFloat2Float2(in, out);
- verifyResultsRoundFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testRoundFloat2Float2(inV, out);
+ verifyResultsRoundFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRoundFloat2Float2: " + e.toString());
}
}
- private void verifyResultsRoundFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsRoundFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRound(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkRoundFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc35eac13b0002505l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd0e6e74e9006382dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testRoundFloat3Float3(in, out);
- verifyResultsRoundFloat3Float3(in, out, false);
+ script.forEach_testRoundFloat3Float3(inV, out);
+ verifyResultsRoundFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRoundFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testRoundFloat3Float3(in, out);
- verifyResultsRoundFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testRoundFloat3Float3(inV, out);
+ verifyResultsRoundFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRoundFloat3Float3: " + e.toString());
}
}
- private void verifyResultsRoundFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsRoundFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRound(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkRoundFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc35eb6b50f06ba9fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd0e8b0698621590bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testRoundFloat4Float4(in, out);
- verifyResultsRoundFloat4Float4(in, out, false);
+ script.forEach_testRoundFloat4Float4(inV, out);
+ verifyResultsRoundFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRoundFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testRoundFloat4Float4(in, out);
- verifyResultsRoundFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testRoundFloat4Float4(inV, out);
+ verifyResultsRoundFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRoundFloat4Float4: " + e.toString());
}
}
- private void verifyResultsRoundFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsRoundFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRound(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRound.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestRound.rs
index 0442849..df77461 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRound.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRound.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testRoundFloatFloat(float in) {
- return round(in);
+float __attribute__((kernel)) testRoundFloatFloat(float inV) {
+ return round(inV);
}
-float2 __attribute__((kernel)) testRoundFloat2Float2(float2 in) {
- return round(in);
+float2 __attribute__((kernel)) testRoundFloat2Float2(float2 inV) {
+ return round(inV);
}
-float3 __attribute__((kernel)) testRoundFloat3Float3(float3 in) {
- return round(in);
+float3 __attribute__((kernel)) testRoundFloat3Float3(float3 inV) {
+ return round(inV);
}
-float4 __attribute__((kernel)) testRoundFloat4Float4(float4 in) {
- return round(in);
+float4 __attribute__((kernel)) testRoundFloat4Float4(float4 inV) {
+ return round(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.java
index 7b57621..9c564a7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkRsqrtFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x736e0d9786ef9c2bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x637c4873aa3f3b8fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testRsqrtFloatFloat(in, out);
- verifyResultsRsqrtFloatFloat(in, out, false);
+ script.forEach_testRsqrtFloatFloat(inV, out);
+ verifyResultsRsqrtFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRsqrtFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testRsqrtFloatFloat(in, out);
- verifyResultsRsqrtFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testRsqrtFloatFloat(inV, out);
+ verifyResultsRsqrtFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRsqrtFloatFloat: " + e.toString());
}
}
- private void verifyResultsRsqrtFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsRsqrtFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRsqrt(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkRsqrtFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xb5df4d6949d76dafl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8c8200af672f6cbbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testRsqrtFloat2Float2(in, out);
- verifyResultsRsqrtFloat2Float2(in, out, false);
+ script.forEach_testRsqrtFloat2Float2(inV, out);
+ verifyResultsRsqrtFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRsqrtFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testRsqrtFloat2Float2(in, out);
- verifyResultsRsqrtFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testRsqrtFloat2Float2(inV, out);
+ verifyResultsRsqrtFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRsqrtFloat2Float2: " + e.toString());
}
}
- private void verifyResultsRsqrtFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsRsqrtFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRsqrt(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkRsqrtFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xb5df580aa8de0349l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8c83c9ca5d4a8d99l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testRsqrtFloat3Float3(in, out);
- verifyResultsRsqrtFloat3Float3(in, out, false);
+ script.forEach_testRsqrtFloat3Float3(inV, out);
+ verifyResultsRsqrtFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRsqrtFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testRsqrtFloat3Float3(in, out);
- verifyResultsRsqrtFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testRsqrtFloat3Float3(inV, out);
+ verifyResultsRsqrtFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRsqrtFloat3Float3: " + e.toString());
}
}
- private void verifyResultsRsqrtFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsRsqrtFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRsqrt(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkRsqrtFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xb5df62ac07e498e3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8c8592e55365ae77l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testRsqrtFloat4Float4(in, out);
- verifyResultsRsqrtFloat4Float4(in, out, false);
+ script.forEach_testRsqrtFloat4Float4(inV, out);
+ verifyResultsRsqrtFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRsqrtFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testRsqrtFloat4Float4(in, out);
- verifyResultsRsqrtFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testRsqrtFloat4Float4(inV, out);
+ verifyResultsRsqrtFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRsqrtFloat4Float4: " + e.toString());
}
}
- private void verifyResultsRsqrtFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsRsqrtFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeRsqrt(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.rs
index 5978899..72c65cc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testRsqrtFloatFloat(float in) {
- return rsqrt(in);
+float __attribute__((kernel)) testRsqrtFloatFloat(float inV) {
+ return rsqrt(inV);
}
-float2 __attribute__((kernel)) testRsqrtFloat2Float2(float2 in) {
- return rsqrt(in);
+float2 __attribute__((kernel)) testRsqrtFloat2Float2(float2 inV) {
+ return rsqrt(inV);
}
-float3 __attribute__((kernel)) testRsqrtFloat3Float3(float3 in) {
- return rsqrt(in);
+float3 __attribute__((kernel)) testRsqrtFloat3Float3(float3 inV) {
+ return rsqrt(inV);
}
-float4 __attribute__((kernel)) testRsqrtFloat4Float4(float4 in) {
- return rsqrt(in);
+float4 __attribute__((kernel)) testRsqrtFloat4Float4(float4 inV) {
+ return rsqrt(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSin.java
index ae039e2..f22475f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSin.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkSinFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xd3e99dcfa01359f9l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x983d81dfe3401d29l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testSinFloatFloat(in, out);
- verifyResultsSinFloatFloat(in, out, false);
+ script.forEach_testSinFloatFloat(inV, out);
+ verifyResultsSinFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testSinFloatFloat(in, out);
- verifyResultsSinFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testSinFloatFloat(inV, out);
+ verifyResultsSinFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinFloatFloat: " + e.toString());
}
}
- private void verifyResultsSinFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsSinFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSin(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkSinFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x9253f296dcfd528dl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x9419bf571e8cde05l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testSinFloat2Float2(in, out);
- verifyResultsSinFloat2Float2(in, out, false);
+ script.forEach_testSinFloat2Float2(inV, out);
+ verifyResultsSinFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testSinFloat2Float2(in, out);
- verifyResultsSinFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testSinFloat2Float2(inV, out);
+ verifyResultsSinFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinFloat2Float2: " + e.toString());
}
}
- private void verifyResultsSinFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsSinFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSin(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkSinFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x9253fd383c03e827l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x941b887214a7fee3l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testSinFloat3Float3(in, out);
- verifyResultsSinFloat3Float3(in, out, false);
+ script.forEach_testSinFloat3Float3(inV, out);
+ verifyResultsSinFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testSinFloat3Float3(in, out);
- verifyResultsSinFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testSinFloat3Float3(inV, out);
+ verifyResultsSinFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinFloat3Float3: " + e.toString());
}
}
- private void verifyResultsSinFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsSinFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSin(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkSinFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x925407d99b0a7dc1l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x941d518d0ac31fc1l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testSinFloat4Float4(in, out);
- verifyResultsSinFloat4Float4(in, out, false);
+ script.forEach_testSinFloat4Float4(inV, out);
+ verifyResultsSinFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testSinFloat4Float4(in, out);
- verifyResultsSinFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testSinFloat4Float4(inV, out);
+ verifyResultsSinFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinFloat4Float4: " + e.toString());
}
}
- private void verifyResultsSinFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsSinFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSin(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSin.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestSin.rs
index 15e78ba..d68243a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSin.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSin.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testSinFloatFloat(float in) {
- return sin(in);
+float __attribute__((kernel)) testSinFloatFloat(float inV) {
+ return sin(inV);
}
-float2 __attribute__((kernel)) testSinFloat2Float2(float2 in) {
- return sin(in);
+float2 __attribute__((kernel)) testSinFloat2Float2(float2 inV) {
+ return sin(inV);
}
-float3 __attribute__((kernel)) testSinFloat3Float3(float3 in) {
- return sin(in);
+float3 __attribute__((kernel)) testSinFloat3Float3(float3 inV) {
+ return sin(inV);
}
-float4 __attribute__((kernel)) testSinFloat4Float4(float4 in) {
- return sin(in);
+float4 __attribute__((kernel)) testSinFloat4Float4(float4 inV) {
+ return sin(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.java
index 60c6ef0..d067f6f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.java
@@ -36,37 +36,37 @@
public class ArgumentsFloatFloatFloat {
public float inV;
- public Target.Floaty outCosptr;
+ public Target.Floaty outCos;
public Target.Floaty out;
}
private void checkSincosFloatFloatFloat() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb8748e13e46c48d4l, false);
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.set_gAllocOutCosptr(outCosptr);
+ script.set_gAllocOutCos(outCos);
script.forEach_testSincosFloatFloatFloat(inV, out);
- verifyResultsSincosFloatFloatFloat(inV, outCosptr, out, false);
+ verifyResultsSincosFloatFloatFloat(inV, outCos, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSincosFloatFloatFloat: " + e.toString());
}
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.set_gAllocOutCosptr(outCosptr);
+ scriptRelaxed.set_gAllocOutCos(outCos);
scriptRelaxed.forEach_testSincosFloatFloatFloat(inV, out);
- verifyResultsSincosFloatFloatFloat(inV, outCosptr, out, true);
+ verifyResultsSincosFloatFloatFloat(inV, outCos, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSincosFloatFloatFloat: " + e.toString());
}
}
- private void verifyResultsSincosFloatFloatFloat(Allocation inV, Allocation outCosptr, Allocation out, boolean relaxed) {
+ private void verifyResultsSincosFloatFloatFloat(Allocation inV, Allocation outCos, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 1];
inV.copyTo(arrayInV);
- float[] arrayOutCosptr = new float[INPUTSIZE * 1];
- outCosptr.copyTo(arrayOutCosptr);
+ float[] arrayOutCos = new float[INPUTSIZE * 1];
+ outCos.copyTo(arrayOutCos);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -79,7 +79,7 @@
CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 1 + j])) {
+ if (!args.outCos.couldBe(arrayOutCos[i * 1 + j])) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -91,13 +91,13 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outCosptr: ");
- message.append(args.outCosptr.toString());
+ message.append("Expected output outCos: ");
+ message.append(args.outCos.toString());
message.append("\n");
- message.append("Actual output outCosptr: ");
+ message.append("Actual output outCos: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutCosptr[i * 1 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 1 + j]), arrayOutCosptr[i * 1 + j]));
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 1 + j])) {
+ arrayOutCos[i * 1 + j], Float.floatToRawIntBits(arrayOutCos[i * 1 + j]), arrayOutCos[i * 1 + j]));
+ if (!args.outCos.couldBe(arrayOutCos[i * 1 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -121,30 +121,30 @@
private void checkSincosFloat2Float2Float2() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc85bab4e3e2fc77cl, false);
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.set_gAllocOutCosptr(outCosptr);
+ script.set_gAllocOutCos(outCos);
script.forEach_testSincosFloat2Float2Float2(inV, out);
- verifyResultsSincosFloat2Float2Float2(inV, outCosptr, out, false);
+ verifyResultsSincosFloat2Float2Float2(inV, outCos, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSincosFloat2Float2Float2: " + e.toString());
}
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.set_gAllocOutCosptr(outCosptr);
+ scriptRelaxed.set_gAllocOutCos(outCos);
scriptRelaxed.forEach_testSincosFloat2Float2Float2(inV, out);
- verifyResultsSincosFloat2Float2Float2(inV, outCosptr, out, true);
+ verifyResultsSincosFloat2Float2Float2(inV, outCos, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSincosFloat2Float2Float2: " + e.toString());
}
}
- private void verifyResultsSincosFloat2Float2Float2(Allocation inV, Allocation outCosptr, Allocation out, boolean relaxed) {
+ private void verifyResultsSincosFloat2Float2Float2(Allocation inV, Allocation outCos, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 2];
inV.copyTo(arrayInV);
- float[] arrayOutCosptr = new float[INPUTSIZE * 2];
- outCosptr.copyTo(arrayOutCosptr);
+ float[] arrayOutCos = new float[INPUTSIZE * 2];
+ outCos.copyTo(arrayOutCos);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -157,7 +157,7 @@
CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 2 + j])) {
+ if (!args.outCos.couldBe(arrayOutCos[i * 2 + j])) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -169,13 +169,13 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outCosptr: ");
- message.append(args.outCosptr.toString());
+ message.append("Expected output outCos: ");
+ message.append(args.outCos.toString());
message.append("\n");
- message.append("Actual output outCosptr: ");
+ message.append("Actual output outCos: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutCosptr[i * 2 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 2 + j]), arrayOutCosptr[i * 2 + j]));
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 2 + j])) {
+ arrayOutCos[i * 2 + j], Float.floatToRawIntBits(arrayOutCos[i * 2 + j]), arrayOutCos[i * 2 + j]));
+ if (!args.outCos.couldBe(arrayOutCos[i * 2 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -199,30 +199,30 @@
private void checkSincosFloat3Float3Float3() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1cc0896e400dc91dl, false);
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.set_gAllocOutCosptr(outCosptr);
+ script.set_gAllocOutCos(outCos);
script.forEach_testSincosFloat3Float3Float3(inV, out);
- verifyResultsSincosFloat3Float3Float3(inV, outCosptr, out, false);
+ verifyResultsSincosFloat3Float3Float3(inV, outCos, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSincosFloat3Float3Float3: " + e.toString());
}
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.set_gAllocOutCosptr(outCosptr);
+ scriptRelaxed.set_gAllocOutCos(outCos);
scriptRelaxed.forEach_testSincosFloat3Float3Float3(inV, out);
- verifyResultsSincosFloat3Float3Float3(inV, outCosptr, out, true);
+ verifyResultsSincosFloat3Float3Float3(inV, outCos, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSincosFloat3Float3Float3: " + e.toString());
}
}
- private void verifyResultsSincosFloat3Float3Float3(Allocation inV, Allocation outCosptr, Allocation out, boolean relaxed) {
+ private void verifyResultsSincosFloat3Float3Float3(Allocation inV, Allocation outCos, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 4];
inV.copyTo(arrayInV);
- float[] arrayOutCosptr = new float[INPUTSIZE * 4];
- outCosptr.copyTo(arrayOutCosptr);
+ float[] arrayOutCos = new float[INPUTSIZE * 4];
+ outCos.copyTo(arrayOutCos);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -235,7 +235,7 @@
CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
+ if (!args.outCos.couldBe(arrayOutCos[i * 4 + j])) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -247,13 +247,13 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outCosptr: ");
- message.append(args.outCosptr.toString());
+ message.append("Expected output outCos: ");
+ message.append(args.outCos.toString());
message.append("\n");
- message.append("Actual output outCosptr: ");
+ message.append("Actual output outCos: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutCosptr[i * 4 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 4 + j]), arrayOutCosptr[i * 4 + j]));
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
+ arrayOutCos[i * 4 + j], Float.floatToRawIntBits(arrayOutCos[i * 4 + j]), arrayOutCos[i * 4 + j]));
+ if (!args.outCos.couldBe(arrayOutCos[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -277,30 +277,30 @@
private void checkSincosFloat4Float4Float4() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x7125678e41ebcabel, false);
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.set_gAllocOutCosptr(outCosptr);
+ script.set_gAllocOutCos(outCos);
script.forEach_testSincosFloat4Float4Float4(inV, out);
- verifyResultsSincosFloat4Float4Float4(inV, outCosptr, out, false);
+ verifyResultsSincosFloat4Float4Float4(inV, outCos, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSincosFloat4Float4Float4: " + e.toString());
}
try {
- Allocation outCosptr = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
+ Allocation outCos = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.set_gAllocOutCosptr(outCosptr);
+ scriptRelaxed.set_gAllocOutCos(outCos);
scriptRelaxed.forEach_testSincosFloat4Float4Float4(inV, out);
- verifyResultsSincosFloat4Float4Float4(inV, outCosptr, out, true);
+ verifyResultsSincosFloat4Float4Float4(inV, outCos, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSincosFloat4Float4Float4: " + e.toString());
}
}
- private void verifyResultsSincosFloat4Float4Float4(Allocation inV, Allocation outCosptr, Allocation out, boolean relaxed) {
+ private void verifyResultsSincosFloat4Float4Float4(Allocation inV, Allocation outCos, Allocation out, boolean relaxed) {
float[] arrayInV = new float[INPUTSIZE * 4];
inV.copyTo(arrayInV);
- float[] arrayOutCosptr = new float[INPUTSIZE * 4];
- outCosptr.copyTo(arrayOutCosptr);
+ float[] arrayOutCos = new float[INPUTSIZE * 4];
+ outCos.copyTo(arrayOutCos);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
@@ -313,7 +313,7 @@
CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
+ if (!args.outCos.couldBe(arrayOutCos[i * 4 + j])) {
valid = false;
}
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -325,13 +325,13 @@
message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
- message.append("Expected output outCosptr: ");
- message.append(args.outCosptr.toString());
+ message.append("Expected output outCos: ");
+ message.append(args.outCos.toString());
message.append("\n");
- message.append("Actual output outCosptr: ");
+ message.append("Actual output outCos: ");
message.append(String.format("%14.8g {%8x} %15a",
- arrayOutCosptr[i * 4 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 4 + j]), arrayOutCosptr[i * 4 + j]));
- if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
+ arrayOutCos[i * 4 + j], Float.floatToRawIntBits(arrayOutCos[i * 4 + j]), arrayOutCos[i * 4 + j]));
+ if (!args.outCos.couldBe(arrayOutCos[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.rs
index 82ff9cd..8bad9df 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.rs
@@ -19,32 +19,32 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-rs_allocation gAllocOutCosptr;
+rs_allocation gAllocOutCos;
float __attribute__((kernel)) testSincosFloatFloatFloat(float inV, unsigned int x) {
- float outCosptr = 0;
- float out = sincos(inV, &outCosptr);
- rsSetElementAt_float(gAllocOutCosptr, outCosptr, x);
+ float outCos = 0;
+ float out = sincos(inV, &outCos);
+ rsSetElementAt_float(gAllocOutCos, outCos, x);
return out;
}
float2 __attribute__((kernel)) testSincosFloat2Float2Float2(float2 inV, unsigned int x) {
- float2 outCosptr = 0;
- float2 out = sincos(inV, &outCosptr);
- rsSetElementAt_float2(gAllocOutCosptr, outCosptr, x);
+ float2 outCos = 0;
+ float2 out = sincos(inV, &outCos);
+ rsSetElementAt_float2(gAllocOutCos, outCos, x);
return out;
}
float3 __attribute__((kernel)) testSincosFloat3Float3Float3(float3 inV, unsigned int x) {
- float3 outCosptr = 0;
- float3 out = sincos(inV, &outCosptr);
- rsSetElementAt_float3(gAllocOutCosptr, outCosptr, x);
+ float3 outCos = 0;
+ float3 out = sincos(inV, &outCos);
+ rsSetElementAt_float3(gAllocOutCos, outCos, x);
return out;
}
float4 __attribute__((kernel)) testSincosFloat4Float4Float4(float4 inV, unsigned int x) {
- float4 outCosptr = 0;
- float4 out = sincos(inV, &outCosptr);
- rsSetElementAt_float4(gAllocOutCosptr, outCosptr, x);
+ float4 outCos = 0;
+ float4 out = sincos(inV, &outCos);
+ rsSetElementAt_float4(gAllocOutCos, outCos, x);
return out;
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.java
index 1ebcba2..3294a8b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkSinhFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x541c2eef0a5d2ff1l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x20bbe226bda70dd1l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testSinhFloatFloat(in, out);
- verifyResultsSinhFloatFloat(in, out, false);
+ script.forEach_testSinhFloatFloat(inV, out);
+ verifyResultsSinhFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testSinhFloatFloat(in, out);
- verifyResultsSinhFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testSinhFloatFloat(inV, out);
+ verifyResultsSinhFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinhFloatFloat: " + e.toString());
}
}
- private void verifyResultsSinhFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsSinhFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSinh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkSinhFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x7f8e1e7d8c47bec5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x6cdf1f16900d0b6dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testSinhFloat2Float2(in, out);
- verifyResultsSinhFloat2Float2(in, out, false);
+ script.forEach_testSinhFloat2Float2(inV, out);
+ verifyResultsSinhFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testSinhFloat2Float2(in, out);
- verifyResultsSinhFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testSinhFloat2Float2(inV, out);
+ verifyResultsSinhFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsSinhFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsSinhFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSinh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkSinhFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x7f8e291eeb4e545fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x6ce0e83186282c4bl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testSinhFloat3Float3(in, out);
- verifyResultsSinhFloat3Float3(in, out, false);
+ script.forEach_testSinhFloat3Float3(inV, out);
+ verifyResultsSinhFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testSinhFloat3Float3(in, out);
- verifyResultsSinhFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testSinhFloat3Float3(inV, out);
+ verifyResultsSinhFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsSinhFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsSinhFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSinh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkSinhFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x7f8e33c04a54e9f9l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x6ce2b14c7c434d29l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testSinhFloat4Float4(in, out);
- verifyResultsSinhFloat4Float4(in, out, false);
+ script.forEach_testSinhFloat4Float4(inV, out);
+ verifyResultsSinhFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testSinhFloat4Float4(in, out);
- verifyResultsSinhFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testSinhFloat4Float4(inV, out);
+ verifyResultsSinhFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsSinhFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsSinhFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSinh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.rs
index bd94f0d..1624bd2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testSinhFloatFloat(float in) {
- return sinh(in);
+float __attribute__((kernel)) testSinhFloatFloat(float inV) {
+ return sinh(inV);
}
-float2 __attribute__((kernel)) testSinhFloat2Float2(float2 in) {
- return sinh(in);
+float2 __attribute__((kernel)) testSinhFloat2Float2(float2 inV) {
+ return sinh(inV);
}
-float3 __attribute__((kernel)) testSinhFloat3Float3(float3 in) {
- return sinh(in);
+float3 __attribute__((kernel)) testSinhFloat3Float3(float3 inV) {
+ return sinh(inV);
}
-float4 __attribute__((kernel)) testSinhFloat4Float4(float4 in) {
- return sinh(in);
+float4 __attribute__((kernel)) testSinhFloat4Float4(float4 inV) {
+ return sinh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.java
index 2df09b8..8243d01 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkSinpiFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x34cb59f49416da82l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xde281c14dfd6b42cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testSinpiFloatFloat(in, out);
- verifyResultsSinpiFloatFloat(in, out, false);
+ script.forEach_testSinpiFloatFloat(inV, out);
+ verifyResultsSinpiFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinpiFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testSinpiFloatFloat(in, out);
- verifyResultsSinpiFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testSinpiFloatFloat(inV, out);
+ verifyResultsSinpiFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinpiFloatFloat: " + e.toString());
}
}
- private void verifyResultsSinpiFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsSinpiFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSinpi(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkSinpiFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x50bbd97d4a48b00el, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8f8d880b7a3592b0l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testSinpiFloat2Float2(in, out);
- verifyResultsSinpiFloat2Float2(in, out, false);
+ script.forEach_testSinpiFloat2Float2(inV, out);
+ verifyResultsSinpiFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinpiFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testSinpiFloat2Float2(in, out);
- verifyResultsSinpiFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testSinpiFloat2Float2(inV, out);
+ verifyResultsSinpiFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinpiFloat2Float2: " + e.toString());
}
}
- private void verifyResultsSinpiFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsSinpiFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSinpi(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkSinpiFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x50bbe41ea94f45a8l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8f8f51267050b38el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testSinpiFloat3Float3(in, out);
- verifyResultsSinpiFloat3Float3(in, out, false);
+ script.forEach_testSinpiFloat3Float3(inV, out);
+ verifyResultsSinpiFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinpiFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testSinpiFloat3Float3(in, out);
- verifyResultsSinpiFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testSinpiFloat3Float3(inV, out);
+ verifyResultsSinpiFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinpiFloat3Float3: " + e.toString());
}
}
- private void verifyResultsSinpiFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsSinpiFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSinpi(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkSinpiFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x50bbeec00855db42l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8f911a41666bd46cl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testSinpiFloat4Float4(in, out);
- verifyResultsSinpiFloat4Float4(in, out, false);
+ script.forEach_testSinpiFloat4Float4(inV, out);
+ verifyResultsSinpiFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinpiFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testSinpiFloat4Float4(in, out);
- verifyResultsSinpiFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testSinpiFloat4Float4(inV, out);
+ verifyResultsSinpiFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSinpiFloat4Float4: " + e.toString());
}
}
- private void verifyResultsSinpiFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsSinpiFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSinpi(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.rs
index 367040e..9ebbb05 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testSinpiFloatFloat(float in) {
- return sinpi(in);
+float __attribute__((kernel)) testSinpiFloatFloat(float inV) {
+ return sinpi(inV);
}
-float2 __attribute__((kernel)) testSinpiFloat2Float2(float2 in) {
- return sinpi(in);
+float2 __attribute__((kernel)) testSinpiFloat2Float2(float2 inV) {
+ return sinpi(inV);
}
-float3 __attribute__((kernel)) testSinpiFloat3Float3(float3 in) {
- return sinpi(in);
+float3 __attribute__((kernel)) testSinpiFloat3Float3(float3 inV) {
+ return sinpi(inV);
}
-float4 __attribute__((kernel)) testSinpiFloat4Float4(float4 in) {
- return sinpi(in);
+float4 __attribute__((kernel)) testSinpiFloat4Float4(float4 inV) {
+ return sinpi(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.java
index 4537c3d..1d9b55e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkSqrtFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x940922bedb2c9271l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xdd88d60ed07c9951l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testSqrtFloatFloat(in, out);
- verifyResultsSqrtFloatFloat(in, out, false);
+ script.forEach_testSqrtFloatFloat(inV, out);
+ verifyResultsSqrtFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSqrtFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testSqrtFloatFloat(in, out);
- verifyResultsSqrtFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testSqrtFloatFloat(inV, out);
+ verifyResultsSqrtFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSqrtFloatFloat: " + e.toString());
}
}
- private void verifyResultsSqrtFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsSqrtFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSqrt(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkSqrtFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x35fb1678b6262d45l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x112cc64698699aedl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testSqrtFloat2Float2(in, out);
- verifyResultsSqrtFloat2Float2(in, out, false);
+ script.forEach_testSqrtFloat2Float2(inV, out);
+ verifyResultsSqrtFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSqrtFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testSqrtFloat2Float2(in, out);
- verifyResultsSqrtFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testSqrtFloat2Float2(inV, out);
+ verifyResultsSqrtFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSqrtFloat2Float2: " + e.toString());
}
}
- private void verifyResultsSqrtFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsSqrtFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSqrt(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkSqrtFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x35fb211a152cc2dfl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x112e8f618e84bbcbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testSqrtFloat3Float3(in, out);
- verifyResultsSqrtFloat3Float3(in, out, false);
+ script.forEach_testSqrtFloat3Float3(inV, out);
+ verifyResultsSqrtFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSqrtFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testSqrtFloat3Float3(in, out);
- verifyResultsSqrtFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testSqrtFloat3Float3(inV, out);
+ verifyResultsSqrtFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSqrtFloat3Float3: " + e.toString());
}
}
- private void verifyResultsSqrtFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsSqrtFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSqrt(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkSqrtFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x35fb2bbb74335879l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x1130587c849fdca9l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testSqrtFloat4Float4(in, out);
- verifyResultsSqrtFloat4Float4(in, out, false);
+ script.forEach_testSqrtFloat4Float4(inV, out);
+ verifyResultsSqrtFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSqrtFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testSqrtFloat4Float4(in, out);
- verifyResultsSqrtFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testSqrtFloat4Float4(inV, out);
+ verifyResultsSqrtFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testSqrtFloat4Float4: " + e.toString());
}
}
- private void verifyResultsSqrtFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsSqrtFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeSqrt(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.rs
index f1c163b..dfae82a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testSqrtFloatFloat(float in) {
- return sqrt(in);
+float __attribute__((kernel)) testSqrtFloatFloat(float inV) {
+ return sqrt(inV);
}
-float2 __attribute__((kernel)) testSqrtFloat2Float2(float2 in) {
- return sqrt(in);
+float2 __attribute__((kernel)) testSqrtFloat2Float2(float2 inV) {
+ return sqrt(inV);
}
-float3 __attribute__((kernel)) testSqrtFloat3Float3(float3 in) {
- return sqrt(in);
+float3 __attribute__((kernel)) testSqrtFloat3Float3(float3 inV) {
+ return sqrt(inV);
}
-float4 __attribute__((kernel)) testSqrtFloat4Float4(float4 in) {
- return sqrt(in);
+float4 __attribute__((kernel)) testSqrtFloat4Float4(float4 inV) {
+ return sqrt(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTan.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTan.java
index 29dae6f..152cc45 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTan.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkTanFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xfb95a6a791c2b8eal, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x4222fe257bb50fa4l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testTanFloatFloat(in, out);
- verifyResultsTanFloatFloat(in, out, false);
+ script.forEach_testTanFloatFloat(inV, out);
+ verifyResultsTanFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testTanFloatFloat(in, out);
- verifyResultsTanFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testTanFloatFloat(inV, out);
+ verifyResultsTanFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanFloatFloat: " + e.toString());
}
}
- private void verifyResultsTanFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsTanFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTan(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkTanFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x1bdfd24778a20d36l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xae98520143383868l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testTanFloat2Float2(in, out);
- verifyResultsTanFloat2Float2(in, out, false);
+ script.forEach_testTanFloat2Float2(inV, out);
+ verifyResultsTanFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testTanFloat2Float2(in, out);
- verifyResultsTanFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testTanFloat2Float2(inV, out);
+ verifyResultsTanFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanFloat2Float2: " + e.toString());
}
}
- private void verifyResultsTanFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsTanFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTan(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkTanFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x1bdfdce8d7a8a2d0l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xae9a1b1c39535946l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testTanFloat3Float3(in, out);
- verifyResultsTanFloat3Float3(in, out, false);
+ script.forEach_testTanFloat3Float3(inV, out);
+ verifyResultsTanFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testTanFloat3Float3(in, out);
- verifyResultsTanFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testTanFloat3Float3(inV, out);
+ verifyResultsTanFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanFloat3Float3: " + e.toString());
}
}
- private void verifyResultsTanFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTanFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTan(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkTanFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x1bdfe78a36af386al, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xae9be4372f6e7a24l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testTanFloat4Float4(in, out);
- verifyResultsTanFloat4Float4(in, out, false);
+ script.forEach_testTanFloat4Float4(inV, out);
+ verifyResultsTanFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testTanFloat4Float4(in, out);
- verifyResultsTanFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testTanFloat4Float4(inV, out);
+ verifyResultsTanFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanFloat4Float4: " + e.toString());
}
}
- private void verifyResultsTanFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTanFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTan(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTan.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestTan.rs
index 1024943..4190d54 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTan.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTan.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testTanFloatFloat(float in) {
- return tan(in);
+float __attribute__((kernel)) testTanFloatFloat(float inV) {
+ return tan(inV);
}
-float2 __attribute__((kernel)) testTanFloat2Float2(float2 in) {
- return tan(in);
+float2 __attribute__((kernel)) testTanFloat2Float2(float2 inV) {
+ return tan(inV);
}
-float3 __attribute__((kernel)) testTanFloat3Float3(float3 in) {
- return tan(in);
+float3 __attribute__((kernel)) testTanFloat3Float3(float3 inV) {
+ return tan(inV);
}
-float4 __attribute__((kernel)) testTanFloat4Float4(float4 in) {
- return tan(in);
+float4 __attribute__((kernel)) testTanFloat4Float4(float4 inV) {
+ return tan(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.java
index e554ad8..a3abc1e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkTanhFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xfe01ab34a2d2226cl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xaa47c1d7594bc87al, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testTanhFloatFloat(in, out);
- verifyResultsTanhFloatFloat(in, out, false);
+ script.forEach_testTanhFloatFloat(inV, out);
+ verifyResultsTanhFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testTanhFloatFloat(in, out);
- verifyResultsTanhFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testTanhFloatFloat(inV, out);
+ verifyResultsTanhFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanhFloatFloat: " + e.toString());
}
}
- private void verifyResultsTanhFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsTanhFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTanh(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkTanhFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x9a0cb127b0f31928l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xe021c1aab8d53a0el, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testTanhFloat2Float2(in, out);
- verifyResultsTanhFloat2Float2(in, out, false);
+ script.forEach_testTanhFloat2Float2(inV, out);
+ verifyResultsTanhFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testTanhFloat2Float2(in, out);
- verifyResultsTanhFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testTanhFloat2Float2(inV, out);
+ verifyResultsTanhFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsTanhFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsTanhFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTanh(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkTanhFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x9a0cbbc90ff9aec2l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe0238ac5aef05aecl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testTanhFloat3Float3(in, out);
- verifyResultsTanhFloat3Float3(in, out, false);
+ script.forEach_testTanhFloat3Float3(inV, out);
+ verifyResultsTanhFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testTanhFloat3Float3(in, out);
- verifyResultsTanhFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testTanhFloat3Float3(inV, out);
+ verifyResultsTanhFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsTanhFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTanhFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTanh(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkTanhFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x9a0cc66a6f00445cl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe02553e0a50b7bcal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testTanhFloat4Float4(in, out);
- verifyResultsTanhFloat4Float4(in, out, false);
+ script.forEach_testTanhFloat4Float4(inV, out);
+ verifyResultsTanhFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testTanhFloat4Float4(in, out);
- verifyResultsTanhFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testTanhFloat4Float4(inV, out);
+ verifyResultsTanhFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsTanhFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTanhFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTanh(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.rs
index a017c2b..5855222 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testTanhFloatFloat(float in) {
- return tanh(in);
+float __attribute__((kernel)) testTanhFloatFloat(float inV) {
+ return tanh(inV);
}
-float2 __attribute__((kernel)) testTanhFloat2Float2(float2 in) {
- return tanh(in);
+float2 __attribute__((kernel)) testTanhFloat2Float2(float2 inV) {
+ return tanh(inV);
}
-float3 __attribute__((kernel)) testTanhFloat3Float3(float3 in) {
- return tanh(in);
+float3 __attribute__((kernel)) testTanhFloat3Float3(float3 inV) {
+ return tanh(inV);
}
-float4 __attribute__((kernel)) testTanhFloat4Float4(float4 in) {
- return tanh(in);
+float4 __attribute__((kernel)) testTanhFloat4Float4(float4 inV) {
+ return tanh(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.java
index 5e45440..9c7f782 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkTanpiFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xbe5739a52fbb952bl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xf8a6aebf04820e8fl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testTanpiFloatFloat(in, out);
- verifyResultsTanpiFloatFloat(in, out, false);
+ script.forEach_testTanpiFloatFloat(inV, out);
+ verifyResultsTanpiFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanpiFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testTanpiFloatFloat(in, out);
- verifyResultsTanpiFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testTanpiFloatFloat(inV, out);
+ verifyResultsTanpiFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanpiFloatFloat: " + e.toString());
}
}
- private void verifyResultsTanpiFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsTanpiFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTanpi(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkTanpiFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xc3fe7c117310deafl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xebbed6ee53d567bbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testTanpiFloat2Float2(in, out);
- verifyResultsTanpiFloat2Float2(in, out, false);
+ script.forEach_testTanpiFloat2Float2(inV, out);
+ verifyResultsTanpiFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanpiFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testTanpiFloat2Float2(in, out);
- verifyResultsTanpiFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testTanpiFloat2Float2(inV, out);
+ verifyResultsTanpiFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanpiFloat2Float2: " + e.toString());
}
}
- private void verifyResultsTanpiFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsTanpiFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTanpi(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkTanpiFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xc3fe86b2d2177449l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xebc0a00949f08899l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testTanpiFloat3Float3(in, out);
- verifyResultsTanpiFloat3Float3(in, out, false);
+ script.forEach_testTanpiFloat3Float3(inV, out);
+ verifyResultsTanpiFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanpiFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testTanpiFloat3Float3(in, out);
- verifyResultsTanpiFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testTanpiFloat3Float3(inV, out);
+ verifyResultsTanpiFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanpiFloat3Float3: " + e.toString());
}
}
- private void verifyResultsTanpiFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTanpiFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTanpi(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkTanpiFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xc3fe9154311e09e3l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xebc26924400ba977l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testTanpiFloat4Float4(in, out);
- verifyResultsTanpiFloat4Float4(in, out, false);
+ script.forEach_testTanpiFloat4Float4(inV, out);
+ verifyResultsTanpiFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanpiFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testTanpiFloat4Float4(in, out);
- verifyResultsTanpiFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testTanpiFloat4Float4(inV, out);
+ verifyResultsTanpiFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTanpiFloat4Float4: " + e.toString());
}
}
- private void verifyResultsTanpiFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTanpiFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTanpi(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.rs
index 883a571..2fa56e2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testTanpiFloatFloat(float in) {
- return tanpi(in);
+float __attribute__((kernel)) testTanpiFloatFloat(float inV) {
+ return tanpi(inV);
}
-float2 __attribute__((kernel)) testTanpiFloat2Float2(float2 in) {
- return tanpi(in);
+float2 __attribute__((kernel)) testTanpiFloat2Float2(float2 inV) {
+ return tanpi(inV);
}
-float3 __attribute__((kernel)) testTanpiFloat3Float3(float3 in) {
- return tanpi(in);
+float3 __attribute__((kernel)) testTanpiFloat3Float3(float3 inV) {
+ return tanpi(inV);
}
-float4 __attribute__((kernel)) testTanpiFloat4Float4(float4 in) {
- return tanpi(in);
+float4 __attribute__((kernel)) testTanpiFloat4Float4(float4 inV) {
+ return tanpi(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.java
index c7bb7b5..d04a67f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkTgammaFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe45f5203be15b490l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x5c02c6a0eda55486l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testTgammaFloatFloat(in, out);
- verifyResultsTgammaFloatFloat(in, out, false);
+ script.forEach_testTgammaFloatFloat(inV, out);
+ verifyResultsTgammaFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTgammaFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testTgammaFloatFloat(in, out);
- verifyResultsTgammaFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testTgammaFloatFloat(inV, out);
+ verifyResultsTgammaFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTgammaFloatFloat: " + e.toString());
}
}
- private void verifyResultsTgammaFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsTgammaFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTgamma(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkTgammaFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x74767f039bfd9f2cl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8fe7559b3399bcbal, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testTgammaFloat2Float2(in, out);
- verifyResultsTgammaFloat2Float2(in, out, false);
+ script.forEach_testTgammaFloat2Float2(inV, out);
+ verifyResultsTgammaFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTgammaFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testTgammaFloat2Float2(in, out);
- verifyResultsTgammaFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testTgammaFloat2Float2(inV, out);
+ verifyResultsTgammaFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTgammaFloat2Float2: " + e.toString());
}
}
- private void verifyResultsTgammaFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsTgammaFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTgamma(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkTgammaFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x747689a4fb0434c6l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8fe91eb629b4dd98l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testTgammaFloat3Float3(in, out);
- verifyResultsTgammaFloat3Float3(in, out, false);
+ script.forEach_testTgammaFloat3Float3(inV, out);
+ verifyResultsTgammaFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTgammaFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testTgammaFloat3Float3(in, out);
- verifyResultsTgammaFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testTgammaFloat3Float3(inV, out);
+ verifyResultsTgammaFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTgammaFloat3Float3: " + e.toString());
}
}
- private void verifyResultsTgammaFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTgammaFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTgamma(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkTgammaFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x747694465a0aca60l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8feae7d11fcffe76l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testTgammaFloat4Float4(in, out);
- verifyResultsTgammaFloat4Float4(in, out, false);
+ script.forEach_testTgammaFloat4Float4(inV, out);
+ verifyResultsTgammaFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTgammaFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testTgammaFloat4Float4(in, out);
- verifyResultsTgammaFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testTgammaFloat4Float4(inV, out);
+ verifyResultsTgammaFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTgammaFloat4Float4: " + e.toString());
}
}
- private void verifyResultsTgammaFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTgammaFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTgamma(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.rs
index 7dae4cf..b27b7d4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testTgammaFloatFloat(float in) {
- return tgamma(in);
+float __attribute__((kernel)) testTgammaFloatFloat(float inV) {
+ return tgamma(inV);
}
-float2 __attribute__((kernel)) testTgammaFloat2Float2(float2 in) {
- return tgamma(in);
+float2 __attribute__((kernel)) testTgammaFloat2Float2(float2 inV) {
+ return tgamma(inV);
}
-float3 __attribute__((kernel)) testTgammaFloat3Float3(float3 in) {
- return tgamma(in);
+float3 __attribute__((kernel)) testTgammaFloat3Float3(float3 inV) {
+ return tgamma(inV);
}
-float4 __attribute__((kernel)) testTgammaFloat4Float4(float4 in) {
- return tgamma(in);
+float4 __attribute__((kernel)) testTgammaFloat4Float4(float4 inV) {
+ return tgamma(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.java
index 0657844..c89bcf2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.java
@@ -35,38 +35,38 @@
}
public class ArgumentsFloatFloat {
- public float in;
+ public float inV;
public Target.Floaty out;
}
private void checkTruncFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x6361d71a4dcff881l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb16f216b11eebe01l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testTruncFloatFloat(in, out);
- verifyResultsTruncFloatFloat(in, out, false);
+ script.forEach_testTruncFloatFloat(inV, out);
+ verifyResultsTruncFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTruncFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testTruncFloatFloat(in, out);
- verifyResultsTruncFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testTruncFloatFloat(inV, out);
+ verifyResultsTruncFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTruncFloatFloat: " + e.toString());
}
}
- private void verifyResultsTruncFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsTruncFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTrunc(args, target);
@@ -77,9 +77,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -99,33 +99,33 @@
}
private void checkTruncFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xcda9bef7b45256d5l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8b83139b49d4961dl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testTruncFloat2Float2(in, out);
- verifyResultsTruncFloat2Float2(in, out, false);
+ script.forEach_testTruncFloat2Float2(inV, out);
+ verifyResultsTruncFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTruncFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testTruncFloat2Float2(in, out);
- verifyResultsTruncFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testTruncFloat2Float2(inV, out);
+ verifyResultsTruncFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTruncFloat2Float2: " + e.toString());
}
}
- private void verifyResultsTruncFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsTruncFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTrunc(args, target);
@@ -136,9 +136,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -158,33 +158,33 @@
}
private void checkTruncFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xcda9c9991358ec6fl, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8b84dcb63fefb6fbl, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testTruncFloat3Float3(in, out);
- verifyResultsTruncFloat3Float3(in, out, false);
+ script.forEach_testTruncFloat3Float3(inV, out);
+ verifyResultsTruncFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTruncFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testTruncFloat3Float3(in, out);
- verifyResultsTruncFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testTruncFloat3Float3(inV, out);
+ verifyResultsTruncFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTruncFloat3Float3: " + e.toString());
}
}
- private void verifyResultsTruncFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTruncFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTrunc(args, target);
@@ -195,9 +195,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
@@ -217,33 +217,33 @@
}
private void checkTruncFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xcda9d43a725f8209l, false);
+ Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8b86a5d1360ad7d9l, false);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testTruncFloat4Float4(in, out);
- verifyResultsTruncFloat4Float4(in, out, false);
+ script.forEach_testTruncFloat4Float4(inV, out);
+ verifyResultsTruncFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTruncFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testTruncFloat4Float4(in, out);
- verifyResultsTruncFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testTruncFloat4Float4(inV, out);
+ verifyResultsTruncFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testTruncFloat4Float4: " + e.toString());
}
}
- private void verifyResultsTruncFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsTruncFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
Target target = new Target(relaxed);
CoreMathVerifier.computeTrunc(args, target);
@@ -254,9 +254,9 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
+ message.append("Input inV: ");
message.append(String.format("%14.8g {%8x} %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.rs b/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.rs
index 2422ae4..89d959e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testTruncFloatFloat(float in) {
- return trunc(in);
+float __attribute__((kernel)) testTruncFloatFloat(float inV) {
+ return trunc(inV);
}
-float2 __attribute__((kernel)) testTruncFloat2Float2(float2 in) {
- return trunc(in);
+float2 __attribute__((kernel)) testTruncFloat2Float2(float2 inV) {
+ return trunc(inV);
}
-float3 __attribute__((kernel)) testTruncFloat3Float3(float3 in) {
- return trunc(in);
+float3 __attribute__((kernel)) testTruncFloat3Float3(float3 inV) {
+ return trunc(inV);
}
-float4 __attribute__((kernel)) testTruncFloat4Float4(float4 in) {
- return trunc(in);
+float4 __attribute__((kernel)) testTruncFloat4Float4(float4 inV) {
+ return trunc(inV);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/intrinsic_resize.rs b/tests/tests/renderscript/src/android/renderscript/cts/intrinsic_resize.rs
index fa8c8dd..ccdf42f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/intrinsic_resize.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/intrinsic_resize.rs
@@ -242,3 +242,203 @@
return (uchar)p;
}
+float4 __attribute__((kernel)) bicubic_F4(uint32_t x, uint32_t y) {
+ float xf = (x + 0.5f) * scaleX - 0.5f;
+ float yf = (y + 0.5f) * scaleY - 0.5f;
+
+ int startx = (int) floor(xf - 1);
+ int starty = (int) floor(yf - 1);
+ xf = xf - floor(xf);
+ yf = yf - floor(yf);
+ int maxx = gWidthIn - 1;
+ int maxy = gHeightIn - 1;
+
+ uint32_t xs0 = (uint32_t) max(0, startx + 0);
+ uint32_t xs1 = (uint32_t) max(0, startx + 1);
+ uint32_t xs2 = (uint32_t) min(maxx, startx + 2);
+ uint32_t xs3 = (uint32_t) min(maxx, startx + 3);
+
+ uint32_t ys0 = (uint32_t) max(0, starty + 0);
+ uint32_t ys1 = (uint32_t) max(0, starty + 1);
+ uint32_t ys2 = (uint32_t) min(maxy, starty + 2);
+ uint32_t ys3 = (uint32_t) min(maxy, starty + 3);
+
+ float4 p00 = rsGetElementAt_float4(gIn, xs0, ys0);
+ float4 p01 = rsGetElementAt_float4(gIn, xs1, ys0);
+ float4 p02 = rsGetElementAt_float4(gIn, xs2, ys0);
+ float4 p03 = rsGetElementAt_float4(gIn, xs3, ys0);
+ float4 p0 = cubicInterpolate_F4(p00, p01, p02, p03, xf);
+
+ float4 p10 = rsGetElementAt_float4(gIn, xs0, ys1);
+ float4 p11 = rsGetElementAt_float4(gIn, xs1, ys1);
+ float4 p12 = rsGetElementAt_float4(gIn, xs2, ys1);
+ float4 p13 = rsGetElementAt_float4(gIn, xs3, ys1);
+ float4 p1 = cubicInterpolate_F4(p10, p11, p12, p13, xf);
+
+ float4 p20 = rsGetElementAt_float4(gIn, xs0, ys2);
+ float4 p21 = rsGetElementAt_float4(gIn, xs1, ys2);
+ float4 p22 = rsGetElementAt_float4(gIn, xs2, ys2);
+ float4 p23 = rsGetElementAt_float4(gIn, xs3, ys2);
+ float4 p2 = cubicInterpolate_F4(p20, p21, p22, p23, xf);
+
+ float4 p30 = rsGetElementAt_float4(gIn, xs0, ys3);
+ float4 p31 = rsGetElementAt_float4(gIn, xs1, ys3);
+ float4 p32 = rsGetElementAt_float4(gIn, xs2, ys3);
+ float4 p33 = rsGetElementAt_float4(gIn, xs3, ys3);
+ float4 p3 = cubicInterpolate_F4(p30, p31, p32, p33, xf);
+
+ float4 p = cubicInterpolate_F4(p0, p1, p2, p3, yf);
+
+ return p;
+}
+
+float3 __attribute__((kernel)) bicubic_F3(uint32_t x, uint32_t y) {
+ float xf = (x + 0.5f) * scaleX - 0.5f;
+ float yf = (y + 0.5f) * scaleY - 0.5f;
+
+ int startx = (int) floor(xf - 1);
+ int starty = (int) floor(yf - 1);
+ xf = xf - floor(xf);
+ yf = yf - floor(yf);
+ int maxx = gWidthIn - 1;
+ int maxy = gHeightIn - 1;
+
+ uint32_t xs0 = (uint32_t) max(0, startx + 0);
+ uint32_t xs1 = (uint32_t) max(0, startx + 1);
+ uint32_t xs2 = (uint32_t) min(maxx, startx + 2);
+ uint32_t xs3 = (uint32_t) min(maxx, startx + 3);
+
+ uint32_t ys0 = (uint32_t) max(0, starty + 0);
+ uint32_t ys1 = (uint32_t) max(0, starty + 1);
+ uint32_t ys2 = (uint32_t) min(maxy, starty + 2);
+ uint32_t ys3 = (uint32_t) min(maxy, starty + 3);
+
+ float3 p00 = rsGetElementAt_float3(gIn, xs0, ys0);
+ float3 p01 = rsGetElementAt_float3(gIn, xs1, ys0);
+ float3 p02 = rsGetElementAt_float3(gIn, xs2, ys0);
+ float3 p03 = rsGetElementAt_float3(gIn, xs3, ys0);
+ float3 p0 = cubicInterpolate_F3(p00, p01, p02, p03, xf);
+
+ float3 p10 = rsGetElementAt_float3(gIn, xs0, ys1);
+ float3 p11 = rsGetElementAt_float3(gIn, xs1, ys1);
+ float3 p12 = rsGetElementAt_float3(gIn, xs2, ys1);
+ float3 p13 = rsGetElementAt_float3(gIn, xs3, ys1);
+ float3 p1 = cubicInterpolate_F3(p10, p11, p12, p13, xf);
+
+ float3 p20 = rsGetElementAt_float3(gIn, xs0, ys2);
+ float3 p21 = rsGetElementAt_float3(gIn, xs1, ys2);
+ float3 p22 = rsGetElementAt_float3(gIn, xs2, ys2);
+ float3 p23 = rsGetElementAt_float3(gIn, xs3, ys2);
+ float3 p2 = cubicInterpolate_F3(p20, p21, p22, p23, xf);
+
+ float3 p30 = rsGetElementAt_float3(gIn, xs0, ys3);
+ float3 p31 = rsGetElementAt_float3(gIn, xs1, ys3);
+ float3 p32 = rsGetElementAt_float3(gIn, xs2, ys3);
+ float3 p33 = rsGetElementAt_float3(gIn, xs3, ys3);
+ float3 p3 = cubicInterpolate_F3(p30, p31, p32, p33, xf);
+
+ float3 p = cubicInterpolate_F3(p0, p1, p2, p3, yf);
+
+ return p;
+}
+
+float2 __attribute__((kernel)) bicubic_F2(uint32_t x, uint32_t y) {
+ float xf = (x + 0.5f) * scaleX - 0.5f;
+ float yf = (y + 0.5f) * scaleY - 0.5f;
+
+ int startx = (int) floor(xf - 1);
+ int starty = (int) floor(yf - 1);
+ xf = xf - floor(xf);
+ yf = yf - floor(yf);
+ int maxx = gWidthIn - 1;
+ int maxy = gHeightIn - 1;
+
+ uint32_t xs0 = (uint32_t) max(0, startx + 0);
+ uint32_t xs1 = (uint32_t) max(0, startx + 1);
+ uint32_t xs2 = (uint32_t) min(maxx, startx + 2);
+ uint32_t xs3 = (uint32_t) min(maxx, startx + 3);
+
+ uint32_t ys0 = (uint32_t) max(0, starty + 0);
+ uint32_t ys1 = (uint32_t) max(0, starty + 1);
+ uint32_t ys2 = (uint32_t) min(maxy, starty + 2);
+ uint32_t ys3 = (uint32_t) min(maxy, starty + 3);
+
+ float2 p00 = rsGetElementAt_float2(gIn, xs0, ys0);
+ float2 p01 = rsGetElementAt_float2(gIn, xs1, ys0);
+ float2 p02 = rsGetElementAt_float2(gIn, xs2, ys0);
+ float2 p03 = rsGetElementAt_float2(gIn, xs3, ys0);
+ float2 p0 = cubicInterpolate_F2(p00, p01, p02, p03, xf);
+
+ float2 p10 = rsGetElementAt_float2(gIn, xs0, ys1);
+ float2 p11 = rsGetElementAt_float2(gIn, xs1, ys1);
+ float2 p12 = rsGetElementAt_float2(gIn, xs2, ys1);
+ float2 p13 = rsGetElementAt_float2(gIn, xs3, ys1);
+ float2 p1 = cubicInterpolate_F2(p10, p11, p12, p13, xf);
+
+ float2 p20 = rsGetElementAt_float2(gIn, xs0, ys2);
+ float2 p21 = rsGetElementAt_float2(gIn, xs1, ys2);
+ float2 p22 = rsGetElementAt_float2(gIn, xs2, ys2);
+ float2 p23 = rsGetElementAt_float2(gIn, xs3, ys2);
+ float2 p2 = cubicInterpolate_F2(p20, p21, p22, p23, xf);
+
+ float2 p30 = rsGetElementAt_float2(gIn, xs0, ys3);
+ float2 p31 = rsGetElementAt_float2(gIn, xs1, ys3);
+ float2 p32 = rsGetElementAt_float2(gIn, xs2, ys3);
+ float2 p33 = rsGetElementAt_float2(gIn, xs3, ys3);
+ float2 p3 = cubicInterpolate_F2(p30, p31, p32, p33, xf);
+
+ float2 p = cubicInterpolate_F2(p0, p1, p2, p3, yf);
+
+ return p;
+}
+
+float __attribute__((kernel)) bicubic_F1(uint32_t x, uint32_t y) {
+ float xf = (x + 0.5f) * scaleX - 0.5f;
+ float yf = (y + 0.5f) * scaleY - 0.5f;
+
+ int startx = (int) floor(xf - 1);
+ int starty = (int) floor(yf - 1);
+ xf = xf - floor(xf);
+ yf = yf - floor(yf);
+ int maxx = gWidthIn - 1;
+ int maxy = gHeightIn - 1;
+
+ uint32_t xs0 = (uint32_t) max(0, startx + 0);
+ uint32_t xs1 = (uint32_t) max(0, startx + 1);
+ uint32_t xs2 = (uint32_t) min(maxx, startx + 2);
+ uint32_t xs3 = (uint32_t) min(maxx, startx + 3);
+
+ uint32_t ys0 = (uint32_t) max(0, starty + 0);
+ uint32_t ys1 = (uint32_t) max(0, starty + 1);
+ uint32_t ys2 = (uint32_t) min(maxy, starty + 2);
+ uint32_t ys3 = (uint32_t) min(maxy, starty + 3);
+
+ float p00 = rsGetElementAt_float(gIn, xs0, ys0);
+ float p01 = rsGetElementAt_float(gIn, xs1, ys0);
+ float p02 = rsGetElementAt_float(gIn, xs2, ys0);
+ float p03 = rsGetElementAt_float(gIn, xs3, ys0);
+ float p0 = cubicInterpolate_F1(p00, p01, p02, p03, xf);
+
+ float p10 = rsGetElementAt_float(gIn, xs0, ys1);
+ float p11 = rsGetElementAt_float(gIn, xs1, ys1);
+ float p12 = rsGetElementAt_float(gIn, xs2, ys1);
+ float p13 = rsGetElementAt_float(gIn, xs3, ys1);
+ float p1 = cubicInterpolate_F1(p10, p11, p12, p13, xf);
+
+ float p20 = rsGetElementAt_float(gIn, xs0, ys2);
+ float p21 = rsGetElementAt_float(gIn, xs1, ys2);
+ float p22 = rsGetElementAt_float(gIn, xs2, ys2);
+ float p23 = rsGetElementAt_float(gIn, xs3, ys2);
+ float p2 = cubicInterpolate_F1(p20, p21, p22, p23, xf);
+
+ float p30 = rsGetElementAt_float(gIn, xs0, ys3);
+ float p31 = rsGetElementAt_float(gIn, xs1, ys3);
+ float p32 = rsGetElementAt_float(gIn, xs2, ys3);
+ float p33 = rsGetElementAt_float(gIn, xs3, ys3);
+ float p3 = cubicInterpolate_F1(p30, p31, p32, p33, xf);
+
+ float p = cubicInterpolate_F1(p0, p1, p2, p3, yf);
+
+ return p;
+}
+
diff --git a/tests/tests/rscpp/librscpptest/Android.mk b/tests/tests/rscpp/librscpptest/Android.mk
index 9813ba6..bc2f81e 100644
--- a/tests/tests/rscpp/librscpptest/Android.mk
+++ b/tests/tests/rscpp/librscpptest/Android.mk
@@ -17,6 +17,8 @@
#
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+LOCAL_CLANG := true
LOCAL_MODULE := librscpptest_jni
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := rs_jni.cpp rs_jni_allocation.cpp
@@ -25,10 +27,18 @@
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
LOCAL_C_INCLUDES += frameworks/rs/cpp
LOCAL_C_INCLUDES += frameworks/rs
-LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
LOCAL_SHARED_LIBRARIES := libdl liblog
-LOCAL_STATIC_LIBRARIES := libRScpp_static libstlport_static libcutils
+LOCAL_STATIC_LIBRARIES := libRScpp_static libcutils
+
+ifeq ($(my_32_64_bit_suffix),32)
+ LOCAL_SDK_VERSION := 8
+else
+ LOCAL_SDK_VERSION := 21
+endif
+
+LOCAL_NDK_STL_VARIANT := stlport_static
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/security/jni/android_security_cts_KernelSettingsTest.cpp b/tests/tests/security/jni/android_security_cts_KernelSettingsTest.cpp
index bab7b57..833d510 100644
--- a/tests/tests/security/jni/android_security_cts_KernelSettingsTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_KernelSettingsTest.cpp
@@ -22,8 +22,8 @@
static jboolean android_security_cts_KernelSettingsTest_supportsXattr(JNIEnv* env, jobject thiz)
{
- int result = getxattr("/system/bin/toolbox", "security.capability", NULL, 0);
- return ((result >= 0) || (errno == ENODATA));
+ int result = getxattr("/system/bin/cat", "security.capability", NULL, 0);
+ return (result != -1);
}
static JNINativeMethod gMethods[] = {
diff --git a/tests/tests/security/jni/android_security_cts_NativeCodeTest.cpp b/tests/tests/security/jni/android_security_cts_NativeCodeTest.cpp
index faa6eea..9553983 100644
--- a/tests/tests/security/jni/android_security_cts_NativeCodeTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_NativeCodeTest.cpp
@@ -16,10 +16,6 @@
#include <jni.h>
#include <linux/futex.h>
-#include <linux/netlink.h>
-#include <linux/sock_diag.h>
-#include <stdio.h>
-#include <sys/socket.h>
#include <sys/types.h>
#include <sys/syscall.h>
#include <unistd.h>
@@ -38,9 +34,6 @@
#include <inttypes.h>
#include <linux/sysctl.h>
-#define PASSED 0
-#define UNKNOWN_ERROR -1
-
/*
* Returns true iff this device is vulnerable to CVE-2013-2094.
* A patch for CVE-2013-2094 can be found at
@@ -90,84 +83,6 @@
}
/*
- * Will hang if vulnerable, return 0 if successful, -1 on unforseen
- * error.
- */
-static jint android_security_cts_NativeCodeTest_doSockDiagTest(JNIEnv* env, jobject thiz)
-{
- int fd, nlmsg_size, err, len;
- char buf[1024];
- struct sockaddr_nl nladdr;
- struct nlmsghdr *nlh;
- struct msghdr msg;
- struct iovec iov;
- struct sock_diag_req* sock_diag_data;
-
- int major, minor;
- struct utsname uts;
- if (uname(&uts) != -1 &&
- sscanf(uts.release, "%d.%d", &major, &minor) == 2 &&
- ((major > 3) || ((major == 3) && (minor > 8)))) {
- // Kernels above 3.8 are patched against CVE-2013-1763
- // This test generates false positives if run on > 3.8.
- // b/17253473
- return PASSED;
- }
-
- fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG);
- if (fd == -1) {
- switch (errno) {
- /* NETLINK_SOCK_DIAG not accessible, vector dne */
- case EACCES:
- case EAFNOSUPPORT:
- case EPERM:
- case EPROTONOSUPPORT:
- return PASSED;
- default:
- return UNKNOWN_ERROR;
- }
- }
- /* prepare and send netlink packet */
- memset(&nladdr, 0, sizeof(nladdr));
- nladdr.nl_family = AF_NETLINK;
- nlmsg_size = NLMSG_ALIGN(NLMSG_HDRLEN + sizeof(sock_diag_data));
- nlh = (nlmsghdr *)malloc(nlmsg_size);
- nlh->nlmsg_len = nlmsg_size;
- nlh->nlmsg_pid = 0; //send packet to kernel
- nlh->nlmsg_type = SOCK_DIAG_BY_FAMILY;
- nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
- iov = { (void *) nlh, nlmsg_size };
- msg = { (void *) &nladdr, sizeof(nladdr), &iov, 1, NULL, 0, 0 };
- sock_diag_data = (sock_diag_req *) NLMSG_DATA(nlh);
- sock_diag_data->sdiag_family = AF_MAX+1;
- if ((err = sendmsg(fd, &msg, 0)) == -1) {
- /* SELinux blocked it */
- if (errno == 22) {
- return PASSED;
- } else {
- return UNKNOWN_ERROR;
- }
- }
- free(nlh);
-
- memset(&nladdr, 0, sizeof(nladdr));
- iov = { buf, sizeof(buf) };
- msg = { (void *) &nladdr, sizeof(nladdr), &iov, 1, NULL, 0, 0 };
- if ((len = recvmsg(fd, &msg, 0)) == -1) {
- return UNKNOWN_ERROR;
- }
- for (nlh = (struct nlmsghdr *) buf; NLMSG_OK(nlh, len); nlh = NLMSG_NEXT (nlh, len)){
- if (nlh->nlmsg_type == NLMSG_ERROR) {
- /* -22 = -EINVAL from kernel */
- if (*(int *)NLMSG_DATA(nlh) == -22) {
- return PASSED;
- }
- }
- }
- return UNKNOWN_ERROR;
-}
-
-/*
* Prior to https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/include/asm/uaccess.h?id=8404663f81d212918ff85f493649a7991209fa04
* there was a flaw in the kernel's handling of get_user and put_user
* requests. Normally, get_user and put_user are supposed to guarantee
@@ -288,8 +203,6 @@
(void *) android_security_cts_NativeCodeTest_doPerfEventTest },
{ "doPerfEventTest2", "()Z",
(void *) android_security_cts_NativeCodeTest_doPerfEventTest2 },
- { "doSockDiagTest", "()I",
- (void *) android_security_cts_NativeCodeTest_doSockDiagTest },
{ "doVrootTest", "()Z",
(void *) android_security_cts_NativeCodeTest_doVrootTest },
{ "doCVE20141710Test", "()Z",
diff --git a/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp b/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp
index c6ce1ef..daac7d9 100644
--- a/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_SELinuxTest.cpp
@@ -71,9 +71,19 @@
(void *) android_security_cts_SELinuxTest_checkSELinuxContext },
};
+static int log_callback(int type __attribute__((unused)), const char *fmt __attribute__((unused)), ...)
+{
+ /* do nothing - silence the avc denials */
+ return 0;
+}
+
int register_android_security_cts_SELinuxTest(JNIEnv* env)
{
jclass clazz = env->FindClass("android/security/cts/SELinuxTest");
+ union selinux_callback cb;
+ cb.func_log = log_callback;
+ selinux_set_callback(SELINUX_CB_LOG, cb);
+
return env->RegisterNatives(clazz, gMethods,
sizeof(gMethods) / sizeof(JNINativeMethod));
}
diff --git a/tests/tests/security/src/android/security/cts/NativeCodeTest.java b/tests/tests/security/src/android/security/cts/NativeCodeTest.java
index 4be00b6..f6e6029 100644
--- a/tests/tests/security/src/android/security/cts/NativeCodeTest.java
+++ b/tests/tests/security/src/android/security/cts/NativeCodeTest.java
@@ -42,12 +42,6 @@
assertTrue(doPerfEventTest2());
}
- public void testSockDiag() throws Exception {
- int result = doSockDiagTest();
- assertFalse("Encountered unexpected error: " + result + ".", (result == -1));
- assertEquals(0, result);
- }
-
public void testFutex() throws Exception {
assertTrue("Device is vulnerable to CVE-2014-3153, a vulnerability in the futex() system "
+ "call. Please apply the security patch at "
@@ -79,12 +73,6 @@
private static native boolean doPerfEventTest2();
/**
- * Hangs if device is vulnerable to CVE-2013-1763, returns -1 if
- * unexpected error occurs, 0 otherwise.
- */
- private static native int doSockDiagTest();
-
- /**
* ANDROID-11234878 / CVE-2013-6282
*
* Returns true if the device is patched against the vroot vulnerability, false otherwise.
diff --git a/tests/tests/security/tools/format_cert.sh b/tests/tests/security/tools/format_cert.sh
index 94407a0..604c1bc 100755
--- a/tests/tests/security/tools/format_cert.sh
+++ b/tests/tests/security/tools/format_cert.sh
@@ -26,16 +26,17 @@
# Output file. If not specified, the file will be named <hash>.0 where "hash"
# is the certificate's subject hash produced by:
-# openssl x509 -in cert_file -subject_hash -noout
+# openssl x509 -in cert_file -subject_hash_old -noout
out_file="$2"
# Detect whether the input file is PEM or DER.
+# It must use old_hash(MD5) function.
in_form="pem"
-subject_hash=$("$OPENSSL" x509 -in "$in_file" -inform $in_form -subject_hash \
+subject_hash=$("$OPENSSL" x509 -in "$in_file" -inform $in_form -subject_hash_old \
-noout 2>/dev/null)
if [ "$?" != "0" ]; then
in_form="der"
- subject_hash=$("$OPENSSL" x509 -in "$in_file" -inform $in_form -subject_hash \
+ subject_hash=$("$OPENSSL" x509 -in "$in_file" -inform $in_form -subject_hash_old \
-noout)
if [ "$?" != "0" ]; then
echo "Certificate file format is neither PEM nor DER"
diff --git a/tests/tests/telephony/src/android/telephony/cts/SmsUsageMonitorShortCodeTest.java b/tests/tests/telephony/src/android/telephony/cts/SmsUsageMonitorShortCodeTest.java
index 67cdd24..0527e9a 100644
--- a/tests/tests/telephony/src/android/telephony/cts/SmsUsageMonitorShortCodeTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/SmsUsageMonitorShortCodeTest.java
@@ -20,7 +20,7 @@
import android.content.pm.PackageManager;
import android.test.InstrumentationTestCase;
import android.test.UiThreadTest;
-
+import android.telephony.TelephonyManager;
import com.android.internal.telephony.SmsUsageMonitor;
/**
@@ -28,6 +28,7 @@
*/
public class SmsUsageMonitorShortCodeTest extends InstrumentationTestCase {
+ private TelephonyManager mTelephonyManager;
private PackageManager mPackageManager;
private Context mContext;
@@ -485,6 +486,12 @@
super.setUp();
mContext = getInstrumentation().getTargetContext();
mPackageManager = mContext.getPackageManager();
+ mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
+ }
+
+ private boolean isCDMA112(String address) {
+ return (mTelephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA)
+ && "112".equals(address);
}
@UiThreadTest
@@ -497,7 +504,8 @@
SmsUsageMonitor monitor = new SmsUsageMonitor(mContext);
for (ShortCodeTest test : sShortCodeTests) {
assertEquals("country: " + test.countryIso + " number: " + test.address,
- test.category, monitor.checkDestination(test.address, test.countryIso));
+ test.category, isCDMA112(test.address) ? CATEGORY_NOT_SHORT_CODE :
+ monitor.checkDestination(test.address, test.countryIso));
}
}
}
diff --git a/tests/tests/text/src/android/text/format/cts/DateFormatTest.java b/tests/tests/text/src/android/text/format/cts/DateFormatTest.java
index 9d739d3..61fa37d 100644
--- a/tests/tests/text/src/android/text/format/cts/DateFormatTest.java
+++ b/tests/tests/text/src/android/text/format/cts/DateFormatTest.java
@@ -46,7 +46,6 @@
private boolean mIs24HourFormat;
private Locale mDefaultLocale;
- private String mDefaultFormat;
@Override
protected void setUp() throws Exception {
@@ -55,8 +54,6 @@
mContentResolver = mContext.getContentResolver();
mIs24HourFormat = DateFormat.is24HourFormat(mContext);
mDefaultLocale = Locale.getDefault();
- mDefaultFormat = Settings.System.getString(mContext.getContentResolver(),
- Settings.System.DATE_FORMAT);
}
@Override
@@ -67,7 +64,7 @@
if (!Locale.getDefault().equals(mDefaultLocale)) {
Locale.setDefault(mDefaultLocale);
}
- Settings.System.putString(mContentResolver, Settings.System.DATE_FORMAT, mDefaultFormat);
+
super.tearDown();
}
@@ -146,12 +143,6 @@
assertTrue(source.indexOf("5") >= 0);
assertTrue(source.indexOf("30") >= 0);
- String testFormat = "yyyy-MM-dd";
- String testOrder = "yMd";
- Settings.System.putString(mContentResolver, Settings.System.DATE_FORMAT, testFormat);
- String actualOrder = String.valueOf(DateFormat.getDateFormatOrder(mContext));
- assertEquals(testOrder, actualOrder);
-
String format = "MM/dd/yy";
String expectedString = "12/18/08";
Calendar calendar = new GregorianCalendar(YEAR, MONTH, DAY);
diff --git a/tests/tests/text/src/android/text/format/cts/TimeTest.java b/tests/tests/text/src/android/text/format/cts/TimeTest.java
index 2d623e3..cc73272 100644
--- a/tests/tests/text/src/android/text/format/cts/TimeTest.java
+++ b/tests/tests/text/src/android/text/format/cts/TimeTest.java
@@ -36,16 +36,20 @@
private Locale originalLocale;
+ private static List<Locale> sSystemLocales;
+
@Override
protected void setUp() throws Exception {
super.setUp();
originalLocale = Locale.getDefault();
+
+ maybeInitializeSystemLocales();
}
@Override
public void tearDown() throws Exception {
// The Locale may be changed by tests. Revert to the original.
- changeJavaAndAndroidLocale(originalLocale);
+ changeJavaAndAndroidLocale(originalLocale, true /* force */);
super.tearDown();
}
@@ -771,7 +775,10 @@
}
public void testFormat_tokensUkLocale() throws Exception {
- changeJavaAndAndroidLocale(Locale.UK);
+ if (!changeJavaAndAndroidLocale(Locale.UK, false /* force */)) {
+ Log.w(TAG, "Skipping testFormat_tokensUkLocale: no assets found");
+ return;
+ }
Time t = new Time("Europe/London");
Fields.setDateTime(t, 2005, 5, 1, 12, 30, 15);
@@ -863,7 +870,10 @@
}
public void testFormat_tokensUsLocale() throws Exception {
- changeJavaAndAndroidLocale(Locale.US);
+ if (!changeJavaAndAndroidLocale(Locale.US, false /* force */)) {
+ Log.w(TAG, "Skipping testFormat_tokensUSLocale: no assets found");
+ return;
+ }
Time t = new Time("America/New_York");
Fields.setDateTime(t, 2005, 5, 1, 12, 30, 15);
@@ -955,7 +965,10 @@
}
public void testFormat_tokensFranceLocale() throws Exception {
- changeJavaAndAndroidLocale(Locale.FRANCE);
+ if (!changeJavaAndAndroidLocale(Locale.FRANCE, false /* force */)) {
+ Log.w(TAG, "Skipping testFormat_tokensFranceLocale: no assets found");
+ return;
+ }
Time t = new Time("Europe/Paris");
Fields.setDateTime(t, 2005, 5, 1, 12, 30, 15);
@@ -1047,7 +1060,10 @@
}
public void testFormat_tokensJapanLocale() throws Exception {
- changeJavaAndAndroidLocale(Locale.JAPAN);
+ if (!changeJavaAndAndroidLocale(Locale.JAPAN, false /* force */)) {
+ Log.w(TAG, "Skipping testFormat_tokensJapanLocale: no assets found");
+ return;
+ }
Time t = new Time("Asia/Tokyo");
Fields.setDateTime(t, 2005, 5, 1, 12, 30, 15);
@@ -2843,7 +2859,19 @@
}
}
- private static void changeJavaAndAndroidLocale(Locale locale) {
+ private static void maybeInitializeSystemLocales() {
+ if (sSystemLocales == null) {
+ String[] locales = Resources.getSystem().getAssets().getLocales();
+ List<Locale> systemLocales = new ArrayList<Locale>(locales.length);
+ for (String localeStr : locales) {
+ systemLocales.add(Locale.forLanguageTag(localeStr));
+ }
+
+ sSystemLocales = systemLocales;
+ }
+ }
+
+ private static boolean changeJavaAndAndroidLocale(Locale locale, boolean force) {
// The Time class uses the Android-managed locale for string resources containing format
// patterns and the Java-managed locale for other things (e.g. month names, week days names)
// that are placed into those patterns. For example the format "%c" expands to include
@@ -2856,6 +2884,10 @@
// locales agree), when the Java-managed locale is changed during this test the locale in
// the runtime-local copy of the system resources is modified as well.
+ if (!force && !sSystemLocales.contains(locale)) {
+ return false;
+ }
+
// Change the Java-managed locale.
Locale.setDefault(locale);
@@ -2864,5 +2896,6 @@
Configuration configuration = Resources.getSystem().getConfiguration();
configuration.locale = locale;
Resources.getSystem().updateConfiguration(configuration, null);
+ return true;
}
}
diff --git a/tools/selinux/SELinuxNeverallowTestFrame.py b/tools/selinux/SELinuxNeverallowTestFrame.py
index 932014a..5eba5bb 100644
--- a/tools/selinux/SELinuxNeverallowTestFrame.py
+++ b/tools/selinux/SELinuxNeverallowTestFrame.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
src_header = """/*
* Copyright (C) 2014 The Android Open Source Project
diff --git a/tools/selinux/SELinuxNeverallowTestGen.py b/tools/selinux/SELinuxNeverallowTestGen.py
index 9cb1e24..bc775d6 100755
--- a/tools/selinux/SELinuxNeverallowTestGen.py
+++ b/tools/selinux/SELinuxNeverallowTestGen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
import re
import sys
diff --git a/tools/vm-tests-tf/etc/starttests b/tools/vm-tests-tf/etc/starttests
index be8fad4..4c5c0b1 100755
--- a/tools/vm-tests-tf/etc/starttests
+++ b/tools/vm-tests-tf/etc/starttests
@@ -63,7 +63,6 @@
scriptdata=$dalviktestdir/data/scriptdata
report=$dalviktest/report.html
curdate=`date`
-curmode=""
datadir=/tmp/${USER}
base=$OUT
framework=$base/system/framework
@@ -100,14 +99,6 @@
mkdir -p $datadir
mkdir -p $datadir/dalvik-cache
-if [ "$TARGET_SIMULATOR" = "true" ]; then
- echo "Simulator mode, $interpreter interpreter";
- curmode="simulator"
-else
- echo "Emulator mode, $interpreter interpreter";
- curmode="emulator"
-fi
-
echo ""
pre_report="<html><head><style>
@@ -118,7 +109,7 @@
</style></head>
<body>
<h1>Dalvik VM test suite results</h1>
-Generated $curdate (using the $curmode)
+Generated $curdate (using the emulator)
<p>
<table width='100%'>
<tr><td>Status</td><td>Target</td><td>Category</td><td>Details</td></tr>"
@@ -136,12 +127,8 @@
export jallcnt=0
export jcolumns=0
-# TODO unhack
-if [ "$TARGET_SIMULATOR" = "true" ]; then
- echo -n ""
-else
- adb push $dexcore /data/local/tmp/dexcore.jar >> /dev/null 2>&1
-fi
+# TODO unhack; dimitry: unhack what?
+adb push $dexcore /data/local/tmp/dexcore.jar >> /dev/null 2>&1
function classnameToJar()
{
@@ -175,40 +162,25 @@
# write dalvik output to file
echo -n "mk_b:" > $datadir/dalvikout
- if [ "$TARGET_SIMULATOR" = "true" ]; then
- classpath=`classnameToJar ${mainclass}`
- for dep in ${deps}; do
- depJar=`classnameToJar ${dep}`
- classpath=${classpath}:${depJar}
- done
- $valgrind $exe -Xmx512M -Xss32K -Xbootclasspath:$bpath $debug_opts \
- -classpath $dexcore:$classpath $mainclass >> $datadir/dalvikout 2>&1
+ classpath="/data/local/tmp/dexcore.jar"
+ deps=${deps}" "${mainclass}
+ pushedjars=""
+ for dep in ${deps}; do
+ depJar=`classnameToJar ${dep}`
+ depFileName=`basename ${depJar}`
+ deviceFileName=/data/local/tmp/${depFileName}
+ adb push ${depJar} ${deviceFileName} &> /dev/null
+ classpath=${classpath}:${deviceFileName}
+ pushedjars=${pushedjars}" "${deviceFileName}
+ done
- RESULTCODE=$?
- if [ ${RESULTCODE} -ne 0 ]; then
- echo "Dalvik VM failed, result=${RESULTCODE}" >> $datadir/dalvikout 2>&1
- fi
- else
- classpath="/data/local/tmp/dexcore.jar"
- deps=${deps}" "${mainclass}
- pushedjars=""
- for dep in ${deps}; do
- depJar=`classnameToJar ${dep}`
- depFileName=`basename ${depJar}`
- deviceFileName=/data/local/tmp/${depFileName}
- adb push ${depJar} ${deviceFileName} &> /dev/null
- classpath=${classpath}:${deviceFileName}
- pushedjars=${pushedjars}" "${deviceFileName}
- done
+ adb shell dalvikvm -Djava.io.tmpdir=/data/local/tmp \
+ -classpath $classpath $mainclass >> $datadir/dalvikout 2>&1 && \
+ echo -n dvmpassed: >> $datadir/dalvikout 2>&1
- adb shell dalvikvm -Djava.io.tmpdir=/data/local/tmp \
- -classpath $classpath $mainclass >> $datadir/dalvikout 2>&1 && \
- echo -n dvmpassed: >> $datadir/dalvikout 2>&1
-
- for jar in ${pushedjars}; do
- adb shell rm ${jar} &> /dev/null
- done
- fi
+ for jar in ${pushedjars}; do
+ adb shell rm ${jar} &> /dev/null
+ done
echo -n "mk_s:" >> $datadir/dalvikout
# Verify tmpout only contains mkdxc_start;mkdxc_stop -> no system.out/err