Fix function mangling of rs_quaternion* arguments in stubs white list.
Fix the generator of the RenderScript header files to allow functions
that take rs_quaternion arguments. Previously they were wrongly mangled
in the RenderScript stubs white list (float* instead of float4*). Factor
out the calculation of vector length from the runtime header generator,
and call it after expanding a typedef to update the vector length. This
way it can calculate the right mangling for a function taking a pointer
to rs_quaternion (which is not itself a vector but the mangling does
need to output a vector length, i.e. Dv4_f). This fix is required by a
following change list, which moves the bodies of the quaternion builtins
to libclcore, so their mangled names are then added to the white list.
Change-Id: I0406a1d956049e11feb9e8de570c019b5542cb20
diff --git a/api/Specification.h b/api/Specification.h
index 959935b..c467c5c 100644
--- a/api/Specification.h
+++ b/api/Specification.h
@@ -612,4 +612,10 @@
extern const NumericalType TYPES[];
extern const int NUM_TYPES;
+/* Given a renderscript type (string) calculate the vector size and base type. If the type
+ * is not a vector the vector size is 1 and baseType is just the type itself.
+ */
+void getVectorSizeAndBaseType(const std::string& type, std::string& vectorSize,
+ std::string& baseType);
+
#endif // ANDROID_RS_API_GENERATOR_SPECIFICATION_H