Fix issues in long and double testing.
This does not enable the tests (something for later). This CL also enables the tests for half_recip.
Change-Id: Iec33c69a1295f2978148c8afec62bb297dd6f58e
diff --git a/api/gen_runtime.cpp b/api/gen_runtime.cpp
index 6a46f35..86bba10 100644
--- a/api/gen_runtime.cpp
+++ b/api/gen_runtime.cpp
@@ -349,10 +349,6 @@
Permutation(Function* function, Specification* specification, int i1, int i2, int i3, int i4);
void writeFiles(ofstream& headerFile, ofstream& rsFile, ofstream& javaFile,
int versionOfTestFiles);
-#define DISABLE_LONG_AND_DOUBLE_TESTS
-#ifdef DISABLE_LONG_AND_DOUBLE_TESTS
- bool hasLongOrDoubleParameter() const;
-#endif
};
// Table of type equivalences
@@ -1146,30 +1142,9 @@
mJavaVerifierComputeMethodName = "compute" + capitalize(mCleanName);
}
-#ifdef DISABLE_LONG_AND_DOUBLE_TESTS
-// TODO Remove once we have long/double copyTo/copyFrom
-bool Permutation::hasLongOrDoubleParameter() const {
- for (size_t i = 0; i < mParams.size(); i++) {
- const ParameterDefinition& p = *mParams[i];
- if (p.javaBaseType == "long" || p.javaBaseType == "double") {
- return true;
- }
- }
- return false;
-}
-#endif
-
void Permutation::writeFiles(ofstream& headerFile, ofstream& rsFile, ofstream& javaFile,
int versionOfTestFiles) {
writeHeaderSection(headerFile);
-#ifdef DISABLE_LONG_AND_DOUBLE_TESTS
- if (hasLongOrDoubleParameter()) {
- printf("Warning: skipping a test for %s as we don't support long or double arguments (due "
- "to Allocation not supporting them).\n",
- mName.c_str());
- return;
- }
-#endif
if (mSpecification->relevantForVersion(versionOfTestFiles) && mTest != "none") {
writeRsSection(rsFile);
writeJavaSection(javaFile);
diff --git a/api/generate.sh b/api/generate.sh
index 4aa933c..7bafa1a 100755
--- a/api/generate.sh
+++ b/api/generate.sh
@@ -17,7 +17,7 @@
set -e
g++ gen_runtime.cpp -Wall -o gen_runtime
-./gen_runtime -v 19 rs_core_math.spec
+./gen_runtime -v 21 rs_core_math.spec
mv Test*.java ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/
mv Test*.rs ../../../cts/tests/src/android/renderscript/cts/
mv rs_core_math.rsh ../scriptc/
diff --git a/api/rs_core_math.spec b/api/rs_core_math.spec
index 7adfce0..4f73c55 100644
--- a/api/rs_core_math.spec
+++ b/api/rs_core_math.spec
@@ -35,7 +35,8 @@
ret: #3#1
comment:
Component wise conversion from #2#1 to #3#1
-version: 21
+# TODO this should be 21
+version: 20
end:
start:
@@ -47,7 +48,8 @@
ret: #3#1
comment:
Component wise conversion from #2#1 to #3#1
-version: 21
+# TODO this should be 21
+version: 20
end:
start:
@@ -59,7 +61,8 @@
ret: #3#1
comment:
Component wise conversion from #2#1 to #3#1
-version: 21
+# TODO this should be 21
+version: 20
end:
start:
@@ -986,6 +989,7 @@
arg: #2#1 v2
comment:
Return the minimum value from two arguments
+# TODO this should be 21
version: 20
end:
@@ -1078,6 +1082,7 @@
arg: #2#1 v2
comment:
Return the maximum value from two arguments
+# TODO this should be 21
version: 20
end:
@@ -1239,6 +1244,7 @@
return 0.f;
else
return 1.f;
+# TODO this should be 21
version: 20
end: