From e9f17cda80ae60818f43b4ed724436c8b88fd0db Mon Sep 17 00:00:00 2001 From: Jean-Luc Brouillet Date: Fri, 24 Apr 2015 15:59:02 -0700 Subject: docs: Overhaul of the RenderScript reference documentation. cherry-pick from CL: https://android-review.googlesource.com/148241 This CL replaces the Doxygen generated documentation by one that's created by our internal tool found in framework/rs/api. The big advantages: - Can handle overloaded functions. Doxygen could not and RenderScript has many. - Can have version information. - Can match the look of the Java documentation. - Cleaner look and no leaking of internal paths. This CL also include changes introduced by the L release which was missing previously. Change-Id: Icade41d04d35e45c445ad952bb8ce14389f9f59f --- docs/html/guide/guide_toc.cs | 58 +- .../guide/topics/renderscript/reference/index.jd | 2837 ++++++++ .../topics/renderscript/reference/overview.jd | 2676 ++++++++ .../renderscript/reference/rs_allocation_data.jd | 2925 ++++++++ .../topics/renderscript/reference/rs_atomic.jd | 506 ++ .../topics/renderscript/reference/rs_convert.jd | 1836 +++++ .../topics/renderscript/reference/rs_debug.jd | 301 + .../topics/renderscript/reference/rs_for_each.jd | 183 + .../topics/renderscript/reference/rs_graphics.jd | 2085 ++++++ .../guide/topics/renderscript/reference/rs_io.jd | 185 + .../guide/topics/renderscript/reference/rs_math.jd | 7251 ++++++++++++++++++++ .../topics/renderscript/reference/rs_matrix.jd | 1059 +++ .../renderscript/reference/rs_object_info.jd | 1077 +++ .../renderscript/reference/rs_object_types.jd | 336 + .../topics/renderscript/reference/rs_quaternion.jd | 387 ++ .../guide/topics/renderscript/reference/rs_time.jd | 269 + .../renderscript/reference/rs_value_types.jd | 1172 ++++ .../renderscript/reference/rs_vector_math.jd | 574 ++ docs/html/reference/renderscript/annotated.html | 53 - docs/html/reference/renderscript/doxygen.css | 946 --- docs/html/reference/renderscript/globals.html | 919 --- docs/html/reference/renderscript/globals_enum.html | 62 - docs/html/reference/renderscript/globals_func.html | 707 -- docs/html/reference/renderscript/globals_type.html | 224 - docs/html/reference/renderscript/index.html | 32 - .../renderscript/rs__allocation_8rsh.html | 818 --- .../renderscript/rs__allocation_8rsh_source.html | 268 - .../reference/renderscript/rs__atomic_8rsh.html | 757 -- .../renderscript/rs__atomic_8rsh_source.html | 110 - docs/html/reference/renderscript/rs__cl_8rsh.html | 2384 ------- .../reference/renderscript/rs__cl_8rsh_source.html | 602 -- .../html/reference/renderscript/rs__core_8rsh.html | 361 - .../renderscript/rs__core_8rsh_source.html | 125 - .../reference/renderscript/rs__debug_8rsh.html | 662 -- .../renderscript/rs__debug_8rsh_source.html | 155 - .../reference/renderscript/rs__element_8rsh.html | 374 - .../renderscript/rs__element_8rsh_source.html | 90 - .../reference/renderscript/rs__graphics_8rsh.html | 1435 ---- .../renderscript/rs__graphics_8rsh_source.html | 196 - .../html/reference/renderscript/rs__math_8rsh.html | 679 -- .../renderscript/rs__math_8rsh_source.html | 177 - .../reference/renderscript/rs__matrix_8rsh.html | 1579 ----- .../renderscript/rs__matrix_8rsh_source.html | 172 - .../html/reference/renderscript/rs__mesh_8rsh.html | 208 - .../renderscript/rs__mesh_8rsh_source.html | 75 - .../reference/renderscript/rs__object_8rsh.html | 858 --- .../renderscript/rs__object_8rsh_source.html | 132 - .../reference/renderscript/rs__program_8rsh.html | 320 - .../renderscript/rs__program_8rsh_source.html | 91 - .../renderscript/rs__quaternion_8rsh.html | 556 -- .../renderscript/rs__quaternion_8rsh_source.html | 211 - .../reference/renderscript/rs__sampler_8rsh.html | 175 - .../renderscript/rs__sampler_8rsh_source.html | 75 - .../html/reference/renderscript/rs__time_8rsh.html | 194 - .../renderscript/rs__time_8rsh_source.html | 83 - .../reference/renderscript/rs__types_8rsh.html | 1023 --- .../renderscript/rs__types_8rsh_source.html | 300 - .../renderscript/structrs__allocation.html | 45 - .../reference/renderscript/structrs__element.html | 45 - .../reference/renderscript/structrs__font.html | 45 - .../renderscript/structrs__matrix2x2.html | 45 - .../renderscript/structrs__matrix3x3.html | 45 - .../renderscript/structrs__matrix4x4.html | 45 - .../reference/renderscript/structrs__mesh.html | 45 - .../reference/renderscript/structrs__path.html | 45 - .../renderscript/structrs__program__fragment.html | 45 - .../renderscript/structrs__program__raster.html | 45 - .../renderscript/structrs__program__store.html | 45 - .../renderscript/structrs__program__vertex.html | 45 - .../reference/renderscript/structrs__sampler.html | 45 - .../reference/renderscript/structrs__script.html | 45 - .../renderscript/structrs__script__call.html | 41 - docs/html/reference/renderscript/structrs__tm.html | 75 - .../reference/renderscript/structrs__type.html | 45 - docs/html/reference/renderscript/tab_a.png | Bin 140 -> 0 bytes docs/html/reference/renderscript/tab_b.png | Bin 178 -> 0 bytes docs/html/reference/renderscript/tab_h.png | Bin 192 -> 0 bytes docs/html/reference/renderscript/tab_s.png | Bin 189 -> 0 bytes docs/html/reference/renderscript/tabs.css | 59 - 79 files changed, 25714 insertions(+), 19041 deletions(-) create mode 100644 docs/html/guide/topics/renderscript/reference/index.jd create mode 100644 docs/html/guide/topics/renderscript/reference/overview.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_allocation_data.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_atomic.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_convert.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_debug.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_for_each.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_graphics.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_io.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_math.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_matrix.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_object_info.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_object_types.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_quaternion.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_time.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_value_types.jd create mode 100644 docs/html/guide/topics/renderscript/reference/rs_vector_math.jd delete mode 100644 docs/html/reference/renderscript/annotated.html delete mode 100644 docs/html/reference/renderscript/doxygen.css delete mode 100644 docs/html/reference/renderscript/globals.html delete mode 100644 docs/html/reference/renderscript/globals_enum.html delete mode 100644 docs/html/reference/renderscript/globals_func.html delete mode 100644 docs/html/reference/renderscript/globals_type.html delete mode 100644 docs/html/reference/renderscript/index.html delete mode 100644 docs/html/reference/renderscript/rs__allocation_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__allocation_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__atomic_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__atomic_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__cl_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__cl_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__core_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__core_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__debug_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__debug_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__element_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__element_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__graphics_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__graphics_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__math_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__math_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__matrix_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__matrix_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__mesh_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__mesh_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__object_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__object_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__program_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__program_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__quaternion_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__quaternion_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__sampler_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__sampler_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__time_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__time_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/rs__types_8rsh.html delete mode 100644 docs/html/reference/renderscript/rs__types_8rsh_source.html delete mode 100644 docs/html/reference/renderscript/structrs__allocation.html delete mode 100644 docs/html/reference/renderscript/structrs__element.html delete mode 100644 docs/html/reference/renderscript/structrs__font.html delete mode 100644 docs/html/reference/renderscript/structrs__matrix2x2.html delete mode 100644 docs/html/reference/renderscript/structrs__matrix3x3.html delete mode 100644 docs/html/reference/renderscript/structrs__matrix4x4.html delete mode 100644 docs/html/reference/renderscript/structrs__mesh.html delete mode 100644 docs/html/reference/renderscript/structrs__path.html delete mode 100644 docs/html/reference/renderscript/structrs__program__fragment.html delete mode 100644 docs/html/reference/renderscript/structrs__program__raster.html delete mode 100644 docs/html/reference/renderscript/structrs__program__store.html delete mode 100644 docs/html/reference/renderscript/structrs__program__vertex.html delete mode 100644 docs/html/reference/renderscript/structrs__sampler.html delete mode 100644 docs/html/reference/renderscript/structrs__script.html delete mode 100644 docs/html/reference/renderscript/structrs__script__call.html delete mode 100644 docs/html/reference/renderscript/structrs__tm.html delete mode 100644 docs/html/reference/renderscript/structrs__type.html delete mode 100644 docs/html/reference/renderscript/tab_a.png delete mode 100644 docs/html/reference/renderscript/tab_b.png delete mode 100644 docs/html/reference/renderscript/tab_h.png delete mode 100644 docs/html/reference/renderscript/tab_s.png delete mode 100644 docs/html/reference/renderscript/tabs.css (limited to 'docs') diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs index 8d010a1..f3f2e5e 100644 --- a/docs/html/guide/guide_toc.cs +++ b/docs/html/guide/guide_toc.cs @@ -357,8 +357,61 @@
  • Advanced RenderScript
  • -
  • - Runtime API Reference +
  • @@ -588,4 +641,3 @@ changeNavLang(getLangPref()); //--> - diff --git a/docs/html/guide/topics/renderscript/reference/index.jd b/docs/html/guide/topics/renderscript/reference/index.jd new file mode 100644 index 0000000..9221bfc --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/index.jd @@ -0,0 +1,2837 @@ +page.title=RenderScript Index + +@jd:body + +
    +

    Constants

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + M_1_PI + + 1 / pi, as a 32 bit float +
    + M_2_PI + + 2 / pi, as a 32 bit float +
    + M_2_SQRTPI + + 2 / sqrt(pi), as a 32 bit float +
    + M_E + + e, as a 32 bit float +
    + M_LN10 + + log_e(10), as a 32 bit float +
    + M_LN2 + + log_e(2), as a 32 bit float +
    + M_LOG10E + + log_10(e), as a 32 bit float +
    + M_LOG2E + + log_2(e), as a 32 bit float +
    + M_PI + + pi, as a 32 bit float +
    + M_PI_2 + + pi / 2, as a 32 bit float +
    + M_PI_4 + + pi / 4, as a 32 bit float +
    + M_SQRT1_2 + + 1 / sqrt(2), as a 32 bit float +
    + M_SQRT2 + + sqrt(2), as a 32 bit float +
    +

    Types

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + char2 + + Two 8 bit signed integers +
    + char3 + + Three 8 bit signed integers +
    + char4 + + Four 8 bit signed integers +
    + double2 + + Two 64 bit floats +
    + double3 + + Three 64 bit floats +
    + double4 + + Four 64 bit floats +
    + float2 + + Two 32 bit floats +
    + float3 + + Three 32 bit floats +
    + float4 + + Four 32 bit floats +
    + int16_t + + 16 bit signed integer +
    + int2 + + Two 32 bit signed integers +
    + int3 + + Three 32 bit signed integers +
    + int32_t + + 32 bit signed integer +
    + int4 + + Four 32 bit signed integers +
    + int64_t + + 64 bit signed integer +
    + int8_t + + 8 bit signed integer +
    + long2 + + Two 64 bit signed integers +
    + long3 + + Three 64 bit signed integers +
    + long4 + + Four 64 bit signed integers +
    + rs_allocation + + Handle to an allocation +
    + rs_allocation_cubemap_face + + Enum for selecting cube map faces +
    + rs_allocation_usage_type + + Bitfield to specify how an allocation is used +
    + rs_data_kind + + Element data kind +
    + rs_data_type + + Element basic data type +
    + rs_element + + Handle to an element +
    + rs_for_each_strategy_t + + Suggested cell processing order +
    + rs_matrix2x2 + + 2x2 matrix of 32 bit floats +
    + rs_matrix3x3 + + 3x3 matrix of 32 bit floats +
    + rs_matrix4x4 + + 4x4 matrix of 32 bit floats +
    + rs_quaternion + + Quaternion +
    + rs_sampler + + Handle to a Sampler +
    + rs_sampler_value + + Sampler wrap T value +
    + rs_script + + Handle to a Script +
    + rs_script_call_t + + Cell iteration information +
    + rs_time_t + + Seconds since January 1, 1970 +
    + rs_tm + + Date and time structure +
    + rs_type + + Handle to a Type +
    + short2 + + Two 16 bit signed integers +
    + short3 + + Three 16 bit signed integers +
    + short4 + + Four 16 bit signed integers +
    + size_t + + Unsigned size type +
    + ssize_t + + Signed size type +
    + uchar + + 8 bit unsigned integer +
    + uchar2 + + Two 8 bit unsigned integers +
    + uchar3 + + Three 8 bit unsigned integers +
    + uchar4 + + Four 8 bit unsigned integers +
    + uint + + 32 bit unsigned integer +
    + uint16_t + + 16 bit unsigned integer +
    + uint2 + + Two 32 bit unsigned integers +
    + uint3 + + Three 32 bit unsigned integers +
    + uint32_t + + 32 bit unsigned integer +
    + uint4 + + Four 32 bit unsigned integers +
    + uint64_t + + 64 bit unsigned integer +
    + uint8_t + + 8 bit unsigned integer +
    + ulong + + 64 bit unsigned integer +
    + ulong2 + + Two 64 bit unsigned integers +
    + ulong3 + + Three 64 bit unsigned integers +
    + ulong4 + + Four 64 bit unsigned integers +
    + ushort + + 16 bit unsigned integer +
    + ushort2 + + Two 16 bit unsigned integers +
    + ushort3 + + Three 16 bit unsigned integers +
    + ushort4 + + Four 16 bit unsigned integers +
    +

    Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + abs + + Absolute value of an integer +
    + acos + + Inverse cosine +
    + acosh + + Inverse hyperbolic cosine +
    + acospi + + Inverse cosine divided by pi +
    + asin + + Inverse sine +
    + asinh + + Inverse hyperbolic sine +
    + asinpi + + Inverse sine divided by pi +
    + atan + + Inverse tangent +
    + atan2 + + Inverse tangent of a ratio +
    + atan2pi + + Inverse tangent of a ratio, divided by pi +
    + atanh + + Inverse hyperbolic tangent +
    + atanpi + + Inverse tangent divided by pi +
    + cbrt + + Cube root +
    + ceil + + Smallest integer not less than a value +
    + clamp + + Restrain a value to a range +
    + clz + + Number of leading 0 bits +
    + convert + + Convert numerical vectors +
    + copysign + + Copies the sign of a number to another +
    + cos + + Cosine +
    + cosh + + Hypebolic cosine +
    + cospi + + Cosine of a number multiplied by pi +
    + cross + + Cross product of two vectors +
    + degrees + + Converts radians into degrees +
    + distance + + Distance between two points +
    + dot + + Dot product of two vectors +
    + erf + + Mathematical error function +
    + erfc + + Mathematical complementary error function +
    + exp + + e raised to a number +
    + exp10 + + 10 raised to a number +
    + exp2 + + 2 raised to a number +
    + expm1 + + e raised to a number minus one +
    + fabs + + Absolute value of a float +
    + fast_distance + + Approximate distance between two points +
    + fast_length + + Approximate length of a vector +
    + fast_normalize + + Approximate normalized vector +
    + fdim + + Positive difference between two values +
    + floor + + Smallest integer not greater than a value +
    + fma + + Multiply and add +
    + fmax + + Maximum of two floats +
    + fmin + + Minimum of two floats +
    + fmod + + Modulo +
    + fract + + Positive fractional part +
    + frexp + + Binary mantissa and exponent +
    + half_recip + + Reciprocal computed to 16 bit precision +
    + half_rsqrt + + Reciprocal of a square root computed to 16 bit precision +
    + half_sqrt + + Square root computed to 16 bit precision +
    + hypot + + Hypotenuse +
    + ilogb + + Base two exponent +
    + ldexp + + Creates a floating point from mantissa and exponent +
    + length + + Length of a vector +
    + lgamma + + Natural logarithm of the gamma function +
    + log + + Natural logarithm +
    + log10 + + Base 10 logarithm +
    + log1p + + Natural logarithm of a value plus 1 +
    + log2 + + Base 2 logarithm +
    + logb + + Base two exponent +
    + mad + + Multiply and add +
    + max + + Maximum +
    + min + + Minimum +
    + mix + + Mixes two values +
    + modf + + Integral and fractional components +
    + nan + + Not a Number +
    + native_acos + + Approximate inverse cosine +
    + native_acosh + + Approximate inverse hyperbolic cosine +
    + native_acospi + + Approximate inverse cosine divided by pi +
    + native_asin + + Approximate inverse sine +
    + native_asinh + + Approximate inverse hyperbolic sine +
    + native_asinpi + + Approximate inverse sine divided by pi +
    + native_atan + + Approximate inverse tangent +
    + native_atan2 + + Approximate inverse tangent of a ratio +
    + native_atan2pi + + Approximate inverse tangent of a ratio, divided by pi +
    + native_atanh + + Approximate inverse hyperbolic tangent +
    + native_atanpi + + Approximate inverse tangent divided by pi +
    + native_cbrt + + Approximate cube root +
    + native_cos + + Approximate cosine +
    + native_cosh + + Approximate hypebolic cosine +
    + native_cospi + + Approximate cosine of a number multiplied by pi +
    + native_distance + + Approximate distance between two points +
    + native_divide + + Approximate division +
    + native_exp + + Approximate e raised to a number +
    + native_exp10 + + Approximate 10 raised to a number +
    + native_exp2 + + Approximate 2 raised to a number +
    + native_expm1 + + Approximate e raised to a number minus one +
    + native_hypot + + Approximate hypotenuse +
    + native_length + + Approximate length of a vector +
    + native_log + + Approximate natural logarithm +
    + native_log10 + + Approximate base 10 logarithm +
    + native_log1p + + Approximate natural logarithm of a value plus 1 +
    + native_log2 + + Approximate base 2 logarithm +
    + native_normalize + + Approximately normalize a vector +
    + native_powr + + Approximate positive base raised to an exponent +
    + native_recip + + Approximate reciprocal +
    + native_rootn + + Approximate nth root +
    + native_rsqrt + + Approximate reciprocal of a square root +
    + native_sin + + Approximate sine +
    + native_sincos + + Approximate sine and cosine +
    + native_sinh + + Approximate hyperbolic sine +
    + native_sinpi + + Approximate sine of a number multiplied by pi +
    + native_sqrt + + Approximate square root +
    + native_tan + + Approximate tangent +
    + native_tanh + + Approximate hyperbolic tangent +
    + native_tanpi + + Approximate tangent of a number multiplied by pi +
    + nextafter + + Next floating point number +
    + normalize + + Normalize a vector +
    + pow + + Base raised to an exponent +
    + pown + + Base raised to an integer exponent +
    + powr + + Positive base raised to an exponent +
    + radians + + Converts degrees into radians +
    + remainder + + Remainder of a division +
    + remquo + + Remainder and quotient of a division +
    + rint + + Round to even +
    + rootn + + Nth root +
    + round + + Round away from zero +
    + rsAllocationCopy1DRange + + Copy consecutive cells between allocations +
    + rsAllocationCopy2DRange + + Copy a rectangular region of cells between allocations +
    + rsAllocationGetDimFaces + + Presence of more than one face +
    + rsAllocationGetDimLOD + + Presence of levels of detail +
    + rsAllocationGetDimX + + Size of the X dimension +
    + rsAllocationGetDimY + + Size of the Y dimension +
    + rsAllocationGetDimZ + + Size of the Z dimension +
    + rsAllocationGetElement + + Get the object that describes the cell of an Allocation +
    + rsAllocationIoReceive + + Receive new content from the queue +
    + rsAllocationIoSend + + Send new content to the queue +
    + rsAllocationVLoadX + + Get a vector from an allocation of scalars +
    + rsAllocationVStoreX + + Store a vector into an allocation of scalars +
    + rsAtomicAdd + + Thread-safe addition +
    + rsAtomicAnd + + Thread-safe bitwise and +
    + rsAtomicCas + + Thread-safe compare and set +
    + rsAtomicDec + + Thread-safe decrement +
    + rsAtomicInc + + Thread-safe increment +
    + rsAtomicMax + + Thread-safe maximum +
    + rsAtomicMin + + Thread-safe minimum +
    + rsAtomicOr + + Thread-safe bitwise or +
    + rsAtomicSub + + Thread-safe subtraction +
    + rsAtomicXor + + Thread-safe bitwise exclusive or +
    + rsClearObject + + Release an object +
    + rsDebug + + Log a message and values +
    + rsElementGetBytesSize + + Size of an Element +
    + rsElementGetDataKind + + Kind of an Element +
    + rsElementGetDataType + + Data type of an Element +
    + rsElementGetSubElement + + Sub-element of a complex Element +
    + rsElementGetSubElementArraySize + + Array size of a sub-element of a complex Element +
    + rsElementGetSubElementCount + + Number of sub-elements +
    + rsElementGetSubElementName + + Name of a sub-element +
    + rsElementGetSubElementNameLength + + Length of the name of a sub-element +
    + rsElementGetSubElementOffsetBytes + + Offset of the instantiated sub-element +
    + rsElementGetVectorSize + + Vector size of the Element +
    + rsExtractFrustumPlanes + + Compute frustum planes +
    + rsForEach + + Invoke the root kernel of a script +
    + rsGetDt + + Elapsed time since last call +
    + rsGetElementAt + + Return a cell from an allocation +
    + rsGetElementAtYuv_uchar_U + + Get the U component of an allocation of YUVs +
    + rsGetElementAtYuv_uchar_V + + Get the V component of an allocation of YUVs +
    + rsGetElementAtYuv_uchar_Y + + Get the Y component of an allocation of YUVs +
    + rsIsObject + + Check for an empty handle +
    + rsIsSphereInFrustum + + Checks if a sphere is within the frustum planes +
    + rsLocaltime + + Convert to local time +
    + rsMatrixGet + + Get one element +
    + rsMatrixInverse + + Inverts a matrix in place +
    + rsMatrixInverseTranspose + + Inverts and transpose a matrix in place +
    + rsMatrixLoad + + Load or copy a matrix +
    + rsMatrixLoadFrustum + + Load a frustum projection matrix +
    + rsMatrixLoadIdentity + + Load identity matrix +
    + rsMatrixLoadMultiply + + Multiply two matrices +
    + rsMatrixLoadOrtho + + Load an orthographic projection matrix +
    + rsMatrixLoadPerspective + + Load a perspective projection matrix +
    + rsMatrixLoadRotate + + Load a rotation matrix +
    + rsMatrixLoadScale + + Load a scaling matrix +
    + rsMatrixLoadTranslate + + Load a translation matrix +
    + rsMatrixMultiply + + Multiply a matrix by a vector or another matrix +
    + rsMatrixRotate + + Apply a rotation to a transformation matrix +
    + rsMatrixScale + + Apply a scaling to a transformation matrix +
    + rsMatrixSet + + Set one element +
    + rsMatrixTranslate + + Apply a translation to a transformation matrix +
    + rsMatrixTranspose + + Transpose a matrix place +
    + rsPackColorTo8888 + + Create a uchar4 RGBA from floats +
    + rsQuaternionAdd + + Add two quaternions +
    + rsQuaternionConjugate + + Conjugate a quaternion +
    + rsQuaternionDot + + Dot product of two quaternions +
    + rsQuaternionGetMatrixUnit + + Get a rotation matrix from a quaternion +
    + rsQuaternionLoadRotate + + Create a rotation quaternion +
    + rsQuaternionLoadRotateUnit + + Quaternion that represents a rotation about an arbitrary unit vector +
    + rsQuaternionMultiply + + Multiply a quaternion by a scalar or another quaternion +
    + rsQuaternionNormalize + + Normalize a quaternion +
    + rsQuaternionSet + + Create a quaternion +
    + rsQuaternionSlerp + + Spherical linear interpolation between two quaternions +
    + rsRand + + Pseudo-random number +
    + rsSample + + Sample a value from a texture allocation +
    + rsSamplerGetAnisotropy + + Anisotropy of the Sampler +
    + rsSamplerGetMagnification + + Sampler magnification value +
    + rsSamplerGetMinification + + Sampler minification value +
    + rsSamplerGetWrapS + + Sampler wrap S value +
    + rsSamplerGetWrapT + + Sampler wrap T value +
    + rsSendToClient + + Send a message to the client, non-blocking +
    + rsSendToClientBlocking + + Send a message to the client, blocking +
    + rsSetElementAt + + Set a cell of an allocation +
    + rsTime + + Seconds since January 1, 1970 +
    + rsUnpackColor8888 + + Create a float4 RGBA from uchar4 +
    + rsUptimeMillis + + System uptime in milliseconds +
    + rsUptimeNanos + + System uptime in nanoseconds +
    + rsYuvToRGBA + + Convert a YUV value to RGBA +
    + rsqrt + + Reciprocal of a square root +
    + sign + + Sign of a value +
    + sin + + Sine +
    + sincos + + Sine and cosine +
    + sinh + + Hyperbolic sine +
    + sinpi + + Sine of a number multiplied by pi +
    + sqrt + + Square root +
    + step + + 0 if less than a value, 0 otherwise +
    + tan + + Tangent +
    + tanh + + Hyperbolic tangent +
    + tanpi + + Tangent of a number multiplied by pi +
    + tgamma + + Gamma function +
    + trunc + + Truncates a floating point +
    +

    Deprecated Types

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + rs_blend_dst_func + + Deprecated. Blend destination function +
    + rs_blend_src_func + + Deprecated. Blend source function +
    + rs_cull_mode + + Deprecated. Culling mode +
    + rs_depth_func + + Deprecated. Depth function +
    + rs_font + + Deprecated. Handle to a Font +
    + rs_mesh + + Deprecated. Handle to a Mesh +
    + rs_primitive + + Deprecated. How to intepret mesh vertex data +
    + rs_program_fragment + + Deprecated. Handle to a ProgramFragment +
    + rs_program_raster + + Deprecated. Handle to a ProgramRaster +
    + rs_program_store + + Deprecated. Handle to a ProgramStore +
    + rs_program_vertex + + Deprecated. Handle to a ProgramVertex +
    +

    Deprecated Functions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + rsClamp + + Deprecated. Restrain a value to a range +
    + rsFrac + + Deprecated. Returns the fractional part of a float +
    + rsGetAllocation + + Deprecated. Return the Allocation for a given pointer +
    + rsgAllocationSyncAll + + Deprecated. Sync the contents of an allocation +
    + rsgBindColorTarget + + Deprecated. Set the color target +
    + rsgBindConstant + + Deprecated. Bind a constant allocation +
    + rsgBindDepthTarget + + Deprecated. Set the depth target +
    + rsgBindFont + + Deprecated. Bind a font object +
    + rsgBindProgramFragment + + Deprecated. Bind a ProgramFragment +
    + rsgBindProgramRaster + + Deprecated. Bind a ProgramRaster +
    + rsgBindProgramStore + + Deprecated. Bind a ProgramStore +
    + rsgBindProgramVertex + + Deprecated. Bind a ProgramVertex +
    + rsgBindSampler + + Deprecated. Bind a sampler +
    + rsgBindTexture + + Deprecated. Bind a texture allocation +
    + rsgClearAllRenderTargets + + Deprecated. Clear all color and depth targets +
    + rsgClearColor + + Deprecated. Clear the specified color from the surface +
    + rsgClearColorTarget + + Deprecated. Clear the color target +
    + rsgClearDepth + + Deprecated. Clear the depth surface +
    + rsgClearDepthTarget + + Deprecated. Clear the depth target +
    + rsgDrawMesh + + Deprecated. Draw a mesh +
    + rsgDrawQuad + + Deprecated. Draw a quad +
    + rsgDrawQuadTexCoords + + Deprecated. Draw a textured quad +
    + rsgDrawRect + + Deprecated. Draw a rectangle +
    + rsgDrawSpriteScreenspace + + Deprecated. Draw rectangles in screenspace +
    + rsgDrawText + + Deprecated. Draw a text string +
    + rsgFinish + + Deprecated. End rendering commands +
    + rsgFontColor + + Deprecated. Set the font color +
    + rsgGetHeight + + Deprecated. Get the surface height +
    + rsgGetWidth + + Deprecated. Get the surface width +
    + rsgMeasureText + + Deprecated. Get the bounding box for a text string +
    + rsgMeshComputeBoundingBox + + Deprecated. Compute a bounding box +
    + rsgMeshGetIndexAllocation + + Deprecated. Return an allocation containing index data +
    + rsgMeshGetPrimitive + + Deprecated. Return the primitive +
    + rsgMeshGetPrimitiveCount + + Deprecated. Return the number of index sets +
    + rsgMeshGetVertexAllocation + + Deprecated. Return a vertex allocation +
    + rsgMeshGetVertexAllocationCount + + Deprecated. Return the number of vertex allocations +
    + rsgProgramFragmentConstantColor + + Deprecated. Set the constant color for a fixed function emulation program +
    + rsgProgramRasterGetCullMode + + Deprecated. Get program raster cull mode +
    + rsgProgramRasterIsPointSpriteEnabled + + Deprecated. Get program raster point sprite state +
    + rsgProgramStoreGetBlendDstFunc + + Deprecated. Get program store blend destination function +
    + rsgProgramStoreGetBlendSrcFunc + + Deprecated. Get program store blend source function +
    + rsgProgramStoreGetDepthFunc + + Deprecated. Get program store depth function +
    + rsgProgramStoreIsColorMaskAlphaEnabled + + Deprecated. Get program store alpha component color mask +
    + rsgProgramStoreIsColorMaskBlueEnabled + + Deprecated. Get program store blur component color mask +
    + rsgProgramStoreIsColorMaskGreenEnabled + + Deprecated. Get program store green component color mask +
    + rsgProgramStoreIsColorMaskRedEnabled + + Deprecated. Get program store red component color mask +
    + rsgProgramStoreIsDepthMaskEnabled + + Deprecated. Get program store depth mask +
    + rsgProgramStoreIsDitherEnabled + + Deprecated. Get program store dither state +
    + rsgProgramVertexGetProjectionMatrix + + Deprecated. Get the projection matrix for a fixed function vertex program +
    + rsgProgramVertexLoadModelMatrix + + Deprecated. Load the model matrix for a bound fixed function vertex program +
    + rsgProgramVertexLoadProjectionMatrix + + Deprecated. Load the projection matrix for a bound fixed function vertex program +
    + rsgProgramVertexLoadTextureMatrix + + Deprecated. Load the texture matrix for a bound fixed function vertex program +
    +
    diff --git a/docs/html/guide/topics/renderscript/reference/overview.jd b/docs/html/guide/topics/renderscript/reference/overview.jd new file mode 100644 index 0000000..f85b843 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/overview.jd @@ -0,0 +1,2676 @@ +page.title=RenderScript Runtime API Reference + +@jd:body + +
    +

    Overview

    +

    RenderScript is a high-performance runtime that provides compute operations at the native level. +RenderScript code is compiled on devices at runtime to allow platform-independence as well. +

    + +

    This reference documentation describes the RenderScript runtime APIs, which you can utilize +to write RenderScript code in C99. The RenderScript compute header files are automatically +included for you. +

    + +

    To use RenderScript, you need to utilize the RenderScript runtime APIs documented here as well +as the Android framework APIs for RenderScript. For documentation on the Android framework +APIs, see the android.renderscript package reference. +

    + +

    For more information on how to develop with RenderScript and how the runtime and Android +framework APIs interact, see the RenderScript developer guide and the RenderScript samples. +

    +

    Numerical Types

    +

    Scalars:
    +

    + +

    RenderScript supports the following scalar numerical types: + + + + + +
    8 bits 16 bits 32 bits 64 bits
    Integer: char, int8_t short, int16_t int32_t long, long long, int64_t
    Unsigned integer: uchar, uint8_t ushort, uint16_t uint, uint32_t ulong, uint64_t
    Floating point: float double
    +

    + +

    Vectors:
    +

    + +

    RenderScript supports fixed size vectors of length 2, 3, and 4. +Vectors are declared using the common type name followed by a 2, 3, or 4. +E.g. float4, int3, double2, ulong4. +

    + +

    To create vector literals, use the vector type followed by the values enclosed +between parentheses, e.g. (float3)(1.0f, 2.0f, 3.0f). +

    + +

    Entries of a vector can be accessed using different naming styles. +

    + +

    Single entries can be accessed by following the variable name with a dot and:

    +

    + +

    For example, with int4 myVar; the following are equivalent:
    + myVar.x == myVar.r == myVar.s0 == myVar.S0
    + myVar.y == myVar.g == myVar.s1 == myVar.S1
    + myVar.z == myVar.b == myVar.s2 == myVar.S2
    + myVar.w == myVar.a == myVar.s3 == myVar.S3
    +

    + +

    Multiple entries of a vector can be accessed at once by using an identifier that is +the concatenation of multiple letters or indices. The resulting vector has a size +equal to the number of entries named. +

    + +

    With the example above, the middle two entries can be accessed using +myVar.yz, myVar.gb, myVar.s12, and myVar.S12. +

    + +

    The entries don't have to be contiguous or in increasing order. Entries can even be +repeated, as long as we're not trying to assign to it. You also can't mix the naming +styles. +

    + +

    Here are examples of what can or can't be done:
    +float4 v4;
    +float3 v3;
    +float2 v2;
    +v2 = v4.xx; // Valid
    +v3 = v4.zxw; // Valid
    +v3 = v4.bba; // Valid
    +v3 = v4.s032; // Valid
    +v3.s120 = v4.S233; // Valid
    +v4.yz = v3.rg; // Valid
    +v4.yzx = v3.rg; // Invalid: mismatched sizes
    +v4.yzz = v3; // Invalid: z appears twice in an assignment
    +v3 = v3.xas0; // Invalid: can't mix xyzw with rgba nor s0...
    +v3 = v4.s034; // Invalid: the digit can only be 0, 1, 2, or 3
    +
    +

    + +

    Matrices and Quaternions:
    +

    + +

    RenderScript supports fixed size square matrices of floats of size 2x2, 3x3, and 4x4. +The types are named rs_matrix2x2, rs_matrix3x3, and rs_matrix4x4. See +Matrix Functions for the list of operations. +

    + +

    Quaternions are also supported via rs_quaternion. See Quaterion Functions for the list +of operations. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Types
    + char2 + + Two 8 bit signed integers +
    + char3 + + Three 8 bit signed integers +
    + char4 + + Four 8 bit signed integers +
    + double2 + + Two 64 bit floats +
    + double3 + + Three 64 bit floats +
    + double4 + + Four 64 bit floats +
    + float2 + + Two 32 bit floats +
    + float3 + + Three 32 bit floats +
    + float4 + + Four 32 bit floats +
    + int16_t + + 16 bit signed integer +
    + int2 + + Two 32 bit signed integers +
    + int3 + + Three 32 bit signed integers +
    + int32_t + + 32 bit signed integer +
    + int4 + + Four 32 bit signed integers +
    + int64_t + + 64 bit signed integer +
    + int8_t + + 8 bit signed integer +
    + long2 + + Two 64 bit signed integers +
    + long3 + + Three 64 bit signed integers +
    + long4 + + Four 64 bit signed integers +
    + rs_matrix2x2 + + 2x2 matrix of 32 bit floats +
    + rs_matrix3x3 + + 3x3 matrix of 32 bit floats +
    + rs_matrix4x4 + + 4x4 matrix of 32 bit floats +
    + rs_quaternion + + Quaternion +
    + short2 + + Two 16 bit signed integers +
    + short3 + + Three 16 bit signed integers +
    + short4 + + Four 16 bit signed integers +
    + size_t + + Unsigned size type +
    + ssize_t + + Signed size type +
    + uchar + + 8 bit unsigned integer +
    + uchar2 + + Two 8 bit unsigned integers +
    + uchar3 + + Three 8 bit unsigned integers +
    + uchar4 + + Four 8 bit unsigned integers +
    + uint + + 32 bit unsigned integer +
    + uint16_t + + 16 bit unsigned integer +
    + uint2 + + Two 32 bit unsigned integers +
    + uint3 + + Three 32 bit unsigned integers +
    + uint32_t + + 32 bit unsigned integer +
    + uint4 + + Four 32 bit unsigned integers +
    + uint64_t + + 64 bit unsigned integer +
    + uint8_t + + 8 bit unsigned integer +
    + ulong + + 64 bit unsigned integer +
    + ulong2 + + Two 64 bit unsigned integers +
    + ulong3 + + Three 64 bit unsigned integers +
    + ulong4 + + Four 64 bit unsigned integers +
    + ushort + + 16 bit unsigned integer +
    + ushort2 + + Two 16 bit unsigned integers +
    + ushort3 + + Three 16 bit unsigned integers +
    + ushort4 + + Four 16 bit unsigned integers +
    +

    Object Types

    +

    The types below are used to manipulate RenderScript objects like allocations, samplers, +elements, and scripts. Most of these object are created using the Java RenderScript APIs. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Types
    + rs_allocation + + Handle to an allocation +
    + rs_allocation_cubemap_face + + Enum for selecting cube map faces +
    + rs_allocation_usage_type + + Bitfield to specify how an allocation is used +
    + rs_data_kind + + Element data kind +
    + rs_data_type + + Element basic data type +
    + rs_element + + Handle to an element +
    + rs_sampler + + Handle to a Sampler +
    + rs_sampler_value + + Sampler wrap T value +
    + rs_script + + Handle to a Script +
    + rs_type + + Handle to a Type +
    +

    Conversion Functions

    +

    The functions below convert from a numerical vector type to another, of from one color +representation to another. +

    + + + + + + + + + + + + + + + + + + +
    Functions
    + convert + + Convert numerical vectors +
    + rsPackColorTo8888 + + Create a uchar4 RGBA from floats +
    + rsUnpackColor8888 + + Create a float4 RGBA from uchar4 +
    + rsYuvToRGBA + + Convert a YUV value to RGBA +
    +

    Mathematical Constants and Functions

    +

    The mathematical functions below can be applied to scalars and vectors. When applied +to vectors, the returned value is a vector of the function applied to each entry of the input. +

    + +

    For example:
    +float3 a, b;
    +// The following call sets
    +// a.x to sin(b.x),
    +// a.y to sin(b.y), and
    +// a.z to sin(b.z).
    +a = sin(b);
    +
    +

    + +

    See Vector Math Functions for functions like distance() and length() that interpret +instead the input as a single vector in n-dimensional space. +

    + +

    The precision of the mathematical operations on 32 bit floats is affected by the pragmas +rs_fp_relaxed and rs_fp_full. Under rs_fp_relaxed, subnormal values may be flushed to zero and +rounding may be done towards zero. In comparison, rs_fp_full requires correct handling of +subnormal values, i.e. smaller than 1.17549435e-38f. rs_fp_rull also requires round to nearest +with ties to even. +

    + +

    Different precision/speed tradeoffs can be achieved by using variants of the common math +functions. Functions with a name starting with

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Constants
    + M_1_PI + + 1 / pi, as a 32 bit float +
    + M_2_PI + + 2 / pi, as a 32 bit float +
    + M_2_SQRTPI + + 2 / sqrt(pi), as a 32 bit float +
    + M_E + + e, as a 32 bit float +
    + M_LN10 + + log_e(10), as a 32 bit float +
    + M_LN2 + + log_e(2), as a 32 bit float +
    + M_LOG10E + + log_10(e), as a 32 bit float +
    + M_LOG2E + + log_2(e), as a 32 bit float +
    + M_PI + + pi, as a 32 bit float +
    + M_PI_2 + + pi / 2, as a 32 bit float +
    + M_PI_4 + + pi / 4, as a 32 bit float +
    + M_SQRT1_2 + + 1 / sqrt(2), as a 32 bit float +
    + M_SQRT2 + + sqrt(2), as a 32 bit float +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + abs + + Absolute value of an integer +
    + acos + + Inverse cosine +
    + acosh + + Inverse hyperbolic cosine +
    + acospi + + Inverse cosine divided by pi +
    + asin + + Inverse sine +
    + asinh + + Inverse hyperbolic sine +
    + asinpi + + Inverse sine divided by pi +
    + atan + + Inverse tangent +
    + atan2 + + Inverse tangent of a ratio +
    + atan2pi + + Inverse tangent of a ratio, divided by pi +
    + atanh + + Inverse hyperbolic tangent +
    + atanpi + + Inverse tangent divided by pi +
    + cbrt + + Cube root +
    + ceil + + Smallest integer not less than a value +
    + clamp + + Restrain a value to a range +
    + clz + + Number of leading 0 bits +
    + copysign + + Copies the sign of a number to another +
    + cos + + Cosine +
    + cosh + + Hypebolic cosine +
    + cospi + + Cosine of a number multiplied by pi +
    + degrees + + Converts radians into degrees +
    + erf + + Mathematical error function +
    + erfc + + Mathematical complementary error function +
    + exp + + e raised to a number +
    + exp10 + + 10 raised to a number +
    + exp2 + + 2 raised to a number +
    + expm1 + + e raised to a number minus one +
    + fabs + + Absolute value of a float +
    + fdim + + Positive difference between two values +
    + floor + + Smallest integer not greater than a value +
    + fma + + Multiply and add +
    + fmax + + Maximum of two floats +
    + fmin + + Minimum of two floats +
    + fmod + + Modulo +
    + fract + + Positive fractional part +
    + frexp + + Binary mantissa and exponent +
    + half_recip + + Reciprocal computed to 16 bit precision +
    + half_rsqrt + + Reciprocal of a square root computed to 16 bit precision +
    + half_sqrt + + Square root computed to 16 bit precision +
    + hypot + + Hypotenuse +
    + ilogb + + Base two exponent +
    + ldexp + + Creates a floating point from mantissa and exponent +
    + lgamma + + Natural logarithm of the gamma function +
    + log + + Natural logarithm +
    + log10 + + Base 10 logarithm +
    + log1p + + Natural logarithm of a value plus 1 +
    + log2 + + Base 2 logarithm +
    + logb + + Base two exponent +
    + mad + + Multiply and add +
    + max + + Maximum +
    + min + + Minimum +
    + mix + + Mixes two values +
    + modf + + Integral and fractional components +
    + nan + + Not a Number +
    + native_acos + + Approximate inverse cosine +
    + native_acosh + + Approximate inverse hyperbolic cosine +
    + native_acospi + + Approximate inverse cosine divided by pi +
    + native_asin + + Approximate inverse sine +
    + native_asinh + + Approximate inverse hyperbolic sine +
    + native_asinpi + + Approximate inverse sine divided by pi +
    + native_atan + + Approximate inverse tangent +
    + native_atan2 + + Approximate inverse tangent of a ratio +
    + native_atan2pi + + Approximate inverse tangent of a ratio, divided by pi +
    + native_atanh + + Approximate inverse hyperbolic tangent +
    + native_atanpi + + Approximate inverse tangent divided by pi +
    + native_cbrt + + Approximate cube root +
    + native_cos + + Approximate cosine +
    + native_cosh + + Approximate hypebolic cosine +
    + native_cospi + + Approximate cosine of a number multiplied by pi +
    + native_divide + + Approximate division +
    + native_exp + + Approximate e raised to a number +
    + native_exp10 + + Approximate 10 raised to a number +
    + native_exp2 + + Approximate 2 raised to a number +
    + native_expm1 + + Approximate e raised to a number minus one +
    + native_hypot + + Approximate hypotenuse +
    + native_log + + Approximate natural logarithm +
    + native_log10 + + Approximate base 10 logarithm +
    + native_log1p + + Approximate natural logarithm of a value plus 1 +
    + native_log2 + + Approximate base 2 logarithm +
    + native_powr + + Approximate positive base raised to an exponent +
    + native_recip + + Approximate reciprocal +
    + native_rootn + + Approximate nth root +
    + native_rsqrt + + Approximate reciprocal of a square root +
    + native_sin + + Approximate sine +
    + native_sincos + + Approximate sine and cosine +
    + native_sinh + + Approximate hyperbolic sine +
    + native_sinpi + + Approximate sine of a number multiplied by pi +
    + native_sqrt + + Approximate square root +
    + native_tan + + Approximate tangent +
    + native_tanh + + Approximate hyperbolic tangent +
    + native_tanpi + + Approximate tangent of a number multiplied by pi +
    + nextafter + + Next floating point number +
    + pow + + Base raised to an exponent +
    + pown + + Base raised to an integer exponent +
    + powr + + Positive base raised to an exponent +
    + radians + + Converts degrees into radians +
    + remainder + + Remainder of a division +
    + remquo + + Remainder and quotient of a division +
    + rint + + Round to even +
    + rootn + + Nth root +
    + round + + Round away from zero +
    + rsRand + + Pseudo-random number +
    + rsqrt + + Reciprocal of a square root +
    + sign + + Sign of a value +
    + sin + + Sine +
    + sincos + + Sine and cosine +
    + sinh + + Hyperbolic sine +
    + sinpi + + Sine of a number multiplied by pi +
    + sqrt + + Square root +
    + step + + 0 if less than a value, 0 otherwise +
    + tan + + Tangent +
    + tanh + + Hyperbolic tangent +
    + tanpi + + Tangent of a number multiplied by pi +
    + tgamma + + Gamma function +
    + trunc + + Truncates a floating point +
    +

    Vector Math Functions

    +

    These functions interpret the input arguments as representation of vectors in +n-dimensional space. +

    + +

    The precision of the mathematical operations on 32 bit floats is affected by the pragmas +rs_fp_relaxed and rs_fp_full. See Mathematical Constants and Functions for details. +

    + +

    Different precision/speed tradeoffs can be achieved by using variants of the common math +functions. Functions with a name starting with

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + cross + + Cross product of two vectors +
    + distance + + Distance between two points +
    + dot + + Dot product of two vectors +
    + fast_distance + + Approximate distance between two points +
    + fast_length + + Approximate length of a vector +
    + fast_normalize + + Approximate normalized vector +
    + length + + Length of a vector +
    + native_distance + + Approximate distance between two points +
    + native_length + + Approximate length of a vector +
    + native_normalize + + Approximately normalize a vector +
    + normalize + + Normalize a vector +
    +

    Matrix Functions

    +

    These functions let you manipulate square matrices of rank 2x2, 3x3, and 4x4. +They are particularly useful for graphical transformations and are compatible +with OpenGL. +

    + +

    We use a zero-based index for rows and columns. E.g. the last element of a +rs_matrix4x4 is found at (3, 3). +

    + +

    RenderScript uses column-major matrices and column-based vectors. Transforming +a vector is done by postmultiplying the vector, e.g. (matrix * vector), +as provided by rsMatrixMultiply(). +

    + +

    To create a transformation matrix that performs two transformations at once, +multiply the two source matrices, with the first transformation as the right +argument. E.g. to create a transformation matrix that applies the +transformation s1 followed by s2, call rsMatrixLoadMultiply(&combined, &s2, &s1). +This derives from s2 * (s1 * v), which is (s2 * s1) * v. +

    + +

    We have two style of functions to create transformation matrices: +rsMatrixLoadTransformation and rsMatrixTransformation. The former +style simply stores the transformation matrix in the first argument. The latter +modifies a pre-existing transformation matrix so that the new transformation +happens first. E.g. if you call rsMatrixTranslate() on a matrix that already +does a scaling, the resulting matrix when applied to a vector will first do the +translation then the scaling. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsExtractFrustumPlanes + + Compute frustum planes +
    + rsIsSphereInFrustum + + Checks if a sphere is within the frustum planes +
    + rsMatrixGet + + Get one element +
    + rsMatrixInverse + + Inverts a matrix in place +
    + rsMatrixInverseTranspose + + Inverts and transpose a matrix in place +
    + rsMatrixLoad + + Load or copy a matrix +
    + rsMatrixLoadFrustum + + Load a frustum projection matrix +
    + rsMatrixLoadIdentity + + Load identity matrix +
    + rsMatrixLoadMultiply + + Multiply two matrices +
    + rsMatrixLoadOrtho + + Load an orthographic projection matrix +
    + rsMatrixLoadPerspective + + Load a perspective projection matrix +
    + rsMatrixLoadRotate + + Load a rotation matrix +
    + rsMatrixLoadScale + + Load a scaling matrix +
    + rsMatrixLoadTranslate + + Load a translation matrix +
    + rsMatrixMultiply + + Multiply a matrix by a vector or another matrix +
    + rsMatrixRotate + + Apply a rotation to a transformation matrix +
    + rsMatrixScale + + Apply a scaling to a transformation matrix +
    + rsMatrixSet + + Set one element +
    + rsMatrixTranslate + + Apply a translation to a transformation matrix +
    + rsMatrixTranspose + + Transpose a matrix place +
    +

    Quaternion Functions

    +

    The following functions manipulate quaternions. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsQuaternionAdd + + Add two quaternions +
    + rsQuaternionConjugate + + Conjugate a quaternion +
    + rsQuaternionDot + + Dot product of two quaternions +
    + rsQuaternionGetMatrixUnit + + Get a rotation matrix from a quaternion +
    + rsQuaternionLoadRotate + + Create a rotation quaternion +
    + rsQuaternionLoadRotateUnit + + Quaternion that represents a rotation about an arbitrary unit vector +
    + rsQuaternionMultiply + + Multiply a quaternion by a scalar or another quaternion +
    + rsQuaternionNormalize + + Normalize a quaternion +
    + rsQuaternionSet + + Create a quaternion +
    + rsQuaternionSlerp + + Spherical linear interpolation between two quaternions +
    +

    Atomic Update Functions

    +

    To update values shared between multiple threads, use the functions below. +They ensure that the values are atomically updated, i.e. that the memory +reads, the updates, and the memory writes are done in the right order. +

    + +

    These functions are slower than their non-atomic equivalents, so use +them only when synchronization is needed. +

    + +

    Note that in RenderScript, your code is likely to be running in separate +threads even though you did not explicitely create them. The RenderScript +runtime will very often split the execution of one kernel across multiple +threads. Updating globals should be done with atomic functions. If possible, +modify your algorithm to avoid them altogether. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsAtomicAdd + + Thread-safe addition +
    + rsAtomicAnd + + Thread-safe bitwise and +
    + rsAtomicCas + + Thread-safe compare and set +
    + rsAtomicDec + + Thread-safe decrement +
    + rsAtomicInc + + Thread-safe increment +
    + rsAtomicMax + + Thread-safe maximum +
    + rsAtomicMin + + Thread-safe minimum +
    + rsAtomicOr + + Thread-safe bitwise or +
    + rsAtomicSub + + Thread-safe subtraction +
    + rsAtomicXor + + Thread-safe bitwise exclusive or +
    +

    Time Functions and Types

    +

    The functions below can be used to tell the current clock time and the current +system up time. It is not recommended to call these functions inside of a kernel. +

    + + + + + + + + + + +
    Types
    + rs_time_t + + Seconds since January 1, 1970 +
    + rs_tm + + Date and time structure +
    + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsGetDt + + Elapsed time since last call +
    + rsLocaltime + + Convert to local time +
    + rsTime + + Seconds since January 1, 1970 +
    + rsUptimeMillis + + System uptime in milliseconds +
    + rsUptimeNanos + + System uptime in nanoseconds +
    +

    Allocation Data Access Functions

    +

    The functions below can be used to get and set the cells that comprise +an allocation. +

    +The rsGetElementAt and rsSetElement* functions are somewhat misnamed. +They don't get or set elements, which are akin to data types; they get +or set cells. Think of them as rsGetCellAt and and rsSetCellAt. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsAllocationCopy1DRange + + Copy consecutive cells between allocations +
    + rsAllocationCopy2DRange + + Copy a rectangular region of cells between allocations +
    + rsAllocationVLoadX + + Get a vector from an allocation of scalars +
    + rsAllocationVStoreX + + Store a vector into an allocation of scalars +
    + rsGetElementAt + + Return a cell from an allocation +
    + rsGetElementAtYuv_uchar_U + + Get the U component of an allocation of YUVs +
    + rsGetElementAtYuv_uchar_V + + Get the V component of an allocation of YUVs +
    + rsGetElementAtYuv_uchar_Y + + Get the Y component of an allocation of YUVs +
    + rsSample + + Sample a value from a texture allocation +
    + rsSetElementAt + + Set a cell of an allocation +
    +

    Object Characteristics Functions

    +

    The functions below can be used to query the characteristics of an Allocation, Element, +or Sampler object. These objects are created from Java. You can't create them from a +script. +

    + +

    Allocations:
    +

    + +

    Allocations are the primary method used to pass data to and from RenderScript kernels. +

    + +

    They are a structured collection of cells that can be used to store bitmaps, textures, +arbitrary data points, etc. +

    + +

    This collection of cells may have many dimensions (X, Y, Z, Array0, Array1, Array2, Array3), +faces (for cubemaps), and level of details (for mipmapping). +

    + +

    See the android.renderscript.Allocation for details on to create Allocations. +

    + +

    Elements:
    +

    + +

    The term "element" is used a bit ambiguously in RenderScript, as both type information +for the cells of an Allocation and the instantiation of that type. For example:

    +

    + +

    The functions below let you query the characteristics of the type specificiation. +

    + +

    An Element can specify a simple data types as found in C, e.g. an integer, float, or +boolean. It can also specify a handle to a RenderScript object. See rs_data_type for +a list of basic types. +

    + +

    Elements can specify fixed size vector (of size 2, 3, or 4) versions of the basic types. +Elements can be grouped together into complex Elements, creating the equivalent of +C structure definitions. +

    + +

    Elements can also have a kind, which is semantic information used to interpret pixel +data. See rs_data_kind. +

    + +

    When creating Allocations of common elements, you can simply use one of the many predefined +Elements like F32_2. +

    + +

    To create complex Elements, use the Element.Builder Java class. +

    + +

    Samplers:
    +

    + +

    Samplers objects define how Allocations can be read as structure within a kernel. +See android.renderscript.S. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsAllocationGetDimFaces + + Presence of more than one face +
    + rsAllocationGetDimLOD + + Presence of levels of detail +
    + rsAllocationGetDimX + + Size of the X dimension +
    + rsAllocationGetDimY + + Size of the Y dimension +
    + rsAllocationGetDimZ + + Size of the Z dimension +
    + rsAllocationGetElement + + Get the object that describes the cell of an Allocation +
    + rsClearObject + + Release an object +
    + rsElementGetBytesSize + + Size of an Element +
    + rsElementGetDataKind + + Kind of an Element +
    + rsElementGetDataType + + Data type of an Element +
    + rsElementGetSubElement + + Sub-element of a complex Element +
    + rsElementGetSubElementArraySize + + Array size of a sub-element of a complex Element +
    + rsElementGetSubElementCount + + Number of sub-elements +
    + rsElementGetSubElementName + + Name of a sub-element +
    + rsElementGetSubElementNameLength + + Length of the name of a sub-element +
    + rsElementGetSubElementOffsetBytes + + Offset of the instantiated sub-element +
    + rsElementGetVectorSize + + Vector size of the Element +
    + rsIsObject + + Check for an empty handle +
    + rsSamplerGetAnisotropy + + Anisotropy of the Sampler +
    + rsSamplerGetMagnification + + Sampler magnification value +
    + rsSamplerGetMinification + + Sampler minification value +
    + rsSamplerGetWrapS + + Sampler wrap S value +
    + rsSamplerGetWrapT + + Sampler wrap T value +
    +

    Kernel Invocation Functions and Types

    +

    The rsForEach() function can be used to invoke the root kernel of a script. +

    + + + + + + + + + + +
    Types
    + rs_for_each_strategy_t + + Suggested cell processing order +
    + rs_script_call_t + + Cell iteration information +
    + + + + + + +
    Functions
    + rsForEach + + Invoke the root kernel of a script +
    +

    Input/Output Functions

    +

    These functions are used to:

    +

    + + + + + + + + + + + + + + + + + + +
    Functions
    + rsAllocationIoReceive + + Receive new content from the queue +
    + rsAllocationIoSend + + Send new content to the queue +
    + rsSendToClient + + Send a message to the client, non-blocking +
    + rsSendToClientBlocking + + Send a message to the client, blocking +
    +

    Debugging Functions

    +

    The functions below are intended to be used during application developement. +They should not be used in shipping applications. +

    + + + + + + +
    Functions
    + rsDebug + + Log a message and values +
    +

    Graphics Functions and Types

    +

    The graphics subsystem of RenderScript has been deprecated. +

    +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_allocation_data.jd b/docs/html/guide/topics/renderscript/reference/rs_allocation_data.jd new file mode 100644 index 0000000..3735cce --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_allocation_data.jd @@ -0,0 +1,2925 @@ +page.title=RenderScript Allocation Data Access Functions + +@jd:body + +
    +

    Overview

    +

    The functions below can be used to get and set the cells that comprise +an allocation. +

    +The rsGetElementAt and rsSetElement* functions are somewhat misnamed. +They don't get or set elements, which are akin to data types; they get +or set cells. Think of them as rsGetCellAt and and rsSetCellAt. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsAllocationCopy1DRange + + Copy consecutive cells between allocations +
    + rsAllocationCopy2DRange + + Copy a rectangular region of cells between allocations +
    + rsAllocationVLoadX + + Get a vector from an allocation of scalars +
    + rsAllocationVStoreX + + Store a vector into an allocation of scalars +
    + rsGetElementAt + + Return a cell from an allocation +
    + rsGetElementAtYuv_uchar_U + + Get the U component of an allocation of YUVs +
    + rsGetElementAtYuv_uchar_V + + Get the V component of an allocation of YUVs +
    + rsGetElementAtYuv_uchar_Y + + Get the Y component of an allocation of YUVs +
    + rsSample + + Sample a value from a texture allocation +
    + rsSetElementAt + + Set a cell of an allocation +
    +

    Functions

    + +
    +

    + rsAllocationCopy1DRange + : Copy consecutive cells between allocations +

    +
    + + + + + +
    void rsAllocationCopy1DRange(rs_allocation dstAlloc, uint32_t dstOff, uint32_t dstMip, uint32_t count, rs_allocation srcAlloc, uint32_t srcOff, uint32_t srcMip); + Added in API level 14 +
    +
    +
    Parameters
    + + + + + + + + +
    dstAllocAllocation to copy cells into.
    dstOffOffset in the destination of the first cell to be copied into.
    dstMipMip level in the destination allocation. 0 if mip mapping is not used.
    countNumber of cells to be copied.
    srcAllocSource allocation.
    srcOffOffset in the source of the first cell to be copied.
    srcMipMip level in the source allocation. 0 if mip mapping is not used.
    +
    +
    +

    Copies the specified number of cells from one allocation to another. +

    + +

    The two allocations must be different. Using this function to copy whithin +the same allocation yields undefined results. +

    + +

    The function does not validate whether the offset plus count exceeds the size +of either allocation. Be careful! +

    + +

    This function should only be called between 1D allocations. Calling it +on other allocations is undefined. +

    +
    +
    + + +
    +

    + rsAllocationCopy2DRange + : Copy a rectangular region of cells between allocations +

    +
    + + + + + +
    void rsAllocationCopy2DRange(rs_allocation dstAlloc, uint32_t dstXoff, uint32_t dstYoff, uint32_t dstMip, rs_allocation_cubemap_face dstFace, uint32_t width, uint32_t height, rs_allocation srcAlloc, uint32_t srcXoff, uint32_t srcYoff, uint32_t srcMip, rs_allocation_cubemap_face srcFace); + Added in API level 14 +
    +
    +
    Parameters
    + + + + + + + + + + + + + +
    dstAllocAllocation to copy cells into.
    dstXoffX offset in the destination of the region to be set.
    dstYoffY offset in the destination of the region to be set.
    dstMipMip level in the destination allocation. 0 if mip mapping is not used.
    dstFaceCubemap face of the destination allocation. Ignored for allocations that aren't cubemaps.
    widthWidth of the incoming region to update.
    heightHeight of the incoming region to update.
    srcAllocSource allocation.
    srcXoffX offset in the source.
    srcYoffY offset in the source.
    srcMipMip level in the source allocation. 0 if mip mapping is not used.
    srcFaceCubemap face of the source allocation. Ignored for allocations that aren't cubemaps.
    +
    +
    +

    Copies a rectangular region of cells from one allocation to another. +(width * heigth) cells are copied. +

    + +

    The two allocations must be different. Using this function to copy whithin +the same allocation yields undefined results. +

    + +

    The function does not validate whether the the source or destination region +exceeds the size of its respective allocation. Be careful! +

    + +

    This function should only be called between 2D allocations. Calling it +on other allocations is undefined. +

    +
    +
    + + +
    +

    + rsAllocationVLoadX + : Get a vector from an allocation of scalars +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    char2 rsAllocationVLoadX_char2(rs_allocation a, uint32_t x); + Added in API level 22 +
    char2 rsAllocationVLoadX_char2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    char2 rsAllocationVLoadX_char2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    char3 rsAllocationVLoadX_char3(rs_allocation a, uint32_t x); + Added in API level 22 +
    char3 rsAllocationVLoadX_char3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    char3 rsAllocationVLoadX_char3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    char4 rsAllocationVLoadX_char4(rs_allocation a, uint32_t x); + Added in API level 22 +
    char4 rsAllocationVLoadX_char4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    char4 rsAllocationVLoadX_char4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    double2 rsAllocationVLoadX_double2(rs_allocation a, uint32_t x); + Added in API level 22 +
    double2 rsAllocationVLoadX_double2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    double2 rsAllocationVLoadX_double2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    double3 rsAllocationVLoadX_double3(rs_allocation a, uint32_t x); + Added in API level 22 +
    double3 rsAllocationVLoadX_double3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    double3 rsAllocationVLoadX_double3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    double4 rsAllocationVLoadX_double4(rs_allocation a, uint32_t x); + Added in API level 22 +
    double4 rsAllocationVLoadX_double4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    double4 rsAllocationVLoadX_double4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    float2 rsAllocationVLoadX_float2(rs_allocation a, uint32_t x); + Added in API level 22 +
    float2 rsAllocationVLoadX_float2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    float2 rsAllocationVLoadX_float2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    float3 rsAllocationVLoadX_float3(rs_allocation a, uint32_t x); + Added in API level 22 +
    float3 rsAllocationVLoadX_float3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    float3 rsAllocationVLoadX_float3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    float4 rsAllocationVLoadX_float4(rs_allocation a, uint32_t x); + Added in API level 22 +
    float4 rsAllocationVLoadX_float4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    float4 rsAllocationVLoadX_float4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    int2 rsAllocationVLoadX_int2(rs_allocation a, uint32_t x); + Added in API level 22 +
    int2 rsAllocationVLoadX_int2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    int2 rsAllocationVLoadX_int2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    int3 rsAllocationVLoadX_int3(rs_allocation a, uint32_t x); + Added in API level 22 +
    int3 rsAllocationVLoadX_int3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    int3 rsAllocationVLoadX_int3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    int4 rsAllocationVLoadX_int4(rs_allocation a, uint32_t x); + Added in API level 22 +
    int4 rsAllocationVLoadX_int4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    int4 rsAllocationVLoadX_int4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    long2 rsAllocationVLoadX_long2(rs_allocation a, uint32_t x); + Added in API level 22 +
    long2 rsAllocationVLoadX_long2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    long2 rsAllocationVLoadX_long2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    long3 rsAllocationVLoadX_long3(rs_allocation a, uint32_t x); + Added in API level 22 +
    long3 rsAllocationVLoadX_long3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    long3 rsAllocationVLoadX_long3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    long4 rsAllocationVLoadX_long4(rs_allocation a, uint32_t x); + Added in API level 22 +
    long4 rsAllocationVLoadX_long4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    long4 rsAllocationVLoadX_long4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    short2 rsAllocationVLoadX_short2(rs_allocation a, uint32_t x); + Added in API level 22 +
    short2 rsAllocationVLoadX_short2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    short2 rsAllocationVLoadX_short2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    short3 rsAllocationVLoadX_short3(rs_allocation a, uint32_t x); + Added in API level 22 +
    short3 rsAllocationVLoadX_short3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    short3 rsAllocationVLoadX_short3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    short4 rsAllocationVLoadX_short4(rs_allocation a, uint32_t x); + Added in API level 22 +
    short4 rsAllocationVLoadX_short4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    short4 rsAllocationVLoadX_short4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    uchar2 rsAllocationVLoadX_uchar2(rs_allocation a, uint32_t x); + Added in API level 22 +
    uchar2 rsAllocationVLoadX_uchar2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    uchar2 rsAllocationVLoadX_uchar2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    uchar3 rsAllocationVLoadX_uchar3(rs_allocation a, uint32_t x); + Added in API level 22 +
    uchar3 rsAllocationVLoadX_uchar3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    uchar3 rsAllocationVLoadX_uchar3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    uchar4 rsAllocationVLoadX_uchar4(rs_allocation a, uint32_t x); + Added in API level 22 +
    uchar4 rsAllocationVLoadX_uchar4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    uchar4 rsAllocationVLoadX_uchar4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    uint2 rsAllocationVLoadX_uint2(rs_allocation a, uint32_t x); + Added in API level 22 +
    uint2 rsAllocationVLoadX_uint2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    uint2 rsAllocationVLoadX_uint2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    uint3 rsAllocationVLoadX_uint3(rs_allocation a, uint32_t x); + Added in API level 22 +
    uint3 rsAllocationVLoadX_uint3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    uint3 rsAllocationVLoadX_uint3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    uint4 rsAllocationVLoadX_uint4(rs_allocation a, uint32_t x); + Added in API level 22 +
    uint4 rsAllocationVLoadX_uint4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    uint4 rsAllocationVLoadX_uint4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    ulong2 rsAllocationVLoadX_ulong2(rs_allocation a, uint32_t x); + Added in API level 22 +
    ulong2 rsAllocationVLoadX_ulong2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    ulong2 rsAllocationVLoadX_ulong2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    ulong3 rsAllocationVLoadX_ulong3(rs_allocation a, uint32_t x); + Added in API level 22 +
    ulong3 rsAllocationVLoadX_ulong3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    ulong3 rsAllocationVLoadX_ulong3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    ulong4 rsAllocationVLoadX_ulong4(rs_allocation a, uint32_t x); + Added in API level 22 +
    ulong4 rsAllocationVLoadX_ulong4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    ulong4 rsAllocationVLoadX_ulong4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    ushort2 rsAllocationVLoadX_ushort2(rs_allocation a, uint32_t x); + Added in API level 22 +
    ushort2 rsAllocationVLoadX_ushort2(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    ushort2 rsAllocationVLoadX_ushort2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    ushort3 rsAllocationVLoadX_ushort3(rs_allocation a, uint32_t x); + Added in API level 22 +
    ushort3 rsAllocationVLoadX_ushort3(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    ushort3 rsAllocationVLoadX_ushort3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    ushort4 rsAllocationVLoadX_ushort4(rs_allocation a, uint32_t x); + Added in API level 22 +
    ushort4 rsAllocationVLoadX_ushort4(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 22 +
    ushort4 rsAllocationVLoadX_ushort4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    +
    +
    Parameters
    + + + + + +
    aAllocation to get the data from.
    xX offset in the allocation of the first cell to be copied from.
    yY offset in the allocation of the first cell to be copied from.
    zZ offset in the allocation of the first cell to be copied from.
    +
    +
    +

    This function returns a vector composed of successive cells of the allocation. +It assumes that the allocation contains scalars. +

    + +

    The "X" in the name indicates that successive values are extracted by +increasing the X index. There are currently no functions to get successive +values incrementing other dimensions. Use multiple calls to rsGetElementAt() +instead. +

    + +

    For example, when calling rsAllocationVLoadX_int4(a, 20, 30), an int4 composed +of a[20, 30], a[21, 30], a[22, 30], and a[23, 30] is returned. +

    + +

    When retrieving from a three dimensional allocations, use the x, y, z variant. +Similarly, use the x, y variant for two dimensional allocations and x for the +mono dimensional allocations. +

    + +

    For efficiency, this function does not validate the inputs. Trying to wrap +the X index, exceeding the size of the allocation, or using indices incompatible +with the dimensionality of the allocation yields undefined results. +

    + +

    See also rsAllocationVStoreX(). +

    +
    +
    + + +
    +

    + rsAllocationVStoreX + : Store a vector into an allocation of scalars +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void rsAllocationVStoreX_char2(rs_allocation a, char2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_char2(rs_allocation a, char2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_char2(rs_allocation a, char2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_char3(rs_allocation a, char3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_char3(rs_allocation a, char3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_char3(rs_allocation a, char3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_char4(rs_allocation a, char4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_char4(rs_allocation a, char4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_char4(rs_allocation a, char4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_double2(rs_allocation a, double2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_double2(rs_allocation a, double2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_double2(rs_allocation a, double2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_double3(rs_allocation a, double3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_double3(rs_allocation a, double3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_double3(rs_allocation a, double3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_double4(rs_allocation a, double4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_double4(rs_allocation a, double4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_double4(rs_allocation a, double4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_float2(rs_allocation a, float2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_float2(rs_allocation a, float2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_float2(rs_allocation a, float2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_float3(rs_allocation a, float3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_float3(rs_allocation a, float3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_float3(rs_allocation a, float3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_float4(rs_allocation a, float4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_float4(rs_allocation a, float4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_float4(rs_allocation a, float4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_int2(rs_allocation a, int2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_int2(rs_allocation a, int2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_int2(rs_allocation a, int2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_int3(rs_allocation a, int3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_int3(rs_allocation a, int3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_int3(rs_allocation a, int3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_int4(rs_allocation a, int4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_int4(rs_allocation a, int4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_int4(rs_allocation a, int4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_long2(rs_allocation a, long2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_long2(rs_allocation a, long2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_long2(rs_allocation a, long2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_long3(rs_allocation a, long3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_long3(rs_allocation a, long3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_long3(rs_allocation a, long3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_long4(rs_allocation a, long4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_long4(rs_allocation a, long4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_long4(rs_allocation a, long4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_short2(rs_allocation a, short2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_short2(rs_allocation a, short2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_short2(rs_allocation a, short2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_short3(rs_allocation a, short3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_short3(rs_allocation a, short3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_short3(rs_allocation a, short3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_short4(rs_allocation a, short4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_short4(rs_allocation a, short4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_short4(rs_allocation a, short4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_uchar2(rs_allocation a, uchar2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_uchar2(rs_allocation a, uchar2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_uchar2(rs_allocation a, uchar2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_uchar3(rs_allocation a, uchar3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_uchar3(rs_allocation a, uchar3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_uchar3(rs_allocation a, uchar3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_uchar4(rs_allocation a, uchar4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_uchar4(rs_allocation a, uchar4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_uchar4(rs_allocation a, uchar4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_uint2(rs_allocation a, uint2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_uint2(rs_allocation a, uint2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_uint2(rs_allocation a, uint2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_uint3(rs_allocation a, uint3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_uint3(rs_allocation a, uint3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_uint3(rs_allocation a, uint3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_uint4(rs_allocation a, uint4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_uint4(rs_allocation a, uint4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_uint4(rs_allocation a, uint4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_ulong2(rs_allocation a, ulong2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_ulong2(rs_allocation a, ulong2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_ulong2(rs_allocation a, ulong2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_ulong3(rs_allocation a, ulong3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_ulong3(rs_allocation a, ulong3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_ulong3(rs_allocation a, ulong3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_ulong4(rs_allocation a, ulong4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_ulong4(rs_allocation a, ulong4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_ulong4(rs_allocation a, ulong4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_ushort2(rs_allocation a, ushort2 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_ushort2(rs_allocation a, ushort2 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_ushort2(rs_allocation a, ushort2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_ushort3(rs_allocation a, ushort3 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_ushort3(rs_allocation a, ushort3 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_ushort3(rs_allocation a, ushort3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    void rsAllocationVStoreX_ushort4(rs_allocation a, ushort4 val, uint32_t x); + Added in API level 22 +
    void rsAllocationVStoreX_ushort4(rs_allocation a, ushort4 val, uint32_t x, uint32_t y); + Added in API level 22 +
    void rsAllocationVStoreX_ushort4(rs_allocation a, ushort4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 22 +
    +
    +
    Parameters
    + + + + + + +
    aAllocation to store the data into.
    valValue to be stored.
    xX offset in the allocation of the first cell to be copied into.
    yY offset in the allocation of the first cell to be copied into.
    zZ offset in the allocation of the first cell to be copied into.
    +
    +
    +

    This function stores the entries of a vector into successive cells of an allocation. +It assumes that the allocation contains scalars. +

    + +

    The "X" in the name indicates that successive values are stored by increasing +the X index. There are currently no functions to store successive values +incrementing other dimensions. Use multiple calls to rsSetElementAt() instead. +

    + +

    For example, when calling rsAllocationVStoreX_int3(a, v, 20, 30), v.x is stored +at a[20, 30], v.y at a[21, 30], and v.z at a[22, 30]. +

    + +

    When storing into a three dimensional allocations, use the x, y, z variant. +Similarly, use the x, y variant for two dimensional allocations and x for the +mono dimensional allocations. +

    + +

    For efficiency, this function does not validate the inputs. Trying to wrap the +X index, exceeding the size of the allocation, or using indexes incompatible +with the dimensionality of the allocation yiels undefined results. +

    + +

    See also rsAllocationVLoadX(). +

    +
    +
    + + +
    +

    + rsGetElementAt + : Return a cell from an allocation +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    char rsGetElementAt_char(rs_allocation a, uint32_t x); +
    char rsGetElementAt_char(rs_allocation a, uint32_t x, uint32_t y); +
    char rsGetElementAt_char(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    char2 rsGetElementAt_char2(rs_allocation a, uint32_t x); +
    char2 rsGetElementAt_char2(rs_allocation a, uint32_t x, uint32_t y); +
    char2 rsGetElementAt_char2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    char3 rsGetElementAt_char3(rs_allocation a, uint32_t x); +
    char3 rsGetElementAt_char3(rs_allocation a, uint32_t x, uint32_t y); +
    char3 rsGetElementAt_char3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    char4 rsGetElementAt_char4(rs_allocation a, uint32_t x); +
    char4 rsGetElementAt_char4(rs_allocation a, uint32_t x, uint32_t y); +
    char4 rsGetElementAt_char4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    const void* rsGetElementAt(rs_allocation a, uint32_t x); +
    const void* rsGetElementAt(rs_allocation a, uint32_t x, uint32_t y); +
    const void* rsGetElementAt(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    double rsGetElementAt_double(rs_allocation a, uint32_t x); +
    double rsGetElementAt_double(rs_allocation a, uint32_t x, uint32_t y); +
    double rsGetElementAt_double(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    double2 rsGetElementAt_double2(rs_allocation a, uint32_t x); +
    double2 rsGetElementAt_double2(rs_allocation a, uint32_t x, uint32_t y); +
    double2 rsGetElementAt_double2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    double3 rsGetElementAt_double3(rs_allocation a, uint32_t x); +
    double3 rsGetElementAt_double3(rs_allocation a, uint32_t x, uint32_t y); +
    double3 rsGetElementAt_double3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    double4 rsGetElementAt_double4(rs_allocation a, uint32_t x); +
    double4 rsGetElementAt_double4(rs_allocation a, uint32_t x, uint32_t y); +
    double4 rsGetElementAt_double4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    float rsGetElementAt_float(rs_allocation a, uint32_t x); +
    float rsGetElementAt_float(rs_allocation a, uint32_t x, uint32_t y); +
    float rsGetElementAt_float(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    float2 rsGetElementAt_float2(rs_allocation a, uint32_t x); +
    float2 rsGetElementAt_float2(rs_allocation a, uint32_t x, uint32_t y); +
    float2 rsGetElementAt_float2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    float3 rsGetElementAt_float3(rs_allocation a, uint32_t x); +
    float3 rsGetElementAt_float3(rs_allocation a, uint32_t x, uint32_t y); +
    float3 rsGetElementAt_float3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    float4 rsGetElementAt_float4(rs_allocation a, uint32_t x); +
    float4 rsGetElementAt_float4(rs_allocation a, uint32_t x, uint32_t y); +
    float4 rsGetElementAt_float4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    int rsGetElementAt_int(rs_allocation a, uint32_t x); +
    int rsGetElementAt_int(rs_allocation a, uint32_t x, uint32_t y); +
    int rsGetElementAt_int(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    int2 rsGetElementAt_int2(rs_allocation a, uint32_t x); +
    int2 rsGetElementAt_int2(rs_allocation a, uint32_t x, uint32_t y); +
    int2 rsGetElementAt_int2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    int3 rsGetElementAt_int3(rs_allocation a, uint32_t x); +
    int3 rsGetElementAt_int3(rs_allocation a, uint32_t x, uint32_t y); +
    int3 rsGetElementAt_int3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    int4 rsGetElementAt_int4(rs_allocation a, uint32_t x); +
    int4 rsGetElementAt_int4(rs_allocation a, uint32_t x, uint32_t y); +
    int4 rsGetElementAt_int4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    long rsGetElementAt_long(rs_allocation a, uint32_t x); +
    long rsGetElementAt_long(rs_allocation a, uint32_t x, uint32_t y); +
    long rsGetElementAt_long(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    long2 rsGetElementAt_long2(rs_allocation a, uint32_t x); +
    long2 rsGetElementAt_long2(rs_allocation a, uint32_t x, uint32_t y); +
    long2 rsGetElementAt_long2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    long3 rsGetElementAt_long3(rs_allocation a, uint32_t x); +
    long3 rsGetElementAt_long3(rs_allocation a, uint32_t x, uint32_t y); +
    long3 rsGetElementAt_long3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    long4 rsGetElementAt_long4(rs_allocation a, uint32_t x); +
    long4 rsGetElementAt_long4(rs_allocation a, uint32_t x, uint32_t y); +
    long4 rsGetElementAt_long4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    short rsGetElementAt_short(rs_allocation a, uint32_t x); +
    short rsGetElementAt_short(rs_allocation a, uint32_t x, uint32_t y); +
    short rsGetElementAt_short(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    short2 rsGetElementAt_short2(rs_allocation a, uint32_t x); +
    short2 rsGetElementAt_short2(rs_allocation a, uint32_t x, uint32_t y); +
    short2 rsGetElementAt_short2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    short3 rsGetElementAt_short3(rs_allocation a, uint32_t x); +
    short3 rsGetElementAt_short3(rs_allocation a, uint32_t x, uint32_t y); +
    short3 rsGetElementAt_short3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    short4 rsGetElementAt_short4(rs_allocation a, uint32_t x); +
    short4 rsGetElementAt_short4(rs_allocation a, uint32_t x, uint32_t y); +
    short4 rsGetElementAt_short4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    uchar rsGetElementAt_uchar(rs_allocation a, uint32_t x); +
    uchar rsGetElementAt_uchar(rs_allocation a, uint32_t x, uint32_t y); +
    uchar rsGetElementAt_uchar(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    uchar2 rsGetElementAt_uchar2(rs_allocation a, uint32_t x); +
    uchar2 rsGetElementAt_uchar2(rs_allocation a, uint32_t x, uint32_t y); +
    uchar2 rsGetElementAt_uchar2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    uchar3 rsGetElementAt_uchar3(rs_allocation a, uint32_t x); +
    uchar3 rsGetElementAt_uchar3(rs_allocation a, uint32_t x, uint32_t y); +
    uchar3 rsGetElementAt_uchar3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    uchar4 rsGetElementAt_uchar4(rs_allocation a, uint32_t x); +
    uchar4 rsGetElementAt_uchar4(rs_allocation a, uint32_t x, uint32_t y); +
    uchar4 rsGetElementAt_uchar4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    uint rsGetElementAt_uint(rs_allocation a, uint32_t x); +
    uint rsGetElementAt_uint(rs_allocation a, uint32_t x, uint32_t y); +
    uint rsGetElementAt_uint(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    uint2 rsGetElementAt_uint2(rs_allocation a, uint32_t x); +
    uint2 rsGetElementAt_uint2(rs_allocation a, uint32_t x, uint32_t y); +
    uint2 rsGetElementAt_uint2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    uint3 rsGetElementAt_uint3(rs_allocation a, uint32_t x); +
    uint3 rsGetElementAt_uint3(rs_allocation a, uint32_t x, uint32_t y); +
    uint3 rsGetElementAt_uint3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    uint4 rsGetElementAt_uint4(rs_allocation a, uint32_t x); +
    uint4 rsGetElementAt_uint4(rs_allocation a, uint32_t x, uint32_t y); +
    uint4 rsGetElementAt_uint4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    ulong rsGetElementAt_ulong(rs_allocation a, uint32_t x); +
    ulong rsGetElementAt_ulong(rs_allocation a, uint32_t x, uint32_t y); +
    ulong rsGetElementAt_ulong(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    ulong2 rsGetElementAt_ulong2(rs_allocation a, uint32_t x); +
    ulong2 rsGetElementAt_ulong2(rs_allocation a, uint32_t x, uint32_t y); +
    ulong2 rsGetElementAt_ulong2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    ulong3 rsGetElementAt_ulong3(rs_allocation a, uint32_t x); +
    ulong3 rsGetElementAt_ulong3(rs_allocation a, uint32_t x, uint32_t y); +
    ulong3 rsGetElementAt_ulong3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    ulong4 rsGetElementAt_ulong4(rs_allocation a, uint32_t x); +
    ulong4 rsGetElementAt_ulong4(rs_allocation a, uint32_t x, uint32_t y); +
    ulong4 rsGetElementAt_ulong4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    ushort rsGetElementAt_ushort(rs_allocation a, uint32_t x); +
    ushort rsGetElementAt_ushort(rs_allocation a, uint32_t x, uint32_t y); +
    ushort rsGetElementAt_ushort(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    ushort2 rsGetElementAt_ushort2(rs_allocation a, uint32_t x); +
    ushort2 rsGetElementAt_ushort2(rs_allocation a, uint32_t x, uint32_t y); +
    ushort2 rsGetElementAt_ushort2(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    ushort3 rsGetElementAt_ushort3(rs_allocation a, uint32_t x); +
    ushort3 rsGetElementAt_ushort3(rs_allocation a, uint32_t x, uint32_t y); +
    ushort3 rsGetElementAt_ushort3(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    ushort4 rsGetElementAt_ushort4(rs_allocation a, uint32_t x); +
    ushort4 rsGetElementAt_ushort4(rs_allocation a, uint32_t x, uint32_t y); +
    ushort4 rsGetElementAt_ushort4(rs_allocation a, uint32_t x, uint32_t y, uint32_t z); +
    +
    +
    +

    This function extracts a single cell from an allocation. +

    + +

    When retrieving from a three dimensional allocations, use the x, y, z variant. +Similarly, use the x, y variant for two dimensional allocations and x for the +mono dimensional allocations. +

    + +

    This function has two styles. One returns the address of the value using a void*, +the other returns the actual value, e.g. rsGetElementAt() vs. rsGetElementAt_int4(). +For primitive types, always use the latter as it is more efficient. +

    +
    +
    + + +
    +

    + rsGetElementAtYuv_uchar_U + : Get the U component of an allocation of YUVs +

    +
    + + + + + +
    uchar rsGetElementAtYuv_uchar_U(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 18 +
    +
    +
    +

    Extracts the U component of a single YUV value from a 2D allocation of YUVs. +

    + +

    Inside an allocation, Y, U, and V components may be stored if different planes +and at different resolutions. The x, y coordinates provided here are in the +dimensions of the Y plane. +

    + +

    See rsGetElementAtYuv_uchar_Y(). +

    +
    +
    + + +
    +

    + rsGetElementAtYuv_uchar_V + : Get the V component of an allocation of YUVs +

    +
    + + + + + +
    uchar rsGetElementAtYuv_uchar_V(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 18 +
    +
    +
    +

    Extracts the V component of a single YUV value from a 2D allocation of YUVs. +

    + +

    Inside an allocation, Y, U, and V components may be stored if different planes +and at different resolutions. The x, y coordinates provided here are in the +dimensions of the Y plane. +

    + +

    See rsGetElementAtYuv_uchar_Y(). +

    +
    +
    + + +
    +

    + rsGetElementAtYuv_uchar_Y + : Get the Y component of an allocation of YUVs +

    +
    + + + + + +
    uchar rsGetElementAtYuv_uchar_Y(rs_allocation a, uint32_t x, uint32_t y); + Added in API level 18 +
    +
    +
    +

    Extracts the Y component of a single YUV value from a 2D allocation of YUVs. +

    + +

    Inside an allocation, Y, U, and V components may be stored if different planes +and at different resolutions. The x, y coordinates provided here are in the +dimensions of the Y plane. +

    + +

    See rsGetElementAtYuv_uchar_U() and rsGetElementAtYuv_uchar_V(). +

    +
    +
    + + +
    +

    + rsSample + : Sample a value from a texture allocation +

    +
    + + + + + + + + + + + + + + + + + +
    float4 rsSample(rs_allocation a, rs_sampler s, float location); + Added in API level 16 +
    float4 rsSample(rs_allocation a, rs_sampler s, float location, float lod); + Added in API level 16 +
    float4 rsSample(rs_allocation a, rs_sampler s, float2 location); + Added in API level 16 +
    float4 rsSample(rs_allocation a, rs_sampler s, float2 location, float lod); + Added in API level 16 +
    +
    +
    Parameters
    + + + + + +
    aAllocation to sample from.
    sSampler state.
    locationLocation to sample from.
    lodMip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used.
    +
    +
    +

    Fetches a value from a texture allocation in a way described by the sampler. +

    + +

    If your allocation is 1D, use the variant with float for location. For 2D, +use the float2 variant. +

    + +

    See android.renderscript.Sampler for more details. +

    +
    +
    + + +
    +

    + rsSetElementAt + : Set a cell of an allocation +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void rsSetElementAt(rs_allocation a, void* ptr, uint32_t x); + Added in API level 18 +
    void rsSetElementAt(rs_allocation a, void* ptr, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_char(rs_allocation a, char val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_char(rs_allocation a, char val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_char(rs_allocation a, char val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_char2(rs_allocation a, char2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_char2(rs_allocation a, char2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_char2(rs_allocation a, char2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_char3(rs_allocation a, char3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_char3(rs_allocation a, char3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_char3(rs_allocation a, char3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_char4(rs_allocation a, char4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_char4(rs_allocation a, char4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_char4(rs_allocation a, char4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_double(rs_allocation a, double val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_double(rs_allocation a, double val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_double(rs_allocation a, double val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_double2(rs_allocation a, double2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_double2(rs_allocation a, double2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_double2(rs_allocation a, double2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_double3(rs_allocation a, double3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_double3(rs_allocation a, double3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_double3(rs_allocation a, double3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_double4(rs_allocation a, double4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_double4(rs_allocation a, double4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_double4(rs_allocation a, double4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_float(rs_allocation a, float val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_float(rs_allocation a, float val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_float(rs_allocation a, float val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_float2(rs_allocation a, float2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_float2(rs_allocation a, float2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_float2(rs_allocation a, float2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_float3(rs_allocation a, float3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_float3(rs_allocation a, float3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_float3(rs_allocation a, float3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_float4(rs_allocation a, float4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_float4(rs_allocation a, float4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_float4(rs_allocation a, float4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_int(rs_allocation a, int val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_int(rs_allocation a, int val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_int(rs_allocation a, int val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_int2(rs_allocation a, int2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_int2(rs_allocation a, int2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_int2(rs_allocation a, int2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_int3(rs_allocation a, int3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_int3(rs_allocation a, int3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_int3(rs_allocation a, int3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_int4(rs_allocation a, int4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_int4(rs_allocation a, int4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_int4(rs_allocation a, int4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_long(rs_allocation a, long val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_long(rs_allocation a, long val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_long(rs_allocation a, long val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_long2(rs_allocation a, long2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_long2(rs_allocation a, long2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_long2(rs_allocation a, long2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_long3(rs_allocation a, long3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_long3(rs_allocation a, long3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_long3(rs_allocation a, long3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_long4(rs_allocation a, long4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_long4(rs_allocation a, long4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_long4(rs_allocation a, long4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_short(rs_allocation a, short val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_short(rs_allocation a, short val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_short(rs_allocation a, short val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_short2(rs_allocation a, short2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_short2(rs_allocation a, short2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_short2(rs_allocation a, short2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_short3(rs_allocation a, short3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_short3(rs_allocation a, short3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_short3(rs_allocation a, short3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_short4(rs_allocation a, short4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_short4(rs_allocation a, short4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_short4(rs_allocation a, short4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_uchar(rs_allocation a, uchar val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_uchar(rs_allocation a, uchar val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_uchar(rs_allocation a, uchar val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_uchar2(rs_allocation a, uchar2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_uchar2(rs_allocation a, uchar2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_uchar2(rs_allocation a, uchar2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_uchar3(rs_allocation a, uchar3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_uchar3(rs_allocation a, uchar3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_uchar3(rs_allocation a, uchar3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_uchar4(rs_allocation a, uchar4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_uchar4(rs_allocation a, uchar4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_uchar4(rs_allocation a, uchar4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_uint(rs_allocation a, uint val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_uint(rs_allocation a, uint val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_uint(rs_allocation a, uint val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_uint2(rs_allocation a, uint2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_uint2(rs_allocation a, uint2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_uint2(rs_allocation a, uint2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_uint3(rs_allocation a, uint3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_uint3(rs_allocation a, uint3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_uint3(rs_allocation a, uint3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_uint4(rs_allocation a, uint4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_uint4(rs_allocation a, uint4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_uint4(rs_allocation a, uint4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_ulong(rs_allocation a, ulong val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_ulong(rs_allocation a, ulong val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_ulong(rs_allocation a, ulong val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_ulong2(rs_allocation a, ulong2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_ulong2(rs_allocation a, ulong2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_ulong2(rs_allocation a, ulong2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_ulong3(rs_allocation a, ulong3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_ulong3(rs_allocation a, ulong3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_ulong3(rs_allocation a, ulong3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_ulong4(rs_allocation a, ulong4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_ulong4(rs_allocation a, ulong4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_ulong4(rs_allocation a, ulong4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_ushort(rs_allocation a, ushort val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_ushort(rs_allocation a, ushort val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_ushort(rs_allocation a, ushort val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_ushort2(rs_allocation a, ushort2 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_ushort2(rs_allocation a, ushort2 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_ushort2(rs_allocation a, ushort2 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_ushort3(rs_allocation a, ushort3 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_ushort3(rs_allocation a, ushort3 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_ushort3(rs_allocation a, ushort3 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    void rsSetElementAt_ushort4(rs_allocation a, ushort4 val, uint32_t x); + Added in API level 18 +
    void rsSetElementAt_ushort4(rs_allocation a, ushort4 val, uint32_t x, uint32_t y); + Added in API level 18 +
    void rsSetElementAt_ushort4(rs_allocation a, ushort4 val, uint32_t x, uint32_t y, uint32_t z); + Added in API level 18 +
    +
    +
    +

    This function stores a value into a single cell of an allocation. +

    + +

    When storing into a three dimensional allocations, use the x, y, z variant. +Similarly, use the x, y variant for two dimensional allocations and x for +the mono dimensional allocations. +

    + +

    This function has two styles. One passes the value to be stored using a void*, +the other has the actual value as an argument, e.g. rsSetElementAt() vs. +rsSetElementAt_int4(). For primitive types, always use the latter as it is +more efficient. +

    + +

    See also rsGetElementAt(). +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_atomic.jd b/docs/html/guide/topics/renderscript/reference/rs_atomic.jd new file mode 100644 index 0000000..e7dde80 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_atomic.jd @@ -0,0 +1,506 @@ +page.title=RenderScript Atomic Update Functions + +@jd:body + +
    +

    Overview

    +

    To update values shared between multiple threads, use the functions below. +They ensure that the values are atomically updated, i.e. that the memory +reads, the updates, and the memory writes are done in the right order. +

    + +

    These functions are slower than their non-atomic equivalents, so use +them only when synchronization is needed. +

    + +

    Note that in RenderScript, your code is likely to be running in separate +threads even though you did not explicitely create them. The RenderScript +runtime will very often split the execution of one kernel across multiple +threads. Updating globals should be done with atomic functions. If possible, +modify your algorithm to avoid them altogether. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsAtomicAdd + + Thread-safe addition +
    + rsAtomicAnd + + Thread-safe bitwise and +
    + rsAtomicCas + + Thread-safe compare and set +
    + rsAtomicDec + + Thread-safe decrement +
    + rsAtomicInc + + Thread-safe increment +
    + rsAtomicMax + + Thread-safe maximum +
    + rsAtomicMin + + Thread-safe minimum +
    + rsAtomicOr + + Thread-safe bitwise or +
    + rsAtomicSub + + Thread-safe subtraction +
    + rsAtomicXor + + Thread-safe bitwise exclusive or +
    +

    Functions

    + +
    +

    + rsAtomicAdd + : Thread-safe addition +

    +
    + + + + + + + + + +
    int32_t rsAtomicAdd(volatile int32_t* addr, int32_t value); + Added in API level 14 +
    int32_t rsAtomicAdd(volatile uint32_t* addr, uint32_t value); + Added in API level 20 +
    +
    +
    Parameters
    + + + +
    addrAddress of the value to modify.
    valueAmount to add.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly adds a value to the value at addr, i.e. *addr += value. +

    +
    +
    + + +
    +

    + rsAtomicAnd + : Thread-safe bitwise and +

    +
    + + + + + + + + + +
    int32_t rsAtomicAnd(volatile int32_t* addr, int32_t value); + Added in API level 14 +
    int32_t rsAtomicAnd(volatile uint32_t* addr, uint32_t value); + Added in API level 20 +
    +
    +
    Parameters
    + + + +
    addrAddress of the value to modify.
    valueValue to and with.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly performs a bitwise and of two values, storing the result back at addr, +i.e. *addr &= value. +

    +
    +
    + + +
    +

    + rsAtomicCas + : Thread-safe compare and set +

    +
    + + + + + + + + + +
    int32_t rsAtomicCas(volatile int32_t* addr, int32_t compareValue, int32_t newValue); + Added in API level 14 +
    uint32_t rsAtomicCas(volatile uint32_t* addr, uint32_t compareValue, uint32_t newValue); + Added in API level 14 +
    +
    +
    Parameters
    + + + + +
    addrAddress of the value to compare and replace if the test passes.
    compareValueValue to test *addr against.
    newValueValue to write if the test passes.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    If the value at addr matches compareValue then the newValue is written at addr, +i.e. if (*addr == compareValue) { *addr = newValue; }. +

    + +

    You can check that the value was written by checking that the value returned +by rsAtomicCas() is compareValue. +

    +
    +
    + + +
    +

    + rsAtomicDec + : Thread-safe decrement +

    +
    + + + + + + + + + +
    int32_t rsAtomicDec(volatile int32_t* addr); + Added in API level 14 +
    int32_t rsAtomicDec(volatile uint32_t* addr); + Added in API level 20 +
    +
    +
    Parameters
    + + +
    addrAddress of the value to decrement.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly subtracts one from the value at addr. This is equivalent to rsAtomicSub(addr, 1). +

    +
    +
    + + +
    +

    + rsAtomicInc + : Thread-safe increment +

    +
    + + + + + + + + + +
    int32_t rsAtomicInc(volatile int32_t* addr); + Added in API level 14 +
    int32_t rsAtomicInc(volatile uint32_t* addr); + Added in API level 20 +
    +
    +
    Parameters
    + + +
    addrAddress of the value to increment.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly adds one to the value at addr. This is equivalent to rsAtomicAdd(addr, 1). +

    +
    +
    + + +
    +

    + rsAtomicMax + : Thread-safe maximum +

    +
    + + + + + + + + + +
    int32_t rsAtomicMax(volatile int32_t* addr, int32_t value); + Added in API level 14 +
    uint32_t rsAtomicMax(volatile uint32_t* addr, uint32_t value); + Added in API level 14 +
    +
    +
    Parameters
    + + + +
    addrAddress of the value to modify.
    valueComparison value.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly sets the value at addr to the maximum of *addr and value, i.e. +*addr = max(*addr, value). +

    +
    +
    + + +
    +

    + rsAtomicMin + : Thread-safe minimum +

    +
    + + + + + + + + + +
    int32_t rsAtomicMin(volatile int32_t* addr, int32_t value); + Added in API level 14 +
    uint32_t rsAtomicMin(volatile uint32_t* addr, uint32_t value); + Added in API level 14 +
    +
    +
    Parameters
    + + + +
    addrAddress of the value to modify.
    valueComparison value.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly sets the value at addr to the minimum of *addr and value, i.e. +*addr = min(*addr, value). +

    +
    +
    + + +
    +

    + rsAtomicOr + : Thread-safe bitwise or +

    +
    + + + + + + + + + +
    int32_t rsAtomicOr(volatile int32_t* addr, int32_t value); + Added in API level 14 +
    int32_t rsAtomicOr(volatile uint32_t* addr, uint32_t value); + Added in API level 20 +
    +
    +
    Parameters
    + + + +
    addrAddress of the value to modify.
    valueValue to or with.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly perform a bitwise or two values, storing the result at addr, +i.e. *addr |= value. +

    +
    +
    + + +
    +

    + rsAtomicSub + : Thread-safe subtraction +

    +
    + + + + + + + + + +
    int32_t rsAtomicSub(volatile int32_t* addr, int32_t value); + Added in API level 14 +
    int32_t rsAtomicSub(volatile uint32_t* addr, uint32_t value); + Added in API level 20 +
    +
    +
    Parameters
    + + + +
    addrAddress of the value to modify.
    valueAmount to subtract.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly subtracts a value from the value at addr, i.e. *addr -= value. +

    +
    +
    + + +
    +

    + rsAtomicXor + : Thread-safe bitwise exclusive or +

    +
    + + + + + + + + + +
    int32_t rsAtomicXor(volatile int32_t* addr, int32_t value); + Added in API level 14 +
    int32_t rsAtomicXor(volatile uint32_t* addr, uint32_t value); + Added in API level 20 +
    +
    +
    Parameters
    + + + +
    addrAddress of the value to modify.
    valueValue to xor with.
    +
    +
    Returns
    + + +
    Value of *addr prior to the operation.
    +
    +
    +

    Atomicly performs a bitwise xor of two values, storing the result at addr, +i.e. *addr ^= value. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_convert.jd b/docs/html/guide/topics/renderscript/reference/rs_convert.jd new file mode 100644 index 0000000..bf1f611 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_convert.jd @@ -0,0 +1,1836 @@ +page.title=RenderScript Conversion Functions + +@jd:body + +
    +

    Overview

    +

    The functions below convert from a numerical vector type to another, of from one color +representation to another. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + +
    Functions
    + convert + + Convert numerical vectors +
    + rsPackColorTo8888 + + Create a uchar4 RGBA from floats +
    + rsUnpackColor8888 + + Create a float4 RGBA from uchar4 +
    + rsYuvToRGBA + + Convert a YUV value to RGBA +
    +

    Functions

    + +
    +

    + convert + : Convert numerical vectors +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    char2 convert_char2(char2 v); +
    char2 convert_char2(double2 v); + Added in API level 21 +
    char2 convert_char2(float2 v); +
    char2 convert_char2(int2 v); +
    char2 convert_char2(long2 v); + Added in API level 21 +
    char2 convert_char2(short2 v); +
    char2 convert_char2(uchar2 v); +
    char2 convert_char2(uint2 v); +
    char2 convert_char2(ulong2 v); + Added in API level 21 +
    char2 convert_char2(ushort2 v); +
    char3 convert_char3(char3 v); +
    char3 convert_char3(double3 v); + Added in API level 21 +
    char3 convert_char3(float3 v); +
    char3 convert_char3(int3 v); +
    char3 convert_char3(long3 v); + Added in API level 21 +
    char3 convert_char3(short3 v); +
    char3 convert_char3(uchar3 v); +
    char3 convert_char3(uint3 v); +
    char3 convert_char3(ulong3 v); + Added in API level 21 +
    char3 convert_char3(ushort3 v); +
    char4 convert_char4(char4 v); +
    char4 convert_char4(double4 v); + Added in API level 21 +
    char4 convert_char4(float4 v); +
    char4 convert_char4(int4 v); +
    char4 convert_char4(long4 v); + Added in API level 21 +
    char4 convert_char4(short4 v); +
    char4 convert_char4(uchar4 v); +
    char4 convert_char4(uint4 v); +
    char4 convert_char4(ulong4 v); + Added in API level 21 +
    char4 convert_char4(ushort4 v); +
    double2 convert_double2(char2 v); + Added in API level 21 +
    double2 convert_double2(double2 v); + Added in API level 21 +
    double2 convert_double2(float2 v); + Added in API level 21 +
    double2 convert_double2(int2 v); + Added in API level 21 +
    double2 convert_double2(long2 v); + Added in API level 21 +
    double2 convert_double2(short2 v); + Added in API level 21 +
    double2 convert_double2(uchar2 v); + Added in API level 21 +
    double2 convert_double2(uint2 v); + Added in API level 21 +
    double2 convert_double2(ulong2 v); + Added in API level 21 +
    double2 convert_double2(ushort2 v); + Added in API level 21 +
    double3 convert_double3(char3 v); + Added in API level 21 +
    double3 convert_double3(double3 v); + Added in API level 21 +
    double3 convert_double3(float3 v); + Added in API level 21 +
    double3 convert_double3(int3 v); + Added in API level 21 +
    double3 convert_double3(long3 v); + Added in API level 21 +
    double3 convert_double3(short3 v); + Added in API level 21 +
    double3 convert_double3(uchar3 v); + Added in API level 21 +
    double3 convert_double3(uint3 v); + Added in API level 21 +
    double3 convert_double3(ulong3 v); + Added in API level 21 +
    double3 convert_double3(ushort3 v); + Added in API level 21 +
    double4 convert_double4(char4 v); + Added in API level 21 +
    double4 convert_double4(double4 v); + Added in API level 21 +
    double4 convert_double4(float4 v); + Added in API level 21 +
    double4 convert_double4(int4 v); + Added in API level 21 +
    double4 convert_double4(long4 v); + Added in API level 21 +
    double4 convert_double4(short4 v); + Added in API level 21 +
    double4 convert_double4(uchar4 v); + Added in API level 21 +
    double4 convert_double4(uint4 v); + Added in API level 21 +
    double4 convert_double4(ulong4 v); + Added in API level 21 +
    double4 convert_double4(ushort4 v); + Added in API level 21 +
    float2 convert_float2(char2 v); +
    float2 convert_float2(double2 v); + Added in API level 21 +
    float2 convert_float2(float2 v); +
    float2 convert_float2(int2 v); +
    float2 convert_float2(long2 v); + Added in API level 21 +
    float2 convert_float2(short2 v); +
    float2 convert_float2(uchar2 v); +
    float2 convert_float2(uint2 v); +
    float2 convert_float2(ulong2 v); + Added in API level 21 +
    float2 convert_float2(ushort2 v); +
    float3 convert_float3(char3 v); +
    float3 convert_float3(double3 v); + Added in API level 21 +
    float3 convert_float3(float3 v); +
    float3 convert_float3(int3 v); +
    float3 convert_float3(long3 v); + Added in API level 21 +
    float3 convert_float3(short3 v); +
    float3 convert_float3(uchar3 v); +
    float3 convert_float3(uint3 v); +
    float3 convert_float3(ulong3 v); + Added in API level 21 +
    float3 convert_float3(ushort3 v); +
    float4 convert_float4(char4 v); +
    float4 convert_float4(double4 v); + Added in API level 21 +
    float4 convert_float4(float4 v); +
    float4 convert_float4(int4 v); +
    float4 convert_float4(long4 v); + Added in API level 21 +
    float4 convert_float4(short4 v); +
    float4 convert_float4(uchar4 v); +
    float4 convert_float4(uint4 v); +
    float4 convert_float4(ulong4 v); + Added in API level 21 +
    float4 convert_float4(ushort4 v); +
    int2 convert_int2(char2 v); +
    int2 convert_int2(double2 v); + Added in API level 21 +
    int2 convert_int2(float2 v); +
    int2 convert_int2(int2 v); +
    int2 convert_int2(long2 v); + Added in API level 21 +
    int2 convert_int2(short2 v); +
    int2 convert_int2(uchar2 v); +
    int2 convert_int2(uint2 v); +
    int2 convert_int2(ulong2 v); + Added in API level 21 +
    int2 convert_int2(ushort2 v); +
    int3 convert_int3(char3 v); +
    int3 convert_int3(double3 v); + Added in API level 21 +
    int3 convert_int3(float3 v); +
    int3 convert_int3(int3 v); +
    int3 convert_int3(long3 v); + Added in API level 21 +
    int3 convert_int3(short3 v); +
    int3 convert_int3(uchar3 v); +
    int3 convert_int3(uint3 v); +
    int3 convert_int3(ulong3 v); + Added in API level 21 +
    int3 convert_int3(ushort3 v); +
    int4 convert_int4(char4 v); +
    int4 convert_int4(double4 v); + Added in API level 21 +
    int4 convert_int4(float4 v); +
    int4 convert_int4(int4 v); +
    int4 convert_int4(long4 v); + Added in API level 21 +
    int4 convert_int4(short4 v); +
    int4 convert_int4(uchar4 v); +
    int4 convert_int4(uint4 v); +
    int4 convert_int4(ulong4 v); + Added in API level 21 +
    int4 convert_int4(ushort4 v); +
    long2 convert_long2(char2 v); + Added in API level 21 +
    long2 convert_long2(double2 v); + Added in API level 21 +
    long2 convert_long2(float2 v); + Added in API level 21 +
    long2 convert_long2(int2 v); + Added in API level 21 +
    long2 convert_long2(long2 v); + Added in API level 21 +
    long2 convert_long2(short2 v); + Added in API level 21 +
    long2 convert_long2(uchar2 v); + Added in API level 21 +
    long2 convert_long2(uint2 v); + Added in API level 21 +
    long2 convert_long2(ulong2 v); + Added in API level 21 +
    long2 convert_long2(ushort2 v); + Added in API level 21 +
    long3 convert_long3(char3 v); + Added in API level 21 +
    long3 convert_long3(double3 v); + Added in API level 21 +
    long3 convert_long3(float3 v); + Added in API level 21 +
    long3 convert_long3(int3 v); + Added in API level 21 +
    long3 convert_long3(long3 v); + Added in API level 21 +
    long3 convert_long3(short3 v); + Added in API level 21 +
    long3 convert_long3(uchar3 v); + Added in API level 21 +
    long3 convert_long3(uint3 v); + Added in API level 21 +
    long3 convert_long3(ulong3 v); + Added in API level 21 +
    long3 convert_long3(ushort3 v); + Added in API level 21 +
    long4 convert_long4(char4 v); + Added in API level 21 +
    long4 convert_long4(double4 v); + Added in API level 21 +
    long4 convert_long4(float4 v); + Added in API level 21 +
    long4 convert_long4(int4 v); + Added in API level 21 +
    long4 convert_long4(long4 v); + Added in API level 21 +
    long4 convert_long4(short4 v); + Added in API level 21 +
    long4 convert_long4(uchar4 v); + Added in API level 21 +
    long4 convert_long4(uint4 v); + Added in API level 21 +
    long4 convert_long4(ulong4 v); + Added in API level 21 +
    long4 convert_long4(ushort4 v); + Added in API level 21 +
    short2 convert_short2(char2 v); +
    short2 convert_short2(double2 v); + Added in API level 21 +
    short2 convert_short2(float2 v); +
    short2 convert_short2(int2 v); +
    short2 convert_short2(long2 v); + Added in API level 21 +
    short2 convert_short2(short2 v); +
    short2 convert_short2(uchar2 v); +
    short2 convert_short2(uint2 v); +
    short2 convert_short2(ulong2 v); + Added in API level 21 +
    short2 convert_short2(ushort2 v); +
    short3 convert_short3(char3 v); +
    short3 convert_short3(double3 v); + Added in API level 21 +
    short3 convert_short3(float3 v); +
    short3 convert_short3(int3 v); +
    short3 convert_short3(long3 v); + Added in API level 21 +
    short3 convert_short3(short3 v); +
    short3 convert_short3(uchar3 v); +
    short3 convert_short3(uint3 v); +
    short3 convert_short3(ulong3 v); + Added in API level 21 +
    short3 convert_short3(ushort3 v); +
    short4 convert_short4(char4 v); +
    short4 convert_short4(double4 v); + Added in API level 21 +
    short4 convert_short4(float4 v); +
    short4 convert_short4(int4 v); +
    short4 convert_short4(long4 v); + Added in API level 21 +
    short4 convert_short4(short4 v); +
    short4 convert_short4(uchar4 v); +
    short4 convert_short4(uint4 v); +
    short4 convert_short4(ulong4 v); + Added in API level 21 +
    short4 convert_short4(ushort4 v); +
    uchar2 convert_uchar2(char2 v); +
    uchar2 convert_uchar2(double2 v); + Added in API level 21 +
    uchar2 convert_uchar2(float2 v); +
    uchar2 convert_uchar2(int2 v); +
    uchar2 convert_uchar2(long2 v); + Added in API level 21 +
    uchar2 convert_uchar2(short2 v); +
    uchar2 convert_uchar2(uchar2 v); +
    uchar2 convert_uchar2(uint2 v); +
    uchar2 convert_uchar2(ulong2 v); + Added in API level 21 +
    uchar2 convert_uchar2(ushort2 v); +
    uchar3 convert_uchar3(char3 v); +
    uchar3 convert_uchar3(double3 v); + Added in API level 21 +
    uchar3 convert_uchar3(float3 v); +
    uchar3 convert_uchar3(int3 v); +
    uchar3 convert_uchar3(long3 v); + Added in API level 21 +
    uchar3 convert_uchar3(short3 v); +
    uchar3 convert_uchar3(uchar3 v); +
    uchar3 convert_uchar3(uint3 v); +
    uchar3 convert_uchar3(ulong3 v); + Added in API level 21 +
    uchar3 convert_uchar3(ushort3 v); +
    uchar4 convert_uchar4(char4 v); +
    uchar4 convert_uchar4(double4 v); + Added in API level 21 +
    uchar4 convert_uchar4(float4 v); +
    uchar4 convert_uchar4(int4 v); +
    uchar4 convert_uchar4(long4 v); + Added in API level 21 +
    uchar4 convert_uchar4(short4 v); +
    uchar4 convert_uchar4(uchar4 v); +
    uchar4 convert_uchar4(uint4 v); +
    uchar4 convert_uchar4(ulong4 v); + Added in API level 21 +
    uchar4 convert_uchar4(ushort4 v); +
    uint2 convert_uint2(char2 v); +
    uint2 convert_uint2(double2 v); + Added in API level 21 +
    uint2 convert_uint2(float2 v); +
    uint2 convert_uint2(int2 v); +
    uint2 convert_uint2(long2 v); + Added in API level 21 +
    uint2 convert_uint2(short2 v); +
    uint2 convert_uint2(uchar2 v); +
    uint2 convert_uint2(uint2 v); +
    uint2 convert_uint2(ulong2 v); + Added in API level 21 +
    uint2 convert_uint2(ushort2 v); +
    uint3 convert_uint3(char3 v); +
    uint3 convert_uint3(double3 v); + Added in API level 21 +
    uint3 convert_uint3(float3 v); +
    uint3 convert_uint3(int3 v); +
    uint3 convert_uint3(long3 v); + Added in API level 21 +
    uint3 convert_uint3(short3 v); +
    uint3 convert_uint3(uchar3 v); +
    uint3 convert_uint3(uint3 v); +
    uint3 convert_uint3(ulong3 v); + Added in API level 21 +
    uint3 convert_uint3(ushort3 v); +
    uint4 convert_uint4(char4 v); +
    uint4 convert_uint4(double4 v); + Added in API level 21 +
    uint4 convert_uint4(float4 v); +
    uint4 convert_uint4(int4 v); +
    uint4 convert_uint4(long4 v); + Added in API level 21 +
    uint4 convert_uint4(short4 v); +
    uint4 convert_uint4(uchar4 v); +
    uint4 convert_uint4(uint4 v); +
    uint4 convert_uint4(ulong4 v); + Added in API level 21 +
    uint4 convert_uint4(ushort4 v); +
    ulong2 convert_ulong2(char2 v); + Added in API level 21 +
    ulong2 convert_ulong2(double2 v); + Added in API level 21 +
    ulong2 convert_ulong2(float2 v); + Added in API level 21 +
    ulong2 convert_ulong2(int2 v); + Added in API level 21 +
    ulong2 convert_ulong2(long2 v); + Added in API level 21 +
    ulong2 convert_ulong2(short2 v); + Added in API level 21 +
    ulong2 convert_ulong2(uchar2 v); + Added in API level 21 +
    ulong2 convert_ulong2(uint2 v); + Added in API level 21 +
    ulong2 convert_ulong2(ulong2 v); + Added in API level 21 +
    ulong2 convert_ulong2(ushort2 v); + Added in API level 21 +
    ulong3 convert_ulong3(char3 v); + Added in API level 21 +
    ulong3 convert_ulong3(double3 v); + Added in API level 21 +
    ulong3 convert_ulong3(float3 v); + Added in API level 21 +
    ulong3 convert_ulong3(int3 v); + Added in API level 21 +
    ulong3 convert_ulong3(long3 v); + Added in API level 21 +
    ulong3 convert_ulong3(short3 v); + Added in API level 21 +
    ulong3 convert_ulong3(uchar3 v); + Added in API level 21 +
    ulong3 convert_ulong3(uint3 v); + Added in API level 21 +
    ulong3 convert_ulong3(ulong3 v); + Added in API level 21 +
    ulong3 convert_ulong3(ushort3 v); + Added in API level 21 +
    ulong4 convert_ulong4(char4 v); + Added in API level 21 +
    ulong4 convert_ulong4(double4 v); + Added in API level 21 +
    ulong4 convert_ulong4(float4 v); + Added in API level 21 +
    ulong4 convert_ulong4(int4 v); + Added in API level 21 +
    ulong4 convert_ulong4(long4 v); + Added in API level 21 +
    ulong4 convert_ulong4(short4 v); + Added in API level 21 +
    ulong4 convert_ulong4(uchar4 v); + Added in API level 21 +
    ulong4 convert_ulong4(uint4 v); + Added in API level 21 +
    ulong4 convert_ulong4(ulong4 v); + Added in API level 21 +
    ulong4 convert_ulong4(ushort4 v); + Added in API level 21 +
    ushort2 convert_ushort2(char2 v); +
    ushort2 convert_ushort2(double2 v); + Added in API level 21 +
    ushort2 convert_ushort2(float2 v); +
    ushort2 convert_ushort2(int2 v); +
    ushort2 convert_ushort2(long2 v); + Added in API level 21 +
    ushort2 convert_ushort2(short2 v); +
    ushort2 convert_ushort2(uchar2 v); +
    ushort2 convert_ushort2(uint2 v); +
    ushort2 convert_ushort2(ulong2 v); + Added in API level 21 +
    ushort2 convert_ushort2(ushort2 v); +
    ushort3 convert_ushort3(char3 v); +
    ushort3 convert_ushort3(double3 v); + Added in API level 21 +
    ushort3 convert_ushort3(float3 v); +
    ushort3 convert_ushort3(int3 v); +
    ushort3 convert_ushort3(long3 v); + Added in API level 21 +
    ushort3 convert_ushort3(short3 v); +
    ushort3 convert_ushort3(uchar3 v); +
    ushort3 convert_ushort3(uint3 v); +
    ushort3 convert_ushort3(ulong3 v); + Added in API level 21 +
    ushort3 convert_ushort3(ushort3 v); +
    ushort4 convert_ushort4(char4 v); +
    ushort4 convert_ushort4(double4 v); + Added in API level 21 +
    ushort4 convert_ushort4(float4 v); +
    ushort4 convert_ushort4(int4 v); +
    ushort4 convert_ushort4(long4 v); + Added in API level 21 +
    ushort4 convert_ushort4(short4 v); +
    ushort4 convert_ushort4(uchar4 v); +
    ushort4 convert_ushort4(uint4 v); +
    ushort4 convert_ushort4(ulong4 v); + Added in API level 21 +
    ushort4 convert_ushort4(ushort4 v); +
    +
    +
    +

    Converts a vector from one numerical type to another. The conversion are done entry per entry. +

    + +

    E.g calling a = convert_short3(b); is equivalent to doing +a.x = (short)b.x; a.y = (short)b.y; a.z = (short)b.z;. +

    + +

    Converting floating point values to integer types truncates. +

    + +

    Converting numbers too large to fit the destination type yields undefined results. +For example, converting a float that contains 1.0e18 to a short is undefined. +Use clamp() to avoid this. +

    +
    +
    + + +
    +

    + rsPackColorTo8888 + : Create a uchar4 RGBA from floats +

    +
    + + + + + + + + + + + + + + + + + +
    uchar4 rsPackColorTo8888(float r, float g, float b); +
    uchar4 rsPackColorTo8888(float r, float g, float b, float a); +
    uchar4 rsPackColorTo8888(float3 color); +
    uchar4 rsPackColorTo8888(float4 color); +
    +
    +
    Parameters
    + + + + + + +
    rRed component.
    gGreen component.
    bBlue component.
    aAlpha component.
    colorVector of 3 or 4 floats containing the R, G, B, and A values.
    +
    +
    +

    Packs three or four floating point RGBA values into a uchar4. The RGBA values should be +between 0.0 and 1.0 inclusive. Values outside of this range are clamped to this range. +However numbers greater than INT_MAX or less than INT_MIN can result in undefined behavior. +

    + +

    If the alpha component is not specified, it is assumed to be 1.0, i.e. the result will +have an alpha set to 255. +

    +
    +
    + + +
    +

    + rsUnpackColor8888 + : Create a float4 RGBA from uchar4 +

    +
    + + + + + +
    float4 rsUnpackColor8888(uchar4 c); +
    +
    +
    +

    Unpacks a uchar4 color to float4. The resulting floats will be between 0.0 and 1.0 inclusive. +

    +
    +
    + + +
    +

    + rsYuvToRGBA + : Convert a YUV value to RGBA +

    +
    + + + + + + + + + +
    float4 rsYuvToRGBA_float4(uchar y, uchar u, uchar v); +
    uchar4 rsYuvToRGBA_uchar4(uchar y, uchar u, uchar v); +
    +
    +
    Parameters
    + + + + +
    yLuminance component.
    uU chrominance component.
    vV chrominance component.
    +
    +
    +

    Converts a color from a YUV representation to RGBA. +

    + +

    We currently don't provide a function to do the reverse conversion. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_debug.jd b/docs/html/guide/topics/renderscript/reference/rs_debug.jd new file mode 100644 index 0000000..d041309 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_debug.jd @@ -0,0 +1,301 @@ +page.title=RenderScript Debugging Functions + +@jd:body + +
    +

    Overview

    +

    The functions below are intended to be used during application developement. +They should not be used in shipping applications. +

    +

    Summary

    + + + + + + +
    Functions
    + rsDebug + + Log a message and values +
    +

    Functions

    + +
    +

    + rsDebug + : Log a message and values +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void rsDebug(const char* message, char a); + Added in API level 17 +
    void rsDebug(const char* message, char2 a); + Added in API level 17 +
    void rsDebug(const char* message, char3 a); + Added in API level 17 +
    void rsDebug(const char* message, char4 a); + Added in API level 17 +
    void rsDebug(const char* message, const rs_matrix2x2* a); +
    void rsDebug(const char* message, const rs_matrix3x3* a); +
    void rsDebug(const char* message, const rs_matrix4x4* a); +
    void rsDebug(const char* message, const void* a); +
    void rsDebug(const char* message, double a); +
    void rsDebug(const char* message, float a); +
    void rsDebug(const char* message, float a, float b); +
    void rsDebug(const char* message, float a, float b, float c); +
    void rsDebug(const char* message, float a, float b, float c, float d); +
    void rsDebug(const char* message, float2 a); +
    void rsDebug(const char* message, float3 a); +
    void rsDebug(const char* message, float4 a); +
    void rsDebug(const char* message, int a); +
    void rsDebug(const char* message, int2 a); + Added in API level 17 +
    void rsDebug(const char* message, int3 a); + Added in API level 17 +
    void rsDebug(const char* message, int4 a); + Added in API level 17 +
    void rsDebug(const char* message, long a); +
    void rsDebug(const char* message, long long a); +
    void rsDebug(const char* message, long2 a); + Added in API level 17 +
    void rsDebug(const char* message, long3 a); + Added in API level 17 +
    void rsDebug(const char* message, long4 a); + Added in API level 17 +
    void rsDebug(const char* message, short a); + Added in API level 17 +
    void rsDebug(const char* message, short2 a); + Added in API level 17 +
    void rsDebug(const char* message, short3 a); + Added in API level 17 +
    void rsDebug(const char* message, short4 a); + Added in API level 17 +
    void rsDebug(const char* message, uchar a); + Added in API level 17 +
    void rsDebug(const char* message, uchar2 a); + Added in API level 17 +
    void rsDebug(const char* message, uchar3 a); + Added in API level 17 +
    void rsDebug(const char* message, uchar4 a); + Added in API level 17 +
    void rsDebug(const char* message, uint a); +
    void rsDebug(const char* message, uint2 a); + Added in API level 17 +
    void rsDebug(const char* message, uint3 a); + Added in API level 17 +
    void rsDebug(const char* message, uint4 a); + Added in API level 17 +
    void rsDebug(const char* message, ulong a); +
    void rsDebug(const char* message, ulong2 a); + Added in API level 17 +
    void rsDebug(const char* message, ulong3 a); + Added in API level 17 +
    void rsDebug(const char* message, ulong4 a); + Added in API level 17 +
    void rsDebug(const char* message, unsigned long long a); +
    void rsDebug(const char* message, ushort a); + Added in API level 17 +
    void rsDebug(const char* message, ushort2 a); + Added in API level 17 +
    void rsDebug(const char* message, ushort3 a); + Added in API level 17 +
    void rsDebug(const char* message, ushort4 a); + Added in API level 17 +
    +
    +
    +

    This function prints a message to the standard log, followed by the provided values. +

    + +

    This function is intended for debugging only and should not be used in shipping +applications. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_for_each.jd b/docs/html/guide/topics/renderscript/reference/rs_for_each.jd new file mode 100644 index 0000000..cad5a21 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_for_each.jd @@ -0,0 +1,183 @@ +page.title=RenderScript Kernel Invocation Functions and Types + +@jd:body + +
    +

    Overview

    +

    The rsForEach() function can be used to invoke the root kernel of a script. +

    +

    Summary

    + + + + + + + + + + +
    Types
    + rs_for_each_strategy_t + + Suggested cell processing order +
    + rs_script_call_t + + Cell iteration information +
    + + + + + + +
    Functions
    + rsForEach + + Invoke the root kernel of a script +
    +

    Types

    + +
    +

    + rs_for_each_strategy_t + : Suggested cell processing order +

    +
    +

    An enum with the following values:      +

    + + + + + + + +
    RS_FOR_EACH_STRATEGY_SERIAL = 0Prefer contiguous memory regions.
    RS_FOR_EACH_STRATEGY_DONT_CARE = 1No prefrences.
    RS_FOR_EACH_STRATEGY_DST_LINEAR = 2Prefer DST.
    RS_FOR_EACH_STRATEGY_TILE_SMALL = 3Prefer processing small rectangular regions.
    RS_FOR_EACH_STRATEGY_TILE_MEDIUM = 4Prefer processing medium rectangular regions.
    RS_FOR_EACH_STRATEGY_TILE_LARGE = 5Prefer processing large rectangular regions.

    +

    This type is used to suggest how the invoked kernel should iterate over the cells of the +allocations. This is a hint only. Implementations may not follow the suggestion. +

    + +

    This specification can help the caching behavior of the running kernel, e.g. the cache +locality when the processing is distributed over multiple cores. +

    +
    +
    + + +
    +

    + rs_script_call_t + : Cell iteration information +

    +
    +

    A structure with the following fields:     

    + + + + + + + + + + + + + + + + +
    rs_for_each_strategy_t strategyCurrently ignored. In the future, will be suggested cell iteration strategy.
    uint32_t xStartStarting index in the X dimension.
    uint32_t xEndEnding index (exclusive) in the X dimension.
    uint32_t yStartStarting index in the Y dimension.
    uint32_t yEndEnding index (exclusive) in the Y dimension.
    uint32_t zStartStarting index in the Z dimension.
    uint32_t zEndEnding index (exclusive) in the Z dimension.
    uint32_t arrayStartStarting index in the Array0 dimension.
    uint32_t arrayEndEnding index (exclusive) in the Array0 dimension.
    uint32_t array1StartStarting index in the Array1 dimension.
    uint32_t array1EndEnding index (exclusive) in the Array1 dimension.
    uint32_t array2StartStarting index in the Array2 dimension.
    uint32_t array2EndEnding index (exclusive) in the Array2 dimension.
    uint32_t array3StartStarting index in the Array3 dimension.
    uint32_t array3EndEnding index (exclusive) in the Array3 dimension.

    +

    This structure is used to provide iteration information to a rsForEach call. +It is currently used to restrict processing to a subset of cells. In future +versions, it will also be used to provide hint on how to best iterate over +the cells. +

    + +

    The Start fields are inclusive and the End fields are exclusive. E.g. to iterate +over cells 4, 5, 6, and 7 in the X dimension, set xStart to 4 and xEnd to 8. +

    +
    +
    + +

    Functions

    + +
    +

    + rsForEach + : Invoke the root kernel of a script +

    +
    + + + + + + + + + + + + + + + + + + + + + +
    void rsForEach(rs_script script, rs_allocation input, rs_allocation output); + Added in API level 14 +
    void rsForEach(rs_script script, rs_allocation input, rs_allocation output, const void* usrData); + Removed from API level 14 +
    void rsForEach(rs_script script, rs_allocation input, rs_allocation output, const void* usrData, const rs_script_call_t* sc); + Removed from API level 14 +
    void rsForEach(rs_script script, rs_allocation input, rs_allocation output, const void* usrData, size_t usrDataLen); + API level 14 - 20 +
    void rsForEach(rs_script script, rs_allocation input, rs_allocation output, const void* usrData, size_t usrDataLen, const rs_script_call_t* sc); + API level 14 - 20 +
    +
    +
    Parameters
    + + + + + + + +
    scriptScript to call.
    inputAllocation to source data from.
    outputAllocation to write date into.
    usrDataUser defined data to pass to the script. May be NULL.
    scExtra control information used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL.
    usrDataLenSize of the userData structure. This will be used to perform a shallow copy of the data if necessary.
    +
    +
    +

    Invoke the kernel named "root" of the specified script. Like other kernels, this root() +function will be invoked repeatedly over the cells of the specificed allocation, filling +the output allocation with the results. +

    + +

    When rsForEach is called, the root script is launched immediately. rsForEach returns +only when the script has completed and the output allocation is ready to use. +

    + +

    The rs_script argument is typically initialized using a global variable set from Java. +

    + +

    The kernel can be invoked with just an input allocation or just an output allocation. +This can be done by defining an rs_allocation variable and not initializing it. E.g.
    +rs_script gCustomScript;
    +void specializedProcessing(rs_allocation in) {
    +  rs_allocation ignoredOut;
    +  rsForEach(gCustomScript, in, ignoredOut);
    +}
    +

    + +

    If both input and output allocations are specified, they must have the same dimensions. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_graphics.jd b/docs/html/guide/topics/renderscript/reference/rs_graphics.jd new file mode 100644 index 0000000..ee50184 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_graphics.jd @@ -0,0 +1,2085 @@ +page.title=RenderScript Graphics Functions and Types + +@jd:body + +
    +

    Overview

    +

    The graphics subsystem of RenderScript has been deprecated. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Deprecated Types
    + rs_blend_dst_func + + Deprecated. Blend destination function +
    + rs_blend_src_func + + Deprecated. Blend source function +
    + rs_cull_mode + + Deprecated. Culling mode +
    + rs_depth_func + + Deprecated. Depth function +
    + rs_font + + Deprecated. Handle to a Font +
    + rs_mesh + + Deprecated. Handle to a Mesh +
    + rs_primitive + + Deprecated. How to intepret mesh vertex data +
    + rs_program_fragment + + Deprecated. Handle to a ProgramFragment +
    + rs_program_raster + + Deprecated. Handle to a ProgramRaster +
    + rs_program_store + + Deprecated. Handle to a ProgramStore +
    + rs_program_vertex + + Deprecated. Handle to a ProgramVertex +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Deprecated Functions
    + rsgAllocationSyncAll + + Deprecated. Sync the contents of an allocation +
    + rsgBindColorTarget + + Deprecated. Set the color target +
    + rsgBindConstant + + Deprecated. Bind a constant allocation +
    + rsgBindDepthTarget + + Deprecated. Set the depth target +
    + rsgBindFont + + Deprecated. Bind a font object +
    + rsgBindProgramFragment + + Deprecated. Bind a ProgramFragment +
    + rsgBindProgramRaster + + Deprecated. Bind a ProgramRaster +
    + rsgBindProgramStore + + Deprecated. Bind a ProgramStore +
    + rsgBindProgramVertex + + Deprecated. Bind a ProgramVertex +
    + rsgBindSampler + + Deprecated. Bind a sampler +
    + rsgBindTexture + + Deprecated. Bind a texture allocation +
    + rsgClearAllRenderTargets + + Deprecated. Clear all color and depth targets +
    + rsgClearColor + + Deprecated. Clear the specified color from the surface +
    + rsgClearColorTarget + + Deprecated. Clear the color target +
    + rsgClearDepth + + Deprecated. Clear the depth surface +
    + rsgClearDepthTarget + + Deprecated. Clear the depth target +
    + rsgDrawMesh + + Deprecated. Draw a mesh +
    + rsgDrawQuad + + Deprecated. Draw a quad +
    + rsgDrawQuadTexCoords + + Deprecated. Draw a textured quad +
    + rsgDrawRect + + Deprecated. Draw a rectangle +
    + rsgDrawSpriteScreenspace + + Deprecated. Draw rectangles in screenspace +
    + rsgDrawText + + Deprecated. Draw a text string +
    + rsgFinish + + Deprecated. End rendering commands +
    + rsgFontColor + + Deprecated. Set the font color +
    + rsgGetHeight + + Deprecated. Get the surface height +
    + rsgGetWidth + + Deprecated. Get the surface width +
    + rsgMeasureText + + Deprecated. Get the bounding box for a text string +
    + rsgMeshComputeBoundingBox + + Deprecated. Compute a bounding box +
    + rsgMeshGetIndexAllocation + + Deprecated. Return an allocation containing index data +
    + rsgMeshGetPrimitive + + Deprecated. Return the primitive +
    + rsgMeshGetPrimitiveCount + + Deprecated. Return the number of index sets +
    + rsgMeshGetVertexAllocation + + Deprecated. Return a vertex allocation +
    + rsgMeshGetVertexAllocationCount + + Deprecated. Return the number of vertex allocations +
    + rsgProgramFragmentConstantColor + + Deprecated. Set the constant color for a fixed function emulation program +
    + rsgProgramRasterGetCullMode + + Deprecated. Get program raster cull mode +
    + rsgProgramRasterIsPointSpriteEnabled + + Deprecated. Get program raster point sprite state +
    + rsgProgramStoreGetBlendDstFunc + + Deprecated. Get program store blend destination function +
    + rsgProgramStoreGetBlendSrcFunc + + Deprecated. Get program store blend source function +
    + rsgProgramStoreGetDepthFunc + + Deprecated. Get program store depth function +
    + rsgProgramStoreIsColorMaskAlphaEnabled + + Deprecated. Get program store alpha component color mask +
    + rsgProgramStoreIsColorMaskBlueEnabled + + Deprecated. Get program store blur component color mask +
    + rsgProgramStoreIsColorMaskGreenEnabled + + Deprecated. Get program store green component color mask +
    + rsgProgramStoreIsColorMaskRedEnabled + + Deprecated. Get program store red component color mask +
    + rsgProgramStoreIsDepthMaskEnabled + + Deprecated. Get program store depth mask +
    + rsgProgramStoreIsDitherEnabled + + Deprecated. Get program store dither state +
    + rsgProgramVertexGetProjectionMatrix + + Deprecated. Get the projection matrix for a fixed function vertex program +
    + rsgProgramVertexLoadModelMatrix + + Deprecated. Load the model matrix for a bound fixed function vertex program +
    + rsgProgramVertexLoadProjectionMatrix + + Deprecated. Load the projection matrix for a bound fixed function vertex program +
    + rsgProgramVertexLoadTextureMatrix + + Deprecated. Load the texture matrix for a bound fixed function vertex program +
    +

    Types

    + +
    +

    + rs_blend_dst_func + : Blend destination function +

    +
    +

    An enum with the following values:      + When compiling for 32 bits. Added in API level 16 +

    + + + + + + + + + + +
    RS_BLEND_DST_ZERO = 0
    RS_BLEND_DST_ONE = 1
    RS_BLEND_DST_SRC_COLOR = 2
    RS_BLEND_DST_ONE_MINUS_SRC_COLOR = 3
    RS_BLEND_DST_SRC_ALPHA = 4
    RS_BLEND_DST_ONE_MINUS_SRC_ALPHA = 5
    RS_BLEND_DST_DST_ALPHA = 6
    RS_BLEND_DST_ONE_MINUS_DST_ALPHA = 7
    RS_BLEND_DST_INVALID = 100

    +

    Deprecated. Do not use.

    +
    +
    + + +
    +

    + rs_blend_src_func + : Blend source function +

    +
    +

    An enum with the following values:      + When compiling for 32 bits. Added in API level 16 +

    + + + + + + + + + + + +
    RS_BLEND_SRC_ZERO = 0
    RS_BLEND_SRC_ONE = 1
    RS_BLEND_SRC_DST_COLOR = 2
    RS_BLEND_SRC_ONE_MINUS_DST_COLOR = 3
    RS_BLEND_SRC_SRC_ALPHA = 4
    RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA = 5
    RS_BLEND_SRC_DST_ALPHA = 6
    RS_BLEND_SRC_ONE_MINUS_DST_ALPHA = 7
    RS_BLEND_SRC_SRC_ALPHA_SATURATE = 8
    RS_BLEND_SRC_INVALID = 100

    +

    Deprecated. Do not use.

    +
    +
    + + +
    +

    + rs_cull_mode + : Culling mode +

    +
    +

    An enum with the following values:      + When compiling for 32 bits. Added in API level 16 +

    + + + + + +
    RS_CULL_BACK = 0
    RS_CULL_FRONT = 1
    RS_CULL_NONE = 2
    RS_CULL_INVALID = 100

    +

    Deprecated. Do not use.

    +
    +
    + + +
    +

    + rs_depth_func + : Depth function +

    +
    +

    An enum with the following values:      + When compiling for 32 bits. Added in API level 16 +

    + + + + + + + + + +
    RS_DEPTH_FUNC_ALWAYS = 0Always drawn
    RS_DEPTH_FUNC_LESS = 1Drawn if the incoming depth value is less than that in the depth buffer
    RS_DEPTH_FUNC_LEQUAL = 2Drawn if the incoming depth value is less or equal to that in the depth buffer
    RS_DEPTH_FUNC_GREATER = 3Drawn if the incoming depth value is greater than that in the depth buffer
    RS_DEPTH_FUNC_GEQUAL = 4Drawn if the incoming depth value is greater or equal to that in the depth buffer
    RS_DEPTH_FUNC_EQUAL = 5Drawn if the incoming depth value is equal to that in the depth buffer
    RS_DEPTH_FUNC_NOTEQUAL = 6Drawn if the incoming depth value is not equal to that in the depth buffer
    RS_DEPTH_FUNC_INVALID = 100Invalid depth function

    +

    Deprecated. Do not use.

    +

    Specifies conditional drawing depending on the comparison of the incoming +depth to that found in the depth buffer. +

    +
    +
    + + +
    +

    + rs_font + : Handle to a Font +

    +
    +

    A typedef of: _RS_HANDLE      When compiling for 32 bits. +

    +

    Deprecated. Do not use.

    +

    Opaque handle to a RenderScript font object. +See: android.renderscript.Font +

    +
    +
    + + +
    +

    + rs_mesh + : Handle to a Mesh +

    +
    +

    A typedef of: _RS_HANDLE      When compiling for 32 bits. +

    +

    Deprecated. Do not use.

    +

    Opaque handle to a RenderScript mesh object. +See: android.renderscript.Mesh +

    +
    +
    + + +
    +

    + rs_primitive + : How to intepret mesh vertex data +

    +
    +

    An enum with the following values:      + When compiling for 32 bits. Added in API level 16 +

    + + + + + + + + +
    RS_PRIMITIVE_POINT = 0Vertex data will be rendered as a series of points
    RS_PRIMITIVE_LINE = 1Vertex pairs will be rendered as lines
    RS_PRIMITIVE_LINE_STRIP = 2Vertex data will be rendered as a connected line strip
    RS_PRIMITIVE_TRIANGLE = 3Vertices will be rendered as individual triangles
    RS_PRIMITIVE_TRIANGLE_STRIP = 4Vertices will be rendered as a connected triangle strip defined by the first three vertices with each additional triangle defined by a new vertex
    RS_PRIMITIVE_TRIANGLE_FAN = 5Vertices will be rendered as a sequence of triangles that all share first vertex as the origin
    RS_PRIMITIVE_INVALID = 100Invalid primitive

    +

    Deprecated. Do not use.

    +

    Describes the way mesh vertex data is interpreted when rendering +

    +
    +
    + + +
    +

    + rs_program_fragment + : Handle to a ProgramFragment +

    +
    +

    A typedef of: _RS_HANDLE      When compiling for 32 bits. +

    +

    Deprecated. Do not use.

    +

    Opaque handle to a RenderScript ProgramFragment object. +See: android.renderscript.ProgramFragment +

    +
    +
    + + +
    +

    + rs_program_raster + : Handle to a ProgramRaster +

    +
    +

    A typedef of: _RS_HANDLE      When compiling for 32 bits. +

    +

    Deprecated. Do not use.

    +

    Opaque handle to a RenderScript ProgramRaster object. +See: android.renderscript.ProgramRaster +

    +
    +
    + + +
    +

    + rs_program_store + : Handle to a ProgramStore +

    +
    +

    A typedef of: _RS_HANDLE      When compiling for 32 bits. +

    +

    Deprecated. Do not use.

    +

    Opaque handle to a RenderScript ProgramStore object. +See: android.renderscript.ProgramStore +

    +
    +
    + + +
    +

    + rs_program_vertex + : Handle to a ProgramVertex +

    +
    +

    A typedef of: _RS_HANDLE      When compiling for 32 bits. +

    +

    Deprecated. Do not use.

    +

    Opaque handle to a RenderScript ProgramVertex object. +See: android.renderscript.ProgramVertex +

    +
    +
    + +

    Functions

    + +
    +

    + rsgAllocationSyncAll + : Sync the contents of an allocation +

    +
    + + + + + + + + + +
    void rsgAllocationSyncAll(rs_allocation alloc); + When compiling for 32 bits. +
    void rsgAllocationSyncAll(rs_allocation alloc, rs_allocation_usage_type source); + When compiling for 32 bits. Added in API level 14 +
    +
    +
    +

    Deprecated. Do not use.

    +

    Sync the contents of an allocation. +

    + +

    If the source is specified, sync from memory space specified by source. +

    + +

    If the source is not specified, sync from its SCRIPT memory space to its HW +memory spaces. +

    +
    +
    + + +
    +

    + rsgBindColorTarget + : Set the color target +

    +
    + + + + + +
    void rsgBindColorTarget(rs_allocation colorTarget, uint slot); + When compiling for 32 bits. Added in API level 14 +
    +
    +
    +

    Deprecated. Do not use.

    +

    Set the color target used for all subsequent rendering calls +

    +
    +
    + + +
    +

    + rsgBindConstant + : Bind a constant allocation +

    +
    + + + + + + + + + +
    void rsgBindConstant(rs_program_fragment ps, uint slot, rs_allocation c); + When compiling for 32 bits. +
    void rsgBindConstant(rs_program_vertex pv, uint slot, rs_allocation c); + When compiling for 32 bits. +
    +
    +
    Parameters
    + + + + + +
    psprogram fragment object
    slotindex of the constant buffer on the program
    cconstants to bind
    pvprogram vertex object
    +
    +
    +

    Deprecated. Do not use.

    +

    Bind a new Allocation object to a ProgramFragment or ProgramVertex. +The Allocation must be a valid constant input for the Program. +

    +
    +
    + + +
    +

    + rsgBindDepthTarget + : Set the depth target +

    +
    + + + + + +
    void rsgBindDepthTarget(rs_allocation depthTarget); + When compiling for 32 bits. Added in API level 14 +
    +
    +
    +

    Deprecated. Do not use.

    +

    Set the depth target used for all subsequent rendering calls +

    +
    +
    + + +
    +

    + rsgBindFont + : Bind a font object +

    +
    + + + + + +
    void rsgBindFont(rs_font font); + When compiling for 32 bits. +
    +
    +
    Parameters
    + + +
    fontobject to bind
    +
    +
    +

    Deprecated. Do not use.

    +

    Binds the font object to be used for all subsequent font rendering calls +

    +
    +
    + + +
    +

    + rsgBindProgramFragment + : Bind a ProgramFragment +

    +
    + + + + + +
    void rsgBindProgramFragment(rs_program_fragment pf); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Bind a new ProgramFragment to the rendering context. +

    +
    +
    + + +
    +

    + rsgBindProgramRaster + : Bind a ProgramRaster +

    +
    + + + + + +
    void rsgBindProgramRaster(rs_program_raster pr); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Bind a new ProgramRaster to the rendering context. +

    +
    +
    + + +
    +

    + rsgBindProgramStore + : Bind a ProgramStore +

    +
    + + + + + +
    void rsgBindProgramStore(rs_program_store ps); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Bind a new ProgramStore to the rendering context. +

    +
    +
    + + +
    +

    + rsgBindProgramVertex + : Bind a ProgramVertex +

    +
    + + + + + +
    void rsgBindProgramVertex(rs_program_vertex pv); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Bind a new ProgramVertex to the rendering context. +

    +
    +
    + + +
    +

    + rsgBindSampler + : Bind a sampler +

    +
    + + + + + +
    void rsgBindSampler(rs_program_fragment fragment, uint slot, rs_sampler sampler); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Bind a new Sampler object to a ProgramFragment. The sampler will +operate on the texture bound at the matching slot. +

    +
    +
    + + +
    +

    + rsgBindTexture + : Bind a texture allocation +

    +
    + + + + + +
    void rsgBindTexture(rs_program_fragment v, uint slot, rs_allocation alloc); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Bind a new Allocation object to a ProgramFragment. The +Allocation must be a valid texture for the Program. The sampling +of the texture will be controled by the Sampler bound at the +matching slot. +

    +
    +
    + + +
    +

    + rsgClearAllRenderTargets + : Clear all color and depth targets +

    +
    + + + + + +
    void rsgClearAllRenderTargets(); + When compiling for 32 bits. Added in API level 14 +
    +
    +
    +

    Deprecated. Do not use.

    +

    Clear all color and depth targets and resume rendering into +the framebuffer +

    +
    +
    + + +
    +

    + rsgClearColor + : Clear the specified color from the surface +

    +
    + + + + + +
    void rsgClearColor(float r, float g, float b, float a); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Clears the rendering surface to the specified color. +

    +
    +
    + + +
    +

    + rsgClearColorTarget + : Clear the color target +

    +
    + + + + + +
    void rsgClearColorTarget(uint slot); + When compiling for 32 bits. Added in API level 14 +
    +
    +
    +

    Deprecated. Do not use.

    +

    Clear the previously set color target +

    +
    +
    + + +
    +

    + rsgClearDepth + : Clear the depth surface +

    +
    + + + + + +
    void rsgClearDepth(float value); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Clears the depth suface to the specified value. +

    +
    +
    + + +
    +

    + rsgClearDepthTarget + : Clear the depth target +

    +
    + + + + + +
    void rsgClearDepthTarget(); + When compiling for 32 bits. Added in API level 14 +
    +
    +
    +

    Deprecated. Do not use.

    +

    Clear the previously set depth target +

    +
    +
    + + +
    +

    + rsgDrawMesh + : Draw a mesh +

    +
    + + + + + + + + + + + + + +
    void rsgDrawMesh(rs_mesh ism); + When compiling for 32 bits. +
    void rsgDrawMesh(rs_mesh ism, uint primitiveIndex); + When compiling for 32 bits. +
    void rsgDrawMesh(rs_mesh ism, uint primitiveIndex, uint start, uint len); + When compiling for 32 bits. +
    +
    +
    Parameters
    + + + + + +
    ismmesh object to render
    primitiveIndexfor meshes that contain multiple primitive groups this parameter specifies the index of the group to draw.
    startstarting index in the range
    lennumber of indices to draw
    +
    +
    +

    Deprecated. Do not use.

    +

    Draw a mesh using the current context state. +

    + +

    If primitiveIndex is specified, draw part of a mesh using the current context state. +

    + +

    If start and len are also specified, draw specified index range of part of a mesh using the current context state. +

    + +

    Otherwise the whole mesh is rendered. +

    +
    +
    + + +
    +

    + rsgDrawQuad + : Draw a quad +

    +
    + + + + + +
    void rsgDrawQuad(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Low performance utility function for drawing a simple quad. Not intended for +drawing large quantities of geometry. +

    +
    +
    + + +
    +

    + rsgDrawQuadTexCoords + : Draw a textured quad +

    +
    + + + + + +
    void rsgDrawQuadTexCoords(float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2, float x3, float y3, float z3, float u3, float v3, float x4, float y4, float z4, float u4, float v4); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Low performance utility function for drawing a textured quad. Not intended +for drawing large quantities of geometry. +

    +
    +
    + + +
    +

    + rsgDrawRect + : Draw a rectangle +

    +
    + + + + + +
    void rsgDrawRect(float x1, float y1, float x2, float y2, float z); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Low performance utility function for drawing a simple rectangle. Not +intended for drawing large quantities of geometry. +

    +
    +
    + + +
    +

    + rsgDrawSpriteScreenspace + : Draw rectangles in screenspace +

    +
    + + + + + +
    void rsgDrawSpriteScreenspace(float x, float y, float z, float w, float h); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Low performance function for drawing rectangles in screenspace. This +function uses the default passthough ProgramVertex. Any bound ProgramVertex +is ignored. This function has considerable overhead and should not be used +for drawing in shipping applications. +

    +
    +
    + + +
    +

    + rsgDrawText + : Draw a text string +

    +
    + + + + + + + + + +
    void rsgDrawText(const char* text, int x, int y); + When compiling for 32 bits. +
    void rsgDrawText(rs_allocation alloc, int x, int y); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Draws text given a string and location +

    +
    +
    + + +
    +

    + rsgFinish + : End rendering commands +

    +
    + + + + + +
    uint rsgFinish(); + When compiling for 32 bits. Added in API level 14 +
    +
    +
    +

    Deprecated. Do not use.

    +

    Force RenderScript to finish all rendering commands +

    +
    +
    + + +
    +

    + rsgFontColor + : Set the font color +

    +
    + + + + + +
    void rsgFontColor(float r, float g, float b, float a); + When compiling for 32 bits. +
    +
    +
    Parameters
    + + + + + +
    rred component
    ggreen component
    bblue component
    aalpha component
    +
    +
    +

    Deprecated. Do not use.

    +

    Sets the font color for all subsequent rendering calls +

    +
    +
    + + +
    +

    + rsgGetHeight + : Get the surface height +

    +
    + + + + + +
    uint rsgGetHeight(); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Get the height of the current rendering surface. +

    +
    +
    + + +
    +

    + rsgGetWidth + : Get the surface width +

    +
    + + + + + +
    uint rsgGetWidth(); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Get the width of the current rendering surface. +

    +
    +
    + + +
    +

    + rsgMeasureText + : Get the bounding box for a text string +

    +
    + + + + + + + + + +
    void rsgMeasureText(const char* text, int* left, int* right, int* top, int* bottom); + When compiling for 32 bits. +
    void rsgMeasureText(rs_allocation alloc, int* left, int* right, int* top, int* bottom); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Returns the bounding box of the text relative to (0, 0) +Any of left, right, top, bottom could be NULL +

    +
    +
    + + +
    +

    + rsgMeshComputeBoundingBox + : Compute a bounding box +

    +
    + + + + + + + + + +
    void rsgMeshComputeBoundingBox(rs_mesh mesh, float* minX, float* minY, float* min, float* maxX, float* maxY, float* maxZ); + When compiling for 32 bits. +
    void rsgMeshComputeBoundingBox(rs_mesh mesh, float3* bBoxMin, float3* bBoxMax); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Computes an axis aligned bounding box of a mesh object +

    +
    +
    + + +
    +

    + rsgMeshGetIndexAllocation + : Return an allocation containing index data +

    +
    + + + + + +
    rs_allocation rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + + +
    mmesh to get data from
    indexindex of the index allocation
    +
    +
    Returns
    + + +
    allocation containing index data
    +
    +
    +

    Deprecated. Do not use.

    +

    Returns an allocation containing index data or a null +allocation if only the primitive is specified +

    +
    +
    + + +
    +

    + rsgMeshGetPrimitive + : Return the primitive +

    +
    + + + + + +
    rs_primitive rsgMeshGetPrimitive(rs_mesh m, uint32_t index); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + + +
    mmesh to get data from
    indexindex of the primitive
    +
    +
    Returns
    + + +
    primitive describing how the mesh is rendered
    +
    +
    +

    Deprecated. Do not use.

    +

    Returns the primitive describing how a part of the mesh is +rendered +

    +
    +
    + + +
    +

    + rsgMeshGetPrimitiveCount + : Return the number of index sets +

    +
    + + + + + +
    uint32_t rsgMeshGetPrimitiveCount(rs_mesh m); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    mmesh to get data from
    +
    +
    Returns
    + + +
    number of primitive groups in the mesh. This would include simple primitives as well as allocations containing index data
    +
    +
    +

    Deprecated. Do not use.

    +

    Meshes could have multiple index sets, this function returns +the number. +

    +
    +
    + + +
    +

    + rsgMeshGetVertexAllocation + : Return a vertex allocation +

    +
    + + + + + +
    rs_allocation rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + + +
    mmesh to get data from
    indexindex of the vertex allocation
    +
    +
    Returns
    + + +
    allocation containing vertex data
    +
    +
    +

    Deprecated. Do not use.

    +

    Returns an allocation that is part of the mesh and contains +vertex data, e.g. positions, normals, texcoords +

    +
    +
    + + +
    +

    + rsgMeshGetVertexAllocationCount + : Return the number of vertex allocations +

    +
    + + + + + +
    uint32_t rsgMeshGetVertexAllocationCount(rs_mesh m); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    mmesh to get data from
    +
    +
    Returns
    + + +
    number of allocations in the mesh that contain vertex data
    +
    +
    +

    Deprecated. Do not use.

    +

    Returns the number of allocations in the mesh that contain +vertex data +

    +
    +
    + + +
    +

    + rsgProgramFragmentConstantColor + : Set the constant color for a fixed function emulation program +

    +
    + + + + + +
    void rsgProgramFragmentConstantColor(rs_program_fragment pf, float r, float g, float b, float a); + When compiling for 32 bits. +
    +
    +
    +

    Deprecated. Do not use.

    +

    Set the constant color for a fixed function emulation program. +

    +
    +
    + + +
    +

    + rsgProgramRasterGetCullMode + : Get program raster cull mode +

    +
    + + + + + +
    rs_cull_mode rsgProgramRasterGetCullMode(rs_program_raster pr); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    prprogram raster to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program raster cull mode +

    +
    +
    + + +
    +

    + rsgProgramRasterIsPointSpriteEnabled + : Get program raster point sprite state +

    +
    + + + + + +
    bool rsgProgramRasterIsPointSpriteEnabled(rs_program_raster pr); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    prprogram raster to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program raster point sprite state +

    +
    +
    + + +
    +

    + rsgProgramStoreGetBlendDstFunc + : Get program store blend destination function +

    +
    + + + + + +
    rs_blend_dst_func rsgProgramStoreGetBlendDstFunc(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store blend destination function +

    +
    +
    + + +
    +

    + rsgProgramStoreGetBlendSrcFunc + : Get program store blend source function +

    +
    + + + + + +
    rs_blend_src_func rsgProgramStoreGetBlendSrcFunc(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store blend source function +

    +
    +
    + + +
    +

    + rsgProgramStoreGetDepthFunc + : Get program store depth function +

    +
    + + + + + +
    rs_depth_func rsgProgramStoreGetDepthFunc(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store depth function +

    +
    +
    + + +
    +

    + rsgProgramStoreIsColorMaskAlphaEnabled + : Get program store alpha component color mask +

    +
    + + + + + +
    bool rsgProgramStoreIsColorMaskAlphaEnabled(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store alpha component color mask +

    +
    +
    + + +
    +

    + rsgProgramStoreIsColorMaskBlueEnabled + : Get program store blur component color mask +

    +
    + + + + + +
    bool rsgProgramStoreIsColorMaskBlueEnabled(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store blur component color mask +

    +
    +
    + + +
    +

    + rsgProgramStoreIsColorMaskGreenEnabled + : Get program store green component color mask +

    +
    + + + + + +
    bool rsgProgramStoreIsColorMaskGreenEnabled(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store green component color mask +

    +
    +
    + + +
    +

    + rsgProgramStoreIsColorMaskRedEnabled + : Get program store red component color mask +

    +
    + + + + + +
    bool rsgProgramStoreIsColorMaskRedEnabled(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store red component color mask +

    +
    +
    + + +
    +

    + rsgProgramStoreIsDepthMaskEnabled + : Get program store depth mask +

    +
    + + + + + +
    bool rsgProgramStoreIsDepthMaskEnabled(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store depth mask +

    +
    +
    + + +
    +

    + rsgProgramStoreIsDitherEnabled + : Get program store dither state +

    +
    + + + + + +
    bool rsgProgramStoreIsDitherEnabled(rs_program_store ps); + When compiling for 32 bits. Added in API level 16 +
    +
    +
    Parameters
    + + +
    psprogram store to query
    +
    +
    +

    Deprecated. Do not use.

    +

    Get program store dither state +

    +
    +
    + + +
    +

    + rsgProgramVertexGetProjectionMatrix + : Get the projection matrix for a fixed function vertex program +

    +
    + + + + + +
    void rsgProgramVertexGetProjectionMatrix(rs_matrix4x4* proj); + When compiling for 32 bits. +
    +
    +
    Parameters
    + + +
    projmatrix to store the current projection matrix into
    +
    +
    +

    Deprecated. Do not use.

    +

    Get the projection matrix for a currently bound fixed function +vertex program. Calling this function with a custom vertex shader +would result in an error. +

    +
    +
    + + +
    +

    + rsgProgramVertexLoadModelMatrix + : Load the model matrix for a bound fixed function vertex program +

    +
    + + + + + +
    void rsgProgramVertexLoadModelMatrix(const rs_matrix4x4* model); + When compiling for 32 bits. +
    +
    +
    Parameters
    + + +
    modelmodel matrix
    +
    +
    +

    Deprecated. Do not use.

    +

    Load the model matrix for a currently bound fixed function +vertex program. Calling this function with a custom vertex shader +would result in an error. +

    +
    +
    + + +
    +

    + rsgProgramVertexLoadProjectionMatrix + : Load the projection matrix for a bound fixed function vertex program +

    +
    + + + + + +
    void rsgProgramVertexLoadProjectionMatrix(const rs_matrix4x4* proj); + When compiling for 32 bits. +
    +
    +
    Parameters
    + + +
    projprojection matrix
    +
    +
    +

    Deprecated. Do not use.

    +

    Load the projection matrix for a currently bound fixed function +vertex program. Calling this function with a custom vertex shader +would result in an error. +

    +
    +
    + + +
    +

    + rsgProgramVertexLoadTextureMatrix + : Load the texture matrix for a bound fixed function vertex program +

    +
    + + + + + +
    void rsgProgramVertexLoadTextureMatrix(const rs_matrix4x4* tex); + When compiling for 32 bits. +
    +
    +
    Parameters
    + + +
    textexture matrix
    +
    +
    +

    Deprecated. Do not use.

    +

    Load the texture matrix for a currently bound fixed function +vertex program. Calling this function with a custom vertex shader +would result in an error. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_io.jd b/docs/html/guide/topics/renderscript/reference/rs_io.jd new file mode 100644 index 0000000..d02c804 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_io.jd @@ -0,0 +1,185 @@ +page.title=RenderScript Input/Output Functions + +@jd:body + +
    +

    Overview

    +

    These functions are used to:

    +

    +

    Summary

    + + + + + + + + + + + + + + + + + + +
    Functions
    + rsAllocationIoReceive + + Receive new content from the queue +
    + rsAllocationIoSend + + Send new content to the queue +
    + rsSendToClient + + Send a message to the client, non-blocking +
    + rsSendToClientBlocking + + Send a message to the client, blocking +
    +

    Functions

    + +
    +

    + rsAllocationIoReceive + : Receive new content from the queue +

    +
    + + + + + +
    void rsAllocationIoReceive(rs_allocation a); + Added in API level 16 +
    +
    +
    Parameters
    + + +
    aAllocation to work on.
    +
    +
    +

    Receive a new set of contents from the queue. +

    +
    +
    + + +
    +

    + rsAllocationIoSend + : Send new content to the queue +

    +
    + + + + + +
    void rsAllocationIoSend(rs_allocation a); + Added in API level 16 +
    +
    +
    Parameters
    + + +
    aAllocation to work on.
    +
    +
    +

    Send the contents of the Allocation to the queue. +

    +
    +
    + + +
    +

    + rsSendToClient + : Send a message to the client, non-blocking +

    +
    + + + + + + + + + +
    bool rsSendToClient(int cmdID); +
    bool rsSendToClient(int cmdID, const void* data, uint len); +
    +
    +
    Parameters
    + + + + +
    cmdID
    dataApplication specific data.
    lenLength of the data, in bytes.
    +
    +
    +

    Sends a message back to the client. This call does not block. +It returns true if the message was sent and false if the +message queue is full. +

    + +

    A message ID is required. The data payload is optional. +

    + +

    See RenderScript.RSMessageHandler. +

    +
    +
    + + +
    +

    + rsSendToClientBlocking + : Send a message to the client, blocking +

    +
    + + + + + + + + + +
    void rsSendToClientBlocking(int cmdID); +
    void rsSendToClientBlocking(int cmdID, const void* data, uint len); +
    +
    +
    Parameters
    + + + + +
    cmdID
    dataApplication specific data.
    lenLength of the data, in bytes.
    +
    +
    +

    Sends a message back to the client. This function will block +until there is room on the message queue for this message. +This function may return before the message was delivered and +processed by the client. +

    + +

    A message ID is required. The data payload is optional. +

    + +

    See RenderScript.RSMessageHandler. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_math.jd b/docs/html/guide/topics/renderscript/reference/rs_math.jd new file mode 100644 index 0000000..13513e9 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_math.jd @@ -0,0 +1,7251 @@ +page.title=RenderScript Mathematical Constants and Functions + +@jd:body + +
    +

    Overview

    +

    The mathematical functions below can be applied to scalars and vectors. When applied +to vectors, the returned value is a vector of the function applied to each entry of the input. +

    + +

    For example:
    +float3 a, b;
    +// The following call sets
    +// a.x to sin(b.x),
    +// a.y to sin(b.y), and
    +// a.z to sin(b.z).
    +a = sin(b);
    +
    +

    + +

    See Vector Math Functions for functions like distance() and length() that interpret +instead the input as a single vector in n-dimensional space. +

    + +

    The precision of the mathematical operations on 32 bit floats is affected by the pragmas +rs_fp_relaxed and rs_fp_full. Under rs_fp_relaxed, subnormal values may be flushed to zero and +rounding may be done towards zero. In comparison, rs_fp_full requires correct handling of +subnormal values, i.e. smaller than 1.17549435e-38f. rs_fp_rull also requires round to nearest +with ties to even. +

    + +

    Different precision/speed tradeoffs can be achieved by using variants of the common math +functions. Functions with a name starting with

    +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Constants
    + M_1_PI + + 1 / pi, as a 32 bit float +
    + M_2_PI + + 2 / pi, as a 32 bit float +
    + M_2_SQRTPI + + 2 / sqrt(pi), as a 32 bit float +
    + M_E + + e, as a 32 bit float +
    + M_LN10 + + log_e(10), as a 32 bit float +
    + M_LN2 + + log_e(2), as a 32 bit float +
    + M_LOG10E + + log_10(e), as a 32 bit float +
    + M_LOG2E + + log_2(e), as a 32 bit float +
    + M_PI + + pi, as a 32 bit float +
    + M_PI_2 + + pi / 2, as a 32 bit float +
    + M_PI_4 + + pi / 4, as a 32 bit float +
    + M_SQRT1_2 + + 1 / sqrt(2), as a 32 bit float +
    + M_SQRT2 + + sqrt(2), as a 32 bit float +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + abs + + Absolute value of an integer +
    + acos + + Inverse cosine +
    + acosh + + Inverse hyperbolic cosine +
    + acospi + + Inverse cosine divided by pi +
    + asin + + Inverse sine +
    + asinh + + Inverse hyperbolic sine +
    + asinpi + + Inverse sine divided by pi +
    + atan + + Inverse tangent +
    + atan2 + + Inverse tangent of a ratio +
    + atan2pi + + Inverse tangent of a ratio, divided by pi +
    + atanh + + Inverse hyperbolic tangent +
    + atanpi + + Inverse tangent divided by pi +
    + cbrt + + Cube root +
    + ceil + + Smallest integer not less than a value +
    + clamp + + Restrain a value to a range +
    + clz + + Number of leading 0 bits +
    + copysign + + Copies the sign of a number to another +
    + cos + + Cosine +
    + cosh + + Hypebolic cosine +
    + cospi + + Cosine of a number multiplied by pi +
    + degrees + + Converts radians into degrees +
    + erf + + Mathematical error function +
    + erfc + + Mathematical complementary error function +
    + exp + + e raised to a number +
    + exp10 + + 10 raised to a number +
    + exp2 + + 2 raised to a number +
    + expm1 + + e raised to a number minus one +
    + fabs + + Absolute value of a float +
    + fdim + + Positive difference between two values +
    + floor + + Smallest integer not greater than a value +
    + fma + + Multiply and add +
    + fmax + + Maximum of two floats +
    + fmin + + Minimum of two floats +
    + fmod + + Modulo +
    + fract + + Positive fractional part +
    + frexp + + Binary mantissa and exponent +
    + half_recip + + Reciprocal computed to 16 bit precision +
    + half_rsqrt + + Reciprocal of a square root computed to 16 bit precision +
    + half_sqrt + + Square root computed to 16 bit precision +
    + hypot + + Hypotenuse +
    + ilogb + + Base two exponent +
    + ldexp + + Creates a floating point from mantissa and exponent +
    + lgamma + + Natural logarithm of the gamma function +
    + log + + Natural logarithm +
    + log10 + + Base 10 logarithm +
    + log1p + + Natural logarithm of a value plus 1 +
    + log2 + + Base 2 logarithm +
    + logb + + Base two exponent +
    + mad + + Multiply and add +
    + max + + Maximum +
    + min + + Minimum +
    + mix + + Mixes two values +
    + modf + + Integral and fractional components +
    + nan + + Not a Number +
    + native_acos + + Approximate inverse cosine +
    + native_acosh + + Approximate inverse hyperbolic cosine +
    + native_acospi + + Approximate inverse cosine divided by pi +
    + native_asin + + Approximate inverse sine +
    + native_asinh + + Approximate inverse hyperbolic sine +
    + native_asinpi + + Approximate inverse sine divided by pi +
    + native_atan + + Approximate inverse tangent +
    + native_atan2 + + Approximate inverse tangent of a ratio +
    + native_atan2pi + + Approximate inverse tangent of a ratio, divided by pi +
    + native_atanh + + Approximate inverse hyperbolic tangent +
    + native_atanpi + + Approximate inverse tangent divided by pi +
    + native_cbrt + + Approximate cube root +
    + native_cos + + Approximate cosine +
    + native_cosh + + Approximate hypebolic cosine +
    + native_cospi + + Approximate cosine of a number multiplied by pi +
    + native_divide + + Approximate division +
    + native_exp + + Approximate e raised to a number +
    + native_exp10 + + Approximate 10 raised to a number +
    + native_exp2 + + Approximate 2 raised to a number +
    + native_expm1 + + Approximate e raised to a number minus one +
    + native_hypot + + Approximate hypotenuse +
    + native_log + + Approximate natural logarithm +
    + native_log10 + + Approximate base 10 logarithm +
    + native_log1p + + Approximate natural logarithm of a value plus 1 +
    + native_log2 + + Approximate base 2 logarithm +
    + native_powr + + Approximate positive base raised to an exponent +
    + native_recip + + Approximate reciprocal +
    + native_rootn + + Approximate nth root +
    + native_rsqrt + + Approximate reciprocal of a square root +
    + native_sin + + Approximate sine +
    + native_sincos + + Approximate sine and cosine +
    + native_sinh + + Approximate hyperbolic sine +
    + native_sinpi + + Approximate sine of a number multiplied by pi +
    + native_sqrt + + Approximate square root +
    + native_tan + + Approximate tangent +
    + native_tanh + + Approximate hyperbolic tangent +
    + native_tanpi + + Approximate tangent of a number multiplied by pi +
    + nextafter + + Next floating point number +
    + pow + + Base raised to an exponent +
    + pown + + Base raised to an integer exponent +
    + powr + + Positive base raised to an exponent +
    + radians + + Converts degrees into radians +
    + remainder + + Remainder of a division +
    + remquo + + Remainder and quotient of a division +
    + rint + + Round to even +
    + rootn + + Nth root +
    + round + + Round away from zero +
    + rsRand + + Pseudo-random number +
    + rsqrt + + Reciprocal of a square root +
    + sign + + Sign of a value +
    + sin + + Sine +
    + sincos + + Sine and cosine +
    + sinh + + Hyperbolic sine +
    + sinpi + + Sine of a number multiplied by pi +
    + sqrt + + Square root +
    + step + + 0 if less than a value, 0 otherwise +
    + tan + + Tangent +
    + tanh + + Hyperbolic tangent +
    + tanpi + + Tangent of a number multiplied by pi +
    + tgamma + + Gamma function +
    + trunc + + Truncates a floating point +
    + + + + + + + + + + +
    Deprecated Functions
    + rsClamp + + Deprecated. Restrain a value to a range +
    + rsFrac + + Deprecated. Returns the fractional part of a float +
    +

    Constants

    + +
    +

    + M_1_PI + : 1 / pi, as a 32 bit float +

    +
    + + +
    +
    Value: 0.318309886183790671537767526745028724f +
    +
    +
    +

    The inverse of pi, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_2_PI + : 2 / pi, as a 32 bit float +

    +
    + + +
    +
    Value: 0.636619772367581343075535053490057448f +
    +
    +
    +

    2 divided by pi, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_2_SQRTPI + : 2 / sqrt(pi), as a 32 bit float +

    +
    + + +
    +
    Value: 1.128379167095512573896158903121545172f +
    +
    +
    +

    2 divided by the square root of pi, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_E + : e, as a 32 bit float +

    +
    + + +
    +
    Value: 2.718281828459045235360287471352662498f +
    +
    +
    +

    The number e, the base of the natural logarithm, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_LN10 + : log_e(10), as a 32 bit float +

    +
    + + +
    +
    Value: 2.302585092994045684017991454684364208f +
    +
    +
    +

    The natural logarithm of 10, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_LN2 + : log_e(2), as a 32 bit float +

    +
    + + +
    +
    Value: 0.693147180559945309417232121458176568f +
    +
    +
    +

    The natural logarithm of 2, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_LOG10E + : log_10(e), as a 32 bit float +

    +
    + + +
    +
    Value: 0.434294481903251827651128918916605082f +
    +
    +
    +

    The logarithm base 10 of e, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_LOG2E + : log_2(e), as a 32 bit float +

    +
    + + +
    +
    Value: 1.442695040888963407359924681001892137f +
    +
    +
    +

    The logarithm base 2 of e, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_PI + : pi, as a 32 bit float +

    +
    + + +
    +
    Value: 3.141592653589793238462643383279502884f +
    +
    +
    +

    The constant pi, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_PI_2 + : pi / 2, as a 32 bit float +

    +
    + + +
    +
    Value: 1.570796326794896619231321691639751442f +
    +
    +
    +

    Pi divided by 2, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_PI_4 + : pi / 4, as a 32 bit float +

    +
    + + +
    +
    Value: 0.785398163397448309615660845819875721f +
    +
    +
    +

    Pi divided by 4, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_SQRT1_2 + : 1 / sqrt(2), as a 32 bit float +

    +
    + + +
    +
    Value: 0.707106781186547524400844362104849039f +
    +
    +
    +

    The inverse of the square root of 2, as a 32 bit float. +

    +
    +
    + + +
    +

    + M_SQRT2 + : sqrt(2), as a 32 bit float +

    +
    + + +
    +
    Value: 1.414213562373095048801688724209698079f +
    +
    +
    +

    The square root of 2, as a 32 bit float. +

    +
    +
    + +

    Functions

    + +
    +

    + abs + : Absolute value of an integer +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    uchar abs(char v); +
    uchar2 abs(char2 v); +
    uchar3 abs(char3 v); +
    uchar4 abs(char4 v); +
    uint abs(int v); +
    uint2 abs(int2 v); +
    uint3 abs(int3 v); +
    uint4 abs(int4 v); +
    ushort abs(short v); +
    ushort2 abs(short2 v); +
    ushort3 abs(short3 v); +
    ushort4 abs(short4 v); +
    +
    +
    +

    Returns the absolute value of an integer. +

    + +

    For floats, use fabs(). +

    +
    +
    + + +
    +

    + acos + : Inverse cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float acos(float v); +
    float2 acos(float2 v); +
    float3 acos(float3 v); +
    float4 acos(float4 v); +
    +
    +
    +

    Returns the inverse cosine, in radians. +

    + +

    See also native_acos(). +

    +
    +
    + + +
    +

    + acosh + : Inverse hyperbolic cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float acosh(float v); +
    float2 acosh(float2 v); +
    float3 acosh(float3 v); +
    float4 acosh(float4 v); +
    +
    +
    +

    Returns the inverse hyperbolic cosine, in radians. +

    + +

    See also native_acosh(). +

    +
    +
    + + +
    +

    + acospi + : Inverse cosine divided by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float acospi(float v); +
    float2 acospi(float2 v); +
    float3 acospi(float3 v); +
    float4 acospi(float4 v); +
    +
    +
    +

    Returns the inverse cosine in radians, divided by pi. +

    + +

    To get an inverse cosine measured in degrees, use acospi(a) * 180.f. +

    + +

    See also native_acospi(). +

    +
    +
    + + +
    +

    + asin + : Inverse sine +

    +
    + + + + + + + + + + + + + + + + + +
    float asin(float v); +
    float2 asin(float2 v); +
    float3 asin(float3 v); +
    float4 asin(float4 v); +
    +
    +
    +

    Returns the inverse sine, in radians. +

    + +

    See also native_asin(). +

    +
    +
    + + +
    +

    + asinh + : Inverse hyperbolic sine +

    +
    + + + + + + + + + + + + + + + + + +
    float asinh(float v); +
    float2 asinh(float2 v); +
    float3 asinh(float3 v); +
    float4 asinh(float4 v); +
    +
    +
    +

    Returns the inverse hyperbolic sine, in radians. +

    + +

    See also native_asinh(). +

    +
    +
    + + +
    +

    + asinpi + : Inverse sine divided by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float asinpi(float v); +
    float2 asinpi(float2 v); +
    float3 asinpi(float3 v); +
    float4 asinpi(float4 v); +
    +
    +
    +

    Returns the inverse sine in radians, divided by pi. +

    + +

    To get an inverse sine measured in degrees, use asinpi(a) * 180.f. +

    + +

    See also native_asinpi(). +

    +
    +
    + + +
    +

    + atan + : Inverse tangent +

    +
    + + + + + + + + + + + + + + + + + +
    float atan(float v); +
    float2 atan(float2 v); +
    float3 atan(float3 v); +
    float4 atan(float4 v); +
    +
    +
    +

    Returns the inverse tangent, in radians. +

    + +

    See also native_atan(). +

    +
    +
    + + +
    +

    + atan2 + : Inverse tangent of a ratio +

    +
    + + + + + + + + + + + + + + + + + +
    float atan2(float numerator, float denominator); +
    float2 atan2(float2 numerator, float2 denominator); +
    float3 atan2(float3 numerator, float3 denominator); +
    float4 atan2(float4 numerator, float4 denominator); +
    +
    +
    Parameters
    + + + +
    numeratorNumerator.
    denominatorDenominator. Can be 0.
    +
    +
    +

    Returns the inverse tangent of (numerator / denominator), in radians. +

    + +

    See also native_atan2(). +

    +
    +
    + + +
    +

    + atan2pi + : Inverse tangent of a ratio, divided by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float atan2pi(float numerator, float denominator); +
    float2 atan2pi(float2 numerator, float2 denominator); +
    float3 atan2pi(float3 numerator, float3 denominator); +
    float4 atan2pi(float4 numerator, float4 denominator); +
    +
    +
    Parameters
    + + + +
    numeratorNumerator.
    denominatorDenominator. Can be 0.
    +
    +
    +

    Returns the inverse tangent of (numerator / denominator), in radians, divided by pi. +

    + +

    To get an inverse tangent measured in degrees, use atan2pi(n, d) * 180.f. +

    + +

    See also native_atan2pi(). +

    +
    +
    + + +
    +

    + atanh + : Inverse hyperbolic tangent +

    +
    + + + + + + + + + + + + + + + + + +
    float atanh(float v); +
    float2 atanh(float2 v); +
    float3 atanh(float3 v); +
    float4 atanh(float4 v); +
    +
    +
    +

    Returns the inverse hyperbolic tangent, in radians. +

    + +

    See also native_atanh(). +

    +
    +
    + + +
    +

    + atanpi + : Inverse tangent divided by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float atanpi(float v); +
    float2 atanpi(float2 v); +
    float3 atanpi(float3 v); +
    float4 atanpi(float4 v); +
    +
    +
    +

    Returns the inverse tangent in radians, divided by pi. +

    + +

    To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. +

    + +

    See also native_atanpi(). +

    +
    +
    + + +
    +

    + cbrt + : Cube root +

    +
    + + + + + + + + + + + + + + + + + +
    float cbrt(float v); +
    float2 cbrt(float2 v); +
    float3 cbrt(float3 v); +
    float4 cbrt(float4 v); +
    +
    +
    +

    Returns the cube root. +

    + +

    See also native_cbrt(). +

    +
    +
    + + +
    +

    + ceil + : Smallest integer not less than a value +

    +
    + + + + + + + + + + + + + + + + + +
    float ceil(float v); +
    float2 ceil(float2 v); +
    float3 ceil(float3 v); +
    float4 ceil(float4 v); +
    +
    +
    +

    Returns the smallest integer not less than a value. +

    + +

    For example, ceil(1.2f) returns 2.f, and ceil(-1.2f) returns -1.f. +

    + +

    See also floor(). +

    +
    +
    + + +
    +

    + clamp + : Restrain a value to a range +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    char clamp(char value, char min_value, char max_value); + Added in API level 19 +
    char2 clamp(char2 value, char min_value, char max_value); + Added in API level 19 +
    char2 clamp(char2 value, char2 min_value, char2 max_value); + Added in API level 19 +
    char3 clamp(char3 value, char min_value, char max_value); + Added in API level 19 +
    char3 clamp(char3 value, char3 min_value, char3 max_value); + Added in API level 19 +
    char4 clamp(char4 value, char min_value, char max_value); + Added in API level 19 +
    char4 clamp(char4 value, char4 min_value, char4 max_value); + Added in API level 19 +
    float clamp(float value, float min_value, float max_value); +
    float2 clamp(float2 value, float min_value, float max_value); +
    float2 clamp(float2 value, float2 min_value, float2 max_value); +
    float3 clamp(float3 value, float min_value, float max_value); +
    float3 clamp(float3 value, float3 min_value, float3 max_value); +
    float4 clamp(float4 value, float min_value, float max_value); +
    float4 clamp(float4 value, float4 min_value, float4 max_value); +
    int clamp(int value, int min_value, int max_value); + Added in API level 19 +
    int2 clamp(int2 value, int min_value, int max_value); + Added in API level 19 +
    int2 clamp(int2 value, int2 min_value, int2 max_value); + Added in API level 19 +
    int3 clamp(int3 value, int min_value, int max_value); + Added in API level 19 +
    int3 clamp(int3 value, int3 min_value, int3 max_value); + Added in API level 19 +
    int4 clamp(int4 value, int min_value, int max_value); + Added in API level 19 +
    int4 clamp(int4 value, int4 min_value, int4 max_value); + Added in API level 19 +
    long clamp(long value, long min_value, long max_value); + Added in API level 19 +
    long2 clamp(long2 value, long min_value, long max_value); + Added in API level 19 +
    long2 clamp(long2 value, long2 min_value, long2 max_value); + Added in API level 19 +
    long3 clamp(long3 value, long min_value, long max_value); + Added in API level 19 +
    long3 clamp(long3 value, long3 min_value, long3 max_value); + Added in API level 19 +
    long4 clamp(long4 value, long min_value, long max_value); + Added in API level 19 +
    long4 clamp(long4 value, long4 min_value, long4 max_value); + Added in API level 19 +
    short clamp(short value, short min_value, short max_value); + Added in API level 19 +
    short2 clamp(short2 value, short min_value, short max_value); + Added in API level 19 +
    short2 clamp(short2 value, short2 min_value, short2 max_value); + Added in API level 19 +
    short3 clamp(short3 value, short min_value, short max_value); + Added in API level 19 +
    short3 clamp(short3 value, short3 min_value, short3 max_value); + Added in API level 19 +
    short4 clamp(short4 value, short min_value, short max_value); + Added in API level 19 +
    short4 clamp(short4 value, short4 min_value, short4 max_value); + Added in API level 19 +
    uchar clamp(uchar value, uchar min_value, uchar max_value); + Added in API level 19 +
    uchar2 clamp(uchar2 value, uchar min_value, uchar max_value); + Added in API level 19 +
    uchar2 clamp(uchar2 value, uchar2 min_value, uchar2 max_value); + Added in API level 19 +
    uchar3 clamp(uchar3 value, uchar min_value, uchar max_value); + Added in API level 19 +
    uchar3 clamp(uchar3 value, uchar3 min_value, uchar3 max_value); + Added in API level 19 +
    uchar4 clamp(uchar4 value, uchar min_value, uchar max_value); + Added in API level 19 +
    uchar4 clamp(uchar4 value, uchar4 min_value, uchar4 max_value); + Added in API level 19 +
    uint clamp(uint value, uint min_value, uint max_value); + Added in API level 19 +
    uint2 clamp(uint2 value, uint min_value, uint max_value); + Added in API level 19 +
    uint2 clamp(uint2 value, uint2 min_value, uint2 max_value); + Added in API level 19 +
    uint3 clamp(uint3 value, uint min_value, uint max_value); + Added in API level 19 +
    uint3 clamp(uint3 value, uint3 min_value, uint3 max_value); + Added in API level 19 +
    uint4 clamp(uint4 value, uint min_value, uint max_value); + Added in API level 19 +
    uint4 clamp(uint4 value, uint4 min_value, uint4 max_value); + Added in API level 19 +
    ulong clamp(ulong value, ulong min_value, ulong max_value); + Added in API level 19 +
    ulong2 clamp(ulong2 value, ulong min_value, ulong max_value); + Added in API level 19 +
    ulong2 clamp(ulong2 value, ulong2 min_value, ulong2 max_value); + Added in API level 19 +
    ulong3 clamp(ulong3 value, ulong min_value, ulong max_value); + Added in API level 19 +
    ulong3 clamp(ulong3 value, ulong3 min_value, ulong3 max_value); + Added in API level 19 +
    ulong4 clamp(ulong4 value, ulong min_value, ulong max_value); + Added in API level 19 +
    ulong4 clamp(ulong4 value, ulong4 min_value, ulong4 max_value); + Added in API level 19 +
    ushort clamp(ushort value, ushort min_value, ushort max_value); + Added in API level 19 +
    ushort2 clamp(ushort2 value, ushort min_value, ushort max_value); + Added in API level 19 +
    ushort2 clamp(ushort2 value, ushort2 min_value, ushort2 max_value); + Added in API level 19 +
    ushort3 clamp(ushort3 value, ushort min_value, ushort max_value); + Added in API level 19 +
    ushort3 clamp(ushort3 value, ushort3 min_value, ushort3 max_value); + Added in API level 19 +
    ushort4 clamp(ushort4 value, ushort min_value, ushort max_value); + Added in API level 19 +
    ushort4 clamp(ushort4 value, ushort4 min_value, ushort4 max_value); + Added in API level 19 +
    +
    +
    Parameters
    + + + + +
    valueValue to be clamped.
    min_valueLower bound, a scalar or matching vector.
    max_valueHigh bound, must match the type of low.
    +
    +
    +

    Clamps a value to a specified high and low bound. clamp() returns min_value +if value < min_value, max_value if value > max_value, otherwise value. +

    + +

    There are two variants of clamp: one where the min and max are scalars applied +to all entries of the value, the other where the min and max are also vectors. +

    + +

    If min_value is greater than max_value, the results are undefined. +

    +
    +
    + + +
    +

    + clz + : Number of leading 0 bits +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    char clz(char value); +
    char2 clz(char2 value); +
    char3 clz(char3 value); +
    char4 clz(char4 value); +
    int clz(int value); +
    int2 clz(int2 value); +
    int3 clz(int3 value); +
    int4 clz(int4 value); +
    short clz(short value); +
    short2 clz(short2 value); +
    short3 clz(short3 value); +
    short4 clz(short4 value); +
    uchar clz(uchar value); +
    uchar2 clz(uchar2 value); +
    uchar3 clz(uchar3 value); +
    uchar4 clz(uchar4 value); +
    uint clz(uint value); +
    uint2 clz(uint2 value); +
    uint3 clz(uint3 value); +
    uint4 clz(uint4 value); +
    ushort clz(ushort value); +
    ushort2 clz(ushort2 value); +
    ushort3 clz(ushort3 value); +
    ushort4 clz(ushort4 value); +
    +
    +
    +

    Returns the number of leading 0-bits in a value. +

    + +

    For example, clz((char)0x03) returns 6. +

    +
    +
    + + +
    +

    + copysign + : Copies the sign of a number to another +

    +
    + + + + + + + + + + + + + + + + + +
    float copysign(float magnitude_value, float sign_value); +
    float2 copysign(float2 magnitude_value, float2 sign_value); +
    float3 copysign(float3 magnitude_value, float3 sign_value); +
    float4 copysign(float4 magnitude_value, float4 sign_value); +
    +
    +
    +

    Copies the sign from sign_value to magnitude_value. +

    + +

    The value returned is either magnitude_value or -magnitude_value. +

    + +

    For example, copysign(4.0f, -2.7f) returns -4.0f and copysign(-4.0f, 2.7f) returns 4.0f. +

    +
    +
    + + +
    +

    + cos + : Cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float cos(float v); +
    float2 cos(float2 v); +
    float3 cos(float3 v); +
    float4 cos(float4 v); +
    +
    +
    +

    Returns the cosine of an angle measured in radians. +

    + +

    See also native_cos(). +

    +
    +
    + + +
    +

    + cosh + : Hypebolic cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float cosh(float v); +
    float2 cosh(float2 v); +
    float3 cosh(float3 v); +
    float4 cosh(float4 v); +
    +
    +
    +

    Returns the hypebolic cosine of v, where v is measured in radians. +

    + +

    See also native_cosh(). +

    +
    +
    + + +
    +

    + cospi + : Cosine of a number multiplied by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float cospi(float v); +
    float2 cospi(float2 v); +
    float3 cospi(float3 v); +
    float4 cospi(float4 v); +
    +
    +
    +

    Returns the cosine of (v * pi), where (v * pi) is measured in radians. +

    + +

    To get the cosine of a value measured in degrees, call cospi(v / 180.f). +

    + +

    See also native_cospi(). +

    +
    +
    + + +
    +

    + degrees + : Converts radians into degrees +

    +
    + + + + + + + + + + + + + + + + + +
    float degrees(float v); +
    float2 degrees(float2 v); +
    float3 degrees(float3 v); +
    float4 degrees(float4 v); +
    +
    +
    +

    Converts from radians to degrees. +

    +
    +
    + + +
    +

    + erf + : Mathematical error function +

    +
    + + + + + + + + + + + + + + + + + +
    float erf(float v); +
    float2 erf(float2 v); +
    float3 erf(float3 v); +
    float4 erf(float4 v); +
    +
    +
    +

    Returns the error function. +

    +
    +
    + + +
    +

    + erfc + : Mathematical complementary error function +

    +
    + + + + + + + + + + + + + + + + + +
    float erfc(float v); +
    float2 erfc(float2 v); +
    float3 erfc(float3 v); +
    float4 erfc(float4 v); +
    +
    +
    +

    Returns the complementary error function. +

    +
    +
    + + +
    +

    + exp + : e raised to a number +

    +
    + + + + + + + + + + + + + + + + + +
    float exp(float v); +
    float2 exp(float2 v); +
    float3 exp(float3 v); +
    float4 exp(float4 v); +
    +
    +
    +

    Returns e raised to v, i.e. e ^ v. +

    + +

    See also native_exp(). +

    +
    +
    + + +
    +

    + exp10 + : 10 raised to a number +

    +
    + + + + + + + + + + + + + + + + + +
    float exp10(float v); +
    float2 exp10(float2 v); +
    float3 exp10(float3 v); +
    float4 exp10(float4 v); +
    +
    +
    +

    Returns 10 raised to v, i.e. 10.f ^ v. +

    + +

    See also native_exp10(). +

    +
    +
    + + +
    +

    + exp2 + : 2 raised to a number +

    +
    + + + + + + + + + + + + + + + + + +
    float exp2(float v); +
    float2 exp2(float2 v); +
    float3 exp2(float3 v); +
    float4 exp2(float4 v); +
    +
    +
    +

    Returns 2 raised to v, i.e. 2.f ^ v. +

    + +

    See also native_exp2(). +

    +
    +
    + + +
    +

    + expm1 + : e raised to a number minus one +

    +
    + + + + + + + + + + + + + + + + + +
    float expm1(float v); +
    float2 expm1(float2 v); +
    float3 expm1(float3 v); +
    float4 expm1(float4 v); +
    +
    +
    +

    Returns e raised to v minus 1, i.e. (e ^ v) - 1. +

    + +

    See also native_expm1(). +

    +
    +
    + + +
    +

    + fabs + : Absolute value of a float +

    +
    + + + + + + + + + + + + + + + + + +
    float fabs(float v); +
    float2 fabs(float2 v); +
    float3 fabs(float3 v); +
    float4 fabs(float4 v); +
    +
    +
    +

    Returns the absolute value of the float v. +

    + +

    For integers, use abs(). +

    +
    +
    + + +
    +

    + fdim + : Positive difference between two values +

    +
    + + + + + + + + + + + + + + + + + +
    float fdim(float a, float b); +
    float2 fdim(float2 a, float2 b); +
    float3 fdim(float3 a, float3 b); +
    float4 fdim(float4 a, float4 b); +
    +
    +
    +

    Returns the positive difference between two values. +

    + +

    If a > b, returns (a - b) otherwise returns 0f. +

    +
    +
    + + +
    +

    + floor + : Smallest integer not greater than a value +

    +
    + + + + + + + + + + + + + + + + + +
    float floor(float v); +
    float2 floor(float2 v); +
    float3 floor(float3 v); +
    float4 floor(float4 v); +
    +
    +
    +

    Returns the smallest integer not greater than a value. +

    + +

    For example, floor(1.2f) returns 1.f, and floor(-1.2f) returns -2.f. +

    + +

    See also ceil(). +

    +
    +
    + + +
    +

    + fma + : Multiply and add +

    +
    + + + + + + + + + + + + + + + + + +
    float fma(float multiplicand1, float multiplicand2, float offset); +
    float2 fma(float2 multiplicand1, float2 multiplicand2, float2 offset); +
    float3 fma(float3 multiplicand1, float3 multiplicand2, float3 offset); +
    float4 fma(float4 multiplicand1, float4 multiplicand2, float4 offset); +
    +
    +
    +

    Multiply and add. Returns (multiplicand1 * multiplicand2) + offset. +

    + +

    This function is similar to mad(). fma() retains full precision of the multiplied result +and rounds only after the addition. mad() rounds after the multiplication and the addition. +This extra precision is not guaranteed in rs_fp_relaxed mode. +

    +
    +
    + + +
    +

    + fmax + : Maximum of two floats +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    float fmax(float a, float b); +
    float2 fmax(float2 a, float b); +
    float2 fmax(float2 a, float2 b); +
    float3 fmax(float3 a, float b); +
    float3 fmax(float3 a, float3 b); +
    float4 fmax(float4 a, float b); +
    float4 fmax(float4 a, float4 b); +
    +
    +
    +

    Returns the maximum of a and b, i.e. (a < b ? b : a). +

    + +

    The max() function returns identical results but can be applied to more data types. +

    +
    +
    + + +
    +

    + fmin + : Minimum of two floats +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    float fmin(float a, float b); +
    float2 fmin(float2 a, float b); +
    float2 fmin(float2 a, float2 b); +
    float3 fmin(float3 a, float b); +
    float3 fmin(float3 a, float3 b); +
    float4 fmin(float4 a, float b); +
    float4 fmin(float4 a, float4 b); +
    +
    +
    +

    Returns the minimum of a and b, i.e. (a > b ? b : a). +

    + +

    The min() function returns identical results but can be applied to more data types. +

    +
    +
    + + +
    +

    + fmod + : Modulo +

    +
    + + + + + + + + + + + + + + + + + +
    float fmod(float numerator, float denominator); +
    float2 fmod(float2 numerator, float2 denominator); +
    float3 fmod(float3 numerator, float3 denominator); +
    float4 fmod(float4 numerator, float4 denominator); +
    +
    +
    +

    Returns the remainder of (numerator / denominator), where the quotient is rounded towards zero. +

    + +

    The function remainder() is similar but rounds toward the closest interger. +For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) +while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). +

    +
    +
    + + +
    +

    + fract + : Positive fractional part +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    float fract(float v); +
    float fract(float v, float* floor); +
    float2 fract(float2 v); +
    float2 fract(float2 v, float2* floor); +
    float3 fract(float3 v); +
    float3 fract(float3 v, float3* floor); +
    float4 fract(float4 v); +
    float4 fract(float4 v, float4* floor); +
    +
    +
    Parameters
    + + + +
    vInput value.
    floorIf floor is not null, *floor will be set to the floor of v.
    +
    +
    +

    Returns the positive fractional part of v, i.e. v - floor(v). +

    + +

    For example, fract(1.3f, &val) returns 0.3f and sets val to 1.f. +fract(-1.3f, &val) returns 0.7f and sets val to -2.f. +

    +
    +
    + + +
    +

    + frexp + : Binary mantissa and exponent +

    +
    + + + + + + + + + + + + + + + + + +
    float frexp(float v, int* exponent); +
    float2 frexp(float2 v, int2* exponent); +
    float3 frexp(float3 v, int3* exponent); +
    float4 frexp(float4 v, int4* exponent); +
    +
    +
    Parameters
    + + + +
    vInput value.
    exponentIf exponent is not null, *exponent will be set to the exponent of v.
    +
    +
    +

    Returns the binary mantissa and exponent of v, i.e. v == mantissa * 2 ^ exponent. +

    + +

    The mantissa is always between 0.5 (inclusive) and 1.0 (exclusive). +

    + +

    See ldexp() for the reverse operation. See also logb() and ilogb(). +

    +
    +
    + + +
    +

    + half_recip + : Reciprocal computed to 16 bit precision +

    +
    + + + + + + + + + + + + + + + + + +
    float half_recip(float v); + Added in API level 17 +
    float2 half_recip(float2 v); + Added in API level 17 +
    float3 half_recip(float3 v); + Added in API level 17 +
    float4 half_recip(float4 v); + Added in API level 17 +
    +
    +
    +

    Returns the approximate reciprocal of a value. +

    + +

    The precision is that of a 16 bit floating point value. +

    + +

    See also native_recip(). +

    +
    +
    + + +
    +

    + half_rsqrt + : Reciprocal of a square root computed to 16 bit precision +

    +
    + + + + + + + + + + + + + + + + + +
    float half_rsqrt(float v); + Added in API level 17 +
    float2 half_rsqrt(float2 v); + Added in API level 17 +
    float3 half_rsqrt(float3 v); + Added in API level 17 +
    float4 half_rsqrt(float4 v); + Added in API level 17 +
    +
    +
    +

    Returns the approximate value of (1.f / sqrt(value)). +

    + +

    The precision is that of a 16 bit floating point value. +

    + +

    See also rsqrt(), native_rsqrt(). +

    +
    +
    + + +
    +

    + half_sqrt + : Square root computed to 16 bit precision +

    +
    + + + + + + + + + + + + + + + + + +
    float half_sqrt(float v); + Added in API level 17 +
    float2 half_sqrt(float2 v); + Added in API level 17 +
    float3 half_sqrt(float3 v); + Added in API level 17 +
    float4 half_sqrt(float4 v); + Added in API level 17 +
    +
    +
    +

    Returns the approximate square root of a value. +

    + +

    The precision is that of a 16 bit floating point value. +

    + +

    See also sqrt(), native_sqrt(). +

    +
    +
    + + +
    +

    + hypot + : Hypotenuse +

    +
    + + + + + + + + + + + + + + + + + +
    float hypot(float a, float b); +
    float2 hypot(float2 a, float2 b); +
    float3 hypot(float3 a, float3 b); +
    float4 hypot(float4 a, float4 b); +
    +
    +
    +

    Returns the hypotenuse, i.e. sqrt(a * a + b * b). +

    + +

    See also native_hypot(). +

    +
    +
    + + +
    +

    + ilogb + : Base two exponent +

    +
    + + + + + + + + + + + + + + + + + +
    int ilogb(float v); +
    int2 ilogb(float2 v); +
    int3 ilogb(float3 v); +
    int4 ilogb(float4 v); +
    +
    +
    +

    Returns the base two exponent of a value, where the mantissa is between +1.f (inclusive) and 2.f (exclusive). +

    + +

    For example, ilogb(8.5f) returns 3. +

    + +

    Because of the difference in mantissa, this number is one less than is returned by frexp(). +

    + +

    logb() is similar but returns a float. +

    +
    +
    + + +
    +

    + ldexp + : Creates a floating point from mantissa and exponent +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    float ldexp(float mantissa, int exponent); +
    float2 ldexp(float2 mantissa, int exponent); +
    float2 ldexp(float2 mantissa, int2 exponent); +
    float3 ldexp(float3 mantissa, int exponent); +
    float3 ldexp(float3 mantissa, int3 exponent); +
    float4 ldexp(float4 mantissa, int exponent); +
    float4 ldexp(float4 mantissa, int4 exponent); +
    +
    +
    Parameters
    + + + +
    mantissaMantissa.
    exponentExponent, a single component or matching vector.
    +
    +
    +

    Returns the floating point created from the mantissa and exponent, +i.e. (mantissa * 2 ^ exponent). +

    + +

    See frexp() for the reverse operation. +

    +
    +
    + + +
    +

    + lgamma + : Natural logarithm of the gamma function +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    float lgamma(float v); +
    float lgamma(float v, int* sign_of_gamma); +
    float2 lgamma(float2 v); +
    float2 lgamma(float2 v, int2* sign_of_gamma); +
    float3 lgamma(float3 v); +
    float3 lgamma(float3 v, int3* sign_of_gamma); +
    float4 lgamma(float4 v); +
    float4 lgamma(float4 v, int4* sign_of_gamma); +
    +
    +
    Parameters
    + + + +
    v
    sign_of_gammaIf sign_of_gamma is not null, *sign_of_gamma will be set to -1.f if the gamma of v is negative, otherwise to 1.f.
    +
    +
    +

    Returns the natural logarithm of the absolute value of the gamma function, +i.e. log(fabs(tgamma(v))). +

    + +

    See also tgamma(). +

    +
    +
    + + +
    +

    + log + : Natural logarithm +

    +
    + + + + + + + + + + + + + + + + + +
    float log(float v); +
    float2 log(float2 v); +
    float3 log(float3 v); +
    float4 log(float4 v); +
    +
    +
    +

    Returns the natural logarithm. +

    + +

    See also native_log(). +

    +
    +
    + + +
    +

    + log10 + : Base 10 logarithm +

    +
    + + + + + + + + + + + + + + + + + +
    float log10(float v); +
    float2 log10(float2 v); +
    float3 log10(float3 v); +
    float4 log10(float4 v); +
    +
    +
    +

    Returns the base 10 logarithm. +

    + +

    See also native_log10(). +

    +
    +
    + + +
    +

    + log1p + : Natural logarithm of a value plus 1 +

    +
    + + + + + + + + + + + + + + + + + +
    float log1p(float v); +
    float2 log1p(float2 v); +
    float3 log1p(float3 v); +
    float4 log1p(float4 v); +
    +
    +
    +

    Returns the natural logarithm of (v + 1.f). +

    + +

    See also native_log1p(). +

    +
    +
    + + +
    +

    + log2 + : Base 2 logarithm +

    +
    + + + + + + + + + + + + + + + + + +
    float log2(float v); +
    float2 log2(float2 v); +
    float3 log2(float3 v); +
    float4 log2(float4 v); +
    +
    +
    +

    Returns the base 2 logarithm. +

    + +

    See also native_log2(). +

    +
    +
    + + +
    +

    + logb + : Base two exponent +

    +
    + + + + + + + + + + + + + + + + + +
    float logb(float v); +
    float2 logb(float2 v); +
    float3 logb(float3 v); +
    float4 logb(float4 v); +
    +
    +
    +

    Returns the base two exponent of a value, where the mantissa is between +1.f (inclusive) and 2.f (exclusive). +

    + +

    For example, logb(8.5f) returns 3.f. +

    + +

    Because of the difference in mantissa, this number is one less than is returned by frexp(). +

    + +

    ilogb() is similar but returns an integer. +

    +
    +
    + + +
    +

    + mad + : Multiply and add +

    +
    + + + + + + + + + + + + + + + + + +
    float mad(float multiplicand1, float multiplicand2, float offset); +
    float2 mad(float2 multiplicand1, float2 multiplicand2, float2 offset); +
    float3 mad(float3 multiplicand1, float3 multiplicand2, float3 offset); +
    float4 mad(float4 multiplicand1, float4 multiplicand2, float4 offset); +
    +
    +
    +

    Multiply and add. Returns (multiplicand1 * multiplicand2) + offset. +

    + +

    This function is similar to fma(). fma() retains full precision of the multiplied result +and rounds only after the addition. mad() rounds after the multiplication and the addition. +In rs_fp_relaxed mode, mad() may not do the rounding after multiplicaiton. +

    +
    +
    + + +
    +

    + max + : Maximum +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    char max(char a, char b); +
    char2 max(char2 a, char2 b); +
    char3 max(char3 a, char3 b); +
    char4 max(char4 a, char4 b); +
    float max(float a, float b); +
    float2 max(float2 a, float2 b); +
    float3 max(float3 a, float3 b); +
    float4 max(float4 a, float4 b); +
    int max(int a, int b); +
    int2 max(int2 a, int2 b); +
    int3 max(int3 a, int3 b); +
    int4 max(int4 a, int4 b); +
    long max(long a, long b); + Added in API level 21 +
    long2 max(long2 a, long2 b); + Added in API level 21 +
    long3 max(long3 a, long3 b); + Added in API level 21 +
    long4 max(long4 a, long4 b); + Added in API level 21 +
    short max(short a, short b); +
    short2 max(short2 a, short2 b); +
    short3 max(short3 a, short3 b); +
    short4 max(short4 a, short4 b); +
    uchar max(uchar a, uchar b); +
    uchar2 max(uchar2 a, uchar2 b); +
    uchar3 max(uchar3 a, uchar3 b); +
    uchar4 max(uchar4 a, uchar4 b); +
    uint max(uint a, uint b); +
    uint2 max(uint2 a, uint2 b); +
    uint3 max(uint3 a, uint3 b); +
    uint4 max(uint4 a, uint4 b); +
    ulong max(ulong a, ulong b); + Added in API level 21 +
    ulong2 max(ulong2 a, ulong2 b); + Added in API level 21 +
    ulong3 max(ulong3 a, ulong3 b); + Added in API level 21 +
    ulong4 max(ulong4 a, ulong4 b); + Added in API level 21 +
    ushort max(ushort a, ushort b); +
    ushort2 max(ushort2 a, ushort2 b); +
    ushort3 max(ushort3 a, ushort3 b); +
    ushort4 max(ushort4 a, ushort4 b); +
    +
    +
    +

    Returns the maximum value of two arguments. +

    +
    +
    + + +
    +

    + min + : Minimum +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    char min(char a, char b); +
    char2 min(char2 a, char2 b); +
    char3 min(char3 a, char3 b); +
    char4 min(char4 a, char4 b); +
    float min(float a, float b); +
    float2 min(float2 a, float2 b); +
    float3 min(float3 a, float3 b); +
    float4 min(float4 a, float4 b); +
    int min(int a, int b); +
    int2 min(int2 a, int2 b); +
    int3 min(int3 a, int3 b); +
    int4 min(int4 a, int4 b); +
    long min(long a, long b); + Added in API level 21 +
    long2 min(long2 a, long2 b); + Added in API level 21 +
    long3 min(long3 a, long3 b); + Added in API level 21 +
    long4 min(long4 a, long4 b); + Added in API level 21 +
    short min(short a, short b); +
    short2 min(short2 a, short2 b); +
    short3 min(short3 a, short3 b); +
    short4 min(short4 a, short4 b); +
    uchar min(uchar a, uchar b); +
    uchar2 min(uchar2 a, uchar2 b); +
    uchar3 min(uchar3 a, uchar3 b); +
    uchar4 min(uchar4 a, uchar4 b); +
    uint min(uint a, uint b); +
    uint2 min(uint2 a, uint2 b); +
    uint3 min(uint3 a, uint3 b); +
    uint4 min(uint4 a, uint4 b); +
    ulong min(ulong a, ulong b); + Added in API level 21 +
    ulong2 min(ulong2 a, ulong2 b); + Added in API level 21 +
    ulong3 min(ulong3 a, ulong3 b); + Added in API level 21 +
    ulong4 min(ulong4 a, ulong4 b); + Added in API level 21 +
    ushort min(ushort a, ushort b); +
    ushort2 min(ushort2 a, ushort2 b); +
    ushort3 min(ushort3 a, ushort3 b); +
    ushort4 min(ushort4 a, ushort4 b); +
    +
    +
    +

    Returns the minimum value of two arguments. +

    +
    +
    + + +
    +

    + mix + : Mixes two values +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    float mix(float start, float stop, float fraction); +
    float2 mix(float2 start, float2 stop, float fraction); +
    float2 mix(float2 start, float2 stop, float2 fraction); +
    float3 mix(float3 start, float3 stop, float fraction); +
    float3 mix(float3 start, float3 stop, float3 fraction); +
    float4 mix(float4 start, float4 stop, float fraction); +
    float4 mix(float4 start, float4 stop, float4 fraction); +
    +
    +
    +

    Returns start + ((stop - start) * fraction). +

    + +

    This can be useful for mixing two values. For example, to create a new color that is +40% color1 and 60% color2, use mix(color1, color2, 0.6f). +

    +
    +
    + + +
    +

    + modf + : Integral and fractional components +

    +
    + + + + + + + + + + + + + + + + + +
    float modf(float v, float* integral_part); +
    float2 modf(float2 v, float2* integral_part); +
    float3 modf(float3 v, float3* integral_part); +
    float4 modf(float4 v, float4* integral_part); +
    +
    +
    Parameters
    + + + +
    vSource value.
    integral_part*integral_part will be set to the integral portion of the number.
    +
    +
    Returns
    + + +
    Floating point portion of the value.
    +
    +
    +

    Returns the integral and fractional components of a number. +

    + +

    Both components will have the same sign as x. For example, for an input of -3.72f, +iret will be set to -3.f and .72f will be returned. +

    +
    +
    + + +
    +

    + nan + : Not a Number +

    +
    + + + + + +
    float nan(uint v); +
    +
    +
    Parameters
    + + +
    vNot used.
    +
    +
    +

    Returns a NaN value (Not a Number). +

    +
    +
    + + +
    +

    + native_acos + : Approximate inverse cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_acos(float v); + Added in API level 21 +
    float2 native_acos(float2 v); + Added in API level 21 +
    float3 native_acos(float3 v); + Added in API level 21 +
    float4 native_acos(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse cosine, in radians. +

    + +

    This function yields undefined results from input values less than -1 or greater than 1. +

    + +

    See also acos(). +

    +
    +
    + + +
    +

    + native_acosh + : Approximate inverse hyperbolic cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_acosh(float v); + Added in API level 21 +
    float2 native_acosh(float2 v); + Added in API level 21 +
    float3 native_acosh(float3 v); + Added in API level 21 +
    float4 native_acosh(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse hyperbolic cosine, in radians. +

    + +

    See also acosh(). +

    +
    +
    + + +
    +

    + native_acospi + : Approximate inverse cosine divided by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float native_acospi(float v); + Added in API level 21 +
    float2 native_acospi(float2 v); + Added in API level 21 +
    float3 native_acospi(float3 v); + Added in API level 21 +
    float4 native_acospi(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse cosine in radians, divided by pi. +

    + +

    To get an inverse cosine measured in degrees, use acospi(a) * 180.f. +

    + +

    This function yields undefined results from input values less than -1 or greater than 1. +

    + +

    See also acospi(). +

    +
    +
    + + +
    +

    + native_asin + : Approximate inverse sine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_asin(float v); + Added in API level 21 +
    float2 native_asin(float2 v); + Added in API level 21 +
    float3 native_asin(float3 v); + Added in API level 21 +
    float4 native_asin(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse sine, in radians. +

    + +

    This function yields undefined results from input values less than -1 or greater than 1. +

    + +

    See also asin(). +

    +
    +
    + + +
    +

    + native_asinh + : Approximate inverse hyperbolic sine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_asinh(float v); + Added in API level 21 +
    float2 native_asinh(float2 v); + Added in API level 21 +
    float3 native_asinh(float3 v); + Added in API level 21 +
    float4 native_asinh(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse hyperbolic sine, in radians. +

    + +

    See also asinh(). +

    +
    +
    + + +
    +

    + native_asinpi + : Approximate inverse sine divided by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float native_asinpi(float v); + Added in API level 21 +
    float2 native_asinpi(float2 v); + Added in API level 21 +
    float3 native_asinpi(float3 v); + Added in API level 21 +
    float4 native_asinpi(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse sine in radians, divided by pi. +

    + +

    To get an inverse sine measured in degrees, use asinpi(a) * 180.f. +

    + +

    This function yields undefined results from input values less than -1 or greater than 1. +

    + +

    See also asinpi(). +

    +
    +
    + + +
    +

    + native_atan + : Approximate inverse tangent +

    +
    + + + + + + + + + + + + + + + + + +
    float native_atan(float v); + Added in API level 21 +
    float2 native_atan(float2 v); + Added in API level 21 +
    float3 native_atan(float3 v); + Added in API level 21 +
    float4 native_atan(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse tangent, in radians. +

    + +

    See also atan(). +

    +
    +
    + + +
    +

    + native_atan2 + : Approximate inverse tangent of a ratio +

    +
    + + + + + + + + + + + + + + + + + +
    float native_atan2(float numerator, float denominator); + Added in API level 21 +
    float2 native_atan2(float2 numerator, float2 denominator); + Added in API level 21 +
    float3 native_atan2(float3 numerator, float3 denominator); + Added in API level 21 +
    float4 native_atan2(float4 numerator, float4 denominator); + Added in API level 21 +
    +
    +
    Parameters
    + + + +
    numeratorNumerator.
    denominatorDenominator. Can be 0.
    +
    +
    +

    Returns the approximate inverse tangent of (numerator / denominator), in radians. +

    + +

    See also atan2(). +

    +
    +
    + + +
    +

    + native_atan2pi + : Approximate inverse tangent of a ratio, divided by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float native_atan2pi(float numerator, float denominator); + Added in API level 21 +
    float2 native_atan2pi(float2 numerator, float2 denominator); + Added in API level 21 +
    float3 native_atan2pi(float3 numerator, float3 denominator); + Added in API level 21 +
    float4 native_atan2pi(float4 numerator, float4 denominator); + Added in API level 21 +
    +
    +
    Parameters
    + + + +
    numeratorNumerator.
    denominatorDenominator. Can be 0.
    +
    +
    +

    Returns the approximate inverse tangent of (numerator / denominator), +in radians, divided by pi. +

    + +

    To get an inverse tangent measured in degrees, use atan2pi(n, d) * 180.f. +

    + +

    See also atan2pi(). +

    +
    +
    + + +
    +

    + native_atanh + : Approximate inverse hyperbolic tangent +

    +
    + + + + + + + + + + + + + + + + + +
    float native_atanh(float v); + Added in API level 21 +
    float2 native_atanh(float2 v); + Added in API level 21 +
    float3 native_atanh(float3 v); + Added in API level 21 +
    float4 native_atanh(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse hyperbolic tangent, in radians. +

    + +

    See also atanh(). +

    +
    +
    + + +
    +

    + native_atanpi + : Approximate inverse tangent divided by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float native_atanpi(float v); + Added in API level 21 +
    float2 native_atanpi(float2 v); + Added in API level 21 +
    float3 native_atanpi(float3 v); + Added in API level 21 +
    float4 native_atanpi(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate inverse tangent in radians, divided by pi. +

    + +

    To get an inverse tangent measured in degrees, use atanpi(a) * 180.f. +

    + +

    See also atanpi(). +

    +
    +
    + + +
    +

    + native_cbrt + : Approximate cube root +

    +
    + + + + + + + + + + + + + + + + + +
    float native_cbrt(float v); + Added in API level 21 +
    float2 native_cbrt(float2 v); + Added in API level 21 +
    float3 native_cbrt(float3 v); + Added in API level 21 +
    float4 native_cbrt(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate cubic root. +

    + +

    See also cbrt(). +

    +
    +
    + + +
    +

    + native_cos + : Approximate cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_cos(float v); + Added in API level 21 +
    float2 native_cos(float2 v); + Added in API level 21 +
    float3 native_cos(float3 v); + Added in API level 21 +
    float4 native_cos(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate cosine of an angle measured in radians. +

    + +

    See also cos(). +

    +
    +
    + + +
    +

    + native_cosh + : Approximate hypebolic cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_cosh(float v); + Added in API level 21 +
    float2 native_cosh(float2 v); + Added in API level 21 +
    float3 native_cosh(float3 v); + Added in API level 21 +
    float4 native_cosh(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate hypebolic cosine. +

    + +

    See also cosh(). +

    +
    +
    + + +
    +

    + native_cospi + : Approximate cosine of a number multiplied by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float native_cospi(float v); + Added in API level 21 +
    float2 native_cospi(float2 v); + Added in API level 21 +
    float3 native_cospi(float3 v); + Added in API level 21 +
    float4 native_cospi(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate cosine of (v * pi), where (v * pi) is measured in radians. +

    + +

    To get the cosine of a value measured in degrees, call cospi(v / 180.f). +

    + +

    See also cospi(). +

    +
    +
    + + +
    +

    + native_divide + : Approximate division +

    +
    + + + + + + + + + + + + + + + + + +
    float native_divide(float left_vector, float right_vector); + Added in API level 21 +
    float2 native_divide(float2 left_vector, float2 right_vector); + Added in API level 21 +
    float3 native_divide(float3 left_vector, float3 right_vector); + Added in API level 21 +
    float4 native_divide(float4 left_vector, float4 right_vector); + Added in API level 21 +
    +
    +
    +

    Computes the approximate division of two values. +

    +
    +
    + + +
    +

    + native_exp + : Approximate e raised to a number +

    +
    + + + + + + + + + + + + + + + + + +
    float native_exp(float v); + Added in API level 18 +
    float2 native_exp(float2 v); + Added in API level 18 +
    float3 native_exp(float3 v); + Added in API level 18 +
    float4 native_exp(float4 v); + Added in API level 18 +
    +
    +
    +

    Fast approximate exp. +

    + +

    It is valid for inputs from -86.f to 86.f. The precision is no worse than what would be +expected from using 16 bit floating point values. +

    + +

    See also exp(). +

    +
    +
    + + +
    +

    + native_exp10 + : Approximate 10 raised to a number +

    +
    + + + + + + + + + + + + + + + + + +
    float native_exp10(float v); + Added in API level 18 +
    float2 native_exp10(float2 v); + Added in API level 18 +
    float3 native_exp10(float3 v); + Added in API level 18 +
    float4 native_exp10(float4 v); + Added in API level 18 +
    +
    +
    +

    Fast approximate exp10. +

    + +

    It is valid for inputs from -37.f to 37.f. The precision is no worse than what would be +expected from using 16 bit floating point values. +

    + +

    See also exp10(). +

    +
    +
    + + +
    +

    + native_exp2 + : Approximate 2 raised to a number +

    +
    + + + + + + + + + + + + + + + + + +
    float native_exp2(float v); + Added in API level 18 +
    float2 native_exp2(float2 v); + Added in API level 18 +
    float3 native_exp2(float3 v); + Added in API level 18 +
    float4 native_exp2(float4 v); + Added in API level 18 +
    +
    +
    +

    Fast approximate exp2. +

    + +

    It is valid for inputs from -125.f to 125.f. The precision is no worse than what would be +expected from using 16 bit floating point values. +

    + +

    See also exp2(). +

    +
    +
    + + +
    +

    + native_expm1 + : Approximate e raised to a number minus one +

    +
    + + + + + + + + + + + + + + + + + +
    float native_expm1(float v); + Added in API level 21 +
    float2 native_expm1(float2 v); + Added in API level 21 +
    float3 native_expm1(float3 v); + Added in API level 21 +
    float4 native_expm1(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate (e ^ v) - 1. +

    + +

    See also expm1(). +

    +
    +
    + + +
    +

    + native_hypot + : Approximate hypotenuse +

    +
    + + + + + + + + + + + + + + + + + +
    float native_hypot(float a, float b); + Added in API level 21 +
    float2 native_hypot(float2 a, float2 b); + Added in API level 21 +
    float3 native_hypot(float3 a, float3 b); + Added in API level 21 +
    float4 native_hypot(float4 a, float4 b); + Added in API level 21 +
    +
    +
    +

    Returns the approximate native_sqrt(a * a + b * b) +

    + +

    See also hypot(). +

    +
    +
    + + +
    +

    + native_log + : Approximate natural logarithm +

    +
    + + + + + + + + + + + + + + + + + +
    float native_log(float v); + Added in API level 18 +
    float2 native_log(float2 v); + Added in API level 18 +
    float3 native_log(float3 v); + Added in API level 18 +
    float4 native_log(float4 v); + Added in API level 18 +
    +
    +
    +

    Fast approximate log. +

    + +

    It is not accurate for values very close to zero. +

    + +

    See also log(). +

    +
    +
    + + +
    +

    + native_log10 + : Approximate base 10 logarithm +

    +
    + + + + + + + + + + + + + + + + + +
    float native_log10(float v); + Added in API level 18 +
    float2 native_log10(float2 v); + Added in API level 18 +
    float3 native_log10(float3 v); + Added in API level 18 +
    float4 native_log10(float4 v); + Added in API level 18 +
    +
    +
    +

    Fast approximate log10. +

    + +

    It is not accurate for values very close to zero. +

    + +

    See also log10(). +

    +
    +
    + + +
    +

    + native_log1p + : Approximate natural logarithm of a value plus 1 +

    +
    + + + + + + + + + + + + + + + + + +
    float native_log1p(float v); + Added in API level 21 +
    float2 native_log1p(float2 v); + Added in API level 21 +
    float3 native_log1p(float3 v); + Added in API level 21 +
    float4 native_log1p(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate natural logarithm of (v + 1.0f) +

    + +

    See also log1p(). +

    +
    +
    + + +
    +

    + native_log2 + : Approximate base 2 logarithm +

    +
    + + + + + + + + + + + + + + + + + +
    float native_log2(float v); + Added in API level 18 +
    float2 native_log2(float2 v); + Added in API level 18 +
    float3 native_log2(float3 v); + Added in API level 18 +
    float4 native_log2(float4 v); + Added in API level 18 +
    +
    +
    +

    Fast approximate log2. +

    + +

    It is not accurate for values very close to zero. +

    + +

    See also log2(). +

    +
    +
    + + +
    +

    + native_powr + : Approximate positive base raised to an exponent +

    +
    + + + + + + + + + + + + + + + + + +
    float native_powr(float base, float exponent); + Added in API level 18 +
    float2 native_powr(float2 base, float2 exponent); + Added in API level 18 +
    float3 native_powr(float3 base, float3 exponent); + Added in API level 18 +
    float4 native_powr(float4 base, float4 exponent); + Added in API level 18 +
    +
    +
    Parameters
    + + + +
    baseMust be between 0.f and 256.f. The function is not accurate for values very close to zero.
    exponentMust be between -15.f and 15.f.
    +
    +
    +

    Fast approximate (base ^ exponent). +

    + +

    See also powr(). +

    +
    +
    + + +
    +

    + native_recip + : Approximate reciprocal +

    +
    + + + + + + + + + + + + + + + + + +
    float native_recip(float v); + Added in API level 21 +
    float2 native_recip(float2 v); + Added in API level 21 +
    float3 native_recip(float3 v); + Added in API level 21 +
    float4 native_recip(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate approximate reciprocal of a value. +

    + +

    See also half_recip(). +

    +
    +
    + + +
    +

    + native_rootn + : Approximate nth root +

    +
    + + + + + + + + + + + + + + + + + +
    float native_rootn(float v, int n); + Added in API level 21 +
    float2 native_rootn(float2 v, int2 n); + Added in API level 21 +
    float3 native_rootn(float3 v, int3 n); + Added in API level 21 +
    float4 native_rootn(float4 v, int4 n); + Added in API level 21 +
    +
    +
    +

    Compute the approximate Nth root of a value. +

    + +

    See also rootn(). +

    +
    +
    + + +
    +

    + native_rsqrt + : Approximate reciprocal of a square root +

    +
    + + + + + + + + + + + + + + + + + +
    float native_rsqrt(float v); + Added in API level 21 +
    float2 native_rsqrt(float2 v); + Added in API level 21 +
    float3 native_rsqrt(float3 v); + Added in API level 21 +
    float4 native_rsqrt(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns approximate (1 / sqrt(v)). +

    + +

    See also rsqrt(), half_rsqrt(). +

    +
    +
    + + +
    +

    + native_sin + : Approximate sine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_sin(float v); + Added in API level 21 +
    float2 native_sin(float2 v); + Added in API level 21 +
    float3 native_sin(float3 v); + Added in API level 21 +
    float4 native_sin(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate sine of an angle measured in radians. +

    + +

    See also sin(). +

    +
    +
    + + +
    +

    + native_sincos + : Approximate sine and cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_sincos(float v, float* cos); + Added in API level 21 +
    float2 native_sincos(float2 v, float2* cos); + Added in API level 21 +
    float3 native_sincos(float3 v, float3* cos); + Added in API level 21 +
    float4 native_sincos(float4 v, float4* cos); + Added in API level 21 +
    +
    +
    Parameters
    + + + +
    vIncoming value in radians.
    cos*cos will be set to the cosine value.
    +
    +
    Returns
    + + +
    Sine.
    +
    +
    +

    Returns the approximate sine and cosine of a value. +

    + +

    See also sincos(). +

    +
    +
    + + +
    +

    + native_sinh + : Approximate hyperbolic sine +

    +
    + + + + + + + + + + + + + + + + + +
    float native_sinh(float v); + Added in API level 21 +
    float2 native_sinh(float2 v); + Added in API level 21 +
    float3 native_sinh(float3 v); + Added in API level 21 +
    float4 native_sinh(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate hyperbolic sine of a value specified in radians. +

    + +

    See also sinh(). +

    +
    +
    + + +
    +

    + native_sinpi + : Approximate sine of a number multiplied by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float native_sinpi(float v); + Added in API level 21 +
    float2 native_sinpi(float2 v); + Added in API level 21 +
    float3 native_sinpi(float3 v); + Added in API level 21 +
    float4 native_sinpi(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate sine of (v * pi), where (v * pi) is measured in radians. +

    + +

    To get the sine of a value measured in degrees, call sinpi(v / 180.f). +

    + +

    See also sinpi(). +

    +
    +
    + + +
    +

    + native_sqrt + : Approximate square root +

    +
    + + + + + + + + + + + + + + + + + +
    float native_sqrt(float v); + Added in API level 21 +
    float2 native_sqrt(float2 v); + Added in API level 21 +
    float3 native_sqrt(float3 v); + Added in API level 21 +
    float4 native_sqrt(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate sqrt(v). +

    + +

    See also sqrt(), half_sqrt(). +

    +
    +
    + + +
    +

    + native_tan + : Approximate tangent +

    +
    + + + + + + + + + + + + + + + + + +
    float native_tan(float v); + Added in API level 21 +
    float2 native_tan(float2 v); + Added in API level 21 +
    float3 native_tan(float3 v); + Added in API level 21 +
    float4 native_tan(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate tangent of an angle measured in radians. +

    +
    +
    + + +
    +

    + native_tanh + : Approximate hyperbolic tangent +

    +
    + + + + + + + + + + + + + + + + + +
    float native_tanh(float v); + Added in API level 21 +
    float2 native_tanh(float2 v); + Added in API level 21 +
    float3 native_tanh(float3 v); + Added in API level 21 +
    float4 native_tanh(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate hyperbolic tangent of a value. +

    + +

    See also tanh(). +

    +
    +
    + + +
    +

    + native_tanpi + : Approximate tangent of a number multiplied by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float native_tanpi(float v); + Added in API level 21 +
    float2 native_tanpi(float2 v); + Added in API level 21 +
    float3 native_tanpi(float3 v); + Added in API level 21 +
    float4 native_tanpi(float4 v); + Added in API level 21 +
    +
    +
    +

    Returns the approximate tangent of (v * pi), where (v * pi) is measured in radians. +

    + +

    To get the tangent of a value measured in degrees, call tanpi(v / 180.f). +

    + +

    See also tanpi(). +

    +
    +
    + + +
    +

    + nextafter + : Next floating point number +

    +
    + + + + + + + + + + + + + + + + + +
    float nextafter(float v, float target); +
    float2 nextafter(float2 v, float2 target); +
    float3 nextafter(float3 v, float3 target); +
    float4 nextafter(float4 v, float4 target); +
    +
    +
    +

    Returns the next representable floating point number from v towards target. +

    + +

    In rs_fp_relaxed mode, a denormalized input value may not yield the next denormalized +value, as support of denormalized values is optional in relaxed mode. +

    +
    +
    + + +
    +

    + pow + : Base raised to an exponent +

    +
    + + + + + + + + + + + + + + + + + +
    float pow(float base, float exponent); +
    float2 pow(float2 base, float2 exponent); +
    float3 pow(float3 base, float3 exponent); +
    float4 pow(float4 base, float4 exponent); +
    +
    +
    +

    Returns base raised to the power exponent, i.e. base ^ exponent. +

    + +

    pown() and powr() are similar. pown() takes an integer exponent. powr() assumes the +base to be non-negative. +

    +
    +
    + + +
    +

    + pown + : Base raised to an integer exponent +

    +
    + + + + + + + + + + + + + + + + + +
    float pown(float base, int exponent); +
    float2 pown(float2 base, int2 exponent); +
    float3 pown(float3 base, int3 exponent); +
    float4 pown(float4 base, int4 exponent); +
    +
    +
    +

    Returns base raised to the power exponent, i.e. base ^ exponent. +

    + +

    pow() and powr() are similar. The both take a float exponent. powr() also assumes the +base to be non-negative. +

    +
    +
    + + +
    +

    + powr + : Positive base raised to an exponent +

    +
    + + + + + + + + + + + + + + + + + +
    float powr(float base, float exponent); +
    float2 powr(float2 base, float2 exponent); +
    float3 powr(float3 base, float3 exponent); +
    float4 powr(float4 base, float4 exponent); +
    +
    +
    +

    Returns base raised to the power exponent, i.e. base ^ exponent. base must be >= 0. +

    + +

    pow() and pown() are similar. They both make no assumptions about the base. +pow() takes a float exponent while pown() take an integer. +

    + +

    See also native_powr(). +

    +
    +
    + + +
    +

    + radians + : Converts degrees into radians +

    +
    + + + + + + + + + + + + + + + + + +
    float radians(float v); +
    float2 radians(float2 v); +
    float3 radians(float3 v); +
    float4 radians(float4 v); +
    +
    +
    +

    Converts from degrees to radians. +

    +
    +
    + + +
    +

    + remainder + : Remainder of a division +

    +
    + + + + + + + + + + + + + + + + + +
    float remainder(float numerator, float denominator); +
    float2 remainder(float2 numerator, float2 denominator); +
    float3 remainder(float3 numerator, float3 denominator); +
    float4 remainder(float4 numerator, float4 denominator); +
    +
    +
    +

    Returns the remainder of (numerator / denominator), where the quotient is rounded towards +the nearest integer. +

    + +

    The function fmod() is similar but rounds toward the closest interger. +For example, fmod(-3.8f, 2.f) returns -1.8f (-3.8f - -1.f * 2.f) +while remainder(-3.8f, 2.f) returns 0.2f (-3.8f - -2.f * 2.f). +

    +
    +
    + + +
    +

    + remquo + : Remainder and quotient of a division +

    +
    + + + + + + + + + + + + + + + + + +
    float remquo(float numerator, float denominator, int* quotient); +
    float2 remquo(float2 numerator, float2 denominator, int2* quotient); +
    float3 remquo(float3 numerator, float3 denominator, int3* quotient); +
    float4 remquo(float4 numerator, float4 denominator, int4* quotient); +
    +
    +
    Parameters
    + + + + +
    numeratorNumerator.
    denominatorDenominator.
    quotient*quotient will be set to the integer quotient.
    +
    +
    Returns
    + + +
    Remainder, precise only for the low three bits.
    +
    +
    +

    Returns the quotient and the remainder of (numerator / denominator). +

    + +

    Only the sign and lowest three bits of the quotient are guaranteed to be accurate. +

    + +

    This function is useful for implementing periodic functions. The low three bits of the +quotient gives the quadrant and the remainder the distance within the quadrant. +For example, an implementation of sin(x) could call remquo(x, PI / 2.f, &quadrant) +to reduce very large value of x to something within a limited range. +

    + +

    Example: remquo(-23.5f, 8.f, &quot) sets the lowest three bits of quot to 3 +and the sign negative. It returns 0.5f. +

    +
    +
    + + +
    +

    + rint + : Round to even +

    +
    + + + + + + + + + + + + + + + + + +
    float rint(float v); +
    float2 rint(float2 v); +
    float3 rint(float3 v); +
    float4 rint(float4 v); +
    +
    +
    +

    Rounds to the nearest integral value. +

    + +

    rint() rounds half values to even. For example, rint(0.5f) returns 0.f and +rint(1.5f) returns 2.f. Similarly, rint(-0.5f) returns -0.f and +rint(-1.5f) returns -2.f. +

    + +

    round() is similar but rounds away from zero. trunc() truncates the decimal fraction. +

    +
    +
    + + +
    +

    + rootn + : Nth root +

    +
    + + + + + + + + + + + + + + + + + +
    float rootn(float v, int n); +
    float2 rootn(float2 v, int2 n); +
    float3 rootn(float3 v, int3 n); +
    float4 rootn(float4 v, int4 n); +
    +
    +
    +

    Compute the Nth root of a value. +

    + +

    See also native_rootn(). +

    +
    +
    + + +
    +

    + round + : Round away from zero +

    +
    + + + + + + + + + + + + + + + + + +
    float round(float v); +
    float2 round(float2 v); +
    float3 round(float3 v); +
    float4 round(float4 v); +
    +
    +
    +

    Round to the nearest integral value. +

    + +

    round() rounds half values away from zero. For example, round(0.5f) returns 1.f +and round(1.5f) returns 2.f. Similarly, round(-0.5f) returns -1.f +and round(-1.5f) returns -2.f. +

    + +

    rint() is similar but rounds half values toward even. trunc() truncates the decimal fraction. +

    +
    +
    + + +
    +

    + rsClamp + : Restrain a value to a range +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    char rsClamp(char amount, char low, char high); +
    int rsClamp(int amount, int low, int high); +
    short rsClamp(short amount, short low, short high); +
    uchar rsClamp(uchar amount, uchar low, uchar high); +
    uint rsClamp(uint amount, uint low, uint high); +
    ushort rsClamp(ushort amount, ushort low, ushort high); +
    +
    +
    Parameters
    + + + + +
    amountValue to clamp.
    lowLower bound.
    highUpper bound.
    +
    +
    +

    Deprecated. Use clamp() instead.

    +

    Clamp a value between low and high. +

    +
    +
    + + +
    +

    + rsFrac + : Returns the fractional part of a float +

    +
    + + + + + +
    float rsFrac(float v); +
    +
    +
    +

    Deprecated. Use fract() instead.

    +

    Returns the fractional part of a float +

    +
    +
    + + +
    +

    + rsRand + : Pseudo-random number +

    +
    + + + + + + + + + + + + + + + + + +
    float rsRand(float max_value); +
    float rsRand(float min_value, float max_value); +
    int rsRand(int max_value); +
    int rsRand(int min_value, int max_value); +
    +
    +
    +

    Return a random value between 0 (or min_value) and max_malue. +

    +
    +
    + + +
    +

    + rsqrt + : Reciprocal of a square root +

    +
    + + + + + + + + + + + + + + + + + +
    float rsqrt(float v); +
    float2 rsqrt(float2 v); +
    float3 rsqrt(float3 v); +
    float4 rsqrt(float4 v); +
    +
    +
    +

    Returns (1 / sqrt(v)). +

    + +

    See also half_rsqrt(), native_rsqrt(). +

    +
    +
    + + +
    +

    + sign + : Sign of a value +

    +
    + + + + + + + + + + + + + + + + + +
    float sign(float v); +
    float2 sign(float2 v); +
    float3 sign(float3 v); +
    float4 sign(float4 v); +
    +
    +
    +

    Returns the sign of a value. +

    + +

    if (v < 0) return -1.f; +else if (v > 0) return 1.f; +else return 0.f; +

    +
    +
    + + +
    +

    + sin + : Sine +

    +
    + + + + + + + + + + + + + + + + + +
    float sin(float v); +
    float2 sin(float2 v); +
    float3 sin(float3 v); +
    float4 sin(float4 v); +
    +
    +
    +

    Returns the sine of an angle measured in radians. +

    + +

    See also native_sin(). +

    +
    +
    + + +
    +

    + sincos + : Sine and cosine +

    +
    + + + + + + + + + + + + + + + + + +
    float sincos(float v, float* cos); +
    float2 sincos(float2 v, float2* cos); +
    float3 sincos(float3 v, float3* cos); +
    float4 sincos(float4 v, float4* cos); +
    +
    +
    Parameters
    + + + +
    vIncoming value in radians.
    cos*cos will be set to the cosine value.
    +
    +
    Returns
    + + +
    Sine of v.
    +
    +
    +

    Returns the sine and cosine of a value. +

    + +

    See also native_sincos(). +

    +
    +
    + + +
    +

    + sinh + : Hyperbolic sine +

    +
    + + + + + + + + + + + + + + + + + +
    float sinh(float v); +
    float2 sinh(float2 v); +
    float3 sinh(float3 v); +
    float4 sinh(float4 v); +
    +
    +
    +

    Returns the hyperbolic sine of v, where v is measured in radians. +

    + +

    See also native_sinh(). +

    +
    +
    + + +
    +

    + sinpi + : Sine of a number multiplied by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float sinpi(float v); +
    float2 sinpi(float2 v); +
    float3 sinpi(float3 v); +
    float4 sinpi(float4 v); +
    +
    +
    +

    Returns the sine of (v * pi), where (v * pi) is measured in radians. +

    + +

    To get the sine of a value measured in degrees, call sinpi(v / 180.f). +

    + +

    See also native_sinpi(). +

    +
    +
    + + +
    +

    + sqrt + : Square root +

    +
    + + + + + + + + + + + + + + + + + +
    float sqrt(float v); +
    float2 sqrt(float2 v); +
    float3 sqrt(float3 v); +
    float4 sqrt(float4 v); +
    +
    +
    +

    Returns the square root of a value. +

    + +

    See also half_sqrt(), native_sqrt(). +

    +
    +
    + + +
    +

    + step + : 0 if less than a value, 0 otherwise +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    float step(float edge, float v); +
    float2 step(float edge, float2 v); + Added in API level 21 +
    float2 step(float2 edge, float v); +
    float2 step(float2 edge, float2 v); +
    float3 step(float edge, float3 v); + Added in API level 21 +
    float3 step(float3 edge, float v); +
    float3 step(float3 edge, float3 v); +
    float4 step(float edge, float4 v); + Added in API level 21 +
    float4 step(float4 edge, float v); +
    float4 step(float4 edge, float4 v); +
    +
    +
    +

    Returns 0.f if v < edge, 1.f otherwise. +

    + +

    This can be useful to create conditional computations without using loops and branching +instructions. For example, instead of computing (a[i] < b[i]) ? 0.f : atan2(a[i], b[i]) +for the corresponding elements of a vector, you could instead use step(a, b) * atan2(a, b). +

    +
    +
    + + +
    +

    + tan + : Tangent +

    +
    + + + + + + + + + + + + + + + + + +
    float tan(float v); +
    float2 tan(float2 v); +
    float3 tan(float3 v); +
    float4 tan(float4 v); +
    +
    +
    +

    Returns the tangent of an angle measured in radians. +

    + +

    See also native_tan(). +

    +
    +
    + + +
    +

    + tanh + : Hyperbolic tangent +

    +
    + + + + + + + + + + + + + + + + + +
    float tanh(float v); +
    float2 tanh(float2 v); +
    float3 tanh(float3 v); +
    float4 tanh(float4 v); +
    +
    +
    +

    Returns the hyperbolic tangent of a value. +

    + +

    See also native_tanh(). +

    +
    +
    + + +
    +

    + tanpi + : Tangent of a number multiplied by pi +

    +
    + + + + + + + + + + + + + + + + + +
    float tanpi(float v); +
    float2 tanpi(float2 v); +
    float3 tanpi(float3 v); +
    float4 tanpi(float4 v); +
    +
    +
    +

    Returns the tangent of (v * pi), where (v * pi) is measured in radians. +

    + +

    To get the tangent of a value measured in degrees, call tanpi(v / 180.f). +

    + +

    See also native_tanpi(). +

    +
    +
    + + +
    +

    + tgamma + : Gamma function +

    +
    + + + + + + + + + + + + + + + + + +
    float tgamma(float v); +
    float2 tgamma(float2 v); +
    float3 tgamma(float3 v); +
    float4 tgamma(float4 v); +
    +
    +
    +

    Returns the gamma function of a value. +

    + +

    See also lgamma(). +

    +
    +
    + + +
    +

    + trunc + : Truncates a floating point +

    +
    + + + + + + + + + + + + + + + + + +
    float trunc(float v); +
    float2 trunc(float2 v); +
    float3 trunc(float3 v); +
    float4 trunc(float4 v); +
    +
    +
    +

    Rounds to integral using truncation. +

    + +

    For example, trunc(1.7f) returns 1.f and trunc(-1.7f) returns -1.f. +

    + +

    See rint() and round() for other rounding options. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_matrix.jd b/docs/html/guide/topics/renderscript/reference/rs_matrix.jd new file mode 100644 index 0000000..5d0df18 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_matrix.jd @@ -0,0 +1,1059 @@ +page.title=RenderScript Matrix Functions + +@jd:body + +
    +

    Overview

    +

    These functions let you manipulate square matrices of rank 2x2, 3x3, and 4x4. +They are particularly useful for graphical transformations and are compatible +with OpenGL. +

    + +

    We use a zero-based index for rows and columns. E.g. the last element of a +rs_matrix4x4 is found at (3, 3). +

    + +

    RenderScript uses column-major matrices and column-based vectors. Transforming +a vector is done by postmultiplying the vector, e.g. (matrix * vector), +as provided by rsMatrixMultiply(). +

    + +

    To create a transformation matrix that performs two transformations at once, +multiply the two source matrices, with the first transformation as the right +argument. E.g. to create a transformation matrix that applies the +transformation s1 followed by s2, call rsMatrixLoadMultiply(&combined, &s2, &s1). +This derives from s2 * (s1 * v), which is (s2 * s1) * v. +

    + +

    We have two style of functions to create transformation matrices: +rsMatrixLoadTransformation and rsMatrixTransformation. The former +style simply stores the transformation matrix in the first argument. The latter +modifies a pre-existing transformation matrix so that the new transformation +happens first. E.g. if you call rsMatrixTranslate() on a matrix that already +does a scaling, the resulting matrix when applied to a vector will first do the +translation then the scaling. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsExtractFrustumPlanes + + Compute frustum planes +
    + rsIsSphereInFrustum + + Checks if a sphere is within the frustum planes +
    + rsMatrixGet + + Get one element +
    + rsMatrixInverse + + Inverts a matrix in place +
    + rsMatrixInverseTranspose + + Inverts and transpose a matrix in place +
    + rsMatrixLoad + + Load or copy a matrix +
    + rsMatrixLoadFrustum + + Load a frustum projection matrix +
    + rsMatrixLoadIdentity + + Load identity matrix +
    + rsMatrixLoadMultiply + + Multiply two matrices +
    + rsMatrixLoadOrtho + + Load an orthographic projection matrix +
    + rsMatrixLoadPerspective + + Load a perspective projection matrix +
    + rsMatrixLoadRotate + + Load a rotation matrix +
    + rsMatrixLoadScale + + Load a scaling matrix +
    + rsMatrixLoadTranslate + + Load a translation matrix +
    + rsMatrixMultiply + + Multiply a matrix by a vector or another matrix +
    + rsMatrixRotate + + Apply a rotation to a transformation matrix +
    + rsMatrixScale + + Apply a scaling to a transformation matrix +
    + rsMatrixSet + + Set one element +
    + rsMatrixTranslate + + Apply a translation to a transformation matrix +
    + rsMatrixTranspose + + Transpose a matrix place +
    +

    Functions

    + +
    +

    + rsExtractFrustumPlanes + : Compute frustum planes +

    +
    + + + + + +
    void rsExtractFrustumPlanes(const rs_matrix4x4* viewProj, float4* left, float4* right, float4* top, float4* bottom, float4* near, float4* far); +
    +
    +
    Parameters
    + + + + + + + + +
    viewProjMatrix to extract planes from.
    leftLeft plane.
    rightRight plane.
    topTop plane.
    bottomBottom plane.
    nearNear plane.
    farFar plane.
    +
    +
    +

    Computes 6 frustum planes from the view projection matrix +

    +
    +
    + + +
    +

    + rsIsSphereInFrustum + : Checks if a sphere is within the frustum planes +

    +
    + + + + + +
    bool rsIsSphereInFrustum(float4* sphere, float4* left, float4* right, float4* top, float4* bottom, float4* near, float4* far); +
    +
    +
    Parameters
    + + + + + + + + +
    spherefloat4 representing the sphere.
    leftLeft plane.
    rightRight plane.
    topTop plane.
    bottomBottom plane.
    nearNear plane.
    farFar plane.
    +
    +
    +

    Returns true if the sphere is within the 6 frustum planes. +

    +
    +
    + + +
    +

    + rsMatrixGet + : Get one element +

    +
    + + + + + + + + + + + + + +
    float rsMatrixGet(const rs_matrix2x2* m, uint32_t col, uint32_t row); +
    float rsMatrixGet(const rs_matrix3x3* m, uint32_t col, uint32_t row); +
    float rsMatrixGet(const rs_matrix4x4* m, uint32_t col, uint32_t row); +
    +
    +
    Parameters
    + + + + +
    mMatrix to extract the element from.
    colZero-based column of the element to be extracted.
    rowZero-based row of the element to extracted.
    +
    +
    +

    Returns one element of a matrix. +

    + +

    Warning: The order of the column and row parameters may be unexpected. +

    +
    +
    + + +
    +

    + rsMatrixInverse + : Inverts a matrix in place +

    +
    + + + + + +
    bool rsMatrixInverse(rs_matrix4x4* m); +
    +
    +
    Parameters
    + + +
    mMatrix to invert.
    +
    +
    +

    Returns true if the matrix was successfully inverted. +

    +
    +
    + + +
    +

    + rsMatrixInverseTranspose + : Inverts and transpose a matrix in place +

    +
    + + + + + +
    bool rsMatrixInverseTranspose(rs_matrix4x4* m); +
    +
    +
    Parameters
    + + +
    mMatrix to modify.
    +
    +
    +

    The matrix is first inverted then transposed. Returns true if the matrix was +successfully inverted. +

    +
    +
    + + +
    +

    + rsMatrixLoad + : Load or copy a matrix +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void rsMatrixLoad(rs_matrix2x2* destination, const float* array); +
    void rsMatrixLoad(rs_matrix2x2* destination, const rs_matrix2x2* source); +
    void rsMatrixLoad(rs_matrix3x3* destination, const float* array); +
    void rsMatrixLoad(rs_matrix3x3* destination, const rs_matrix3x3* source); +
    void rsMatrixLoad(rs_matrix4x4* destination, const float* array); +
    void rsMatrixLoad(rs_matrix4x4* destination, const rs_matrix2x2* source); +
    void rsMatrixLoad(rs_matrix4x4* destination, const rs_matrix3x3* source); +
    void rsMatrixLoad(rs_matrix4x4* destination, const rs_matrix4x4* source); +
    +
    +
    Parameters
    + + + + +
    destinationMatrix to set.
    arrayArray of values to set the matrix to. These arrays should be 4, 9, or 16 floats long, depending on the matrix size.
    sourceSource matrix.
    +
    +
    +

    Set the elements of a matrix from an array of floats or from another matrix. +

    + +

    If loading from an array, the floats should be in row-major order, i.e. the element a +row 0, column 0 should be first, followed by the element at +row 0, column 1, etc. +

    + +

    If loading from a matrix and the source is smaller than the destination, the rest +of the destination is filled with elements of the identity matrix. E.g. +loading a rs_matrix2x2 into a rs_matrix4x4 will give: + + + + + +
    m00 m01 0.0 0.0
    m10 m11 0.0 0.0
    0.0 0.0 1.0 0.0
    0.0 0.0 0.0 1.0
    +

    +
    +
    + + +
    +

    + rsMatrixLoadFrustum + : Load a frustum projection matrix +

    +
    + + + + + +
    void rsMatrixLoadFrustum(rs_matrix4x4* m, float left, float right, float bottom, float top, float near, float far); +
    +
    +
    Parameters
    + + + + + + + + +
    mMatrix to set.
    left
    right
    bottom
    top
    near
    far
    +
    +
    +

    Constructs a frustum projection matrix, transforming the box identified by +the six clipping planes left, right, bottom, top, near, far. +

    + +

    To apply this projection to a vector, multiply the vector by the created +matrix using rsMatrixMultiply(). +

    +
    +
    + + +
    +

    + rsMatrixLoadIdentity + : Load identity matrix +

    +
    + + + + + + + + + + + + + +
    void rsMatrixLoadIdentity(rs_matrix2x2* m); +
    void rsMatrixLoadIdentity(rs_matrix3x3* m); +
    void rsMatrixLoadIdentity(rs_matrix4x4* m); +
    +
    +
    Parameters
    + + +
    mMatrix to set.
    +
    +
    +

    Set the elements of a matrix to the identity matrix. +

    +
    +
    + + +
    +

    + rsMatrixLoadMultiply + : Multiply two matrices +

    +
    + + + + + + + + + + + + + +
    void rsMatrixLoadMultiply(rs_matrix2x2* m, const rs_matrix2x2* lhs, const rs_matrix2x2* rhs); +
    void rsMatrixLoadMultiply(rs_matrix3x3* m, const rs_matrix3x3* lhs, const rs_matrix3x3* rhs); +
    void rsMatrixLoadMultiply(rs_matrix4x4* m, const rs_matrix4x4* lhs, const rs_matrix4x4* rhs); +
    +
    +
    Parameters
    + + + + +
    mMatrix to set.
    lhsLeft matrix of the product.
    rhsRight matrix of the product.
    +
    +
    +

    Sets m to the matrix product of lhs * rhs. +

    + +

    To combine two 4x4 transformaton matrices, multiply the second transformation matrix +by the first transformation matrix. E.g. to create a transformation matrix that applies +the transformation s1 followed by s2, call rsMatrixLoadMultiply(&combined, &s2, &s1). +

    + +

    Warning: Prior to version 21, storing the result back into right matrix is not supported and +will result in undefined behavior. Use rsMatrixMulitply instead. E.g. instead of doing +rsMatrixLoadMultiply (&m2r, &m2r, &m2l), use rsMatrixMultiply (&m2r, &m2l). +rsMatrixLoadMultiply (&m2l, &m2r, &m2l) works as expected. +

    +
    +
    + + +
    +

    + rsMatrixLoadOrtho + : Load an orthographic projection matrix +

    +
    + + + + + +
    void rsMatrixLoadOrtho(rs_matrix4x4* m, float left, float right, float bottom, float top, float near, float far); +
    +
    +
    Parameters
    + + + + + + + + +
    mMatrix to set.
    left
    right
    bottom
    top
    near
    far
    +
    +
    +

    Constructs an orthographic projection matrix, transforming the box identified by the +six clipping planes left, right, bottom, top, near, far into a unit cube +with a corner at (-1, -1, -1) and the opposite at (1, 1, 1). +

    + +

    To apply this projection to a vector, multiply the vector by the created matrix +using rsMatrixMultiply(). +

    + +

    See https://en.wikipedia.org/wiki/Orthographic_projection . +

    +
    +
    + + +
    +

    + rsMatrixLoadPerspective + : Load a perspective projection matrix +

    +
    + + + + + +
    void rsMatrixLoadPerspective(rs_matrix4x4* m, float fovy, float aspect, float near, float far); +
    +
    +
    Parameters
    + + + + + + +
    mMatrix to set.
    fovyField of view, in degrees along the Y axis.
    aspectRatio of x / y.
    nearNear clipping plane.
    farFar clipping plane.
    +
    +
    +

    Constructs a perspective projection matrix, assuming a symmetrical field of view. +

    + +

    To apply this projection to a vector, multiply the vector by the created matrix +using rsMatrixMultiply(). +

    +
    +
    + + +
    +

    + rsMatrixLoadRotate + : Load a rotation matrix +

    +
    + + + + + +
    void rsMatrixLoadRotate(rs_matrix4x4* m, float rot, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + + +
    mMatrix to set.
    rotHow much rotation to do, in degrees.
    xX component of the vector that is the axis of rotation.
    yY component of the vector that is the axis of rotation.
    zZ component of the vector that is the axis of rotation.
    +
    +
    +

    This function creates a rotation matrix. The axis of rotation is the (x, y, z) vector. +

    + +

    To rotate a vector, multiply the vector by the created matrix using rsMatrixMultiply(). +

    + +

    See http://en.wikipedia.org/wiki/Rotation_matrix . +

    +
    +
    + + +
    +

    + rsMatrixLoadScale + : Load a scaling matrix +

    +
    + + + + + +
    void rsMatrixLoadScale(rs_matrix4x4* m, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + +
    mMatrix to set.
    xMultiple to scale the x components by.
    yMultiple to scale the y components by.
    zMultiple to scale the z components by.
    +
    +
    +

    This function creates a scaling matrix, where each component of a vector is multiplied +by a number. This number can be negative. +

    + +

    To scale a vector, multiply the vector by the created matrix using rsMatrixMultiply(). +

    +
    +
    + + +
    +

    + rsMatrixLoadTranslate + : Load a translation matrix +

    +
    + + + + + +
    void rsMatrixLoadTranslate(rs_matrix4x4* m, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + +
    mMatrix to set.
    xNumber to add to each x component.
    yNumber to add to each y component.
    zNumber to add to each z component.
    +
    +
    +

    This function creates a translation matrix, where a number is added to each element of +a vector. +

    + +

    To translate a vector, multiply the vector by the created matrix using +rsMatrixMultiply(). +

    +
    +
    + + +
    +

    + rsMatrixMultiply + : Multiply a matrix by a vector or another matrix +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    float2 rsMatrixMultiply(const rs_matrix2x2* m, float2 in); + Added in API level 14 +
    float2 rsMatrixMultiply(rs_matrix2x2* m, float2 in); + Removed from API level 14 +
    float3 rsMatrixMultiply(const rs_matrix3x3* m, float2 in); + Added in API level 14 +
    float3 rsMatrixMultiply(const rs_matrix3x3* m, float3 in); + Added in API level 14 +
    float3 rsMatrixMultiply(rs_matrix3x3* m, float2 in); + Removed from API level 14 +
    float3 rsMatrixMultiply(rs_matrix3x3* m, float3 in); + Removed from API level 14 +
    float4 rsMatrixMultiply(const rs_matrix4x4* m, float2 in); + Added in API level 14 +
    float4 rsMatrixMultiply(const rs_matrix4x4* m, float3 in); + Added in API level 14 +
    float4 rsMatrixMultiply(const rs_matrix4x4* m, float4 in); + Added in API level 14 +
    float4 rsMatrixMultiply(rs_matrix4x4* m, float2 in); + Removed from API level 14 +
    float4 rsMatrixMultiply(rs_matrix4x4* m, float3 in); + Removed from API level 14 +
    float4 rsMatrixMultiply(rs_matrix4x4* m, float4 in); + Removed from API level 14 +
    void rsMatrixMultiply(rs_matrix2x2* m, const rs_matrix2x2* rhs); +
    void rsMatrixMultiply(rs_matrix3x3* m, const rs_matrix3x3* rhs); +
    void rsMatrixMultiply(rs_matrix4x4* m, const rs_matrix4x4* rhs); +
    +
    +
    Parameters
    + + + + +
    mLeft matrix of the product and the matrix to be set.
    rhsRight matrix of the product.
    in
    +
    +
    +

    For the matrix by matrix variant, sets m to the matrix product m * rhs. +

    + +

    When combining two 4x4 transformation matrices using this function, the resulting +matrix will correspond to performing the rhs transformation first followed by +the original m transformation. +

    + +

    For the matrix by vector variant, returns the post-multiplication of the vector +by the matrix, ie. m * in. +

    + +

    When multiplying a float3 to a rs_matrix4x4, the vector is expanded with (1). +

    + +

    When multiplying a float2 to a rs_matrix4x4, the vector is expanded with (0, 1). +

    + +

    When multiplying a float2 to a rs_matrix3x3, the vector is expanded with (0). +

    + +

    Starting with API 14, this function takes a const matrix as the first argument. +

    +
    +
    + + +
    +

    + rsMatrixRotate + : Apply a rotation to a transformation matrix +

    +
    + + + + + +
    void rsMatrixRotate(rs_matrix4x4* m, float rot, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + + +
    mMatrix to modify.
    rotHow much rotation to do, in degrees.
    xX component of the vector that is the axis of rotation.
    yY component of the vector that is the axis of rotation.
    zZ component of the vector that is the axis of rotation.
    +
    +
    +

    Multiply the matrix m with a rotation matrix. +

    + +

    This function modifies a transformation matrix to first do a rotation. The axis of +rotation is the (x, y, z) vector. +

    + +

    To apply this combined transformation to a vector, multiply the vector by the created +matrix using rsMatrixMultiply(). +

    +
    +
    + + +
    +

    + rsMatrixScale + : Apply a scaling to a transformation matrix +

    +
    + + + + + +
    void rsMatrixScale(rs_matrix4x4* m, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + +
    mMatrix to modify.
    xMultiple to scale the x components by.
    yMultiple to scale the y components by.
    zMultiple to scale the z components by.
    +
    +
    +

    Multiply the matrix m with a scaling matrix. +

    + +

    This function modifies a transformation matrix to first do a scaling. When scaling, +each component of a vector is multiplied by a number. This number can be negative. +

    + +

    To apply this combined transformation to a vector, multiply the vector by the created +matrix using rsMatrixMultiply(). +

    +
    +
    + + +
    +

    + rsMatrixSet + : Set one element +

    +
    + + + + + + + + + + + + + +
    void rsMatrixSet(rs_matrix2x2* m, uint32_t col, uint32_t row, float v); +
    void rsMatrixSet(rs_matrix3x3* m, uint32_t col, uint32_t row, float v); +
    void rsMatrixSet(rs_matrix4x4* m, uint32_t col, uint32_t row, float v); +
    +
    +
    Parameters
    + + + + + +
    mMatrix that will be modified.
    colZero-based column of the element to be set.
    rowZero-based row of the element to be set.
    vValue to set.
    +
    +
    +

    Set an element of a matrix. +

    + +

    Warning: The order of the column and row parameters may be unexpected. +

    +
    +
    + + +
    +

    + rsMatrixTranslate + : Apply a translation to a transformation matrix +

    +
    + + + + + +
    void rsMatrixTranslate(rs_matrix4x4* m, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + +
    mMatrix to modify.
    xNumber to add to each x component.
    yNumber to add to each y component.
    zNumber to add to each z component.
    +
    +
    +

    Multiply the matrix m with a translation matrix. +

    + +

    This function modifies a transformation matrix to first do a translation. When +translating, a number is added to each component of a vector. +

    + +

    To apply this combined transformation to a vector, multiply the vector by the +created matrix using rsMatrixMultiply(). +

    +
    +
    + + +
    +

    + rsMatrixTranspose + : Transpose a matrix place +

    +
    + + + + + + + + + + + + + +
    void rsMatrixTranspose(rs_matrix2x2* m); +
    void rsMatrixTranspose(rs_matrix3x3* m); +
    void rsMatrixTranspose(rs_matrix4x4* m); +
    +
    +
    Parameters
    + + +
    mMatrix to transpose.
    +
    +
    +

    Transpose the matrix m in place. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_object_info.jd b/docs/html/guide/topics/renderscript/reference/rs_object_info.jd new file mode 100644 index 0000000..192df54 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_object_info.jd @@ -0,0 +1,1077 @@ +page.title=RenderScript Object Characteristics Functions + +@jd:body + +
    +

    Overview

    +

    The functions below can be used to query the characteristics of an Allocation, Element, +or Sampler object. These objects are created from Java. You can't create them from a +script. +

    + +

    Allocations:
    +

    + +

    Allocations are the primary method used to pass data to and from RenderScript kernels. +

    + +

    They are a structured collection of cells that can be used to store bitmaps, textures, +arbitrary data points, etc. +

    + +

    This collection of cells may have many dimensions (X, Y, Z, Array0, Array1, Array2, Array3), +faces (for cubemaps), and level of details (for mipmapping). +

    + +

    See the android.renderscript.Allocation for details on to create Allocations. +

    + +

    Elements:
    +

    + +

    The term "element" is used a bit ambiguously in RenderScript, as both type information +for the cells of an Allocation and the instantiation of that type. For example:

    +

    + +

    The functions below let you query the characteristics of the type specificiation. +

    + +

    An Element can specify a simple data types as found in C, e.g. an integer, float, or +boolean. It can also specify a handle to a RenderScript object. See rs_data_type for +a list of basic types. +

    + +

    Elements can specify fixed size vector (of size 2, 3, or 4) versions of the basic types. +Elements can be grouped together into complex Elements, creating the equivalent of +C structure definitions. +

    + +

    Elements can also have a kind, which is semantic information used to interpret pixel +data. See rs_data_kind. +

    + +

    When creating Allocations of common elements, you can simply use one of the many predefined +Elements like F32_2. +

    + +

    To create complex Elements, use the Element.Builder Java class. +

    + +

    Samplers:
    +

    + +

    Samplers objects define how Allocations can be read as structure within a kernel. +See android.renderscript.S. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsAllocationGetDimFaces + + Presence of more than one face +
    + rsAllocationGetDimLOD + + Presence of levels of detail +
    + rsAllocationGetDimX + + Size of the X dimension +
    + rsAllocationGetDimY + + Size of the Y dimension +
    + rsAllocationGetDimZ + + Size of the Z dimension +
    + rsAllocationGetElement + + Get the object that describes the cell of an Allocation +
    + rsClearObject + + Release an object +
    + rsElementGetBytesSize + + Size of an Element +
    + rsElementGetDataKind + + Kind of an Element +
    + rsElementGetDataType + + Data type of an Element +
    + rsElementGetSubElement + + Sub-element of a complex Element +
    + rsElementGetSubElementArraySize + + Array size of a sub-element of a complex Element +
    + rsElementGetSubElementCount + + Number of sub-elements +
    + rsElementGetSubElementName + + Name of a sub-element +
    + rsElementGetSubElementNameLength + + Length of the name of a sub-element +
    + rsElementGetSubElementOffsetBytes + + Offset of the instantiated sub-element +
    + rsElementGetVectorSize + + Vector size of the Element +
    + rsIsObject + + Check for an empty handle +
    + rsSamplerGetAnisotropy + + Anisotropy of the Sampler +
    + rsSamplerGetMagnification + + Sampler magnification value +
    + rsSamplerGetMinification + + Sampler minification value +
    + rsSamplerGetWrapS + + Sampler wrap S value +
    + rsSamplerGetWrapT + + Sampler wrap T value +
    + + + + + + +
    Deprecated Functions
    + rsGetAllocation + + Deprecated. Return the Allocation for a given pointer +
    +

    Functions

    + +
    +

    + rsAllocationGetDimFaces + : Presence of more than one face +

    +
    + + + + + +
    uint32_t rsAllocationGetDimFaces(rs_allocation a); +
    +
    +
    Returns
    + + +
    Returns 1 if more than one face is present, 0 otherwise.
    +
    +
    +

    If the Allocation is a cubemap, this function returns 1 if there's more than one face +present. In all other cases, it returns 0. +

    +
    +
    + + +
    +

    + rsAllocationGetDimLOD + : Presence of levels of detail +

    +
    + + + + + +
    uint32_t rsAllocationGetDimLOD(rs_allocation a); +
    +
    +
    Returns
    + + +
    Returns 1 if more than one LOD is present, 0 otherwise.
    +
    +
    +

    Query an Allocation for the presence of more than one Level Of Detail. This is useful +for mipmaps. +

    +
    +
    + + +
    +

    + rsAllocationGetDimX + : Size of the X dimension +

    +
    + + + + + +
    uint32_t rsAllocationGetDimX(rs_allocation a); +
    +
    +
    Returns
    + + +
    X dimension of the Allocation.
    +
    +
    +

    Returns the size of the X dimension of the Allocation. +

    +
    +
    + + +
    +

    + rsAllocationGetDimY + : Size of the Y dimension +

    +
    + + + + + +
    uint32_t rsAllocationGetDimY(rs_allocation a); +
    +
    +
    Returns
    + + +
    Y dimension of the Allocation.
    +
    +
    +

    Returns the size of the Y dimension of the Allocation. If the Allocation has less +than two dimensions, returns 0. +

    +
    +
    + + +
    +

    + rsAllocationGetDimZ + : Size of the Z dimension +

    +
    + + + + + +
    uint32_t rsAllocationGetDimZ(rs_allocation a); +
    +
    +
    Returns
    + + +
    Z dimension of the Allocation.
    +
    +
    +

    Returns the size of the Z dimension of the Allocation. If the Allocation has less +than three dimensions, returns 0. +

    +
    +
    + + +
    +

    + rsAllocationGetElement + : Get the object that describes the cell of an Allocation +

    +
    + + + + + +
    rs_element rsAllocationGetElement(rs_allocation a); +
    +
    +
    Parameters
    + + +
    aAllocation to get data from.
    +
    +
    Returns
    + + +
    Element describing Allocation layout.
    +
    +
    +

    Get the Element object describing the type, kind, and other characteristics of a cell +of an Allocation. See the rsElement* functions below. +

    +
    +
    + + +
    +

    + rsClearObject + : Release an object +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void rsClearObject(rs_allocation* dst); +
    void rsClearObject(rs_element* dst); +
    void rsClearObject(rs_font* dst); + When compiling for 32 bits. +
    void rsClearObject(rs_mesh* dst); + When compiling for 32 bits. +
    void rsClearObject(rs_program_fragment* dst); + When compiling for 32 bits. +
    void rsClearObject(rs_program_raster* dst); + When compiling for 32 bits. +
    void rsClearObject(rs_program_store* dst); + When compiling for 32 bits. +
    void rsClearObject(rs_program_vertex* dst); + When compiling for 32 bits. +
    void rsClearObject(rs_sampler* dst); +
    void rsClearObject(rs_script* dst); +
    void rsClearObject(rs_type* dst); +
    +
    +
    +

    Tells the run time that this handle will no longer be used to access the the related +object. If this was the last handle to that object, resource recovery may happen. +

    + +

    After calling this function, *dst will be set to an empty handle. See rsIsObject(). +

    +
    +
    + + +
    +

    + rsElementGetBytesSize + : Size of an Element +

    +
    + + + + + +
    uint32_t rsElementGetBytesSize(rs_element e); + Added in API level 16 +
    +
    +
    +

    Returns the size in bytes that an instantiation of this Element will occupy. +

    +
    +
    + + +
    +

    + rsElementGetDataKind + : Kind of an Element +

    +
    + + + + + +
    rs_data_kind rsElementGetDataKind(rs_element e); + Added in API level 16 +
    +
    +
    +

    Returns the Element's data kind. This is used to interpret pixel data. +

    + +

    See rs_data_kind. +

    +
    +
    + + +
    +

    + rsElementGetDataType + : Data type of an Element +

    +
    + + + + + +
    rs_data_type rsElementGetDataType(rs_element e); + Added in API level 16 +
    +
    +
    +

    Returns the Element's base data type. This can be a type similar to C/C++ (e.g. +RS_TYPE_UNSIGNED_8), a handle (e.g. RS_TYPE_ALLOCATION and RS_TYPE_ELEMENT), or a +more complex numerical type (e.g. RS_TYPE_UNSIGNED_5_6_5 and RS_TYPE_MATRIX_4X4). +See rs_data_type. +

    + +

    If the Element describes a vector, this function returns the data type of one of its items. +Use rsElementGetVectorSize to get the size of the vector. +

    + +

    If the Element describes a structure, RS_TYPE_NONE is returned. Use the rsElementGetSub* +functions to explore this complex Element. +

    +
    +
    + + +
    +

    + rsElementGetSubElement + : Sub-element of a complex Element +

    +
    + + + + + +
    rs_element rsElementGetSubElement(rs_element e, uint32_t index); + Added in API level 16 +
    +
    +
    Parameters
    + + + +
    eElement to query.
    indexIndex of the sub-element to return.
    +
    +
    Returns
    + + +
    Sub-element at the given index.
    +
    +
    +

    For Elements that represents a structure, this function returns the sub-element at the +specified index. +

    + +

    If the Element is not a structure or the index is greater or equal to the number of +sub-elements, an invalid handle is returned. +

    +
    +
    + + +
    +

    + rsElementGetSubElementArraySize + : Array size of a sub-element of a complex Element +

    +
    + + + + + +
    uint32_t rsElementGetSubElementArraySize(rs_element e, uint32_t index); + Added in API level 16 +
    +
    +
    Parameters
    + + + +
    eElement to query.
    indexIndex of the sub-element.
    +
    +
    Returns
    + + +
    Array size of the sub-element.
    +
    +
    +

    For complex Elements, sub-elements can be statically sized arrays. This function +returns the array size of the sub-element at the index. This sub-element repetition +is different than fixed size vectors. +

    +
    +
    + + +
    +

    + rsElementGetSubElementCount + : Number of sub-elements +

    +
    + + + + + +
    uint32_t rsElementGetSubElementCount(rs_element e); + Added in API level 16 +
    +
    +
    Parameters
    + + +
    eElement to get data from.
    +
    +
    Returns
    + + +
    Number of sub-elements.
    +
    +
    +

    Elements can be simple, such as an int or a float, or a structure with multiple +sub-elements. This function returns zero for simple Elements and the number of +sub-elements for complex Elements. +

    +
    +
    + + +
    +

    + rsElementGetSubElementName + : Name of a sub-element +

    +
    + + + + + +
    uint32_t rsElementGetSubElementName(rs_element e, uint32_t index, char* name, uint32_t nameLength); + Added in API level 16 +
    +
    +
    Parameters
    + + + + + +
    eElement to get data from.
    indexIndex of the sub-element.
    nameAddress of the array to store the name into.
    nameLengthLength of the provided name array.
    +
    +
    Returns
    + + +
    Number of characters copied, excluding the null terminator.
    +
    +
    +

    For complex Elements, this function returns the name of the sub-element at the +specified index. +

    +
    +
    + + +
    +

    + rsElementGetSubElementNameLength + : Length of the name of a sub-element +

    +
    + + + + + +
    uint32_t rsElementGetSubElementNameLength(rs_element e, uint32_t index); + Added in API level 16 +
    +
    +
    Parameters
    + + + +
    eElement to get data from.
    indexIndex of the sub-element.
    +
    +
    Returns
    + + +
    Length of the sub-element name including the null terminator.
    +
    +
    +

    For complex Elements, this function returns the length of the name of the sub-element +at the specified index. +

    +
    +
    + + +
    +

    + rsElementGetSubElementOffsetBytes + : Offset of the instantiated sub-element +

    +
    + + + + + +
    uint32_t rsElementGetSubElementOffsetBytes(rs_element e, uint32_t index); + Added in API level 16 +
    +
    +
    Parameters
    + + + +
    eElement to get data from.
    indexIndex of the sub-element.
    +
    +
    Returns
    + + +
    Offset in bytes.
    +
    +
    +

    This function returns the relative position of the instantiation of the specified +sub-element within the instantiation of the Element. +

    + +

    For example, if the Element describes a 32 bit float followed by a 32 bit integer, +the offset return for the first will be 0 and the second 4. +

    +
    +
    + + +
    +

    + rsElementGetVectorSize + : Vector size of the Element +

    +
    + + + + + +
    uint32_t rsElementGetVectorSize(rs_element e); + Added in API level 16 +
    +
    +
    Parameters
    + + +
    eElement to get data from.
    +
    +
    Returns
    + + +
    Length of the element vector.
    +
    +
    +

    Returns the Element's vector size. If the Element does not represent a vector, +1 is returned. +

    +
    +
    + + +
    +

    + rsGetAllocation + : Return the Allocation for a given pointer +

    +
    + + + + + +
    rs_allocation rsGetAllocation(const void* p); +
    +
    +
    +

    Deprecated. This function is deprecated and will be removed from the SDK in a future release.

    +

    Returns the Allocation for a given pointer. The pointer should point within a valid +allocation. The results are undefined if the pointer is not from a valid Allocation. +

    +
    +
    + + +
    +

    + rsIsObject + : Check for an empty handle +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    bool rsIsObject(rs_allocation v); +
    bool rsIsObject(rs_element v); +
    bool rsIsObject(rs_font v); + When compiling for 32 bits. +
    bool rsIsObject(rs_mesh v); + When compiling for 32 bits. +
    bool rsIsObject(rs_program_fragment v); + When compiling for 32 bits. +
    bool rsIsObject(rs_program_raster v); + When compiling for 32 bits. +
    bool rsIsObject(rs_program_store v); + When compiling for 32 bits. +
    bool rsIsObject(rs_program_vertex v); + When compiling for 32 bits. +
    bool rsIsObject(rs_sampler v); +
    bool rsIsObject(rs_script v); +
    bool rsIsObject(rs_type v); +
    +
    +
    +

    Returns true if the handle contains a non-null reference. +

    + +

    This function does not validate that the internal pointer used in the handle +points to an actual valid object; it only checks for null. +

    + +

    This function can be used to check the Element returned by rsElementGetSubElement() +or see if rsClearObject() has been called on a handle. +

    +
    +
    + + +
    +

    + rsSamplerGetAnisotropy + : Anisotropy of the Sampler +

    +
    + + + + + +
    float rsSamplerGetAnisotropy(rs_sampler s); + Added in API level 16 +
    +
    +
    +

    Get the Sampler's anisotropy. +

    + +

    See android.renderscript.S. +

    +
    +
    + + +
    +

    + rsSamplerGetMagnification + : Sampler magnification value +

    +
    + + + + + +
    rs_sampler_value rsSamplerGetMagnification(rs_sampler s); + Added in API level 16 +
    +
    +
    +

    Get the Sampler's magnification value. +

    + +

    See android.renderscript.S. +

    +
    +
    + + +
    +

    + rsSamplerGetMinification + : Sampler minification value +

    +
    + + + + + +
    rs_sampler_value rsSamplerGetMinification(rs_sampler s); + Added in API level 16 +
    +
    +
    +

    Get the Sampler's minification value. +

    + +

    See android.renderscript.S. +

    +
    +
    + + +
    +

    + rsSamplerGetWrapS + : Sampler wrap S value +

    +
    + + + + + +
    rs_sampler_value rsSamplerGetWrapS(rs_sampler s); + Added in API level 16 +
    +
    +
    +

    Get the Sampler's wrap S value. +

    + +

    See android.renderscript.S. +

    +
    +
    + + +
    +

    + rsSamplerGetWrapT + : Sampler wrap T value +

    +
    + + + + + +
    rs_sampler_value rsSamplerGetWrapT(rs_sampler s); + Added in API level 16 +
    +
    +
    +

    Get the sampler's wrap T value. +

    + +

    See android.renderscript.S. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_object_types.jd b/docs/html/guide/topics/renderscript/reference/rs_object_types.jd new file mode 100644 index 0000000..f342896 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_object_types.jd @@ -0,0 +1,336 @@ +page.title=RenderScript Object Types + +@jd:body + +
    +

    Overview

    +

    The types below are used to manipulate RenderScript objects like allocations, samplers, +elements, and scripts. Most of these object are created using the Java RenderScript APIs. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Types
    + rs_allocation + + Handle to an allocation +
    + rs_allocation_cubemap_face + + Enum for selecting cube map faces +
    + rs_allocation_usage_type + + Bitfield to specify how an allocation is used +
    + rs_data_kind + + Element data kind +
    + rs_data_type + + Element basic data type +
    + rs_element + + Handle to an element +
    + rs_sampler + + Handle to a Sampler +
    + rs_sampler_value + + Sampler wrap T value +
    + rs_script + + Handle to a Script +
    + rs_type + + Handle to a Type +
    +

    Types

    + +
    +

    + rs_allocation + : Handle to an allocation +

    +
    +

    A typedef of: _RS_HANDLE     

    +

    An opaque handle to a RenderScript allocation. +

    + +

    See android.renderscript.Allocation. +

    +
    +
    + + +
    +

    + rs_allocation_cubemap_face + : Enum for selecting cube map faces +

    +
    +

    An enum with the following values:      + Added in API level 14 +

    + + + + + + + +
    RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0
    RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1
    RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2
    RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3
    RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4
    RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5

    +

    An enum used to specify one the six faces of a cubemap. +

    +
    +
    + + +
    +

    + rs_allocation_usage_type + : Bitfield to specify how an allocation is used +

    +
    +

    An enum with the following values:      + Added in API level 14 +

    + + + + + + + + + +
    RS_ALLOCATION_USAGE_SCRIPT = 0x0001Allocation is bound to and accessed by scripts.
    RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002Deprecated.
    RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004Deprecated.
    RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008Deprecated.
    RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010Deprecated.
    RS_ALLOCATION_USAGE_IO_INPUT = 0x0020Allocation is used as a Surface consumer.
    RS_ALLOCATION_USAGE_IO_OUTPUT = 0x0040Allocation is used as a Surface producer.
    RS_ALLOCATION_USAGE_SHARED = 0x0080Allocation's backing store is shared with another object (usually a Bitmap). Copying to or from the original source Bitmap will cause a synchronization rather than a full copy.

    +

    These values are ORed together to specify which usages or memory spaces are +relevant to an allocation or an operation on an allocation. +

    +
    +
    + + +
    +

    + rs_data_kind + : Element data kind +

    +
    +

    An enum with the following values:      + Added in API level 16 +

    + + + + + + + + + + +
    RS_KIND_USER = 0No special interpretation.
    RS_KIND_PIXEL_L = 7Luminance.
    RS_KIND_PIXEL_A = 8Alpha.
    RS_KIND_PIXEL_LA = 9Luminance and Alpha.
    RS_KIND_PIXEL_RGB = 10Red, Green, Blue.
    RS_KIND_PIXEL_RGBA = 11Red, Green, Blue, and Alpha.
    RS_KIND_PIXEL_DEPTH = 12Depth for a depth texture.
    RS_KIND_PIXEL_YUV = 13Luminance and chrominance.
    RS_KIND_INVALID = 100

    +

    This enumeration is primarly useful for graphical data. It provides additional information to +help interpret the rs_data_type. +

    + +

    RS_KIND_USER indicates no special interpretation is expected. +

    + +

    The RS_KIND_PIXEL_* values are used in conjunction with the standard data types for representing +texture formats. +

    + +

    See the Element.createPixel() method. +

    +
    +
    + + +
    +

    + rs_data_type + : Element basic data type +

    +
    +

    An enum with the following values:      + Added in API level 16 +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RS_TYPE_NONE = 0Element is a complex type, i.e. a struct.
    RS_TYPE_FLOAT_32 = 2A 32 bit float point value.
    RS_TYPE_FLOAT_64 = 3A 64 bit floating point value.
    RS_TYPE_SIGNED_8 = 4An 8 bit signed integer.
    RS_TYPE_SIGNED_16 = 5A 16 bit signed integer.
    RS_TYPE_SIGNED_32 = 6A 32 bit signed integer.
    RS_TYPE_SIGNED_64 = 7A 64 bit signed integer.
    RS_TYPE_UNSIGNED_8 = 8An 8 bit unsigned integer.
    RS_TYPE_UNSIGNED_16 = 9A 16 bit unsigned integer.
    RS_TYPE_UNSIGNED_32 = 10A 32 bit unsigned integer.
    RS_TYPE_UNSIGNED_64 = 11A 64 bit unsigned integer.
    RS_TYPE_BOOLEAN = 120 or 1 (false or true) stored in an 8 bit container.
    RS_TYPE_UNSIGNED_5_6_5 = 13A 16 bit unsigned integer packing graphical data in 5, 6, and 5 bit sections.
    RS_TYPE_UNSIGNED_5_5_5_1 = 14A 16 bit unsigned integer packing graphical data in 5, 5, 5, and 1 bit sections.
    RS_TYPE_UNSIGNED_4_4_4_4 = 15A 16 bit unsigned integer packing graphical data in 4, 4, 4, and 4 bit sections.
    RS_TYPE_MATRIX_4X4 = 16A 4x4 matrix of 32 bit floats, aligned on a 32 bit boundary.
    RS_TYPE_MATRIX_3X3 = 17A 3x3 matrix of 32 bit floats, aligned on a 32 bit boundary.
    RS_TYPE_MATRIX_2X2 = 18A 2x2 matrix of 32 bit floats, aligned on a 32 bit boundary.
    RS_TYPE_ELEMENT = 1000A handle to an Element.
    RS_TYPE_TYPE = 1001A handle to a Type.
    RS_TYPE_ALLOCATION = 1002A handle to an Allocation.
    RS_TYPE_SAMPLER = 1003A handle to a Sampler.
    RS_TYPE_SCRIPT = 1004A handle to a Script.
    RS_TYPE_MESH = 1005Deprecated.
    RS_TYPE_PROGRAM_FRAGMENT = 1006Deprecated.
    RS_TYPE_PROGRAM_VERTEX = 1007Deprecated.
    RS_TYPE_PROGRAM_RASTER = 1008Deprecated.
    RS_TYPE_PROGRAM_STORE = 1009Deprecated.
    RS_TYPE_FONT = 1010Deprecated.
    RS_TYPE_INVALID = 10000

    +

    rs_data_type is used to encode the type information of a basic element. +

    + +

    RS_TYPE_UNSIGNED_5_6_5, RS_TYPE_UNSIGNED_5_5_5_1, RS_TYPE_UNSIGNED_4_4_4_4 are for packed +graphical data formats and represent vectors with per vector member sizes which are treated +as a single unit for packing and alignment purposes. +

    +
    +
    + + +
    +

    + rs_element + : Handle to an element +

    +
    +

    A typedef of: _RS_HANDLE     

    +

    An opaque handle to a RenderScript element. +

    + +

    See android.renderscript.Element. +

    +
    +
    + + +
    +

    + rs_sampler + : Handle to a Sampler +

    +
    +

    A typedef of: _RS_HANDLE     

    +

    An opaque handle to a RenderScript sampler object. +

    + +

    See android.renderscript.Sampler. +

    +
    +
    + + +
    +

    + rs_sampler_value + : Sampler wrap T value +

    +
    +

    An enum with the following values:      + Added in API level 16 +

    + + + + + + + + + +
    RS_SAMPLER_NEAREST = 0
    RS_SAMPLER_LINEAR = 1
    RS_SAMPLER_LINEAR_MIP_LINEAR = 2
    RS_SAMPLER_WRAP = 3
    RS_SAMPLER_CLAMP = 4
    RS_SAMPLER_LINEAR_MIP_NEAREST = 5
    RS_SAMPLER_MIRRORED_REPEAT = 6
    RS_SAMPLER_INVALID = 100

    +
    +
    + + +
    +

    + rs_script + : Handle to a Script +

    +
    +

    A typedef of: _RS_HANDLE     

    +

    An opaque handle to a RenderScript script object. +

    + +

    See android.renderscript.ScriptC. +

    +
    +
    + + +
    +

    + rs_type + : Handle to a Type +

    +
    +

    A typedef of: _RS_HANDLE     

    +

    An opaque handle to a RenderScript type. +

    + +

    See android.renderscript.Type. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_quaternion.jd b/docs/html/guide/topics/renderscript/reference/rs_quaternion.jd new file mode 100644 index 0000000..020f1ad --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_quaternion.jd @@ -0,0 +1,387 @@ +page.title=RenderScript Quaternion Functions + +@jd:body + +
    +

    Overview

    +

    The following functions manipulate quaternions. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsQuaternionAdd + + Add two quaternions +
    + rsQuaternionConjugate + + Conjugate a quaternion +
    + rsQuaternionDot + + Dot product of two quaternions +
    + rsQuaternionGetMatrixUnit + + Get a rotation matrix from a quaternion +
    + rsQuaternionLoadRotate + + Create a rotation quaternion +
    + rsQuaternionLoadRotateUnit + + Quaternion that represents a rotation about an arbitrary unit vector +
    + rsQuaternionMultiply + + Multiply a quaternion by a scalar or another quaternion +
    + rsQuaternionNormalize + + Normalize a quaternion +
    + rsQuaternionSet + + Create a quaternion +
    + rsQuaternionSlerp + + Spherical linear interpolation between two quaternions +
    +

    Functions

    + +
    +

    + rsQuaternionAdd + : Add two quaternions +

    +
    + + + + + +
    void rsQuaternionAdd(rs_quaternion* q, const rs_quaternion* rhs); +
    +
    +
    Parameters
    + + + +
    qDestination quaternion to add to.
    rhsQuaternion to add.
    +
    +
    +

    Adds two quaternions, i.e. *q += *rhs; +

    +
    +
    + + +
    +

    + rsQuaternionConjugate + : Conjugate a quaternion +

    +
    + + + + + +
    void rsQuaternionConjugate(rs_quaternion* q); +
    +
    +
    Parameters
    + + +
    qQuaternion to modify.
    +
    +
    +

    Conjugates the quaternion. +

    +
    +
    + + +
    +

    + rsQuaternionDot + : Dot product of two quaternions +

    +
    + + + + + +
    float rsQuaternionDot(const rs_quaternion* q0, const rs_quaternion* q1); +
    +
    +
    Parameters
    + + + +
    q0First quaternion.
    q1Second quaternion.
    +
    +
    +

    Returns the dot product of two quaternions. +

    +
    +
    + + +
    +

    + rsQuaternionGetMatrixUnit + : Get a rotation matrix from a quaternion +

    +
    + + + + + +
    void rsQuaternionGetMatrixUnit(rs_matrix4x4* m, const rs_quaternion* q); +
    +
    +
    Parameters
    + + + +
    mResulting matrix.
    qNormalized quaternion.
    +
    +
    +

    Computes a rotation matrix from the normalized quaternion. +

    +
    +
    + + +
    +

    + rsQuaternionLoadRotate + : Create a rotation quaternion +

    +
    + + + + + +
    void rsQuaternionLoadRotate(rs_quaternion* q, float rot, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + + +
    qDestination quaternion.
    rotAngle to rotate by.
    xX component of a vector.
    yY component of a vector.
    zZ component of a vector.
    +
    +
    +

    Loads a quaternion that represents a rotation about an arbitrary vector +(doesn't have to be unit) +

    +
    +
    + + +
    +

    + rsQuaternionLoadRotateUnit + : Quaternion that represents a rotation about an arbitrary unit vector +

    +
    + + + + + +
    void rsQuaternionLoadRotateUnit(rs_quaternion* q, float rot, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + + +
    qDestination quaternion.
    rotAngle to rotate by, in radians.
    xX component of the vector.
    yY component of the vector.
    zZ component of the vector.
    +
    +
    +

    Loads a quaternion that represents a rotation about an arbitrary unit vector. +

    +
    +
    + + +
    +

    + rsQuaternionMultiply + : Multiply a quaternion by a scalar or another quaternion +

    +
    + + + + + + + + + +
    void rsQuaternionMultiply(rs_quaternion* q, const rs_quaternion* rhs); +
    void rsQuaternionMultiply(rs_quaternion* q, float scalar); +
    +
    +
    Parameters
    + + + + +
    qDestination quaternion.
    scalarScalar to multiply the quaternion by.
    rhsQuaternion to multiply the destination quaternion by.
    +
    +
    +

    Multiplies a quaternion by a scalar or by another quaternion, e.g +*q = *q * scalar; or *q = *q * *rhs;. +

    +
    +
    + + +
    +

    + rsQuaternionNormalize + : Normalize a quaternion +

    +
    + + + + + +
    void rsQuaternionNormalize(rs_quaternion* q); +
    +
    +
    Parameters
    + + +
    qQuaternion to normalize.
    +
    +
    +

    Normalizes the quaternion. +

    +
    +
    + + +
    +

    + rsQuaternionSet + : Create a quaternion +

    +
    + + + + + + + + + +
    void rsQuaternionSet(rs_quaternion* q, const rs_quaternion* rhs); +
    void rsQuaternionSet(rs_quaternion* q, float w, float x, float y, float z); +
    +
    +
    Parameters
    + + + + + + + +
    qDestination quaternion.
    wW component.
    xX component.
    yY component.
    zZ component.
    rhsSource quaternion.
    +
    +
    +

    Creates a quaternion from its four components or from another quaternion. +

    +
    +
    + + +
    +

    + rsQuaternionSlerp + : Spherical linear interpolation between two quaternions +

    +
    + + + + + +
    void rsQuaternionSlerp(rs_quaternion* q, const rs_quaternion* q0, const rs_quaternion* q1, float t); +
    +
    +
    Parameters
    + + + + + +
    qResult quaternion from the interpolation.
    q0First input quaternion.
    q1Second input quaternion.
    tHow much to interpolate by.
    +
    +
    +

    Performs spherical linear interpolation between two quaternions. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_time.jd b/docs/html/guide/topics/renderscript/reference/rs_time.jd new file mode 100644 index 0000000..27044a3 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_time.jd @@ -0,0 +1,269 @@ +page.title=RenderScript Time Functions and Types + +@jd:body + +
    +

    Overview

    +

    The functions below can be used to tell the current clock time and the current +system up time. It is not recommended to call these functions inside of a kernel. +

    +

    Summary

    + + + + + + + + + + +
    Types
    + rs_time_t + + Seconds since January 1, 1970 +
    + rs_tm + + Date and time structure +
    + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + rsGetDt + + Elapsed time since last call +
    + rsLocaltime + + Convert to local time +
    + rsTime + + Seconds since January 1, 1970 +
    + rsUptimeMillis + + System uptime in milliseconds +
    + rsUptimeNanos + + System uptime in nanoseconds +
    +

    Types

    + +
    +

    + rs_time_t + : Seconds since January 1, 1970 +

    +
    +

    A typedef of: int      When compiling for 32 bits. +

    +

    A typedef of: long      When compiling for 64 bits. +

    +

    Calendar time interpreted as seconds elapsed since the Epoch (00:00:00 on +January 1, 1970, Coordinated Universal Time (UTC)). +

    +
    +
    + + +
    +

    + rs_tm + : Date and time structure +

    +
    +

    A structure with the following fields:     

    + + + + + + + + + + +
    int tm_secSeconds after the minute. This ranges from 0 to 59, but possibly up to 60 for leap seconds.
    int tm_minMinutes after the hour. This ranges from 0 to 59.
    int tm_hourHours past midnight. This ranges from 0 to 23.
    int tm_mdayDay of the month. This ranges from 1 to 31.
    int tm_monMonths since January. This ranges from 0 to 11.
    int tm_yearYears since 1900.
    int tm_wdayDays since Sunday. This ranges from 0 to 6.
    int tm_ydayDays since January 1. This ranges from 0 to 365.
    int tm_isdstFlag to indicate whether daylight saving time is in effect. The value is positive if it is in effect, zero if it is not, and negative if the information is not available.

    +

    Data structure for broken-down time components. +

    +
    +
    + +

    Functions

    + +
    +

    + rsGetDt + : Elapsed time since last call +

    +
    + + + + + +
    float rsGetDt(); +
    +
    +
    Returns
    + + +
    Time in seconds.
    +
    +
    +

    Returns the time in seconds since this function was last called in this script. +

    +
    +
    + + +
    +

    + rsLocaltime + : Convert to local time +

    +
    + + + + + +
    rs_tm* rsLocaltime(rs_tm* local, const rs_time_t* timer); +
    +
    +
    Parameters
    + + + +
    localPointer to time structure where the local time will be stored.
    timerInput time as a number of seconds since January 1, 1970.
    +
    +
    Returns
    + + +
    Pointer to the output local time, i.e. the same value as the parameter local.
    +
    +
    +

    Converts the time specified by timer into a rs_tm structure that provides year, month, +hour, etc. This value is stored at *local. +

    + +

    This functions returns the same pointer that is passed as first argument. If the +local parameter is NULL, this function does nothing and returns NULL. +

    +
    +
    + + +
    +

    + rsTime + : Seconds since January 1, 1970 +

    +
    + + + + + +
    rs_time_t rsTime(rs_time_t* timer); +
    +
    +
    Parameters
    + + +
    timerLocation to also store the returned calendar time.
    +
    +
    Returns
    + + +
    Seconds since the Epoch, -1 if there's an error.
    +
    +
    +

    Returns the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970). +

    + +

    If timer is non-NULL, the result is also stored in the memory pointed to by +this variable. +

    +
    +
    + + +
    +

    + rsUptimeMillis + : System uptime in milliseconds +

    +
    + + + + + +
    int64_t rsUptimeMillis(); +
    +
    +
    Returns
    + + +
    Uptime in milliseconds.
    +
    +
    +

    Returns the current system clock (uptime) in milliseconds. +

    +
    +
    + + +
    +

    + rsUptimeNanos + : System uptime in nanoseconds +

    +
    + + + + + +
    int64_t rsUptimeNanos(); +
    +
    +
    Returns
    + + +
    Uptime in nanoseconds.
    +
    +
    +

    Returns the current system clock (uptime) in nanoseconds. +

    + +

    The granularity of the values return by this call may be much larger than a nanosecond. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_value_types.jd b/docs/html/guide/topics/renderscript/reference/rs_value_types.jd new file mode 100644 index 0000000..a7caf10 --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_value_types.jd @@ -0,0 +1,1172 @@ +page.title=RenderScript Numerical Types + +@jd:body + +
    +

    Overview

    +

    Scalars:
    +

    + +

    RenderScript supports the following scalar numerical types: + + + + + +
    8 bits 16 bits 32 bits 64 bits
    Integer: char, int8_t short, int16_t int32_t long, long long, int64_t
    Unsigned integer: uchar, uint8_t ushort, uint16_t uint, uint32_t ulong, uint64_t
    Floating point: float double
    +

    + +

    Vectors:
    +

    + +

    RenderScript supports fixed size vectors of length 2, 3, and 4. +Vectors are declared using the common type name followed by a 2, 3, or 4. +E.g. float4, int3, double2, ulong4. +

    + +

    To create vector literals, use the vector type followed by the values enclosed +between parentheses, e.g. (float3)(1.0f, 2.0f, 3.0f). +

    + +

    Entries of a vector can be accessed using different naming styles. +

    + +

    Single entries can be accessed by following the variable name with a dot and:

    +

    + +

    For example, with int4 myVar; the following are equivalent:
    + myVar.x == myVar.r == myVar.s0 == myVar.S0
    + myVar.y == myVar.g == myVar.s1 == myVar.S1
    + myVar.z == myVar.b == myVar.s2 == myVar.S2
    + myVar.w == myVar.a == myVar.s3 == myVar.S3
    +

    + +

    Multiple entries of a vector can be accessed at once by using an identifier that is +the concatenation of multiple letters or indices. The resulting vector has a size +equal to the number of entries named. +

    + +

    With the example above, the middle two entries can be accessed using +myVar.yz, myVar.gb, myVar.s12, and myVar.S12. +

    + +

    The entries don't have to be contiguous or in increasing order. Entries can even be +repeated, as long as we're not trying to assign to it. You also can't mix the naming +styles. +

    + +

    Here are examples of what can or can't be done:
    +float4 v4;
    +float3 v3;
    +float2 v2;
    +v2 = v4.xx; // Valid
    +v3 = v4.zxw; // Valid
    +v3 = v4.bba; // Valid
    +v3 = v4.s032; // Valid
    +v3.s120 = v4.S233; // Valid
    +v4.yz = v3.rg; // Valid
    +v4.yzx = v3.rg; // Invalid: mismatched sizes
    +v4.yzz = v3; // Invalid: z appears twice in an assignment
    +v3 = v3.xas0; // Invalid: can't mix xyzw with rgba nor s0...
    +v3 = v4.s034; // Invalid: the digit can only be 0, 1, 2, or 3
    +
    +

    + +

    Matrices and Quaternions:
    +

    + +

    RenderScript supports fixed size square matrices of floats of size 2x2, 3x3, and 4x4. +The types are named rs_matrix2x2, rs_matrix3x3, and rs_matrix4x4. See +Matrix Functions for the list of operations. +

    + +

    Quaternions are also supported via rs_quaternion. See Quaterion Functions for the list +of operations. +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Types
    + char2 + + Two 8 bit signed integers +
    + char3 + + Three 8 bit signed integers +
    + char4 + + Four 8 bit signed integers +
    + double2 + + Two 64 bit floats +
    + double3 + + Three 64 bit floats +
    + double4 + + Four 64 bit floats +
    + float2 + + Two 32 bit floats +
    + float3 + + Three 32 bit floats +
    + float4 + + Four 32 bit floats +
    + int16_t + + 16 bit signed integer +
    + int2 + + Two 32 bit signed integers +
    + int3 + + Three 32 bit signed integers +
    + int32_t + + 32 bit signed integer +
    + int4 + + Four 32 bit signed integers +
    + int64_t + + 64 bit signed integer +
    + int8_t + + 8 bit signed integer +
    + long2 + + Two 64 bit signed integers +
    + long3 + + Three 64 bit signed integers +
    + long4 + + Four 64 bit signed integers +
    + rs_matrix2x2 + + 2x2 matrix of 32 bit floats +
    + rs_matrix3x3 + + 3x3 matrix of 32 bit floats +
    + rs_matrix4x4 + + 4x4 matrix of 32 bit floats +
    + rs_quaternion + + Quaternion +
    + short2 + + Two 16 bit signed integers +
    + short3 + + Three 16 bit signed integers +
    + short4 + + Four 16 bit signed integers +
    + size_t + + Unsigned size type +
    + ssize_t + + Signed size type +
    + uchar + + 8 bit unsigned integer +
    + uchar2 + + Two 8 bit unsigned integers +
    + uchar3 + + Three 8 bit unsigned integers +
    + uchar4 + + Four 8 bit unsigned integers +
    + uint + + 32 bit unsigned integer +
    + uint16_t + + 16 bit unsigned integer +
    + uint2 + + Two 32 bit unsigned integers +
    + uint3 + + Three 32 bit unsigned integers +
    + uint32_t + + 32 bit unsigned integer +
    + uint4 + + Four 32 bit unsigned integers +
    + uint64_t + + 64 bit unsigned integer +
    + uint8_t + + 8 bit unsigned integer +
    + ulong + + 64 bit unsigned integer +
    + ulong2 + + Two 64 bit unsigned integers +
    + ulong3 + + Three 64 bit unsigned integers +
    + ulong4 + + Four 64 bit unsigned integers +
    + ushort + + 16 bit unsigned integer +
    + ushort2 + + Two 16 bit unsigned integers +
    + ushort3 + + Three 16 bit unsigned integers +
    + ushort4 + + Four 16 bit unsigned integers +
    +

    Types

    + +
    +

    + char2 + : Two 8 bit signed integers +

    +
    +

    A typedef of: char __attribute__((ext_vector_type(2)))     

    +

    A vector of two chars. These two chars are packed into a single 16 bit field +with a 16 bit alignment. +

    +
    +
    + + +
    +

    + char3 + : Three 8 bit signed integers +

    +
    +

    A typedef of: char __attribute__((ext_vector_type(3)))     

    +

    A vector of three chars. These three chars are packed into a single 32 bit field +with a 32 bit alignment. +

    +
    +
    + + +
    +

    + char4 + : Four 8 bit signed integers +

    +
    +

    A typedef of: char __attribute__((ext_vector_type(4)))     

    +

    A vector of four chars. These four chars are packed into a single 32 bit field +with a 32 bit alignment. +

    +
    +
    + + +
    +

    + double2 + : Two 64 bit floats +

    +
    +

    A typedef of: double __attribute__((ext_vector_type(2)))     

    +

    A vector of two doubles. These two double fields packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + double3 + : Three 64 bit floats +

    +
    +

    A typedef of: double __attribute__((ext_vector_type(3)))     

    +

    A vector of three doubles. These three double fields packed into a single 256 bit field +with a 256 bit alignment. +

    +
    +
    + + +
    +

    + double4 + : Four 64 bit floats +

    +
    +

    A typedef of: double __attribute__((ext_vector_type(4)))     

    +

    A vector of four doubles. These four double fields packed into a single 256 bit field +with a 256 bit alignment. +

    +
    +
    + + +
    +

    + float2 + : Two 32 bit floats +

    +
    +

    A typedef of: float __attribute__((ext_vector_type(2)))     

    +

    A vector of two floats. These two floats are packed into a single 64 bit field +with a 64 bit alignment. +

    + +

    A vector of two floats. These two floats are packed into a single 64 bit field +with a 64 bit alignment. +

    +
    +
    + + +
    +

    + float3 + : Three 32 bit floats +

    +
    +

    A typedef of: float __attribute__((ext_vector_type(3)))     

    +

    A vector of three floats. These three floats are packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + float4 + : Four 32 bit floats +

    +
    +

    A typedef of: float __attribute__((ext_vector_type(4)))     

    +

    A vector of four floats type. These four floats are packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + int16_t + : 16 bit signed integer +

    +
    +

    A typedef of: short     

    +

    A 16 bit signed integer type. +

    +
    +
    + + +
    +

    + int2 + : Two 32 bit signed integers +

    +
    +

    A typedef of: int __attribute__((ext_vector_type(2)))     

    +

    A vector of two ints. These two ints are packed into a single 64 bit field +with a 64 bit alignment. +

    +
    +
    + + +
    +

    + int3 + : Three 32 bit signed integers +

    +
    +

    A typedef of: int __attribute__((ext_vector_type(3)))     

    +

    A vector of three ints. These three ints are packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + int32_t + : 32 bit signed integer +

    +
    +

    A typedef of: int     

    +

    A 32 bit signed integer type. +

    +
    +
    + + +
    +

    + int4 + : Four 32 bit signed integers +

    +
    +

    A typedef of: int __attribute__((ext_vector_type(4)))     

    +

    A vector of four ints. These two fours are packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + int64_t + : 64 bit signed integer +

    +
    +

    A typedef of: long long      Removed from API level 21 +

    +

    A typedef of: long      Added in API level 21 +

    +

    A 64 bit signed integer type. +

    +
    +
    + + +
    +

    + int8_t + : 8 bit signed integer +

    +
    +

    A typedef of: char     

    +

    8 bit signed integer type. +

    +
    +
    + + +
    +

    + long2 + : Two 64 bit signed integers +

    +
    +

    A typedef of: long __attribute__((ext_vector_type(2)))     

    +

    A vector of two longs. These two longs are packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + long3 + : Three 64 bit signed integers +

    +
    +

    A typedef of: long __attribute__((ext_vector_type(3)))     

    +

    A vector of three longs. These three longs are packed into a single 256 bit field +with a 256 bit alignment. +

    +
    +
    + + +
    +

    + long4 + : Four 64 bit signed integers +

    +
    +

    A typedef of: long __attribute__((ext_vector_type(4)))     

    +

    A vector of four longs. These four longs are packed into a single 256 bit field +with a 256 bit alignment. +

    +
    +
    + + +
    +

    + rs_matrix2x2 + : 2x2 matrix of 32 bit floats +

    +
    +

    A structure with the following fields:     

    + + +
    float m[4]

    +

    A square 2x2 matrix of floats. The entries are stored in the array at the +location [row*2 + col]. +

    + +

    See Matrix Functions. +

    +
    +
    + + +
    +

    + rs_matrix3x3 + : 3x3 matrix of 32 bit floats +

    +
    +

    A structure with the following fields:     

    + + +
    float m[9]

    +

    A square 3x3 matrix of floats. The entries are stored in the array at the +location [row*3 + col]. +

    + +

    See Matrix Functions. +

    +
    +
    + + +
    +

    + rs_matrix4x4 + : 4x4 matrix of 32 bit floats +

    +
    +

    A structure with the following fields:     

    + + +
    float m[16]

    +

    A square 4x4 matrix of floats. The entries are stored in the array at the +location [row*4 + col]. +

    + +

    See Matrix Functions. +

    +
    +
    + + +
    +

    + rs_quaternion + : Quaternion +

    +
    +

    A typedef of: float4     

    +

    A square 4x4 matrix of floats that represents a quaternion. +

    + +

    See Quaternion Functions. +

    +
    +
    + + +
    +

    + short2 + : Two 16 bit signed integers +

    +
    +

    A typedef of: short __attribute__((ext_vector_type(2)))     

    +

    A vector of two shorts. These two shorts are packed into a single 32 bit field +with a 32 bit alignment. +

    +
    +
    + + +
    +

    + short3 + : Three 16 bit signed integers +

    +
    +

    A typedef of: short __attribute__((ext_vector_type(3)))     

    +

    A vector of three shorts. These three short fields packed into a single 64 bit field +with a 64 bit alignment. +

    +
    +
    + + +
    +

    + short4 + : Four 16 bit signed integers +

    +
    +

    A typedef of: short __attribute__((ext_vector_type(4)))     

    +

    A vector of four shorts. These four short fields packed into a single 64 bit field +with a 64 bit alignment. +

    +
    +
    + + +
    +

    + size_t + : Unsigned size type +

    +
    +

    A typedef of: uint64_t      When compiling for 64 bits. +

    +

    A typedef of: uint32_t      When compiling for 32 bits. +

    +

    Unsigned size type. The number of bits depend on the compilation flags. +

    +
    +
    + + +
    +

    + ssize_t + : Signed size type +

    +
    +

    A typedef of: int64_t      When compiling for 64 bits. +

    +

    A typedef of: int32_t      When compiling for 32 bits. +

    +

    Signed size type. The number of bits depend on the compilation flags. +

    +
    +
    + + +
    +

    + uchar + : 8 bit unsigned integer +

    +
    +

    A typedef of: uint8_t     

    +

    8 bit unsigned integer type. +

    +
    +
    + + +
    +

    + uchar2 + : Two 8 bit unsigned integers +

    +
    +

    A typedef of: uchar __attribute__((ext_vector_type(2)))     

    +

    A vector of two uchars. These two uchar fields packed into a single 16 bit field +with a 16 bit alignment. +

    +
    +
    + + +
    +

    + uchar3 + : Three 8 bit unsigned integers +

    +
    +

    A typedef of: uchar __attribute__((ext_vector_type(3)))     

    +

    A vector of three uchars. These three uchar fields packed into a single 32 bit field +with a 32 bit alignment. +

    +
    +
    + + +
    +

    + uchar4 + : Four 8 bit unsigned integers +

    +
    +

    A typedef of: uchar __attribute__((ext_vector_type(4)))     

    +

    A vector of four uchars. These four uchar fields packed into a single 32 bit field +with a 32 bit alignment. +

    +
    +
    + + +
    +

    + uint + : 32 bit unsigned integer +

    +
    +

    A typedef of: uint32_t     

    +

    A 32 bit unsigned integer type. +

    +
    +
    + + +
    +

    + uint16_t + : 16 bit unsigned integer +

    +
    +

    A typedef of: unsigned short     

    +

    A 16 bit unsigned integer type. +

    +
    +
    + + +
    +

    + uint2 + : Two 32 bit unsigned integers +

    +
    +

    A typedef of: uint __attribute__((ext_vector_type(2)))     

    +

    A vector of two uints. These two uints are packed into a single 64 bit field +with a 64 bit alignment. +

    +
    +
    + + +
    +

    + uint3 + : Three 32 bit unsigned integers +

    +
    +

    A typedef of: uint __attribute__((ext_vector_type(3)))     

    +

    A vector of three uints. These three uints are packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + uint32_t + : 32 bit unsigned integer +

    +
    +

    A typedef of: unsigned int     

    +

    A 32 bit unsigned integer type. +

    +
    +
    + + +
    +

    + uint4 + : Four 32 bit unsigned integers +

    +
    +

    A typedef of: uint __attribute__((ext_vector_type(4)))     

    +

    A vector of four uints. These four uints are packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + uint64_t + : 64 bit unsigned integer +

    +
    +

    A typedef of: unsigned long long      Removed from API level 21 +

    +

    A typedef of: unsigned long      Added in API level 21 +

    +

    A 64 bit unsigned integer type. +

    +
    +
    + + +
    +

    + uint8_t + : 8 bit unsigned integer +

    +
    +

    A typedef of: unsigned char     

    +

    8 bit unsigned integer type. +

    +
    +
    + + +
    +

    + ulong + : 64 bit unsigned integer +

    +
    +

    A typedef of: uint64_t     

    +

    A 64 bit unsigned integer type. +

    +
    +
    + + +
    +

    + ulong2 + : Two 64 bit unsigned integers +

    +
    +

    A typedef of: ulong __attribute__((ext_vector_type(2)))     

    +

    A vector of two ulongs. These two ulongs are packed into a single 128 bit field +with a 128 bit alignment. +

    +
    +
    + + +
    +

    + ulong3 + : Three 64 bit unsigned integers +

    +
    +

    A typedef of: ulong __attribute__((ext_vector_type(3)))     

    +

    A vector of three ulongs. These three ulong fields packed into a single 256 bit field +with a 256 bit alignment. +

    +
    +
    + + +
    +

    + ulong4 + : Four 64 bit unsigned integers +

    +
    +

    A typedef of: ulong __attribute__((ext_vector_type(4)))     

    +

    A vector of four ulongs. These four ulong fields packed into a single 256 bit field +with a 256 bit alignment. +

    +
    +
    + + +
    +

    + ushort + : 16 bit unsigned integer +

    +
    +

    A typedef of: uint16_t     

    +

    A 16 bit unsigned integer type. +

    +
    +
    + + +
    +

    + ushort2 + : Two 16 bit unsigned integers +

    +
    +

    A typedef of: ushort __attribute__((ext_vector_type(2)))     

    +

    A vector of two ushorts. These two ushort fields packed into a single 32 bit field +with a 32 bit alignment. +

    +
    +
    + + +
    +

    + ushort3 + : Three 16 bit unsigned integers +

    +
    +

    A typedef of: ushort __attribute__((ext_vector_type(3)))     

    +

    A vector of three ushorts. These three ushort fields packed into a single 64 bit field +with a 64 bit alignment. +

    +
    +
    + + +
    +

    + ushort4 + : Four 16 bit unsigned integers +

    +
    +

    A typedef of: ushort __attribute__((ext_vector_type(4)))     

    +

    A vector of four ushorts. These four ushort fields packed into a single 64 bit field +with a 64 bit alignment. +

    +
    +
    + +
    diff --git a/docs/html/guide/topics/renderscript/reference/rs_vector_math.jd b/docs/html/guide/topics/renderscript/reference/rs_vector_math.jd new file mode 100644 index 0000000..cb90e9d --- /dev/null +++ b/docs/html/guide/topics/renderscript/reference/rs_vector_math.jd @@ -0,0 +1,574 @@ +page.title=RenderScript Vector Math Functions + +@jd:body + +
    +

    Overview

    +

    These functions interpret the input arguments as representation of vectors in +n-dimensional space. +

    + +

    The precision of the mathematical operations on 32 bit floats is affected by the pragmas +rs_fp_relaxed and rs_fp_full. See Mathematical Constants and Functions for details. +

    + +

    Different precision/speed tradeoffs can be achieved by using variants of the common math +functions. Functions with a name starting with

    +

    +

    Summary

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Functions
    + cross + + Cross product of two vectors +
    + distance + + Distance between two points +
    + dot + + Dot product of two vectors +
    + fast_distance + + Approximate distance between two points +
    + fast_length + + Approximate length of a vector +
    + fast_normalize + + Approximate normalized vector +
    + length + + Length of a vector +
    + native_distance + + Approximate distance between two points +
    + native_length + + Approximate length of a vector +
    + native_normalize + + Approximately normalize a vector +
    + normalize + + Normalize a vector +
    +

    Functions

    + +
    +

    + cross + : Cross product of two vectors +

    +
    + + + + + + + + + +
    float3 cross(float3 left_vector, float3 right_vector); +
    float4 cross(float4 left_vector, float4 right_vector); +
    +
    +
    +

    Computes the cross product of two vectors. +

    +
    +
    + + +
    +

    + distance + : Distance between two points +

    +
    + + + + + + + + + + + + + + + + + +
    float distance(float left_vector, float right_vector); +
    float distance(float2 left_vector, float2 right_vector); +
    float distance(float3 left_vector, float3 right_vector); +
    float distance(float4 left_vector, float4 right_vector); +
    +
    +
    +

    Compute the distance between two points. +

    + +

    See also fast_distance(), native_distance(). +

    +
    +
    + + +
    +

    + dot + : Dot product of two vectors +

    +
    + + + + + + + + + + + + + + + + + +
    float dot(float left_vector, float right_vector); +
    float dot(float2 left_vector, float2 right_vector); +
    float dot(float3 left_vector, float3 right_vector); +
    float dot(float4 left_vector, float4 right_vector); +
    +
    +
    +

    Computes the dot product of two vectors. +

    +
    +
    + + +
    +

    + fast_distance + : Approximate distance between two points +

    +
    + + + + + + + + + + + + + + + + + +
    float fast_distance(float left_vector, float right_vector); + Added in API level 17 +
    float fast_distance(float2 left_vector, float2 right_vector); + Added in API level 17 +
    float fast_distance(float3 left_vector, float3 right_vector); + Added in API level 17 +
    float fast_distance(float4 left_vector, float4 right_vector); + Added in API level 17 +
    +
    +
    +

    Computes the approximate distance between two points. +

    + +

    The precision is what would be expected from doing the computation using 16 bit floating +point values. +

    + +

    See also distance(), native_distance(). +

    +
    +
    + + +
    +

    + fast_length + : Approximate length of a vector +

    +
    + + + + + + + + + + + + + + + + + +
    float fast_length(float v); + Added in API level 17 +
    float fast_length(float2 v); + Added in API level 17 +
    float fast_length(float3 v); + Added in API level 17 +
    float fast_length(float4 v); + Added in API level 17 +
    +
    +
    +

    Computes the approximate length of a vector. +

    + +

    The precision is what would be expected from doing the computation using 16 bit floating +point values. +

    + +

    See also length(), native_length(). +

    +
    +
    + + +
    +

    + fast_normalize + : Approximate normalized vector +

    +
    + + + + + + + + + + + + + + + + + +
    float fast_normalize(float v); + Added in API level 17 +
    float2 fast_normalize(float2 v); + Added in API level 17 +
    float3 fast_normalize(float3 v); + Added in API level 17 +
    float4 fast_normalize(float4 v); + Added in API level 17 +
    +
    +
    +

    Approximately normalizes a vector. +

    + +

    For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for +positive values. +

    + +

    The precision is what would be expected from doing the computation using 16 bit floating +point values. +

    + +

    See also normalize(), native_normalize(). +

    +
    +
    + + +
    +

    + length + : Length of a vector +

    +
    + + + + + + + + + + + + + + + + + +
    float length(float v); +
    float length(float2 v); +
    float length(float3 v); +
    float length(float4 v); +
    +
    +
    +

    Computes the length of a vector. +

    + +

    See also fast_length(), native_length(). +

    +
    +
    + + +
    +

    + native_distance + : Approximate distance between two points +

    +
    + + + + + + + + + + + + + + + + + +
    float native_distance(float left_vector, float right_vector); + Added in API level 21 +
    float native_distance(float2 left_vector, float2 right_vector); + Added in API level 21 +
    float native_distance(float3 left_vector, float3 right_vector); + Added in API level 21 +
    float native_distance(float4 left_vector, float4 right_vector); + Added in API level 21 +
    +
    +
    +

    Computes the approximate distance between two points. +

    + +

    See also distance(), fast_distance(). +

    +
    +
    + + +
    +

    + native_length + : Approximate length of a vector +

    +
    + + + + + + + + + + + + + + + + + +
    float native_length(float v); + Added in API level 21 +
    float native_length(float2 v); + Added in API level 21 +
    float native_length(float3 v); + Added in API level 21 +
    float native_length(float4 v); + Added in API level 21 +
    +
    +
    +

    Compute the approximate length of a vector. +

    + +

    See also length(), fast_length(). +

    +
    +
    + + +
    +

    + native_normalize + : Approximately normalize a vector +

    +
    + + + + + + + + + + + + + + + + + +
    float native_normalize(float v); + Added in API level 21 +
    float2 native_normalize(float2 v); + Added in API level 21 +
    float3 native_normalize(float3 v); + Added in API level 21 +
    float4 native_normalize(float4 v); + Added in API level 21 +
    +
    +
    +

    Approximately normalizes a vector. +

    + +

    See also normalize(), fast_normalize(). +

    +
    +
    + + +
    +

    + normalize + : Normalize a vector +

    +
    + + + + + + + + + + + + + + + + + +
    float normalize(float v); +
    float2 normalize(float2 v); +
    float3 normalize(float3 v); +
    float4 normalize(float4 v); +
    +
    +
    +

    Normalize a vector. +

    + +

    For vectors of size 1, returns -1.f for negative values, 0.f for null values, and 1.f for +positive values. +

    + +

    See also fast_normalize(), native_normalize(). +

    +
    +
    + +
    diff --git a/docs/html/reference/renderscript/annotated.html b/docs/html/reference/renderscript/annotated.html deleted file mode 100644 index 9ddbc81..0000000 --- a/docs/html/reference/renderscript/annotated.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - -Data Structures - - - - - - - -
    - - - - -
    -
    -
    -
    Data Structures
    -
    -
    -
    - - - - - - - - - - - - - - - - - -
    rs_allocationOpaque handle to a RenderScript allocation
    rs_elementOpaque handle to a RenderScript element
    rs_fontOpaque handle to a RenderScript font object
    rs_matrix2x22x2 float matrix
    rs_matrix3x33x3 float matrix
    rs_matrix4x44x4 float matrix
    rs_meshOpaque handle to a RenderScript mesh object
    rs_pathOpaque handle to a RenderScript Path object
    rs_program_fragmentOpaque handle to a RenderScript ProgramFragment object
    rs_program_rasterOpaque handle to a RenderScript ProgramRaster object
    rs_program_storeOpaque handle to a RenderScript ProgramStore object
    rs_program_vertexOpaque handle to a RenderScript ProgramVertex object
    rs_samplerOpaque handle to a RenderScript sampler object
    rs_scriptOpaque handle to a RenderScript script object
    rs_script_call
    rs_tm
    rs_typeOpaque handle to a RenderScript type
    -
    - - - diff --git a/docs/html/reference/renderscript/doxygen.css b/docs/html/reference/renderscript/doxygen.css deleted file mode 100644 index 22c7b5c..0000000 --- a/docs/html/reference/renderscript/doxygen.css +++ /dev/null @@ -1,946 +0,0 @@ -/* The standard CSS for doxygen */ - -body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 12px; -} - -/* @group Heading Levels */ - -h1 { - font-size: 150%; -} - -.title { - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2 { - font-size: 120%; -} - -h3 { - font-size: 100%; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd, p.starttd { - margin-top: 2px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code { - color: #4665A2; -} - -a.codeRef { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -.fragment { - font-family: monospace, fixed; - font-size: 105%; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; -} - -div.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background-color: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 8px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #C4CFE5; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; -} - -.memname { - white-space: nowrap; - font-weight: bold; - margin-left: 6px; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 8px; - border-top-left-radius: 8px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 8px; - -moz-border-radius-topleft: 8px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 8px; - -webkit-border-top-left-radius: 8px; - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 2px 5px; - background-color: #FBFCFD; - border-top-width: 0; - /* opera specific markup */ - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} - -.params, .retval, .exception, .tparams { - border-spacing: 6px 2px; -} - -.params .paramname, .retval .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - - - - -/* @end */ - -/* @group Directory (tree) */ - -/* for the tree view */ - -.ftvtree { - font-family: sans-serif; - margin: 0px; -} - -/* these are for tree view when used as main index */ - -.directory { - font-size: 9pt; - font-weight: bold; - margin: 5px; -} - -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* -The following two styles can be used to replace the root node title -with an image of your choice. Simply uncomment the next two styles, -specify the name of your image and be sure to set 'height' to the -proper pixel height of your image. -*/ - -/* -.directory h3.swap { - height: 61px; - background-repeat: no-repeat; - background-image: url("yourimage.gif"); -} -.directory h3.swap span { - display: none; -} -*/ - -.directory > h3 { - margin-top: 0; -} - -.directory p { - margin: 0px; - white-space: nowrap; -} - -.directory div { - display: none; - margin: 0px; -} - -.directory img { - vertical-align: -30%; -} - -/* these are for tree view when not used as main index */ - -.directory-alt { - font-size: 100%; - font-weight: bold; -} - -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -.directory-alt > h3 { - margin-top: 0; -} - -.directory-alt p { - margin: 0px; - white-space: nowrap; -} - -.directory-alt div { - display: none; - margin: 0px; -} - -.directory-alt img { - vertical-align: -30%; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable { - border-collapse:collapse; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; -} - -table.fieldtable { - width: 100%; - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - width: 100%; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -div.ingroups -{ - margin-left: 5px; - font-size: 8pt; - padding-left: 5px; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 7px; -} - -dl -{ - padding: 0 0 0 10px; -} - -dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug -{ - border-left:4px solid; - padding: 0 0 0 6px; -} - -dl.note -{ - border-color: #D0C000; -} - -dl.warning, dl.attention -{ - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant -{ - border-color: #00D000; -} - -dl.deprecated -{ - border-color: #505050; -} - -dl.todo -{ - border-color: #00C0E0; -} - -dl.test -{ - border-color: #3030E0; -} - -dl.bug -{ - border-color: #C08050; -} - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90A5CE; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } - pre.fragment - { - overflow: visible; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - } -} - diff --git a/docs/html/reference/renderscript/globals.html b/docs/html/reference/renderscript/globals.html deleted file mode 100644 index d149a0d..0000000 --- a/docs/html/reference/renderscript/globals.html +++ /dev/null @@ -1,919 +0,0 @@ - - - - - -Members - - - - - - - -
    - - - - - - -
    -
    -
    - -

    - a -

    - - -

    - c -

    - - -

    - d -

    - - -

    - e -

    - - -

    - f -

    - - -

    - h -

    - - -

    - i -

    - - -

    - l -

    - - -

    - m -

    - - -

    - n -

    - - -

    - p -

    - - -

    - r -

    - - -

    - s -

    - - -

    - t -

    - - -

    - u -

    -
    - - - diff --git a/docs/html/reference/renderscript/globals_enum.html b/docs/html/reference/renderscript/globals_enum.html deleted file mode 100644 index 500d6c4..0000000 --- a/docs/html/reference/renderscript/globals_enum.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - -Members - - - - - - - -
    - - - - - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/globals_func.html b/docs/html/reference/renderscript/globals_func.html deleted file mode 100644 index bed106a..0000000 --- a/docs/html/reference/renderscript/globals_func.html +++ /dev/null @@ -1,707 +0,0 @@ - - - - - -Members - - - - - - - -
    - - - - - - -
    -
    -  - -

    - a -

    - - -

    - c -

    - - -

    - d -

    - - -

    - e -

    - - -

    - f -

    - - -

    - h -

    - - -

    - i -

    - - -

    - l -

    - - -

    - m -

    - - -

    - n -

    - - -

    - p -

    - - -

    - r -

    - - -

    - s -

    - - -

    - t -

    -
    - - - diff --git a/docs/html/reference/renderscript/globals_type.html b/docs/html/reference/renderscript/globals_type.html deleted file mode 100644 index 1d1ffd7..0000000 --- a/docs/html/reference/renderscript/globals_type.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - -Members - - - - - - - -
    - - - - - - -
    -
    -  - -

    - c -

    - - -

    - d -

    - - -

    - f -

    - - -

    - i -

    - - -

    - l -

    - - -

    - r -

    - - -

    - s -

    - - -

    - u -

    -
    - - - diff --git a/docs/html/reference/renderscript/index.html b/docs/html/reference/renderscript/index.html deleted file mode 100644 index 2e3a449..0000000 --- a/docs/html/reference/renderscript/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -Main Page - - - - - - - -
    - - - - -
    -
    -

    RenderScript is a high-performance runtime that provides compute operations at the native level. RenderScript code is compiled on devices at runtime to allow platform-independence as well. This reference documentation describes the RenderScript runtime APIs, which you can utilize to write RenderScript code in C99. The RenderScript compute header files are automatically included for you.

    -

    To use RenderScript, you need to utilize the RenderScript runtime APIs documented here as well as the Android framework APIs for RenderScript. For documentation on the Android framework APIs, see the android.renderscript package reference. For more information on how to develop with RenderScript and how the runtime and Android framework APIs interact, see the RenderScript developer guide and the RenderScript samples.

    -
    - - - diff --git a/docs/html/reference/renderscript/rs__allocation_8rsh.html b/docs/html/reference/renderscript/rs__allocation_8rsh.html deleted file mode 100644 index 31736a6..0000000 --- a/docs/html/reference/renderscript/rs__allocation_8rsh.html +++ /dev/null @@ -1,818 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.rsh File Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    rs_allocation rsGetAllocation (const void *)
    uint32_t rsAllocationGetDimX (rs_allocation)
    uint32_t rsAllocationGetDimY (rs_allocation)
    uint32_t rsAllocationGetDimZ (rs_allocation)
    uint32_t rsAllocationGetDimLOD (rs_allocation)
    uint32_t rsAllocationGetDimFaces (rs_allocation)
    void rsAllocationCopy1DRange (rs_allocation dstAlloc, uint32_t dstOff, uint32_t dstMip, uint32_t count, rs_allocation srcAlloc, uint32_t srcOff, uint32_t srcMip)
    void rsAllocationCopy2DRange (rs_allocation dstAlloc, uint32_t dstXoff, uint32_t dstYoff, uint32_t dstMip, rs_allocation_cubemap_face dstFace, uint32_t width, uint32_t height, rs_allocation srcAlloc, uint32_t srcXoff, uint32_t srcYoff, uint32_t srcMip, rs_allocation_cubemap_face srcFace)
    const void * rsGetElementAt (rs_allocation a, uint32_t x)
    const void * rsGetElementAt (rs_allocation a, uint32_t x, uint32_t y)
    const void * rsGetElementAt (rs_allocation a, uint32_t x, uint32_t y, uint32_t z)
    const void rsAllocationIoSend (rs_allocation a)
    const void rsAllocationIoReceive (rs_allocation a)
    rs_element rsAllocationGetElement (rs_allocation a)
    const float4 rsSample (rs_allocation a, rs_sampler s, float location)
    const float4 rsSample (rs_allocation a, rs_sampler s, float location, float lod)
    void rsSetElementAt (rs_allocation a, void *ptr, uint32_t x)
    void rsSetElementAt (rs_allocation a, void *ptr, uint32_t x, uint32_t y)
    const uchar rsGetElementAtYuv_uchar_Y (rs_allocation a, uint32_t x, uint32_t y)
    const uchar rsGetElementAtYuv_uchar_U (rs_allocation a, uint32_t x, uint32_t y)
    const uchar rsGetElementAtYuv_uchar_V (rs_allocation a, uint32_t x, uint32_t y)
    -

    Detailed Description

    -

    Allocation routines.

    - -

    Definition in file rs_allocation.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsAllocationCopy1DRange (rs_allocation dstAlloc,
    uint32_t dstOff,
    uint32_t dstMip,
    uint32_t count,
    rs_allocation srcAlloc,
    uint32_t srcOff,
    uint32_t srcMip 
    )
    -
    -
    -

    Copy part of an allocation from another allocation.

    -
    Parameters:
    - - - - - - - - -
    dstAllocAllocation to copy data into.
    dstOffThe offset of the first element to be copied in the destination allocation.
    dstMipMip level in the destination allocation.
    countThe number of elements to be copied.
    srcAllocThe source data allocation.
    srcOffThe offset of the first element in data to be copied in the source allocation.
    srcMipMip level in the source allocation.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsAllocationCopy2DRange (rs_allocation dstAlloc,
    uint32_t dstXoff,
    uint32_t dstYoff,
    uint32_t dstMip,
    rs_allocation_cubemap_face dstFace,
    uint32_t width,
    uint32_t height,
    rs_allocation srcAlloc,
    uint32_t srcXoff,
    uint32_t srcYoff,
    uint32_t srcMip,
    rs_allocation_cubemap_face srcFace 
    )
    -
    -
    -

    Copy a rectangular region into the allocation from another allocation.

    -
    Parameters:
    - - - - - - - - - - - - - -
    dstAllocallocation to copy data into.
    dstXoffX offset of the region to update in the destination allocation.
    dstYoffY offset of the region to update in the destination allocation.
    dstMipMip level in the destination allocation.
    dstFaceCubemap face of the destination allocation, ignored for allocations that aren't cubemaps.
    widthWidth of the incoming region to update.
    heightHeight of the incoming region to update.
    srcAllocThe source data allocation.
    srcXoffX offset in data of the source allocation.
    srcYoffY offset in data of the source allocation.
    srcMipMip level in the source allocation.
    srcFaceCubemap face of the source allocation, ignored for allocations that aren't cubemaps.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsAllocationGetDimFaces (rs_allocation )
    -
    -
    -

    Query an allocation for the presence of more than one face.

    -
    Returns:
    uint32_t Returns 1 if more than one face is present, 0 otherwise.
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsAllocationGetDimLOD (rs_allocation )
    -
    -
    -

    Query an allocation for the presence of more than one LOD.

    -
    Returns:
    uint32_t Returns 1 if more than one LOD is present, 0 otherwise.
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsAllocationGetDimX (rs_allocation )
    -
    -
    -

    Query the dimension of an allocation.

    -
    Returns:
    uint32_t The X dimension of the allocation.
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsAllocationGetDimY (rs_allocation )
    -
    -
    -

    Query the dimension of an allocation.

    -
    Returns:
    uint32_t The Y dimension of the allocation.
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsAllocationGetDimZ (rs_allocation )
    -
    -
    -

    Query the dimension of an allocation.

    -
    Returns:
    uint32_t The Z dimension of the allocation.
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_element rsAllocationGetElement (rs_allocation a)
    -
    -
    -

    Get the element object describing the allocation's layout

    -
    Parameters:
    - - -
    aallocation to get data from
    -
    -
    -
    Returns:
    element describing allocation layout
    - -
    -
    - -
    -
    - - - - - - - - -
    const void rsAllocationIoReceive (rs_allocation a)
    -
    -
    -

    Receive a new set of contents from the queue.

    -
    Parameters:
    - - -
    aallocation to work on
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    const void rsAllocationIoSend (rs_allocation a)
    -
    -
    -

    Send the contents of the Allocation to the queue.

    -
    Parameters:
    - - -
    aallocation to work on
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_allocation rsGetAllocation (const void * )
    -
    -
    -

    Returns the Allocation for a given pointer. The pointer should point within a valid allocation. The results are undefined if the pointer is not from a valid allocation.

    -

    This function is deprecated and will be removed in the SDK from a future release.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    const void* rsGetElementAt (rs_allocation a,
    uint32_t x 
    )
    -
    -
    -

    Extract a single element from an allocation.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    const void* rsGetElementAt (rs_allocation a,
    uint32_t x,
    uint32_t y 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    const void* rsGetElementAt (rs_allocation a,
    uint32_t x,
    uint32_t y,
    uint32_t z 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    const uchar rsGetElementAtYuv_uchar_U (rs_allocation a,
    uint32_t x,
    uint32_t y 
    )
    -
    -
    -

    Extract a single element from an allocation.

    -

    Coordinates are in the dimensions of the Y plane

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    const uchar rsGetElementAtYuv_uchar_V (rs_allocation a,
    uint32_t x,
    uint32_t y 
    )
    -
    -
    -

    Extract a single element from an allocation.

    -

    Coordinates are in the dimensions of the Y plane

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    const uchar rsGetElementAtYuv_uchar_Y (rs_allocation a,
    uint32_t x,
    uint32_t y 
    )
    -
    -
    -

    Extract a single element from an allocation.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    const float4 rsSample (rs_allocation a,
    rs_sampler s,
    float location 
    )
    -
    -
    -

    Fetch allocation in a way described by the sampler

    -
    Parameters:
    - - - - -
    a1D allocation to sample from
    ssampler state
    locationto sample from
    -
    -
    -

    Fetch allocation in a way described by the sampler

    -
    Parameters:
    - - - - -
    a2D allocation to sample from
    ssampler state
    locationto sample from
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    const float4 rsSample (rs_allocation a,
    rs_sampler s,
    float location,
    float lod 
    )
    -
    -
    -

    Fetch allocation in a way described by the sampler

    -
    Parameters:
    - - - - - -
    a1D allocation to sample from
    ssampler state
    locationto sample from
    lodmip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used
    -
    -
    -

    Fetch allocation in a way described by the sampler

    -
    Parameters:
    - - - - - -
    a2D allocation to sample from
    ssampler state
    locationto sample from
    lodmip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsSetElementAt (rs_allocation a,
    void * ptr,
    uint32_t x 
    )
    -
    -
    -

    Set single element of an allocation.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsSetElementAt (rs_allocation a,
    void * ptr,
    uint32_t x,
    uint32_t y 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__allocation_8rsh_source.html b/docs/html/reference/renderscript/rs__allocation_8rsh_source.html deleted file mode 100644 index 6d925a8..0000000 --- a/docs/html/reference/renderscript/rs__allocation_8rsh_source.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_ALLOCATION_RSH__
    -00024 #define __RS_ALLOCATION_RSH__
    -00025 
    -00034 extern rs_allocation __attribute__((overloadable))
    -00035     rsGetAllocation(const void *);
    -00036 
    -00042 extern uint32_t __attribute__((overloadable))
    -00043     rsAllocationGetDimX(rs_allocation);
    -00044 
    -00050 extern uint32_t __attribute__((overloadable))
    -00051     rsAllocationGetDimY(rs_allocation);
    -00052 
    -00058 extern uint32_t __attribute__((overloadable))
    -00059     rsAllocationGetDimZ(rs_allocation);
    -00060 
    -00066 extern uint32_t __attribute__((overloadable))
    -00067     rsAllocationGetDimLOD(rs_allocation);
    -00068 
    -00074 extern uint32_t __attribute__((overloadable))
    -00075     rsAllocationGetDimFaces(rs_allocation);
    -00076 
    -00077 #if (defined(RS_VERSION) && (RS_VERSION >= 14))
    -00078 
    -00092 extern void __attribute__((overloadable))
    -00093     rsAllocationCopy1DRange(rs_allocation dstAlloc,
    -00094                             uint32_t dstOff, uint32_t dstMip,
    -00095                             uint32_t count,
    -00096                             rs_allocation srcAlloc,
    -00097                             uint32_t srcOff, uint32_t srcMip);
    -00098 
    -00120 extern void __attribute__((overloadable))
    -00121     rsAllocationCopy2DRange(rs_allocation dstAlloc,
    -00122                             uint32_t dstXoff, uint32_t dstYoff,
    -00123                             uint32_t dstMip,
    -00124                             rs_allocation_cubemap_face dstFace,
    -00125                             uint32_t width, uint32_t height,
    -00126                             rs_allocation srcAlloc,
    -00127                             uint32_t srcXoff, uint32_t srcYoff,
    -00128                             uint32_t srcMip,
    -00129                             rs_allocation_cubemap_face srcFace);
    -00130 
    -00131 #endif //defined(RS_VERSION) && (RS_VERSION >= 14)
    -00132 
    -00136 extern const void * __attribute__((overloadable))
    -00137     rsGetElementAt(rs_allocation a, uint32_t x);
    -00141 extern const void * __attribute__((overloadable))
    -00142     rsGetElementAt(rs_allocation a, uint32_t x, uint32_t y);
    -00146 extern const void * __attribute__((overloadable))
    -00147     rsGetElementAt(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
    -00148 
    -00149 
    -00150 #if (defined(RS_VERSION) && (RS_VERSION >= 18))
    -00151     #define GET_ELEMENT_AT(T) \
    -00152     extern T __attribute__((overloadable)) \
    -00153             rsGetElementAt_##T(rs_allocation a, uint32_t x); \
    -00154     extern T __attribute__((overloadable)) \
    -00155             rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y);  \
    -00156     extern T __attribute__((overloadable)) \
    -00157             rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
    -00158 #else
    -00159     #define GET_ELEMENT_AT(T) \
    -00160     static inline T __attribute__((overloadable)) \
    -00161             rsGetElementAt_##T(rs_allocation a, uint32_t x) {  \
    -00162         return ((T *)rsGetElementAt(a, x))[0]; \
    -00163     } \
    -00164     static inline T __attribute__((overloadable)) \
    -00165             rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y) {  \
    -00166         return ((T *)rsGetElementAt(a, x, y))[0]; \
    -00167     } \
    -00168     static inline T __attribute__((overloadable)) \
    -00169             rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z) {  \
    -00170         return ((T *)rsGetElementAt(a, x, y, z))[0]; \
    -00171     }
    -00172 #endif
    -00173 
    -00174 GET_ELEMENT_AT(char)
    -00175 GET_ELEMENT_AT(char2)
    -00176 GET_ELEMENT_AT(char3)
    -00177 GET_ELEMENT_AT(char4)
    -00178 GET_ELEMENT_AT(uchar)
    -00179 GET_ELEMENT_AT(uchar2)
    -00180 GET_ELEMENT_AT(uchar3)
    -00181 GET_ELEMENT_AT(uchar4)
    -00182 GET_ELEMENT_AT(short)
    -00183 GET_ELEMENT_AT(short2)
    -00184 GET_ELEMENT_AT(short3)
    -00185 GET_ELEMENT_AT(short4)
    -00186 GET_ELEMENT_AT(ushort)
    -00187 GET_ELEMENT_AT(ushort2)
    -00188 GET_ELEMENT_AT(ushort3)
    -00189 GET_ELEMENT_AT(ushort4)
    -00190 GET_ELEMENT_AT(int)
    -00191 GET_ELEMENT_AT(int2)
    -00192 GET_ELEMENT_AT(int3)
    -00193 GET_ELEMENT_AT(int4)
    -00194 GET_ELEMENT_AT(uint)
    -00195 GET_ELEMENT_AT(uint2)
    -00196 GET_ELEMENT_AT(uint3)
    -00197 GET_ELEMENT_AT(uint4)
    -00198 GET_ELEMENT_AT(long)
    -00199 GET_ELEMENT_AT(long2)
    -00200 GET_ELEMENT_AT(long3)
    -00201 GET_ELEMENT_AT(long4)
    -00202 GET_ELEMENT_AT(ulong)
    -00203 GET_ELEMENT_AT(ulong2)
    -00204 GET_ELEMENT_AT(ulong3)
    -00205 GET_ELEMENT_AT(ulong4)
    -00206 GET_ELEMENT_AT(float)
    -00207 GET_ELEMENT_AT(float2)
    -00208 GET_ELEMENT_AT(float3)
    -00209 GET_ELEMENT_AT(float4)
    -00210 GET_ELEMENT_AT(double)
    -00211 GET_ELEMENT_AT(double2)
    -00212 GET_ELEMENT_AT(double3)
    -00213 GET_ELEMENT_AT(double4)
    -00214 
    -00215 #undef GET_ELEMENT_AT
    -00216 
    -00217 // Jelly Bean
    -00218 #if (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00219 
    -00224 extern const void __attribute__((overloadable))
    -00225     rsAllocationIoSend(rs_allocation a);
    -00226 
    -00231 extern const void __attribute__((overloadable))
    -00232     rsAllocationIoReceive(rs_allocation a);
    -00233 
    -00234 
    -00240 extern rs_element __attribute__((overloadable))
    -00241     rsAllocationGetElement(rs_allocation a);
    -00242 
    -00249 extern const float4 __attribute__((overloadable))
    -00250     rsSample(rs_allocation a, rs_sampler s, float location);
    -00260 extern const float4 __attribute__((overloadable))
    -00261     rsSample(rs_allocation a, rs_sampler s, float location, float lod);
    -00262 
    -00269 extern const float4 __attribute__((overloadable))
    -00270     rsSample(rs_allocation a, rs_sampler s, float2 location);
    -00271 
    -00281 extern const float4 __attribute__((overloadable))
    -00282     rsSample(rs_allocation a, rs_sampler s, float2 location, float lod);
    -00283 
    -00284 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00285 
    -00286 #if (defined(RS_VERSION) && (RS_VERSION >= 18))
    -00287 
    -00291 extern void __attribute__((overloadable))
    -00292     rsSetElementAt(rs_allocation a, void* ptr, uint32_t x);
    -00293 
    -00297 extern void __attribute__((overloadable))
    -00298     rsSetElementAt(rs_allocation a, void* ptr, uint32_t x, uint32_t y);
    -00299 
    -00300 #define SET_ELEMENT_AT(T)                                               \
    -00301     extern void __attribute__((overloadable))                           \
    -00302     rsSetElementAt_##T(rs_allocation a, T val, uint32_t x);             \
    -00303     extern void __attribute__((overloadable))                           \
    -00304     rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y); \
    -00305     extern void __attribute__((overloadable))                           \
    -00306     rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y, uint32_t z);
    -00307 
    -00308 
    -00309 SET_ELEMENT_AT(char)
    -00310 SET_ELEMENT_AT(char2)
    -00311 SET_ELEMENT_AT(char3)
    -00312 SET_ELEMENT_AT(char4)
    -00313 SET_ELEMENT_AT(uchar)
    -00314 SET_ELEMENT_AT(uchar2)
    -00315 SET_ELEMENT_AT(uchar3)
    -00316 SET_ELEMENT_AT(uchar4)
    -00317 SET_ELEMENT_AT(short)
    -00318 SET_ELEMENT_AT(short2)
    -00319 SET_ELEMENT_AT(short3)
    -00320 SET_ELEMENT_AT(short4)
    -00321 SET_ELEMENT_AT(ushort)
    -00322 SET_ELEMENT_AT(ushort2)
    -00323 SET_ELEMENT_AT(ushort3)
    -00324 SET_ELEMENT_AT(ushort4)
    -00325 SET_ELEMENT_AT(int)
    -00326 SET_ELEMENT_AT(int2)
    -00327 SET_ELEMENT_AT(int3)
    -00328 SET_ELEMENT_AT(int4)
    -00329 SET_ELEMENT_AT(uint)
    -00330 SET_ELEMENT_AT(uint2)
    -00331 SET_ELEMENT_AT(uint3)
    -00332 SET_ELEMENT_AT(uint4)
    -00333 SET_ELEMENT_AT(long)
    -00334 SET_ELEMENT_AT(long2)
    -00335 SET_ELEMENT_AT(long3)
    -00336 SET_ELEMENT_AT(long4)
    -00337 SET_ELEMENT_AT(ulong)
    -00338 SET_ELEMENT_AT(ulong2)
    -00339 SET_ELEMENT_AT(ulong3)
    -00340 SET_ELEMENT_AT(ulong4)
    -00341 SET_ELEMENT_AT(float)
    -00342 SET_ELEMENT_AT(float2)
    -00343 SET_ELEMENT_AT(float3)
    -00344 SET_ELEMENT_AT(float4)
    -00345 SET_ELEMENT_AT(double)
    -00346 SET_ELEMENT_AT(double2)
    -00347 SET_ELEMENT_AT(double3)
    -00348 SET_ELEMENT_AT(double4)
    -00349 
    -00350 #undef SET_ELEMENT_AT
    -00351 
    -00352 
    -00356 extern const uchar __attribute__((overloadable))
    -00357     rsGetElementAtYuv_uchar_Y(rs_allocation a, uint32_t x, uint32_t y);
    -00358 
    -00364 extern const uchar __attribute__((overloadable))
    -00365     rsGetElementAtYuv_uchar_U(rs_allocation a, uint32_t x, uint32_t y);
    -00366 
    -00372 extern const uchar __attribute__((overloadable))
    -00373     rsGetElementAtYuv_uchar_V(rs_allocation a, uint32_t x, uint32_t y);
    -00374 
    -00375 #endif // (defined(RS_VERSION) && (RS_VERSION >= 18))
    -00376 
    -00377 #endif
    -00378 
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__atomic_8rsh.html b/docs/html/reference/renderscript/rs__atomic_8rsh.html deleted file mode 100644 index 94c16ef..0000000 --- a/docs/html/reference/renderscript/rs__atomic_8rsh.html +++ /dev/null @@ -1,757 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_atomic.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_atomic.rsh File Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    int32_t rsAtomicInc (volatile int32_t *addr)
    uint32_t rsAtomicInc (volatile uint32_t *addr)
    int32_t rsAtomicDec (volatile int32_t *addr)
    uint32_t rsAtomicDec (volatile uint32_t *addr)
    int32_t rsAtomicAdd (volatile int32_t *addr, int32_t value)
    uint32_t rsAtomicAdd (volatile uint32_t *addr, uint32_t value)
    int32_t rsAtomicSub (volatile int32_t *addr, int32_t value)
    uint32_t rsAtomicSub (volatile uint32_t *addr, uint32_t value)
    int32_t rsAtomicAnd (volatile int32_t *addr, int32_t value)
    uint32_t rsAtomicAnd (volatile uint32_t *addr, uint32_t value)
    int32_t rsAtomicOr (volatile int32_t *addr, int32_t value)
    uint32_t rsAtomicOr (volatile uint32_t *addr, uint32_t value)
    uint32_t rsAtomicXor (volatile uint32_t *addr, uint32_t value)
    int32_t rsAtomicXor (volatile int32_t *addr, int32_t value)
    uint32_t rsAtomicMin (volatile uint32_t *addr, uint32_t value)
    int32_t rsAtomicMin (volatile int32_t *addr, int32_t value)
    uint32_t rsAtomicMax (volatile uint32_t *addr, uint32_t value)
    int32_t rsAtomicMax (volatile int32_t *addr, int32_t value)
    int32_t rsAtomicCas (volatile int32_t *addr, int32_t compareValue, int32_t newValue)
    uint32_t rsAtomicCas (volatile uint32_t *addr, uint32_t compareValue, uint32_t newValue)
    -

    Detailed Description

    -

    Atomic routines.

    - -

    Definition in file rs_atomic.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int32_t rsAtomicAdd (volatile int32_taddr,
    int32_t value 
    )
    -
    -
    -

    Atomic add a value to the value at addr. addr[0] += value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to add to the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsAtomicAdd (volatile uint32_taddr,
    uint32_t value 
    )
    -
    -
    -

    Atomic add a value to the value at addr. addr[0] += value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to add to the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int32_t rsAtomicAnd (volatile int32_taddr,
    int32_t value 
    )
    -
    -
    -

    Atomic Bitwise and a value from the value at addr. addr[0] &= value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to and with the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsAtomicAnd (volatile uint32_taddr,
    uint32_t value 
    )
    -
    -
    -

    Atomic Bitwise and a value from the value at addr. addr[0] &= value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to and with the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    int32_t rsAtomicCas (volatile int32_taddr,
    int32_t compareValue,
    int32_t newValue 
    )
    -
    -
    -

    Compare-and-set operation with a full memory barrier.

    -

    If the value at addr matches compareValue then newValue is written.

    -
    Parameters:
    - - - - -
    addrThe address to compare and replace if the compare passes.
    compareValueThe value to test addr[0] against.
    newValueThe value to write if the test passes.
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    uint32_t rsAtomicCas (volatile uint32_taddr,
    uint32_t compareValue,
    uint32_t newValue 
    )
    -
    -
    -

    Compare-and-set operation with a full memory barrier.

    -

    If the value at addr matches compareValue then newValue is written.

    -
    Parameters:
    - - - - -
    addrThe address to compare and replace if the compare passes.
    compareValueThe value to test addr[0] against.
    newValueThe value to write if the test passes.
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - -
    int32_t rsAtomicDec (volatile int32_taddr)
    -
    -
    -

    Atomic subtract one from the value at addr. Equal to rsAtomicSub(addr, 1)

    -
    Parameters:
    - - -
    addrAddress of value to decrement
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsAtomicDec (volatile uint32_taddr)
    -
    -
    -

    Atomic subtract one from the value at addr. Equal to rsAtomicSub(addr, 1)

    -
    Parameters:
    - - -
    addrAddress of value to decrement
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - -
    int32_t rsAtomicInc (volatile int32_taddr)
    -
    -
    -

    Atomic add one to the value at addr. Equal to rsAtomicAdd(addr, 1)

    -
    Parameters:
    - - -
    addrAddress of value to increment
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsAtomicInc (volatile uint32_taddr)
    -
    -
    -

    Atomic add one to the value at addr. Equal to rsAtomicAdd(addr, 1)

    -
    Parameters:
    - - -
    addrAddress of value to increment
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsAtomicMax (volatile uint32_taddr,
    uint32_t value 
    )
    -
    -
    -

    Atomic Set the value at addr to the max of addr and value addr[0] = rsMax(addr[0], value)

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valuecomparison value
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int32_t rsAtomicMax (volatile int32_taddr,
    int32_t value 
    )
    -
    -
    -

    Atomic Set the value at addr to the max of addr and value addr[0] = rsMin(addr[0], value)

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valuecomparison value
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsAtomicMin (volatile uint32_taddr,
    uint32_t value 
    )
    -
    -
    -

    Atomic Set the value at addr to the min of addr and value addr[0] = rsMin(addr[0], value)

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valuecomparison value
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int32_t rsAtomicMin (volatile int32_taddr,
    int32_t value 
    )
    -
    -
    -

    Atomic Set the value at addr to the min of addr and value addr[0] = rsMin(addr[0], value)

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valuecomparison value
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int32_t rsAtomicOr (volatile int32_taddr,
    int32_t value 
    )
    -
    -
    -

    Atomic Bitwise or a value from the value at addr. addr[0] |= value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to or with the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsAtomicOr (volatile uint32_taddr,
    uint32_t value 
    )
    -
    -
    -

    Atomic Bitwise or a value from the value at addr. addr[0] |= value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to or with the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int32_t rsAtomicSub (volatile int32_taddr,
    int32_t value 
    )
    -
    -
    -

    Atomic Subtract a value from the value at addr. addr[0] -= value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to subtract from the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsAtomicSub (volatile uint32_taddr,
    uint32_t value 
    )
    -
    -
    -

    Atomic Subtract a value from the value at addr. addr[0] -= value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to subtract from the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsAtomicXor (volatile uint32_taddr,
    uint32_t value 
    )
    -
    -
    -

    Atomic Bitwise xor a value from the value at addr. addr[0] ^= value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to xor with the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int32_t rsAtomicXor (volatile int32_taddr,
    int32_t value 
    )
    -
    -
    -

    Atomic Bitwise xor a value from the value at addr. addr[0] ^= value

    -
    Parameters:
    - - - -
    addrAddress of value to modify
    valueAmount to xor with the value at addr
    -
    -
    -
    Returns:
    old value
    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__atomic_8rsh_source.html b/docs/html/reference/renderscript/rs__atomic_8rsh_source.html deleted file mode 100644 index 2136df4..0000000 --- a/docs/html/reference/renderscript/rs__atomic_8rsh_source.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_atomic.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_atomic.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_ATOMIC_RSH__
    -00024 #define __RS_ATOMIC_RSH__
    -00025 
    -00026 #if (defined(RS_VERSION) && (RS_VERSION >= 14))
    -00027 
    -00036 extern int32_t __attribute__((overloadable))
    -00037     rsAtomicInc(volatile int32_t* addr);
    -00046 extern uint32_t __attribute__((overloadable))
    -00047     rsAtomicInc(volatile uint32_t* addr);
    -00048 
    -00056 extern int32_t __attribute__((overloadable))
    -00057     rsAtomicDec(volatile int32_t* addr);
    -00065 extern uint32_t __attribute__((overloadable))
    -00066     rsAtomicDec(volatile uint32_t* addr);
    -00067 
    -00076 extern int32_t __attribute__((overloadable))
    -00077     rsAtomicAdd(volatile int32_t* addr, int32_t value);
    -00086 extern uint32_t __attribute__((overloadable))
    -00087     rsAtomicAdd(volatile uint32_t* addr, uint32_t value);
    -00088 
    -00097 extern int32_t __attribute__((overloadable))
    -00098     rsAtomicSub(volatile int32_t* addr, int32_t value);
    -00107 extern uint32_t __attribute__((overloadable))
    -00108     rsAtomicSub(volatile uint32_t* addr, uint32_t value);
    -00109 
    -00118 extern int32_t __attribute__((overloadable))
    -00119     rsAtomicAnd(volatile int32_t* addr, int32_t value);
    -00128 extern uint32_t __attribute__((overloadable))
    -00129     rsAtomicAnd(volatile uint32_t* addr, uint32_t value);
    -00130 
    -00139 extern int32_t __attribute__((overloadable))
    -00140     rsAtomicOr(volatile int32_t* addr, int32_t value);
    -00149 extern uint32_t __attribute__((overloadable))
    -00150     rsAtomicOr(volatile uint32_t* addr, uint32_t value);
    -00151 
    -00160 extern uint32_t __attribute__((overloadable))
    -00161     rsAtomicXor(volatile uint32_t* addr, uint32_t value);
    -00170 extern int32_t __attribute__((overloadable))
    -00171     rsAtomicXor(volatile int32_t* addr, int32_t value);
    -00172 
    -00182 extern uint32_t __attribute__((overloadable))
    -00183     rsAtomicMin(volatile uint32_t* addr, uint32_t value);
    -00193 extern int32_t __attribute__((overloadable))
    -00194     rsAtomicMin(volatile int32_t* addr, int32_t value);
    -00195 
    -00205 extern uint32_t __attribute__((overloadable))
    -00206     rsAtomicMax(volatile uint32_t* addr, uint32_t value);
    -00216 extern int32_t __attribute__((overloadable))
    -00217     rsAtomicMax(volatile int32_t* addr, int32_t value);
    -00218 
    -00230 extern int32_t __attribute__((overloadable))
    -00231     rsAtomicCas(volatile int32_t* addr, int32_t compareValue, int32_t newValue);
    -00232 
    -00244 extern uint32_t __attribute__((overloadable))
    -00245     rsAtomicCas(volatile uint32_t* addr, uint32_t compareValue, uint32_t newValue);
    -00246 
    -00247 #endif //defined(RS_VERSION) && (RS_VERSION >= 14)
    -00248 
    -00249 #endif
    -00250 
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__cl_8rsh.html b/docs/html/reference/renderscript/rs__cl_8rsh.html deleted file mode 100644 index 2a781b6..0000000 --- a/docs/html/reference/renderscript/rs__cl_8rsh.html +++ /dev/null @@ -1,2384 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh File Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    char2 convert_char2 (uchar2 v)
    uchar2 convert_uchar2 (uchar2 v)
    short2 convert_short2 (uchar2 v)
    ushort2 convert_ushort2 (uchar2 v)
    int2 convert_int2 (uchar2 v)
    uint2 convert_uint2 (uchar2 v)
    float2 convert_float2 (uchar2 v)
    float acos (float)
    float acosh (float)
    float acospi (float v)
    float asin (float)
    float asinh (float)
    float asinpi (float v)
    float atan (float)
    float atan2 (float y, float x)
    float atanh (float)
    float atanpi (float v)
    float atan2pi (float y, float x)
    float cbrt (float)
    float ceil (float)
    float copysign (float x, float y)
    float cos (float)
    float cosh (float)
    float cospi (float v)
    float erfc (float)
    float erf (float)
    float exp (float)
    float exp2 (float)
    float pow (float x, float y)
    float exp10 (float v)
    float expm1 (float)
    float fabs (float)
    float fdim (float, float)
    float floor (float)
    float fma (float a, float b, float c)
    float fmax (float x, float y)
    float fmin (float x, float y)
    float fmod (float x, float y)
    float fract (float v, float *iptr)
    static float fract (float v)
    float frexp (float v, int *iptr)
    float hypot (float x, float y)
    int ilogb (float)
    float ldexp (float x, int y)
    float lgamma (float)
    float lgamma (float x, int *y)
    float log (float)
    float log10 (float)
    float log2 (float v)
    float log1p (float v)
    float logb (float)
    float mad (float a, float b, float c)
    float modf (float x, float *iret)
    float nextafter (float x, float y)
    float pown (float v, int p)
    float powr (float v, float p)
    float remainder (float x, float y)
    float rint (float)
    float rootn (float v, int n)
    float round (float)
    float sqrt (float)
    float rsqrt (float v)
    float sin (float v)
    float sincos (float v, float *cosptr)
    float sinh (float)
    float sinpi (float v)
    float tan (float v)
    float tanh (float)
    float tanpi (float v)
    float tgamma (float)
    float trunc (float)
    uchar abs (char v)
    uchar clz (uchar v)
    uchar min (uchar v1, uchar v2)
    uchar max (uchar v1, uchar v2)
    float clamp (float amount, float low, float high)
    float degrees (float radians)
    float mix (float start, float stop, float amount)
    float radians (float degrees)
    float step (float edge, float v)
    float sign (float v)
    float3 cross (float3 lhs, float3 rhs)
    float dot (float lhs, float rhs)
    float length (float v)
    float distance (float lhs, float rhs)
    float normalize (float v)
    float half_recip (float)
    float half_sqrt (float)
    float half_rsqrt (float v)
    float fast_length (float v)
    float fast_distance (float lhs, float rhs)
    float fast_normalize (float v)
    float native_exp2 (float v)
    float native_exp (float v)
    float native_exp10 (float v)
    -

    Detailed Description

    -

    Basic math functions.

    - -

    Definition in file rs_cl.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - -
    uchar abs (char v)
    -
    -
    -

    Return the absolute value of a value.

    -

    Supports 1,2,3,4 components of char, short, int.

    - -
    -
    - -
    -
    - - - - - - - - -
    float acos (float )
    -
    -
    -

    Return the inverse cosine.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - -
    float acosh (float )
    -
    -
    -

    Return the inverse hyperbolic cosine.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - -
    float acospi (float v)
    -
    -
    -

    Return the inverse cosine divided by PI.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - -
    float asin (float )
    -
    -
    -

    Return the inverse sine.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - -
    float asinh (float )
    -
    -
    -

    Return the inverse hyperbolic sine.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - -
    float asinpi (float v)
    -
    -
    -

    Return the inverse sine divided by PI.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - -
    float atan (float )
    -
    -
    -

    Return the inverse tangent.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float atan2 (float y,
    float x 
    )
    -
    -
    -

    Return the inverse tangent of y / x.

    -

    Supports float, float2, float3, float4. Both arguments must be of the same type.

    -
    Parameters:
    - - - -
    y
    x
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float atan2pi (float y,
    float x 
    )
    -
    -
    -

    Return the inverse tangent of y / x, divided by PI.

    -

    Supports float, float2, float3, float4. Both arguments must be of the same type.

    -
    Parameters:
    - - - -
    y
    x
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    float atanh (float )
    -
    -
    -

    Return the inverse hyperbolic tangent.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - -
    float atanpi (float v)
    -
    -
    -

    Return the inverse tangent divided by PI.

    -

    Supports float, float2, float3, float4

    - -
    -
    - -
    -
    - - - - - - - - -
    float cbrt (float )
    -
    -
    -

    Return the cube root.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float ceil (float )
    -
    -
    -

    Return the smallest integer not less than a value.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    float clamp (float amount,
    float low,
    float high 
    )
    -
    -
    -

    Clamp a value to a specified high and low bound.

    -
    Parameters:
    - - - - -
    amountvalue to be clamped. Supports 1,2,3,4 components
    lowLower bound, must be scalar or matching vector.
    highHigh bound, must match type of low
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    uchar clz (uchar v)
    -
    -
    -

    Return the number of leading 0-bits in a value.

    -

    Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int.

    - -
    -
    - -
    -
    - - - - - - - - -
    char2 convert_char2 (uchar2 v)
    -
    -
    -

    Convert to char.

    -

    Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - -
    float2 convert_float2 (uchar2 v)
    -
    -
    -

    Convert to float.

    -

    Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - -
    int2 convert_int2 (uchar2 v)
    -
    -
    -

    Convert to int.

    -

    Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - -
    short2 convert_short2 (uchar2 v)
    -
    -
    -

    Convert to short.

    -

    Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - -
    uchar2 convert_uchar2 (uchar2 v)
    -
    -
    -

    Convert to unsigned char.

    -

    Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - -
    uint2 convert_uint2 (uchar2 v)
    -
    -
    -

    Convert to unsigned int.

    -

    Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - -
    ushort2 convert_ushort2 (uchar2 v)
    -
    -
    -

    Convert to unsigned short.

    -

    Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float copysign (float x,
    float y 
    )
    -
    -
    -

    Copy the sign bit from y to x.

    -

    Supports float, float2, float3, float4. Both arguments must be of the same type.

    -
    Parameters:
    - - - -
    x
    y
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    float cos (float )
    -
    -
    -

    Return the cosine.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float cosh (float )
    -
    -
    -

    Return the hypebolic cosine.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float cospi (float v)
    -
    -
    -

    Return the cosine of the value * PI.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float4 cross (float3 lhs,
    float3 rhs 
    )
    -
    -
    -

    Compute the cross product of two vectors.

    -

    Supports 3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float degrees (float radians)
    -
    -
    -

    Convert from radians to degrees.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float distance (float lhs,
    float rhs 
    )
    -
    -
    -

    Compute the distance between two points.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float dot (float lhs,
    float rhs 
    )
    -
    -
    -

    Compute the dot product of two vectors.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float erf (float )
    -
    -
    -

    Return the error function.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float erfc (float )
    -
    -
    -

    Return the complementary error function.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float exp (float )
    -
    -
    -

    Return e ^ value.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float exp10 (float v)
    -
    -
    -

    Return 10 ^ value.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float exp2 (float )
    -
    -
    -

    Return 2 ^ value.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float expm1 (float )
    -
    -
    -

    Return (e ^ value) - 1.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    float fabs (float )
    -
    -
    -

    Return the absolute value of a value.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float fast_distance (float lhs,
    float rhs 
    )
    -
    -
    -

    Compute the approximate distance between two points.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float fast_length (float v)
    -
    -
    -

    Compute the approximate length of a vector.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float fast_normalize (float v)
    -
    -
    -

    Approximately normalize a vector.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float fdim (float ,
    float  
    )
    -
    -
    -

    Return the positive difference between two values.

    -

    Supports float, float2, float3, float4. Both arguments must be of the same type.

    - -
    -
    - -
    -
    - - - - - - - - -
    float floor (float )
    -
    -
    -

    Return the smallest integer not greater than a value.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    float fma (float a,
    float b,
    float c 
    )
    -
    -
    -

    Return a*b + c.

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float fmax (float x,
    float y 
    )
    -
    -
    -

    Return (x < y ? y : x)

    -

    Supports float, float2, float3, float4.

    -
    Parameters:
    - - - -
    x,:may be float, float2, float3, float4
    y,:may be float or vector. If vector must match type of x.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float fmin (float x,
    float y 
    )
    -
    -
    -

    Return (x > y ? y : x)

    -
    Parameters:
    - - - -
    x,:may be float, float2, float3, float4
    y,:may be float or vector. If vector must match type of x.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float fmod (float x,
    float y 
    )
    -
    -
    -

    Return the remainder from x / y

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float fract (float v,
    float * iptr 
    )
    -
    -
    -

    Return fractional part of v

    -
    Parameters:
    - - -
    iptriptr[0] will be set to the floor of the input value. Supports float, float2, float3, float4.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    static float4 fract (float v) [inline, static]
    -
    -
    -

    Return fractional part of v

    -

    Supports float, float2, float3, float4.

    - -

    Definition at line 485 of file rs_cl.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float frexp (float v,
    int * iptr 
    )
    -
    -
    -

    Return the mantissa and place the exponent into iptr[0]

    -
    Parameters:
    - - - -
    vSupports float, float2, float3, float4.
    iptrMust have the same vector size as v.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    float half_recip (float )
    -
    -
    -

    Return the approximate reciprocal of a value.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float half_rsqrt (float v)
    -
    -
    -

    Return the approximate value of (1 / sqrt(value)).

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float half_sqrt (float )
    -
    -
    -

    Return the approximate square root of a value.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float hypot (float x,
    float y 
    )
    -
    -
    -

    Return sqrt(x*x + y*y)

    -

    Supports float, float2, float3, float4.

    - -
    -
    - -
    -
    - - - - - - - - -
    int ilogb (float )
    -
    -
    -

    Return the integer exponent of a value

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float ldexp (float x,
    int y 
    )
    -
    -
    -

    Return (x * 2^y)

    -
    Parameters:
    - - - -
    xSupports 1,2,3,4 components
    ySupports single component or matching vector.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    float length (float v)
    -
    -
    -

    Compute the length of a vector.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float lgamma (float )
    -
    -
    -

    Return the log gamma

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float lgamma (float x,
    int * y 
    )
    -
    -
    -

    Return the log gamma and sign

    -
    Parameters:
    - - - -
    xSupports 1,2,3,4 components
    ySupports matching vector.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    float log (float )
    -
    -
    -

    Return the natural logarithm

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float log10 (float )
    -
    -
    -

    Return the base 10 logarithm

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float log1p (float v)
    -
    -
    -

    Return the natural logarithm of (v + 1.0f)

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float log2 (float v)
    -
    -
    -

    Return the base 2 logarithm

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float logb (float )
    -
    -
    -

    Compute the exponent of the value.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    float mad (float a,
    float b,
    float c 
    )
    -
    -
    -

    Compute (a * b) + c

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uchar max (uchar v1,
    uchar v2 
    )
    -
    -
    -

    Return the maximum of two values.

    -

    Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uchar min (uchar v1,
    uchar v2 
    )
    -
    -
    -

    Return the minimum of two values.

    -

    Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    float mix (float start,
    float stop,
    float amount 
    )
    -
    -
    -

    return start + ((stop - start) * amount);

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float modf (float x,
    float * iret 
    )
    -
    -
    -

    Return the integral and fractional components of a number. Supports 1,2,3,4 components

    -
    Parameters:
    - - - -
    xSource value
    iretiret[0] will be set to the integral portion of the number.
    -
    -
    -
    Returns:
    The floating point portion of the value.
    - -
    -
    - -
    -
    - - - - - - - - -
    float native_exp (float v)
    -
    -
    -

    Fast approximate exp valid for inputs -86.f to 86.f Max 8192 ulps of error

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float native_exp10 (float v)
    -
    -
    -

    Fast approximate exp10 valid for inputs -37.f to 37.f Max 8192 ulps of error

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float native_exp2 (float v)
    -
    -
    -

    Fast approximate exp2 valid for inputs -125.f to 125.f Max 8192 ulps of error

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float nextafter (float x,
    float y 
    )
    -
    -
    -

    Return the next floating point number from x towards y.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float normalize (float v)
    -
    -
    -

    Normalize a vector.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float pow (float x,
    float y 
    )
    -
    -
    -

    Return x ^ y.

    -

    Supports float, float2, float3, float4. Both arguments must be of the same type.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float pown (float v,
    int p 
    )
    -
    -
    -

    Return (v ^ p).

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float powr (float v,
    float p 
    )
    -
    -
    -

    Return (v ^ p).

    -
    Parameters:
    - - -
    vmust be greater than 0.
    -
    -
    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float radians (float degrees)
    -
    -
    -

    Convert from degrees to radians.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float remainder (float x,
    float y 
    )
    -
    -
    -

    Return round x/y to the nearest integer then compute the remander.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float rint (float )
    -
    -
    -

    Round to the nearest integral value.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float rootn (float v,
    int n 
    )
    -
    -
    -

    Compute the Nth root of a value.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float round (float )
    -
    -
    -

    Round to the nearest integral value. Half values are rounded away from zero.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float rsqrt (float v)
    -
    -
    -

    Return (1 / sqrt(value)).

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float sign (float v)
    -
    -
    -

    Return the sign of a value.

    -

    if (v < 0) return -1.f; else if (v > 0) return 1.f; else return 0.f;

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float sin (float v)
    -
    -
    -

    Return the sine of a value specified in radians.

    -
    Parameters:
    - - -
    vThe incoming value in radians Supports 1,2,3,4 components
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float sincos (float v,
    float * cosptr 
    )
    -
    -
    -

    Return the sine and cosine of a value.

    -
    Returns:
    sine
    -
    Parameters:
    - - - -
    vThe incoming value in radians
    *cosptrcosptr[0] will be set to the cosine value.
    -
    -
    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float sinh (float )
    -
    -
    -

    Return the hyperbolic sine of a value specified in radians.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float sinpi (float v)
    -
    -
    -

    Return the sin(v * PI).

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float sqrt (float )
    -
    -
    -

    Return the square root of a value.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float step (float edge,
    float v 
    )
    -
    -
    -

    if (v < edge) return 0.f; else return 1.f;

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float tan (float v)
    -
    -
    -

    Return the tangent of a value.

    -

    Supports 1,2,3,4 components

    -
    Parameters:
    - - -
    vThe incoming value in radians
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    float tanh (float )
    -
    -
    -

    Return the hyperbolic tangent of a value.

    -

    Supports 1,2,3,4 components

    -
    Parameters:
    - - -
    vThe incoming value in radians
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    float tanpi (float v)
    -
    -
    -

    Return tan(v * PI)

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float tgamma (float )
    -
    -
    -

    Compute the gamma function of a value.

    -

    Supports 1,2,3,4 components

    - -
    -
    - -
    -
    - - - - - - - - -
    float trunc (float )
    -
    -
    -

    Round to integral using truncation.

    -

    Supports 1,2,3,4 components

    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__cl_8rsh_source.html b/docs/html/reference/renderscript/rs__cl_8rsh_source.html deleted file mode 100644 index ae5f70e..0000000 --- a/docs/html/reference/renderscript/rs__cl_8rsh_source.html +++ /dev/null @@ -1,602 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011-2012 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_CL_RSH__
    -00024 #define __RS_CL_RSH__
    -00025 
    -00026 // Conversions
    -00027 #define CVT_FUNC_2(typeout, typein)                             \
    -00028 _RS_RUNTIME typeout##2 __attribute__((overloadable))            \
    -00029         convert_##typeout##2(typein##2 v);                      \
    -00030 _RS_RUNTIME typeout##3 __attribute__((overloadable))            \
    -00031         convert_##typeout##3(typein##3 v);                      \
    -00032 _RS_RUNTIME typeout##4 __attribute__((overloadable))            \
    -00033         convert_##typeout##4(typein##4 v);
    -00034 
    -00035 
    -00036 #define CVT_FUNC(type)  CVT_FUNC_2(type, uchar)     \
    -00037                         CVT_FUNC_2(type, char)      \
    -00038                         CVT_FUNC_2(type, ushort)    \
    -00039                         CVT_FUNC_2(type, short)     \
    -00040                         CVT_FUNC_2(type, uint)      \
    -00041                         CVT_FUNC_2(type, int)       \
    -00042                         CVT_FUNC_2(type, float)
    -00043 
    -00049 CVT_FUNC(char)
    -00050 
    -00051 
    -00056 CVT_FUNC(uchar)
    -00057 
    -00063 CVT_FUNC(short)
    -00064 
    -00070 CVT_FUNC(ushort)
    -00071 
    -00077 CVT_FUNC(int)
    -00078 
    -00084 CVT_FUNC(uint)
    -00085 
    -00091 CVT_FUNC(float)
    -00092 
    -00093 // Float ops, 6.11.2
    -00094 
    -00095 #ifdef DOXYGEN
    -00096 
    -00097 #define FN_FUNC_FN(fnc)
    -00098 #define F_FUNC_FN(fnc)
    -00099 #define IN_FUNC_FN(fnc)
    -00100 #define FN_FUNC_FN_FN(fnc)
    -00101 #define F_FUNC_FN_FN(fnc)
    -00102 #define FN_FUNC_FN_F(fnc)
    -00103 #define FN_FUNC_FN_IN(fnc)
    -00104 #define FN_FUNC_FN_I(fnc)
    -00105 #define FN_FUNC_FN_PFN(fnc)
    -00106 #define FN_FUNC_FN_PIN(fnc)
    -00107 #define FN_FUNC_FN_FN_FN(fnc)
    -00108 #define FN_FUNC_FN_FN_F(fnc)
    -00109 #define FN_FUNC_FN_F_F(fnc)
    -00110 #define FN_FUNC_FN_FN_PIN(fnc)
    -00111 
    -00112 #else
    -00113 
    -00114 #define FN_FUNC_FN(fnc)                                         \
    -00115 _RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v); \
    -00116 _RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v); \
    -00117 _RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v);
    -00118 
    -00119 #define F_FUNC_FN(fnc)                                          \
    -00120 _RS_RUNTIME float __attribute__((overloadable)) fnc(float2 v);  \
    -00121 _RS_RUNTIME float __attribute__((overloadable)) fnc(float3 v);  \
    -00122 _RS_RUNTIME float __attribute__((overloadable)) fnc(float4 v);
    -00123 
    -00124 #define IN_FUNC_FN(fnc)                                         \
    -00125 _RS_RUNTIME int2 __attribute__((overloadable)) fnc(float2 v);   \
    -00126 _RS_RUNTIME int3 __attribute__((overloadable)) fnc(float3 v);   \
    -00127 _RS_RUNTIME int4 __attribute__((overloadable)) fnc(float4 v);
    -00128 
    -00129 #define FN_FUNC_FN_FN(fnc)                                                  \
    -00130 _RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, float2 v2); \
    -00131 _RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, float3 v2); \
    -00132 _RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, float4 v2);
    -00133 
    -00134 #define F_FUNC_FN_FN(fnc)                                                   \
    -00135 _RS_RUNTIME float __attribute__((overloadable)) fnc(float2 v1, float2 v2);  \
    -00136 _RS_RUNTIME float __attribute__((overloadable)) fnc(float3 v1, float3 v2);  \
    -00137 _RS_RUNTIME float __attribute__((overloadable)) fnc(float4 v1, float4 v2);
    -00138 
    -00139 #define FN_FUNC_FN_F(fnc)                                                   \
    -00140 _RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, float v2);  \
    -00141 _RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, float v2);  \
    -00142 _RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, float v2);
    -00143 
    -00144 #define FN_FUNC_FN_IN(fnc)                                                  \
    -00145 _RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int2 v2);   \
    -00146 _RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int3 v2);   \
    -00147 _RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int4 v2);   \
    -00148 
    -00149 #define FN_FUNC_FN_I(fnc)                                                   \
    -00150 _RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int v2);    \
    -00151 _RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int v2);    \
    -00152 _RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int v2);
    -00153 
    -00154 #define FN_FUNC_FN_PFN(fnc)                         \
    -00155 _RS_RUNTIME float2 __attribute__((overloadable))    \
    -00156         fnc(float2 v1, float2 *v2);                 \
    -00157 _RS_RUNTIME float3 __attribute__((overloadable))    \
    -00158         fnc(float3 v1, float3 *v2);                 \
    -00159 _RS_RUNTIME float4 __attribute__((overloadable))    \
    -00160         fnc(float4 v1, float4 *v2);
    -00161 
    -00162 #define FN_FUNC_FN_PIN(fnc)                                                 \
    -00163 _RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int2 *v2);  \
    -00164 _RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int3 *v2);  \
    -00165 _RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int4 *v2);
    -00166 
    -00167 #define FN_FUNC_FN_FN_FN(fnc)                       \
    -00168 _RS_RUNTIME float2 __attribute__((overloadable))    \
    -00169         fnc(float2 v1, float2 v2, float2 v3);       \
    -00170 _RS_RUNTIME float3 __attribute__((overloadable))    \
    -00171         fnc(float3 v1, float3 v2, float3 v3);       \
    -00172 _RS_RUNTIME float4 __attribute__((overloadable))    \
    -00173         fnc(float4 v1, float4 v2, float4 v3);
    -00174 
    -00175 #define FN_FUNC_FN_FN_F(fnc)                        \
    -00176 _RS_RUNTIME float2 __attribute__((overloadable))    \
    -00177         fnc(float2 v1, float2 v2, float v3);        \
    -00178 _RS_RUNTIME float3 __attribute__((overloadable))    \
    -00179         fnc(float3 v1, float3 v2, float v3);        \
    -00180 _RS_RUNTIME float4 __attribute__((overloadable))    \
    -00181         fnc(float4 v1, float4 v2, float v3);
    -00182 
    -00183 #define FN_FUNC_FN_F_F(fnc)                         \
    -00184 _RS_RUNTIME float2 __attribute__((overloadable))    \
    -00185         fnc(float2 v1, float v2, float v3);         \
    -00186 _RS_RUNTIME float3 __attribute__((overloadable))    \
    -00187         fnc(float3 v1, float v2, float v3);         \
    -00188 _RS_RUNTIME float4 __attribute__((overloadable))    \
    -00189         fnc(float4 v1, float v2, float v3);
    -00190 
    -00191 #define FN_FUNC_FN_FN_PIN(fnc)                      \
    -00192 _RS_RUNTIME float2 __attribute__((overloadable))    \
    -00193         fnc(float2 v1, float2 v2, int2 *v3);        \
    -00194 _RS_RUNTIME float3 __attribute__((overloadable))    \
    -00195         fnc(float3 v1, float3 v2, int3 *v3);        \
    -00196 _RS_RUNTIME float4 __attribute__((overloadable))    \
    -00197         fnc(float4 v1, float4 v2, int4 *v3);
    -00198 
    -00199 #endif  // DOXYGEN
    -00200 
    -00201 
    -00207 extern float __attribute__((overloadable)) acos(float);
    -00208 FN_FUNC_FN(acos)
    -00209 
    -00215 extern float __attribute__((overloadable)) acosh(float);
    -00216 FN_FUNC_FN(acosh)
    -00217 
    -00223 _RS_RUNTIME float __attribute__((overloadable)) acospi(float v);
    -00224 FN_FUNC_FN(acospi)
    -00225 
    -00231 extern float __attribute__((overloadable)) asin(float);
    -00232 FN_FUNC_FN(asin)
    -00233 
    -00239 extern float __attribute__((overloadable)) asinh(float);
    -00240 FN_FUNC_FN(asinh)
    -00241 
    -00242 
    -00248 _RS_RUNTIME float __attribute__((overloadable)) asinpi(float v);
    -00249 FN_FUNC_FN(asinpi)
    -00250 
    -00256 extern float __attribute__((overloadable)) atan(float);
    -00257 FN_FUNC_FN(atan)
    -00258 
    -00268 extern float __attribute__((overloadable)) atan2(float y, float x);
    -00269 FN_FUNC_FN_FN(atan2)
    -00270 
    -00276 extern float __attribute__((overloadable)) atanh(float);
    -00277 FN_FUNC_FN(atanh)
    -00278 
    -00284 _RS_RUNTIME float __attribute__((overloadable)) atanpi(float v);
    -00285 FN_FUNC_FN(atanpi)
    -00286 
    -00296 _RS_RUNTIME float __attribute__((overloadable)) atan2pi(float y, float x);
    -00297 FN_FUNC_FN_FN(atan2pi)
    -00298 
    -00299 
    -00305 extern float __attribute__((overloadable)) cbrt(float);
    -00306 FN_FUNC_FN(cbrt)
    -00307 
    -00313 extern float __attribute__((overloadable)) ceil(float);
    -00314 FN_FUNC_FN(ceil)
    -00315 
    -00325 extern float __attribute__((overloadable)) copysign(float x, float y);
    -00326 FN_FUNC_FN_FN(copysign)
    -00327 
    -00333 extern float __attribute__((overloadable)) cos(float);
    -00334 FN_FUNC_FN(cos)
    -00335 
    -00341 extern float __attribute__((overloadable)) cosh(float);
    -00342 FN_FUNC_FN(cosh)
    -00343 
    -00349 _RS_RUNTIME float __attribute__((overloadable)) cospi(float v);
    -00350 FN_FUNC_FN(cospi)
    -00351 
    -00357 extern float __attribute__((overloadable)) erfc(float);
    -00358 FN_FUNC_FN(erfc)
    -00359 
    -00365 extern float __attribute__((overloadable)) erf(float);
    -00366 FN_FUNC_FN(erf)
    -00367 
    -00373 extern float __attribute__((overloadable)) exp(float);
    -00374 FN_FUNC_FN(exp)
    -00375 
    -00381 extern float __attribute__((overloadable)) exp2(float);
    -00382 FN_FUNC_FN(exp2)
    -00383 
    -00390 extern float __attribute__((overloadable)) pow(float x, float y);
    -00391 FN_FUNC_FN_FN(pow)
    -00392 
    -00398 _RS_RUNTIME float __attribute__((overloadable)) exp10(float v);
    -00399 FN_FUNC_FN(exp10)
    -00400 
    -00406 extern float __attribute__((overloadable)) expm1(float);
    -00407 FN_FUNC_FN(expm1)
    -00408 
    -00414 extern float __attribute__((overloadable)) fabs(float);
    -00415 FN_FUNC_FN(fabs)
    -00416 
    -00423 extern float __attribute__((overloadable)) fdim(float, float);
    -00424 FN_FUNC_FN_FN(fdim)
    -00425 
    -00431 extern float __attribute__((overloadable)) floor(float);
    -00432 FN_FUNC_FN(floor)
    -00433 
    -00439 extern float __attribute__((overloadable)) fma(float a, float b, float c);
    -00440 FN_FUNC_FN_FN_FN(fma)
    -00441 
    -00449 extern float __attribute__((overloadable)) fmax(float x, float y);
    -00450 FN_FUNC_FN_FN(fmax);
    -00451 FN_FUNC_FN_F(fmax);
    -00452 
    -00459 extern float __attribute__((overloadable)) fmin(float x, float y);
    -00460 FN_FUNC_FN_FN(fmin);
    -00461 FN_FUNC_FN_F(fmin);
    -00462 
    -00468 extern float __attribute__((overloadable)) fmod(float x, float y);
    -00469 FN_FUNC_FN_FN(fmod)
    -00470 
    -00477 _RS_RUNTIME float __attribute__((overloadable)) fract(float v, float *iptr);
    -00478 FN_FUNC_FN_PFN(fract)
    -00479 
    -00485 static inline float __attribute__((overloadable)) fract(float v) {
    -00486     float unused;
    -00487     return fract(v, &unused);
    -00488 }
    -00489 
    -00490 static inline float2 __attribute__((overloadable)) fract(float2 v) {
    -00491     float2 unused;
    -00492     return fract(v, &unused);
    -00493 }
    -00494 
    -00495 static inline float3 __attribute__((overloadable)) fract(float3 v) {
    -00496     float3 unused;
    -00497     return fract(v, &unused);
    -00498 }
    -00499 
    -00500 static inline float4 __attribute__((overloadable)) fract(float4 v) {
    -00501     float4 unused;
    -00502     return fract(v, &unused);
    -00503 }
    -00504 
    -00511 extern float __attribute__((overloadable)) frexp(float v, int *iptr);
    -00512 FN_FUNC_FN_PIN(frexp)
    -00513 
    -00519 extern float __attribute__((overloadable)) hypot(float x, float y);
    -00520 FN_FUNC_FN_FN(hypot)
    -00521 
    -00527 extern int __attribute__((overloadable)) ilogb(float);
    -00528 IN_FUNC_FN(ilogb)
    -00529 
    -00536 extern float __attribute__((overloadable)) ldexp(float x, int y);
    -00537 FN_FUNC_FN_IN(ldexp)
    -00538 FN_FUNC_FN_I(ldexp)
    -00539 
    -00545 extern float __attribute__((overloadable)) lgamma(float);
    -00546 FN_FUNC_FN(lgamma)
    -00547 
    -00554 extern float __attribute__((overloadable)) lgamma(float x, int* y);
    -00555 FN_FUNC_FN_PIN(lgamma)
    -00556 
    -00562 extern float __attribute__((overloadable)) log(float);
    -00563 FN_FUNC_FN(log)
    -00564 
    -00570 extern float __attribute__((overloadable)) log10(float);
    -00571 FN_FUNC_FN(log10)
    -00572 
    -00578 _RS_RUNTIME float __attribute__((overloadable)) log2(float v);
    -00579 FN_FUNC_FN(log2)
    -00580 
    -00586 extern float __attribute__((overloadable)) log1p(float v);
    -00587 FN_FUNC_FN(log1p)
    -00588 
    -00594 extern float __attribute__((overloadable)) logb(float);
    -00595 FN_FUNC_FN(logb)
    -00596 
    -00602 extern float __attribute__((overloadable)) mad(float a, float b, float c);
    -00603 FN_FUNC_FN_FN_FN(mad)
    -00604 
    -00613 extern float __attribute__((overloadable)) modf(float x, float *iret);
    -00614 FN_FUNC_FN_PFN(modf);
    -00615 
    -00616 extern float __attribute__((overloadable)) nan(uint);
    -00617 
    -00623 extern float __attribute__((overloadable)) nextafter(float x, float y);
    -00624 FN_FUNC_FN_FN(nextafter)
    -00625 
    -00631 _RS_RUNTIME float __attribute__((overloadable)) pown(float v, int p);
    -00632 FN_FUNC_FN_IN(pown)
    -00633 
    -00640 _RS_RUNTIME float __attribute__((overloadable)) powr(float v, float p);
    -00641 FN_FUNC_FN_FN(powr)
    -00642 
    -00648 extern float __attribute__((overloadable)) remainder(float x, float y);
    -00649 FN_FUNC_FN_FN(remainder)
    -00650 
    -00651 // document once we know the precision of bionic
    -00652 extern float __attribute__((overloadable)) remquo(float, float, int *);
    -00653 FN_FUNC_FN_FN_PIN(remquo)
    -00654 
    -00660 extern float __attribute__((overloadable)) rint(float);
    -00661 FN_FUNC_FN(rint)
    -00662 
    -00668 _RS_RUNTIME float __attribute__((overloadable)) rootn(float v, int n);
    -00669 FN_FUNC_FN_IN(rootn)
    -00670 
    -00676 extern float __attribute__((overloadable)) round(float);
    -00677 FN_FUNC_FN(round)
    -00678 
    -00684 extern float __attribute__((overloadable)) sqrt(float);
    -00685 FN_FUNC_FN(sqrt)
    -00686 
    -00692 _RS_RUNTIME float __attribute__((overloadable)) rsqrt(float v);
    -00693 FN_FUNC_FN(rsqrt)
    -00694 
    -00701 extern float __attribute__((overloadable)) sin(float v);
    -00702 FN_FUNC_FN(sin)
    -00703 
    -00713 _RS_RUNTIME float __attribute__((overloadable)) sincos(float v, float *cosptr);
    -00714 FN_FUNC_FN_PFN(sincos);
    -00715 
    -00721 extern float __attribute__((overloadable)) sinh(float);
    -00722 FN_FUNC_FN(sinh)
    -00723 
    -00729 _RS_RUNTIME float __attribute__((overloadable)) sinpi(float v);
    -00730 FN_FUNC_FN(sinpi)
    -00731 
    -00738 extern float __attribute__((overloadable)) tan(float v);
    -00739 FN_FUNC_FN(tan)
    -00740 
    -00747 extern float __attribute__((overloadable)) tanh(float);
    -00748 FN_FUNC_FN(tanh)
    -00749 
    -00755 _RS_RUNTIME float __attribute__((overloadable)) tanpi(float v);
    -00756 FN_FUNC_FN(tanpi)
    -00757 
    -00763 extern float __attribute__((overloadable)) tgamma(float);
    -00764 FN_FUNC_FN(tgamma)
    -00765 
    -00771 extern float __attribute__((overloadable)) trunc(float);
    -00772 FN_FUNC_FN(trunc)
    -00773 
    -00774 #ifdef DOXYGEN
    -00775 
    -00776 #define XN_FUNC_YN(typeout, fnc, typein)                                \
    -00777 extern typeout __attribute__((overloadable)) fnc(typein v);
    -00778 
    -00779 #define XN_FUNC_XN_XN_BODY(type, fnc, body)         \
    -00780 _RS_RUNTIME type __attribute__((overloadable))      \
    -00781         fnc(type v1, type v2);
    -00782 
    -00783 #else
    -00784 
    -00785 #define XN_FUNC_YN(typeout, fnc, typein)                                \
    -00786 extern typeout __attribute__((overloadable)) fnc(typein v);             \
    -00787 _RS_RUNTIME typeout##2 __attribute__((overloadable)) fnc(typein##2 v);  \
    -00788 _RS_RUNTIME typeout##3 __attribute__((overloadable)) fnc(typein##3 v);  \
    -00789 _RS_RUNTIME typeout##4 __attribute__((overloadable)) fnc(typein##4 v);
    -00790 
    -00791 #define XN_FUNC_XN_XN_BODY(type, fnc, body)         \
    -00792 _RS_RUNTIME type __attribute__((overloadable))      \
    -00793         fnc(type v1, type v2);                      \
    -00794 _RS_RUNTIME type##2 __attribute__((overloadable))   \
    -00795         fnc(type##2 v1, type##2 v2);                \
    -00796 _RS_RUNTIME type##3 __attribute__((overloadable))   \
    -00797         fnc(type##3 v1, type##3 v2);                \
    -00798 _RS_RUNTIME type##4 __attribute__((overloadable))   \
    -00799         fnc(type##4 v1, type##4 v2);
    -00800 
    -00801 #endif  // DOXYGEN
    -00802 
    -00803 #define UIN_FUNC_IN(fnc)          \
    -00804 XN_FUNC_YN(uchar, fnc, char)      \
    -00805 XN_FUNC_YN(ushort, fnc, short)    \
    -00806 XN_FUNC_YN(uint, fnc, int)
    -00807 
    -00808 #define IN_FUNC_IN(fnc)           \
    -00809 XN_FUNC_YN(uchar, fnc, uchar)     \
    -00810 XN_FUNC_YN(char, fnc, char)       \
    -00811 XN_FUNC_YN(ushort, fnc, ushort)   \
    -00812 XN_FUNC_YN(short, fnc, short)     \
    -00813 XN_FUNC_YN(uint, fnc, uint)       \
    -00814 XN_FUNC_YN(int, fnc, int)
    -00815 
    -00816 #define IN_FUNC_IN_IN_BODY(fnc, body)   \
    -00817 XN_FUNC_XN_XN_BODY(uchar, fnc, body)    \
    -00818 XN_FUNC_XN_XN_BODY(char, fnc, body)     \
    -00819 XN_FUNC_XN_XN_BODY(ushort, fnc, body)   \
    -00820 XN_FUNC_XN_XN_BODY(short, fnc, body)    \
    -00821 XN_FUNC_XN_XN_BODY(uint, fnc, body)     \
    -00822 XN_FUNC_XN_XN_BODY(int, fnc, body)      \
    -00823 XN_FUNC_XN_XN_BODY(float, fnc, body)
    -00824 
    -00831 UIN_FUNC_IN(abs)
    -00832 
    -00833 
    -00838 IN_FUNC_IN(clz)
    -00839 
    -00845 IN_FUNC_IN_IN_BODY(min, (v1 < v2 ? v1 : v2))
    -00846 FN_FUNC_FN_F(min)
    -00847 
    -00853 IN_FUNC_IN_IN_BODY(max, (v1 > v2 ? v1 : v2))
    -00854 FN_FUNC_FN_F(max)
    -00855 
    -00863 _RS_RUNTIME float __attribute__((overloadable)) clamp(float amount, float low, float high);
    -00864 FN_FUNC_FN_FN_FN(clamp)
    -00865 FN_FUNC_FN_F_F(clamp)
    -00866 
    -00872 _RS_RUNTIME float __attribute__((overloadable)) degrees(float radians);
    -00873 FN_FUNC_FN(degrees)
    -00874 
    -00880 _RS_RUNTIME float __attribute__((overloadable)) mix(float start, float stop, float amount);
    -00881 FN_FUNC_FN_FN_FN(mix)
    -00882 FN_FUNC_FN_FN_F(mix)
    -00883 
    -00889 _RS_RUNTIME float __attribute__((overloadable)) radians(float degrees);
    -00890 FN_FUNC_FN(radians)
    -00891 
    -00900 _RS_RUNTIME float __attribute__((overloadable)) step(float edge, float v);
    -00901 FN_FUNC_FN_FN(step)
    -00902 FN_FUNC_FN_F(step)
    -00903 
    -00904 // not implemented
    -00905 extern float __attribute__((overloadable)) smoothstep(float, float, float);
    -00906 extern float2 __attribute__((overloadable)) smoothstep(float2, float2, float2);
    -00907 extern float3 __attribute__((overloadable)) smoothstep(float3, float3, float3);
    -00908 extern float4 __attribute__((overloadable)) smoothstep(float4, float4, float4);
    -00909 extern float2 __attribute__((overloadable)) smoothstep(float, float, float2);
    -00910 extern float3 __attribute__((overloadable)) smoothstep(float, float, float3);
    -00911 extern float4 __attribute__((overloadable)) smoothstep(float, float, float4);
    -00912 
    -00922 _RS_RUNTIME float __attribute__((overloadable)) sign(float v);
    -00923 FN_FUNC_FN(sign)
    -00924 
    -00930 _RS_RUNTIME float3 __attribute__((overloadable)) cross(float3 lhs, float3 rhs);
    -00931 _RS_RUNTIME float4 __attribute__((overloadable)) cross(float4 lhs, float4 rhs);
    -00932 
    -00938 _RS_RUNTIME float __attribute__((overloadable)) dot(float lhs, float rhs);
    -00939 F_FUNC_FN_FN(dot)
    -00940 
    -00946 _RS_RUNTIME float __attribute__((overloadable)) length(float v);
    -00947 F_FUNC_FN(length)
    -00948 
    -00954 _RS_RUNTIME float __attribute__((overloadable)) distance(float lhs, float rhs);
    -00955 F_FUNC_FN_FN(distance)
    -00956 
    -00962 _RS_RUNTIME float __attribute__((overloadable)) normalize(float v);
    -00963 FN_FUNC_FN(normalize)
    -00964 
    -00965 
    -00966 // New approx API functions
    -00967 #if (defined(RS_VERSION) && (RS_VERSION >= 17))
    -00968 
    -00974 _RS_RUNTIME float __attribute__((overloadable)) half_recip(float);
    -00975 FN_FUNC_FN(half_recip)
    -00976 
    -00982 _RS_RUNTIME float __attribute__((overloadable)) half_sqrt(float);
    -00983 FN_FUNC_FN(half_sqrt)
    -00984 
    -00990 _RS_RUNTIME float __attribute__((overloadable)) half_rsqrt(float v);
    -00991 FN_FUNC_FN(half_rsqrt)
    -00992 
    -00998 _RS_RUNTIME float __attribute__((overloadable)) fast_length(float v);
    -00999 F_FUNC_FN(fast_length)
    -01000 
    -01006 _RS_RUNTIME float __attribute__((overloadable)) fast_distance(float lhs, float rhs);
    -01007 F_FUNC_FN_FN(fast_distance)
    -01008 
    -01014 _RS_RUNTIME float __attribute__((overloadable)) fast_normalize(float v);
    -01015 F_FUNC_FN(fast_normalize)
    -01016 
    -01017 #endif  // (defined(RS_VERSION) && (RS_VERSION >= 17))
    -01018 
    -01019 
    -01020 
    -01021 #if (defined(RS_VERSION) && (RS_VERSION >= 18))
    -01022 // Fast native math functions.
    -01023 
    -01024 
    -01032 _RS_RUNTIME float __attribute__((overloadable)) native_exp2(float v);
    -01033 FN_FUNC_FN(native_exp2)
    -01034 
    -01042 _RS_RUNTIME float __attribute__((overloadable)) native_exp(float v);
    -01043 FN_FUNC_FN(native_exp)
    -01044 
    -01052 _RS_RUNTIME float __attribute__((overloadable)) native_exp10(float v);
    -01053 FN_FUNC_FN(native_exp10)
    -01054 
    -01055 
    -01056 _RS_RUNTIME float __attribute__((overloadable)) native_log2(float v);
    -01057 FN_FUNC_FN(native_log2)
    -01058 
    -01059 _RS_RUNTIME float __attribute__((overloadable)) native_log(float v);
    -01060 FN_FUNC_FN(native_log)
    -01061 
    -01062 _RS_RUNTIME float __attribute__((overloadable)) native_log10(float v);
    -01063 FN_FUNC_FN(native_log10)
    -01064 
    -01065 
    -01066 _RS_RUNTIME float __attribute__((overloadable)) native_powr(float v, float y);
    -01067 FN_FUNC_FN_FN(native_powr)
    -01068 
    -01069 
    -01070 #endif  // (defined(RS_VERSION) && (RS_VERSION >= 18))
    -01071 
    -01072 
    -01073 #undef CVT_FUNC
    -01074 #undef CVT_FUNC_2
    -01075 #undef FN_FUNC_FN
    -01076 #undef F_FUNC_FN
    -01077 #undef IN_FUNC_FN
    -01078 #undef FN_FUNC_FN_FN
    -01079 #undef F_FUNC_FN_FN
    -01080 #undef FN_FUNC_FN_F
    -01081 #undef FN_FUNC_FN_IN
    -01082 #undef FN_FUNC_FN_I
    -01083 #undef FN_FUNC_FN_PFN
    -01084 #undef FN_FUNC_FN_PIN
    -01085 #undef FN_FUNC_FN_FN_FN
    -01086 #undef FN_FUNC_FN_FN_F
    -01087 #undef FN_FUNC_FN_F_F
    -01088 #undef FN_FUNC_FN_FN_PIN
    -01089 #undef XN_FUNC_YN
    -01090 #undef UIN_FUNC_IN
    -01091 #undef IN_FUNC_IN
    -01092 #undef XN_FUNC_XN_XN_BODY
    -01093 #undef IN_FUNC_IN_IN_BODY
    -01094 
    -01095 #endif
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__core_8rsh.html b/docs/html/reference/renderscript/rs__core_8rsh.html deleted file mode 100644 index 132488d..0000000 --- a/docs/html/reference/renderscript/rs__core_8rsh.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.rsh File Reference
    -
    -
    -
    #include "rs_types.rsh"
    -#include "rs_allocation.rsh"
    -#include "rs_atomic.rsh"
    -#include "rs_cl.rsh"
    -#include "rs_debug.rsh"
    -#include "rs_element.rsh"
    -#include "rs_math.rsh"
    -#include "rs_matrix.rsh"
    -#include "rs_object.rsh"
    -#include "rs_quaternion.rsh"
    -#include "rs_sampler.rsh"
    -#include "rs_time.rsh"
    -
    - - - - - - - - - - - - - - -

    -Data Structures

    struct  rs_script_call

    -Typedefs

    typedef struct rs_script_call rs_script_call_t

    -Enumerations

    enum  rs_for_each_strategy

    -Functions

    bool rsSendToClient (int cmdID)
    bool rsSendToClient (int cmdID, const void *data, uint len)
    void rsSendToClientBlocking (int cmdID)
    void rsSendToClientBlocking (int cmdID, const void *data, uint len)
    void rsForEach (rs_script script, rs_allocation input, rs_allocation output, const void *usrData, size_t usrDataLen, const rs_script_call_t *)
    void rsForEach (rs_script script, rs_allocation input, rs_allocation output, const void *usrData, size_t usrDataLen)
    void rsForEach (rs_script script, rs_allocation input, rs_allocation output)
    -

    Detailed Description

    -

    todo-jsams

    - -

    Definition in file rs_core.rsh.

    -

    Typedef Documentation

    - -
    -
    - - - - -
    typedef struct rs_script_call rs_script_call_t
    -
    -
    -

    Structure to provide extra information to a rsForEach call. Primarly used to restrict the call to a subset of cells in the allocation.

    - -
    -
    -

    Enumeration Type Documentation

    - -
    -
    - - - - -
    enum rs_for_each_strategy
    -
    -
    -

    Launch order hint for rsForEach calls. This provides a hint to the system to determine in which order the root function of the target is called with each cell of the allocation.

    -

    This is a hint and implementations may not obey the order.

    - -

    Definition at line 96 of file rs_core.rsh.

    - -
    -
    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsForEach (rs_script script,
    rs_allocation input,
    rs_allocation output,
    const void * usrData,
    size_t usrDataLen,
    const rs_script_call_t 
    )
    -
    -
    -

    Make a script to script call to launch work. One of the input or output is required to be a valid object. The input and output must be of the same dimensions. API 10-13

    -
    Parameters:
    - - - - - - - - - - - - -
    scriptThe target script to call
    inputThe allocation to source data from
    outputthe allocation to write date into
    usrDataThe user definied params to pass to the root script. May be NULL.
    scExtra control infomation used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL. Make a script to script call to launch work. One of the input or output is required to be a valid object. The input and output must be of the same dimensions. API 14+
    scriptThe target script to call
    inputThe allocation to source data from
    outputthe allocation to write date into
    usrDataThe user definied params to pass to the root script. May be NULL.
    usrDataLenThe size of the userData structure. This will be used to perform a shallow copy of the data if necessary.
    scExtra control infomation used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsForEach (rs_script script,
    rs_allocation input,
    rs_allocation output,
    const void * usrData,
    size_t usrDataLen 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsForEach (rs_script script,
    rs_allocation input,
    rs_allocation output 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsSendToClient (int cmdID)
    -
    -
    -

    Send a message back to the client. Will not block and returns true if the message was sendable and false if the fifo was full. A message ID is required. Data payload is optional.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    bool rsSendToClient (int cmdID,
    const void * data,
    uint len 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsSendToClientBlocking (int cmdID)
    -
    -
    -

    Send a message back to the client, blocking until the message is queued. A message ID is required. Data payload is optional.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsSendToClientBlocking (int cmdID,
    const void * data,
    uint len 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__core_8rsh_source.html b/docs/html/reference/renderscript/rs__core_8rsh_source.html deleted file mode 100644 index ddc870d..0000000 --- a/docs/html/reference/renderscript/rs__core_8rsh_source.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011-2012 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00046 #ifndef __RS_CORE_RSH__
    -00047 #define __RS_CORE_RSH__
    -00048 
    -00049 #define _RS_RUNTIME extern
    -00050 
    -00051 #include "rs_types.rsh"
    -00052 #include "rs_allocation.rsh"
    -00053 #include "rs_atomic.rsh"
    -00054 #include "rs_cl.rsh"
    -00055 #include "rs_debug.rsh"
    -00056 #include "rs_element.rsh"
    -00057 #include "rs_math.rsh"
    -00058 #include "rs_matrix.rsh"
    -00059 #include "rs_object.rsh"
    -00060 #include "rs_quaternion.rsh"
    -00061 #include "rs_sampler.rsh"
    -00062 #include "rs_time.rsh"
    -00063 
    -00069 extern bool __attribute__((overloadable))
    -00070     rsSendToClient(int cmdID);
    -00074 extern bool __attribute__((overloadable))
    -00075     rsSendToClient(int cmdID, const void *data, uint len);
    -00080 extern void __attribute__((overloadable))
    -00081     rsSendToClientBlocking(int cmdID);
    -00085 extern void __attribute__((overloadable))
    -00086     rsSendToClientBlocking(int cmdID, const void *data, uint len);
    -00087 
    -00088 
    -00096 enum rs_for_each_strategy {
    -00097     RS_FOR_EACH_STRATEGY_SERIAL = 0,
    -00098     RS_FOR_EACH_STRATEGY_DONT_CARE = 1,
    -00099     RS_FOR_EACH_STRATEGY_DST_LINEAR = 2,
    -00100     RS_FOR_EACH_STRATEGY_TILE_SMALL= 3,
    -00101     RS_FOR_EACH_STRATEGY_TILE_MEDIUM = 4,
    -00102     RS_FOR_EACH_STRATEGY_TILE_LARGE = 5
    -00103 };
    -00104 
    -00105 
    -00110 typedef struct rs_script_call {
    -00111     enum rs_for_each_strategy strategy;
    -00112     uint32_t xStart;
    -00113     uint32_t xEnd;
    -00114     uint32_t yStart;
    -00115     uint32_t yEnd;
    -00116     uint32_t zStart;
    -00117     uint32_t zEnd;
    -00118     uint32_t arrayStart;
    -00119     uint32_t arrayEnd;
    -00120 } rs_script_call_t;
    -00121 
    -00138 #if !defined(RS_VERSION) || (RS_VERSION < 14)
    -00139 extern void __attribute__((overloadable))
    -00140     rsForEach(rs_script script, rs_allocation input,
    -00141               rs_allocation output, const void * usrData,
    -00142               const rs_script_call_t *sc);
    -00146 extern void __attribute__((overloadable))
    -00147     rsForEach(rs_script script, rs_allocation input,
    -00148               rs_allocation output, const void * usrData);
    -00149 #else
    -00150 
    -00169 extern void __attribute__((overloadable))
    -00170     rsForEach(rs_script script, rs_allocation input, rs_allocation output,
    -00171               const void * usrData, size_t usrDataLen, const rs_script_call_t *);
    -00175 extern void __attribute__((overloadable))
    -00176     rsForEach(rs_script script, rs_allocation input, rs_allocation output,
    -00177               const void * usrData, size_t usrDataLen);
    -00181 extern void __attribute__((overloadable))
    -00182     rsForEach(rs_script script, rs_allocation input, rs_allocation output);
    -00183 #endif
    -00184 
    -00185 
    -00186 
    -00187 #undef _RS_RUNTIME
    -00188 
    -00189 #endif
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__debug_8rsh.html b/docs/html/reference/renderscript/rs__debug_8rsh.html deleted file mode 100644 index cb7eb65..0000000 --- a/docs/html/reference/renderscript/rs__debug_8rsh.html +++ /dev/null @@ -1,662 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_debug.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_debug.rsh File Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    void rsDebug (const char *, float)
    void rsDebug (const char *, float, float)
    void rsDebug (const char *, float, float, float)
    void rsDebug (const char *, float, float, float, float)
    void rsDebug (const char *, double)
    void rsDebug (const char *, const rs_matrix4x4 *)
    void rsDebug (const char *, const rs_matrix3x3 *)
    void rsDebug (const char *, const rs_matrix2x2 *)
    void rsDebug (const char *, int)
    void rsDebug (const char *, uint)
    void rsDebug (const char *, long)
    void rsDebug (const char *, unsigned long)
    void rsDebug (const char *, const void *)
    void rsDebug (const char *, char)
    void rsDebug (const char *, unsigned char)
    void rsDebug (const char *, uchar2)
    void rsDebug (const char *, short)
    void rsDebug (const char *, ushort2)
    void rsDebug (const char *, long2)
    void rsDebug (const char *, ulong2)
    -

    Detailed Description

    -

    Utility debugging routines.

    -

    Routines intended to be used during application developement. These should not be used in shipping applications. All print a string and value pair to the standard log.

    - -

    Definition in file rs_debug.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    float  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    float ,
    float  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    float ,
    float ,
    float  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    float ,
    float ,
    float ,
    float  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    double  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    const rs_matrix4x4 
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    const rs_matrix3x3 
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    const rs_matrix2x2 
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    int  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    uint  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    long  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    unsigned long 
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    const void *  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    char  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    unsigned char 
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    uchar2  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    short  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    ushort2  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    long2  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsDebug (const char * ,
    ulong2  
    )
    -
    -
    -

    Debug function. Prints a string and value to the log.

    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__debug_8rsh_source.html b/docs/html/reference/renderscript/rs__debug_8rsh_source.html deleted file mode 100644 index cd5895d..0000000 --- a/docs/html/reference/renderscript/rs__debug_8rsh_source.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_debug.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_debug.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00026 #ifndef __RS_DEBUG_RSH__
    -00027 #define __RS_DEBUG_RSH__
    -00028 
    -00029 
    -00033 extern void __attribute__((overloadable))
    -00034     rsDebug(const char *, float);
    -00038 extern void __attribute__((overloadable))
    -00039     rsDebug(const char *, float, float);
    -00043 extern void __attribute__((overloadable))
    -00044     rsDebug(const char *, float, float, float);
    -00048 extern void __attribute__((overloadable))
    -00049     rsDebug(const char *, float, float, float, float);
    -00053 extern void __attribute__((overloadable))
    -00054     rsDebug(const char *, float2);
    -00058 extern void __attribute__((overloadable))
    -00059     rsDebug(const char *, float3);
    -00063 extern void __attribute__((overloadable))
    -00064     rsDebug(const char *, float4);
    -00068 extern void __attribute__((overloadable))
    -00069     rsDebug(const char *, double);
    -00073 extern void __attribute__((overloadable))
    -00074     rsDebug(const char *, const rs_matrix4x4 *);
    -00078 extern void __attribute__((overloadable))
    -00079     rsDebug(const char *, const rs_matrix3x3 *);
    -00083 extern void __attribute__((overloadable))
    -00084     rsDebug(const char *, const rs_matrix2x2 *);
    -00088 extern void __attribute__((overloadable))
    -00089     rsDebug(const char *, int);
    -00093 extern void __attribute__((overloadable))
    -00094     rsDebug(const char *, uint);
    -00098 extern void __attribute__((overloadable))
    -00099     rsDebug(const char *, long);
    -00103 extern void __attribute__((overloadable))
    -00104     rsDebug(const char *, unsigned long);
    -00108 extern void __attribute__((overloadable))
    -00109     rsDebug(const char *, long long);
    -00113 extern void __attribute__((overloadable))
    -00114     rsDebug(const char *, unsigned long long);
    -00118 extern void __attribute__((overloadable))
    -00119     rsDebug(const char *, const void *);
    -00120 
    -00121 #if (defined(RS_VERSION) && (RS_VERSION >= 17))
    -00122 
    -00125 extern void __attribute__((overloadable))
    -00126     rsDebug(const char *, char);
    -00130 extern void __attribute__((overloadable))
    -00131     rsDebug(const char *, char2);
    -00135 extern void __attribute__((overloadable))
    -00136     rsDebug(const char *, char3);
    -00140 extern void __attribute__((overloadable))
    -00141     rsDebug(const char *, char4);
    -00145 extern void __attribute__((overloadable))
    -00146     rsDebug(const char *, unsigned char);
    -00150 extern void __attribute__((overloadable))
    -00151     rsDebug(const char *, uchar2);
    -00155 extern void __attribute__((overloadable))
    -00156     rsDebug(const char *, uchar3);
    -00160 extern void __attribute__((overloadable))
    -00161     rsDebug(const char *, uchar4);
    -00165 extern void __attribute__((overloadable))
    -00166     rsDebug(const char *, short);
    -00170 extern void __attribute__((overloadable))
    -00171     rsDebug(const char *, short2);
    -00175 extern void __attribute__((overloadable))
    -00176     rsDebug(const char *, short3);
    -00180 extern void __attribute__((overloadable))
    -00181     rsDebug(const char *, short4);
    -00185 extern void __attribute__((overloadable))
    -00186     rsDebug(const char *, unsigned short);
    -00190 extern void __attribute__((overloadable))
    -00191     rsDebug(const char *, ushort2);
    -00195 extern void __attribute__((overloadable))
    -00196     rsDebug(const char *, ushort3);
    -00200 extern void __attribute__((overloadable))
    -00201     rsDebug(const char *, ushort4);
    -00205 extern void __attribute__((overloadable))
    -00206     rsDebug(const char *, int2);
    -00210 extern void __attribute__((overloadable))
    -00211     rsDebug(const char *, int3);
    -00215 extern void __attribute__((overloadable))
    -00216     rsDebug(const char *, int4);
    -00220 extern void __attribute__((overloadable))
    -00221     rsDebug(const char *, uint2);
    -00225 extern void __attribute__((overloadable))
    -00226     rsDebug(const char *, uint3);
    -00230 extern void __attribute__((overloadable))
    -00231     rsDebug(const char *, uint4);
    -00235 extern void __attribute__((overloadable))
    -00236     rsDebug(const char *, long2);
    -00240 extern void __attribute__((overloadable))
    -00241     rsDebug(const char *, long3);
    -00245 extern void __attribute__((overloadable))
    -00246     rsDebug(const char *, long4);
    -00250 extern void __attribute__((overloadable))
    -00251     rsDebug(const char *, ulong2);
    -00255 extern void __attribute__((overloadable))
    -00256     rsDebug(const char *, ulong3);
    -00260 extern void __attribute__((overloadable))
    -00261     rsDebug(const char *, ulong4);
    -00262 #endif  // (defined(RS_VERSION) && (RS_VERSION >= 17))
    -00263 
    -00264 #define RS_DEBUG(a) rsDebug(#a, a)
    -00265 #define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__)
    -00266 
    -00267 #endif
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__element_8rsh.html b/docs/html/reference/renderscript/rs__element_8rsh.html deleted file mode 100644 index 201f71c..0000000 --- a/docs/html/reference/renderscript/rs__element_8rsh.html +++ /dev/null @@ -1,374 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.rsh File Reference
    -
    -
    - - - - - - - - - - - - -

    -Functions

    uint32_t rsElementGetSubElementCount (rs_element e)
    rs_element rsElementGetSubElement (rs_element, uint32_t index)
    uint32_t rsElementGetSubElementNameLength (rs_element e, uint32_t index)
    uint32_t rsElementGetSubElementName (rs_element e, uint32_t index, char *name, uint32_t nameLength)
    uint32_t rsElementGetSubElementArraySize (rs_element e, uint32_t index)
    uint32_t rsElementGetSubElementOffsetBytes (rs_element e, uint32_t index)
    uint32_t rsElementGetBytesSize (rs_element e)
    rs_data_type rsElementGetDataType (rs_element e)
    rs_data_kind rsElementGetDataKind (rs_element e)
    uint32_t rsElementGetVectorSize (rs_element e)
    -

    Detailed Description

    -

    Element routines.

    - -

    Definition in file rs_element.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - -
    uint32_t rsElementGetBytesSize (rs_element e)
    -
    -
    -

    Returns the size of element in bytes

    -
    Parameters:
    - - -
    eelement to get data from
    -
    -
    -
    Returns:
    total size of the element in bytes
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_data_kind rsElementGetDataKind (rs_element e)
    -
    -
    -

    Returns the element's data kind

    -
    Parameters:
    - - -
    eelement to get data from
    -
    -
    -
    Returns:
    element's data size
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_data_type rsElementGetDataType (rs_element e)
    -
    -
    -

    Returns the element's data type

    -
    Parameters:
    - - -
    eelement to get data from
    -
    -
    -
    Returns:
    element's data type
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    rs_element rsElementGetSubElement (rs_element ,
    uint32_t index 
    )
    -
    -
    -

    For complex elements, this function will return the sub-element at index

    -
    Parameters:
    - - - -
    eelement to get data from
    indexindex of the sub-element to return
    -
    -
    -
    Returns:
    sub-element in this element at given index
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsElementGetSubElementArraySize (rs_element e,
    uint32_t index 
    )
    -
    -
    -

    For complex elements, some sub-elements could be statically sized arrays. This function will return the array size for sub-element at index

    -
    Parameters:
    - - - -
    eelement to get data from
    indexindex of the sub-element
    -
    -
    -
    Returns:
    array size of sub-element in this element at given index
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsElementGetSubElementCount (rs_element e)
    -
    -
    -

    Elements could be simple, such as an int or a float, or a structure with multiple sub elements, such as a collection of floats, float2, float4. This function returns zero for simple elements or the number of sub-elements otherwise.

    -
    Parameters:
    - - -
    eelement to get data from
    -
    -
    -
    Returns:
    number of sub-elements in this element
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    uint32_t rsElementGetSubElementName (rs_element e,
    uint32_t index,
    char * name,
    uint32_t nameLength 
    )
    -
    -
    -

    For complex elements, this function will return the sub-element name at index

    -
    Parameters:
    - - - - - -
    eelement to get data from
    indexindex of the sub-element
    namearray to store the name into
    nameLengthlength of the provided name array
    -
    -
    -
    Returns:
    number of characters actually written, excluding the null terminator
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsElementGetSubElementNameLength (rs_element e,
    uint32_t index 
    )
    -
    -
    -

    For complex elements, this function will return the length of sub-element name at index

    -
    Parameters:
    - - - -
    eelement to get data from
    indexindex of the sub-element to return
    -
    -
    -
    Returns:
    length of the sub-element name including the null terminator (size of buffer needed to write the name)
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    uint32_t rsElementGetSubElementOffsetBytes (rs_element e,
    uint32_t index 
    )
    -
    -
    -

    This function specifies the location of a sub-element within the element

    -
    Parameters:
    - - - -
    eelement to get data from
    indexindex of the sub-element
    -
    -
    -
    Returns:
    offset in bytes of sub-element in this element at given index
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsElementGetVectorSize (rs_element e)
    -
    -
    -

    Returns the element's vector size

    -
    Parameters:
    - - -
    eelement to get data from
    -
    -
    -
    Returns:
    length of the element vector (for float2, float3, etc.)
    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__element_8rsh_source.html b/docs/html/reference/renderscript/rs__element_8rsh_source.html deleted file mode 100644 index 1d2601e..0000000 --- a/docs/html/reference/renderscript/rs__element_8rsh_source.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2012 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_ELEMENT_RSH__
    -00024 #define __RS_ELEMENT_RSH__
    -00025 
    -00026 // New API's
    -00027 #if (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00028 
    -00038 extern uint32_t __attribute__((overloadable))
    -00039     rsElementGetSubElementCount(rs_element e);
    -00040 
    -00049 extern rs_element __attribute__((overloadable))
    -00050     rsElementGetSubElement(rs_element, uint32_t index);
    -00051 
    -00061 extern uint32_t __attribute__((overloadable))
    -00062     rsElementGetSubElementNameLength(rs_element e, uint32_t index);
    -00063 
    -00075 extern uint32_t __attribute__((overloadable))
    -00076     rsElementGetSubElementName(rs_element e, uint32_t index, char *name, uint32_t nameLength);
    -00077 
    -00088 extern uint32_t __attribute__((overloadable))
    -00089     rsElementGetSubElementArraySize(rs_element e, uint32_t index);
    -00090 
    -00100 extern uint32_t __attribute__((overloadable))
    -00101     rsElementGetSubElementOffsetBytes(rs_element e, uint32_t index);
    -00102 
    -00109 extern uint32_t __attribute__((overloadable))
    -00110     rsElementGetBytesSize(rs_element e);
    -00111 
    -00118 extern rs_data_type __attribute__((overloadable))
    -00119     rsElementGetDataType(rs_element e);
    -00120 
    -00127 extern rs_data_kind __attribute__((overloadable))
    -00128     rsElementGetDataKind(rs_element e);
    -00129 
    -00137 extern uint32_t __attribute__((overloadable))
    -00138     rsElementGetVectorSize(rs_element e);
    -00139 
    -00140 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00141 
    -00142 #endif // __RS_ELEMENT_RSH__
    -00143 
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__graphics_8rsh.html b/docs/html/reference/renderscript/rs__graphics_8rsh.html deleted file mode 100644 index de62965..0000000 --- a/docs/html/reference/renderscript/rs__graphics_8rsh.html +++ /dev/null @@ -1,1435 +0,0 @@ - - - - - -rs_graphics.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    rs_graphics.rsh File Reference
    -
    -
    -
    #include "rs_mesh.rsh"
    -#include "rs_program.rsh"
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    void rsgBindProgramFragment (rs_program_fragment pf)
    void rsgBindProgramStore (rs_program_store ps)
    void rsgBindProgramVertex (rs_program_vertex pv)
    void rsgBindProgramRaster (rs_program_raster pr)
    void rsgBindSampler (rs_program_fragment, uint slot, rs_sampler)
    void rsgBindTexture (rs_program_fragment, uint slot, rs_allocation)
    void rsgProgramVertexLoadProjectionMatrix (const rs_matrix4x4 *proj)
    void rsgProgramVertexLoadModelMatrix (const rs_matrix4x4 *model)
    void rsgProgramVertexLoadTextureMatrix (const rs_matrix4x4 *tex)
    void rsgProgramVertexGetProjectionMatrix (rs_matrix4x4 *proj)
    void rsgProgramFragmentConstantColor (rs_program_fragment pf, float r, float g, float b, float a)
    void rsgBindConstant (rs_program_fragment ps, uint slot, rs_allocation c)
    void rsgBindConstant (rs_program_vertex pv, uint slot, rs_allocation c)
    uint rsgGetWidth (void)
    uint rsgGetHeight (void)
    void rsgAllocationSyncAll (rs_allocation alloc)
    void rsgDrawRect (float x1, float y1, float x2, float y2, float z)
    void rsgDrawQuad (float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4)
    void rsgDrawQuadTexCoords (float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2, float x3, float y3, float z3, float u3, float v3, float x4, float y4, float z4, float u4, float v4)
    void rsgDrawSpriteScreenspace (float x, float y, float z, float w, float h)
    void rsgDrawMesh (rs_mesh ism)
    void rsgDrawMesh (rs_mesh ism, uint primitiveIndex)
    void rsgDrawMesh (rs_mesh ism, uint primitiveIndex, uint start, uint len)
    void rsgClearColor (float r, float g, float b, float a)
    void rsgClearDepth (float value)
    void rsgDrawText (const char *, int x, int y)
    void rsgDrawText (rs_allocation, int x, int y)
    void rsgBindFont (rs_font font)
    void rsgFontColor (float r, float g, float b, float a)
    void rsgMeasureText (const char *, int *left, int *right, int *top, int *bottom)
    void rsgMeasureText (rs_allocation, int *left, int *right, int *top, int *bottom)
    void rsgMeshComputeBoundingBox (rs_mesh mesh, float *minX, float *minY, float *minZ, float *maxX, float *maxY, float *maxZ)
    static __inline__ void rsgMeshComputeBoundingBox (rs_mesh mesh, float3 *bBoxMin, float3 *bBoxMax)
    -

    Detailed Description

    -

    Renderscript graphics API.

    -

    A set of graphics functions used by Renderscript.

    - -

    Definition in file rs_graphics.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - -
    void rsgAllocationSyncAll (rs_allocation alloc)
    -
    -
    -

    Sync the contents of an allocation from its SCRIPT memory space to its HW memory spaces.

    -
    Parameters:
    - - -
    alloc
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgBindConstant (rs_program_fragment ps,
    uint slot,
    rs_allocation c 
    )
    -
    -
    -

    Bind a new Allocation object to a ProgramFragment. The Allocation must be a valid constant input for the Program.

    -
    Parameters:
    - - - - -
    psprogram object
    slotindex of the constant buffer on the program
    cconstants to bind
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgBindConstant (rs_program_vertex pv,
    uint slot,
    rs_allocation c 
    )
    -
    -
    -

    Bind a new Allocation object to a ProgramVertex. The Allocation must be a valid constant input for the Program.

    -
    Parameters:
    - - - - -
    pvprogram object
    slotindex of the constant buffer on the program
    cconstants to bind
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgBindFont (rs_font font)
    -
    -
    -

    Binds the font object to be used for all subsequent font rendering calls

    -
    Parameters:
    - - -
    fontobject to bind
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgBindProgramFragment (rs_program_fragment pf)
    -
    -
    -

    Bind a new ProgramFragment to the rendering context.

    -
    Parameters:
    - - -
    pf
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgBindProgramRaster (rs_program_raster pr)
    -
    -
    -

    Bind a new ProgramRaster to the rendering context.

    -
    Parameters:
    - - -
    pr
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgBindProgramStore (rs_program_store ps)
    -
    -
    -

    Bind a new ProgramStore to the rendering context.

    -
    Parameters:
    - - -
    ps
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgBindProgramVertex (rs_program_vertex pv)
    -
    -
    -

    Bind a new ProgramVertex to the rendering context.

    -
    Parameters:
    - - -
    pv
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgBindSampler (rs_program_fragment ,
    uint slot,
    rs_sampler  
    )
    -
    -
    -

    Bind a new Sampler object to a ProgramFragment. The sampler will operate on the texture bound at the matching slot.

    -
    Parameters:
    - - -
    slot
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgBindTexture (rs_program_fragment ,
    uint slot,
    rs_allocation  
    )
    -
    -
    -

    Bind a new Allocation object to a ProgramFragment. The Allocation must be a valid texture for the Program. The sampling of the texture will be controled by the Sampler bound at the matching slot.

    -
    Parameters:
    - - -
    slot
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgClearColor (float r,
    float g,
    float b,
    float a 
    )
    -
    -
    -

    Clears the rendering surface to the specified color.

    -
    Parameters:
    - - - - - -
    r
    g
    b
    a
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgClearDepth (float value)
    -
    -
    -

    Clears the depth suface to the specified value.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgDrawMesh (rs_mesh ism)
    -
    -
    -

    Draw a mesh using the current context state. The whole mesh is rendered.

    -
    Parameters:
    - - -
    ism
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsgDrawMesh (rs_mesh ism,
    uint primitiveIndex 
    )
    -
    -
    -

    Draw part of a mesh using the current context state.

    -
    Parameters:
    - - - -
    ismmesh object to render
    primitiveIndexfor meshes that contain multiple primitive groups this parameter specifies the index of the group to draw.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgDrawMesh (rs_mesh ism,
    uint primitiveIndex,
    uint start,
    uint len 
    )
    -
    -
    -

    Draw specified index range of part of a mesh using the current context state.

    -
    Parameters:
    - - - - - -
    ismmesh object to render
    primitiveIndexfor meshes that contain multiple primitive groups this parameter specifies the index of the group to draw.
    startstarting index in the range
    lennumber of indices to draw
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgDrawQuad (float x1,
    float y1,
    float z1,
    float x2,
    float y2,
    float z2,
    float x3,
    float y3,
    float z3,
    float x4,
    float y4,
    float z4 
    )
    -
    -
    -

    Low performance utility function for drawing a simple quad. Not intended for drawing large quantities of geometry.

    -
    Parameters:
    - - - - - - - - - - - - - -
    x1
    y1
    z1
    x2
    y2
    z2
    x3
    y3
    z3
    x4
    y4
    z4
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgDrawQuadTexCoords (float x1,
    float y1,
    float z1,
    float u1,
    float v1,
    float x2,
    float y2,
    float z2,
    float u2,
    float v2,
    float x3,
    float y3,
    float z3,
    float u3,
    float v3,
    float x4,
    float y4,
    float z4,
    float u4,
    float v4 
    )
    -
    -
    -

    Low performance utility function for drawing a textured quad. Not intended for drawing large quantities of geometry.

    -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - -
    x1
    y1
    z1
    u1
    v1
    x2
    y2
    z2
    u2
    v2
    x3
    y3
    z3
    u3
    v3
    x4
    y4
    z4
    u4
    v4
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgDrawRect (float x1,
    float y1,
    float x2,
    float y2,
    float z 
    )
    -
    -
    -

    Low performance utility function for drawing a simple rectangle. Not intended for drawing large quantities of geometry.

    -
    Parameters:
    - - - - - - -
    x1
    y1
    x2
    y2
    z
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgDrawSpriteScreenspace (float x,
    float y,
    float z,
    float w,
    float h 
    )
    -
    -
    -

    Low performance function for drawing rectangles in screenspace. This function uses the default passthough ProgramVertex. Any bound ProgramVertex is ignored. This function has considerable overhead and should not be used for drawing in shipping applications.

    -
    Parameters:
    - - - - - - -
    x
    y
    z
    w
    h
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgDrawText (const char * ,
    int x,
    int y 
    )
    -
    -
    -

    Draws text given a string and location

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgDrawText (rs_allocation ,
    int x,
    int y 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgFontColor (float r,
    float g,
    float b,
    float a 
    )
    -
    -
    -

    Sets the font color for all subsequent rendering calls

    -
    Parameters:
    - - - - - -
    rred component
    ggreen component
    bblue component
    aalpha component
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    uint rsgGetHeight (void )
    -
    -
    -

    Get the height of the current rendering surface.

    -
    Returns:
    uint
    - -
    -
    - -
    -
    - - - - - - - - -
    uint rsgGetWidth (void )
    -
    -
    -

    Get the width of the current rendering surface.

    -
    Returns:
    uint
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgMeasureText (const char * ,
    int * left,
    int * right,
    int * top,
    int * bottom 
    )
    -
    -
    -

    Returns the bounding box of the text relative to (0, 0) Any of left, right, top, bottom could be NULL

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgMeasureText (rs_allocation ,
    int * left,
    int * right,
    int * top,
    int * bottom 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgMeshComputeBoundingBox (rs_mesh mesh,
    float * minX,
    float * minY,
    float * minZ,
    float * maxX,
    float * maxY,
    float * maxZ 
    )
    -
    -
    -

    Computes an axis aligned bounding box of a mesh object

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    static __inline__ void rsgMeshComputeBoundingBox (rs_mesh mesh,
    float3bBoxMin,
    float3bBoxMax 
    ) [static]
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -

    Definition at line 409 of file rs_graphics.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsgProgramFragmentConstantColor (rs_program_fragment pf,
    float r,
    float g,
    float b,
    float a 
    )
    -
    -
    -

    Set the constant color for a fixed function emulation program.

    -
    Parameters:
    - - - - - - -
    pf
    r
    g
    b
    a
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgProgramVertexGetProjectionMatrix (rs_matrix4x4proj)
    -
    -
    -

    Get the projection matrix for a currently bound fixed function vertex program. Calling this function with a custom vertex shader would result in an error.

    -
    Parameters:
    - - -
    projmatrix to store the current projection matrix into
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgProgramVertexLoadModelMatrix (const rs_matrix4x4model)
    -
    -
    -

    Load the model matrix for a currently bound fixed function vertex program. Calling this function with a custom vertex shader would result in an error.

    -
    Parameters:
    - - -
    modelmodel matrix
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgProgramVertexLoadProjectionMatrix (const rs_matrix4x4proj)
    -
    -
    -

    Load the projection matrix for a currently bound fixed function vertex program. Calling this function with a custom vertex shader would result in an error.

    -
    Parameters:
    - - -
    projprojection matrix
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsgProgramVertexLoadTextureMatrix (const rs_matrix4x4tex)
    -
    -
    -

    Load the texture matrix for a currently bound fixed function vertex program. Calling this function with a custom vertex shader would result in an error.

    -
    Parameters:
    - - -
    textexture matrix
    -
    -
    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__graphics_8rsh_source.html b/docs/html/reference/renderscript/rs__graphics_8rsh_source.html deleted file mode 100644 index 9f673bd..0000000 --- a/docs/html/reference/renderscript/rs__graphics_8rsh_source.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - -rs_graphics.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    rs_graphics.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011-2012 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_GRAPHICS_RSH__
    -00024 #define __RS_GRAPHICS_RSH__
    -00025 
    -00026 #include "rs_mesh.rsh"
    -00027 #include "rs_program.rsh"
    -00028 
    -00029 #if (defined(RS_VERSION) && (RS_VERSION >= 14))
    -00030 
    -00035 extern void __attribute__((overloadable))
    -00036     rsgBindColorTarget(rs_allocation colorTarget, uint slot);
    -00037 
    -00042 extern void __attribute__((overloadable))
    -00043     rsgClearColorTarget(uint slot);
    -00044 
    -00049 extern void __attribute__((overloadable))
    -00050     rsgBindDepthTarget(rs_allocation depthTarget);
    -00051 
    -00055 extern void __attribute__((overloadable))
    -00056     rsgClearDepthTarget(void);
    -00057 
    -00062 extern void __attribute__((overloadable))
    -00063     rsgClearAllRenderTargets(void);
    -00064 
    -00068 extern uint __attribute__((overloadable))
    -00069     rsgFinish(void);
    -00070 
    -00071 #endif //defined(RS_VERSION) && (RS_VERSION >= 14)
    -00072 
    -00078 extern void __attribute__((overloadable))
    -00079     rsgBindProgramFragment(rs_program_fragment pf);
    -00080 
    -00086 extern void __attribute__((overloadable))
    -00087     rsgBindProgramStore(rs_program_store ps);
    -00088 
    -00094 extern void __attribute__((overloadable))
    -00095     rsgBindProgramVertex(rs_program_vertex pv);
    -00096 
    -00102 extern void __attribute__((overloadable))
    -00103     rsgBindProgramRaster(rs_program_raster pr);
    -00104 
    -00111 extern void __attribute__((overloadable))
    -00112     rsgBindSampler(rs_program_fragment, uint slot, rs_sampler);
    -00113 
    -00122 extern void __attribute__((overloadable))
    -00123     rsgBindTexture(rs_program_fragment, uint slot, rs_allocation);
    -00124 
    -00131 extern void __attribute__((overloadable))
    -00132     rsgProgramVertexLoadProjectionMatrix(const rs_matrix4x4 *proj);
    -00139 extern void __attribute__((overloadable))
    -00140     rsgProgramVertexLoadModelMatrix(const rs_matrix4x4 *model);
    -00147 extern void __attribute__((overloadable))
    -00148     rsgProgramVertexLoadTextureMatrix(const rs_matrix4x4 *tex);
    -00155 extern void __attribute__((overloadable))
    -00156     rsgProgramVertexGetProjectionMatrix(rs_matrix4x4 *proj);
    -00157 
    -00167 extern void __attribute__((overloadable))
    -00168     rsgProgramFragmentConstantColor(rs_program_fragment pf, float r, float g, float b, float a);
    -00169 
    -00178 extern void __attribute__((overloadable))
    -00179     rsgBindConstant(rs_program_fragment ps, uint slot, rs_allocation c);
    -00180 
    -00189 extern void __attribute__((overloadable))
    -00190     rsgBindConstant(rs_program_vertex pv, uint slot, rs_allocation c);
    -00191 
    -00197 extern uint __attribute__((overloadable))
    -00198     rsgGetWidth(void);
    -00199 
    -00205 extern uint __attribute__((overloadable))
    -00206     rsgGetHeight(void);
    -00207 
    -00208 
    -00215 extern void __attribute__((overloadable))
    -00216     rsgAllocationSyncAll(rs_allocation alloc);
    -00217 
    -00218 #if (defined(RS_VERSION) && (RS_VERSION >= 14))
    -00219 
    -00227 extern void __attribute__((overloadable))
    -00228     rsgAllocationSyncAll(rs_allocation alloc,
    -00229                          rs_allocation_usage_type source);
    -00230 
    -00231 #endif //defined(RS_VERSION) && (RS_VERSION >= 14)
    -00232 
    -00243 extern void __attribute__((overloadable))
    -00244     rsgDrawRect(float x1, float y1, float x2, float y2, float z);
    -00245 
    -00263 extern void __attribute__((overloadable))
    -00264     rsgDrawQuad(float x1, float y1, float z1,
    -00265                 float x2, float y2, float z2,
    -00266                 float x3, float y3, float z3,
    -00267                 float x4, float y4, float z4);
    -00268 
    -00269 
    -00295 extern void __attribute__((overloadable))
    -00296     rsgDrawQuadTexCoords(float x1, float y1, float z1, float u1, float v1,
    -00297                          float x2, float y2, float z2, float u2, float v2,
    -00298                          float x3, float y3, float z3, float u3, float v3,
    -00299                          float x4, float y4, float z4, float u4, float v4);
    -00300 
    -00301 
    -00314 extern void __attribute__((overloadable))
    -00315     rsgDrawSpriteScreenspace(float x, float y, float z, float w, float h);
    -00316 
    -00317 extern void __attribute__((overloadable))
    -00318     rsgDrawPath(rs_path p);
    -00319 
    -00326 extern void __attribute__((overloadable))
    -00327     rsgDrawMesh(rs_mesh ism);
    -00334 extern void __attribute__((overloadable))
    -00335     rsgDrawMesh(rs_mesh ism, uint primitiveIndex);
    -00344 extern void __attribute__((overloadable))
    -00345     rsgDrawMesh(rs_mesh ism, uint primitiveIndex, uint start, uint len);
    -00346 
    -00355 extern void __attribute__((overloadable))
    -00356     rsgClearColor(float r, float g, float b, float a);
    -00357 
    -00361 extern void __attribute__((overloadable))
    -00362     rsgClearDepth(float value);
    -00366 extern void __attribute__((overloadable))
    -00367     rsgDrawText(const char *, int x, int y);
    -00371 extern void __attribute__((overloadable))
    -00372     rsgDrawText(rs_allocation, int x, int y);
    -00377 extern void __attribute__((overloadable))
    -00378     rsgBindFont(rs_font font);
    -00386 extern void __attribute__((overloadable))
    -00387     rsgFontColor(float r, float g, float b, float a);
    -00392 extern void __attribute__((overloadable))
    -00393     rsgMeasureText(const char *, int *left, int *right, int *top, int *bottom);
    -00397 extern void __attribute__((overloadable))
    -00398     rsgMeasureText(rs_allocation, int *left, int *right, int *top, int *bottom);
    -00402 extern void __attribute__((overloadable))
    -00403     rsgMeshComputeBoundingBox(rs_mesh mesh, float *minX, float *minY, float *minZ,
    -00404                                                 float *maxX, float *maxY, float *maxZ);
    -00408 __inline__ static void __attribute__((overloadable, always_inline))
    -00409 rsgMeshComputeBoundingBox(rs_mesh mesh, float3 *bBoxMin, float3 *bBoxMax) {
    -00410     float x1, y1, z1, x2, y2, z2;
    -00411     rsgMeshComputeBoundingBox(mesh, &x1, &y1, &z1, &x2, &y2, &z2);
    -00412     bBoxMin->x = x1;
    -00413     bBoxMin->y = y1;
    -00414     bBoxMin->z = z1;
    -00415     bBoxMax->x = x2;
    -00416     bBoxMax->y = y2;
    -00417     bBoxMax->z = z2;
    -00418 }
    -00419 
    -00420 #endif
    -00421 
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__math_8rsh.html b/docs/html/reference/renderscript/rs__math_8rsh.html deleted file mode 100644 index 7379f54..0000000 --- a/docs/html/reference/renderscript/rs__math_8rsh.html +++ /dev/null @@ -1,679 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh File Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - -

    -Functions

    int rsRand (int max_value)
    int rsRand (int min_value, int max_value)
    float rsRand (float max_value)
    float rsRand (float min_value, float max_value)
    float rsFrac (float)
    uint rsClamp (uint amount, uint low, uint high)
    int rsClamp (int amount, int low, int high)
    ushort rsClamp (ushort amount, ushort low, ushort high)
    short rsClamp (short amount, short low, short high)
    uchar rsClamp (uchar amount, uchar low, uchar high)
    char rsClamp (char amount, char low, char high)
    static __inline__ void rsExtractFrustumPlanes (const rs_matrix4x4 *viewProj, float4 *left, float4 *right, float4 *top, float4 *bottom, float4 *near, float4 *far)
    static __inline__ bool rsIsSphereInFrustum (float4 *sphere, float4 *left, float4 *right, float4 *top, float4 *bottom, float4 *near, float4 *far)
    uchar4 rsPackColorTo8888 (float r, float g, float b)
    uchar4 rsPackColorTo8888 (float r, float g, float b, float a)
    uchar4 rsPackColorTo8888 (float3 color)
    float4 rsUnpackColor8888 (uchar4 c)
    -

    Detailed Description

    -

    todo-jsams

    - -

    Definition in file rs_math.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    uint rsClamp (uint amount,
    uint low,
    uint high 
    )
    -
    -
    -

    Clamp the value amount between low and high.

    -
    Parameters:
    - - - - -
    amountThe value to clamp
    low
    high
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    int rsClamp (int amount,
    int low,
    int high 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    ushort rsClamp (ushort amount,
    ushort low,
    ushort high 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    short rsClamp (short amount,
    short low,
    short high 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    uchar rsClamp (uchar amount,
    uchar low,
    uchar high 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    char rsClamp (char amount,
    char low,
    char high 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static __inline__ void rsExtractFrustumPlanes (const rs_matrix4x4viewProj,
    float4left,
    float4right,
    float4top,
    float4bottom,
    float4near,
    float4far 
    ) [static]
    -
    -
    -

    Computes 6 frustum planes from the view projection matrix

    -
    Parameters:
    - - - - - - - - -
    viewProjmatrix to extract planes from
    leftplane
    rightplane
    topplane
    bottomplane
    nearplane
    farplane
    -
    -
    - -

    Definition at line 102 of file rs_math.rsh.

    - -
    -
    - -
    -
    - - - - - - - - -
    float rsFrac (float )
    -
    -
    -

    Returns the fractional part of a float

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static __inline__ bool rsIsSphereInFrustum (float4sphere,
    float4left,
    float4right,
    float4top,
    float4bottom,
    float4near,
    float4far 
    ) [static]
    -
    -
    -

    Checks if a sphere is withing the 6 frustum planes

    -
    Parameters:
    - - - - - - - - -
    spherefloat4 representing the sphere
    leftplane
    rightplane
    topplane
    bottomplane
    nearplane
    farplane
    -
    -
    - -

    Definition at line 162 of file rs_math.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    uchar4 rsPackColorTo8888 (float r,
    float g,
    float b 
    )
    -
    -
    -

    Pack floating point (0-1) RGB values into a uchar4. The alpha component is set to 255 (1.0).

    -
    Parameters:
    - - - - -
    r
    g
    b
    -
    -
    -
    Returns:
    uchar4
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    uchar4 rsPackColorTo8888 (float r,
    float g,
    float b,
    float a 
    )
    -
    -
    -

    Pack floating point (0-1) RGBA values into a uchar4.

    -
    Parameters:
    - - - - - -
    r
    g
    b
    a
    -
    -
    -
    Returns:
    uchar4
    - -
    -
    - -
    -
    - - - - - - - - -
    uchar4 rsPackColorTo8888 (float3 color)
    -
    -
    -

    Pack floating point (0-1) RGB values into a uchar4. The alpha component is set to 255 (1.0).

    -
    Parameters:
    - - -
    color
    -
    -
    -
    Returns:
    uchar4
    -

    Pack floating point (0-1) RGBA values into a uchar4.

    -
    Parameters:
    - - -
    color
    -
    -
    -
    Returns:
    uchar4
    - -
    -
    - -
    -
    - - - - - - - - -
    int rsRand (int max_value)
    -
    -
    -

    Return a random value between 0 (or min_value) and max_malue.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int rsRand (int min_value,
    int max_value 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    float rsRand (float max_value)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    float rsRand (float min_value,
    float max_value 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    float4 rsUnpackColor8888 (uchar4 c)
    -
    -
    -

    Unpack a uchar4 color to float4. The resulting float range will be (0-1).

    -
    Parameters:
    - - -
    c
    -
    -
    -
    Returns:
    float4
    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__math_8rsh_source.html b/docs/html/reference/renderscript/rs__math_8rsh_source.html deleted file mode 100644 index 513ce48..0000000 --- a/docs/html/reference/renderscript/rs__math_8rsh_source.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00024 #ifndef __RS_MATH_RSH__
    -00025 #define __RS_MATH_RSH__
    -00026 
    -00027 
    -00031 extern int __attribute__((overloadable))
    -00032     rsRand(int max_value);
    -00036 extern int __attribute__((overloadable))
    -00037     rsRand(int min_value, int max_value);
    -00041 extern float __attribute__((overloadable))
    -00042     rsRand(float max_value);
    -00046 extern float __attribute__((overloadable))
    -00047     rsRand(float min_value, float max_value);
    -00048 
    -00052 extern float __attribute__((overloadable))
    -00053     rsFrac(float);
    -00054 
    -00055 
    -00057 // int ops
    -00059 
    -00067 _RS_RUNTIME uint __attribute__((overloadable, always_inline)) rsClamp(uint amount, uint low, uint high);
    -00068 
    -00072 _RS_RUNTIME int __attribute__((overloadable, always_inline)) rsClamp(int amount, int low, int high);
    -00076 _RS_RUNTIME ushort __attribute__((overloadable, always_inline)) rsClamp(ushort amount, ushort low, ushort high);
    -00080 _RS_RUNTIME short __attribute__((overloadable, always_inline)) rsClamp(short amount, short low, short high);
    -00084 _RS_RUNTIME uchar __attribute__((overloadable, always_inline)) rsClamp(uchar amount, uchar low, uchar high);
    -00088 _RS_RUNTIME char __attribute__((overloadable, always_inline)) rsClamp(char amount, char low, char high);
    -00089 
    -00090 
    -00101 __inline__ static void __attribute__((overloadable, always_inline))
    -00102 rsExtractFrustumPlanes(const rs_matrix4x4 *viewProj,
    -00103                          float4 *left, float4 *right,
    -00104                          float4 *top, float4 *bottom,
    -00105                          float4 *near, float4 *far) {
    -00106     // x y z w = a b c d in the plane equation
    -00107     left->x = viewProj->m[3] + viewProj->m[0];
    -00108     left->y = viewProj->m[7] + viewProj->m[4];
    -00109     left->z = viewProj->m[11] + viewProj->m[8];
    -00110     left->w = viewProj->m[15] + viewProj->m[12];
    -00111 
    -00112     right->x = viewProj->m[3] - viewProj->m[0];
    -00113     right->y = viewProj->m[7] - viewProj->m[4];
    -00114     right->z = viewProj->m[11] - viewProj->m[8];
    -00115     right->w = viewProj->m[15] - viewProj->m[12];
    -00116 
    -00117     top->x = viewProj->m[3] - viewProj->m[1];
    -00118     top->y = viewProj->m[7] - viewProj->m[5];
    -00119     top->z = viewProj->m[11] - viewProj->m[9];
    -00120     top->w = viewProj->m[15] - viewProj->m[13];
    -00121 
    -00122     bottom->x = viewProj->m[3] + viewProj->m[1];
    -00123     bottom->y = viewProj->m[7] + viewProj->m[5];
    -00124     bottom->z = viewProj->m[11] + viewProj->m[9];
    -00125     bottom->w = viewProj->m[15] + viewProj->m[13];
    -00126 
    -00127     near->x = viewProj->m[3] + viewProj->m[2];
    -00128     near->y = viewProj->m[7] + viewProj->m[6];
    -00129     near->z = viewProj->m[11] + viewProj->m[10];
    -00130     near->w = viewProj->m[15] + viewProj->m[14];
    -00131 
    -00132     far->x = viewProj->m[3] - viewProj->m[2];
    -00133     far->y = viewProj->m[7] - viewProj->m[6];
    -00134     far->z = viewProj->m[11] - viewProj->m[10];
    -00135     far->w = viewProj->m[15] - viewProj->m[14];
    -00136 
    -00137     float len = length(left->xyz);
    -00138     *left /= len;
    -00139     len = length(right->xyz);
    -00140     *right /= len;
    -00141     len = length(top->xyz);
    -00142     *top /= len;
    -00143     len = length(bottom->xyz);
    -00144     *bottom /= len;
    -00145     len = length(near->xyz);
    -00146     *near /= len;
    -00147     len = length(far->xyz);
    -00148     *far /= len;
    -00149 }
    -00150 
    -00161 __inline__ static bool __attribute__((overloadable, always_inline))
    -00162 rsIsSphereInFrustum(float4 *sphere,
    -00163                       float4 *left, float4 *right,
    -00164                       float4 *top, float4 *bottom,
    -00165                       float4 *near, float4 *far) {
    -00166 
    -00167     float distToCenter = dot(left->xyz, sphere->xyz) + left->w;
    -00168     if (distToCenter < -sphere->w) {
    -00169         return false;
    -00170     }
    -00171     distToCenter = dot(right->xyz, sphere->xyz) + right->w;
    -00172     if (distToCenter < -sphere->w) {
    -00173         return false;
    -00174     }
    -00175     distToCenter = dot(top->xyz, sphere->xyz) + top->w;
    -00176     if (distToCenter < -sphere->w) {
    -00177         return false;
    -00178     }
    -00179     distToCenter = dot(bottom->xyz, sphere->xyz) + bottom->w;
    -00180     if (distToCenter < -sphere->w) {
    -00181         return false;
    -00182     }
    -00183     distToCenter = dot(near->xyz, sphere->xyz) + near->w;
    -00184     if (distToCenter < -sphere->w) {
    -00185         return false;
    -00186     }
    -00187     distToCenter = dot(far->xyz, sphere->xyz) + far->w;
    -00188     if (distToCenter < -sphere->w) {
    -00189         return false;
    -00190     }
    -00191     return true;
    -00192 }
    -00193 
    -00194 
    -00205 _RS_RUNTIME uchar4 __attribute__((overloadable)) rsPackColorTo8888(float r, float g, float b);
    -00206 
    -00217 _RS_RUNTIME uchar4 __attribute__((overloadable)) rsPackColorTo8888(float r, float g, float b, float a);
    -00218 
    -00227 _RS_RUNTIME uchar4 __attribute__((overloadable)) rsPackColorTo8888(float3 color);
    -00228 
    -00236 _RS_RUNTIME uchar4 __attribute__((overloadable)) rsPackColorTo8888(float4 color);
    -00237 
    -00245 _RS_RUNTIME float4 rsUnpackColor8888(uchar4 c);
    -00246 
    -00247 _RS_RUNTIME uchar4 __attribute__((overloadable)) rsYuvToRGBA_uchar4(uchar y, uchar u, uchar v);
    -00248 _RS_RUNTIME float4 __attribute__((overloadable)) rsYuvToRGBA_float4(uchar y, uchar u, uchar v);
    -00249 
    -00250 
    -00251 #endif
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__matrix_8rsh.html b/docs/html/reference/renderscript/rs__matrix_8rsh.html deleted file mode 100644 index 3b8e047..0000000 --- a/docs/html/reference/renderscript/rs__matrix_8rsh.html +++ /dev/null @@ -1,1579 +0,0 @@ - - - - - -frameworks/rs/scriptc/rs_matrix.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    frameworks/rs/scriptc/rs_matrix.rsh File Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    _RS_RUNTIME void rsMatrixSet (rs_matrix4x4 *m, uint32_t col, uint32_t row, float v)
    _RS_RUNTIME void rsMatrixSet (rs_matrix3x3 *m, uint32_t col, uint32_t row, float v)
    _RS_RUNTIME void rsMatrixSet (rs_matrix2x2 *m, uint32_t col, uint32_t row, float v)
    _RS_RUNTIME float rsMatrixGet (const rs_matrix4x4 *m, uint32_t col, uint32_t row)
    _RS_RUNTIME float rsMatrixGet (const rs_matrix3x3 *m, uint32_t col, uint32_t row)
    _RS_RUNTIME float rsMatrixGet (const rs_matrix2x2 *m, uint32_t col, uint32_t row)
    void rsMatrixLoadIdentity (rs_matrix4x4 *m)
    void rsMatrixLoadIdentity (rs_matrix3x3 *m)
    void rsMatrixLoadIdentity (rs_matrix2x2 *m)
    void rsMatrixLoad (rs_matrix4x4 *m, const float *v)
    void rsMatrixLoad (rs_matrix3x3 *m, const float *v)
    void rsMatrixLoad (rs_matrix2x2 *m, const float *v)
    void rsMatrixLoad (rs_matrix4x4 *m, const rs_matrix4x4 *v)
    void rsMatrixLoad (rs_matrix4x4 *m, const rs_matrix3x3 *v)
    void rsMatrixLoad (rs_matrix4x4 *m, const rs_matrix2x2 *v)
    void rsMatrixLoad (rs_matrix3x3 *m, const rs_matrix3x3 *v)
    void rsMatrixLoad (rs_matrix2x2 *m, const rs_matrix2x2 *v)
    void rsMatrixLoadRotate (rs_matrix4x4 *m, float rot, float x, float y, float z)
    void rsMatrixLoadScale (rs_matrix4x4 *m, float x, float y, float z)
    void rsMatrixLoadTranslate (rs_matrix4x4 *m, float x, float y, float z)
    void rsMatrixLoadMultiply (rs_matrix4x4 *m, const rs_matrix4x4 *lhs, const rs_matrix4x4 *rhs)
    void rsMatrixLoadMultiply (rs_matrix3x3 *m, const rs_matrix3x3 *lhs, const rs_matrix3x3 *rhs)
    void rsMatrixLoadMultiply (rs_matrix2x2 *m, const rs_matrix2x2 *lhs, const rs_matrix2x2 *rhs)
    void rsMatrixMultiply (rs_matrix4x4 *m, const rs_matrix4x4 *rhs)
    void rsMatrixMultiply (rs_matrix3x3 *m, const rs_matrix3x3 *rhs)
    void rsMatrixMultiply (rs_matrix2x2 *m, const rs_matrix2x2 *rhs)
    void rsMatrixRotate (rs_matrix4x4 *m, float rot, float x, float y, float z)
    void rsMatrixScale (rs_matrix4x4 *m, float x, float y, float z)
    void rsMatrixTranslate (rs_matrix4x4 *m, float x, float y, float z)
    void rsMatrixLoadOrtho (rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far)
    void rsMatrixLoadFrustum (rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far)
    void rsMatrixLoadPerspective (rs_matrix4x4 *m, float fovy, float aspect, float near, float far)
    _RS_RUNTIME float4 rsMatrixMultiply (rs_matrix4x4 *m, float4 in)
    _RS_RUNTIME float3 rsMatrixMultiply (rs_matrix3x3 *m, float3 in)
    _RS_RUNTIME float2 rsMatrixMultiply (rs_matrix2x2 *m, float2 in)
    bool rsMatrixInverse (rs_matrix4x4 *m)
    bool rsMatrixInverseTranspose (rs_matrix4x4 *m)
    void rsMatrixTranspose (rs_matrix4x4 *m)
    void rsMatrixTranspose (rs_matrix3x3 *m)
    void rsMatrixTranspose (rs_matrix2x2 *m)
    -

    Detailed Description

    -

    Matrix functions.

    -

    These functions let you manipulate square matrices of rank 2x2, 3x3, and 4x4. They are particularly useful for graphical transformations and are compatible with OpenGL.

    -

    A few general notes:

    -
      -
    • We use a zero-based index for rows and columns. E.g. the last element of a rs_matrix4x4 is found at (3, 3).
    • -
    -
      -
    • RenderScript uses column-based vectors. Transforming a vector is done by postmultiplying the vector, e.g. (matrix * vector), as provided by rsMatrixMultiply.
    • -
    -
      -
    • To create a transformation matrix that performs two transformations at once, multiply the two source matrices, with the first transformation as the right argument. E.g. to create a transformation matrix that applies the transformation s1 followed by s2, call rsMatrixLoadMultiply(&combined, &s2, &s1). This derives from s2 * (s1 * v), which is (s2 * s1) * v.
    • -
    -
      -
    • We have two style of functions to create transformation matrices: rsMatrixLoadTransformation and rsMatrixTransformation. The former style simply stores the transformation matrix in the first argument. The latter modifies a pre-existing transformation matrix so that the new transformation happens first. E.g. if you call rsMatrixTranslate on a matrix that already does a scaling, the resulting matrix when applied to a vector will first do the translation then the scaling.
    • -
    - -

    Definition in file rs_matrix.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME float rsMatrixGet (const rs_matrix4x4m,
    uint32_t col,
    uint32_t row 
    )
    -
    -
    -

    Returns one element of a matrix.

    -
    Parameters:
    - - - - -
    mThe matrix to extract the element from.
    colThe zero-based column of the element to be extracted.
    rowThe zero-based row of the element to extracted.
    -
    -
    -
    Warning:
    The order of the column and row parameters may be unexpected.
    -
    Returns:
    float
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME float rsMatrixGet (const rs_matrix3x3m,
    uint32_t col,
    uint32_t row 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME float rsMatrixGet (const rs_matrix2x2m,
    uint32_t col,
    uint32_t row 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsMatrixInverse (rs_matrix4x4m)
    -
    -
    -

    Inverts a matrix in place.

    -

    Returns true if the matrix was successfully inversed.

    -
    Parameters:
    - - -
    mThe matrix to invert.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsMatrixInverseTranspose (rs_matrix4x4m)
    -
    -
    -

    Inverts and transpose a matrix in place.

    -

    The matrix is first inverted then transposed. Returns true if the matrix was successfully inverted.

    -
    Parameters:
    - - -
    mThe matrix to modify.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoad (rs_matrix4x4m,
    const float * v 
    )
    -
    -
    -

    Set the elements of a matrix from an array of floats.

    -

    The array of floats should be in row-major order, i.e. the element a row 0, column 0 should be first, followed by the element at row 0, column 1, etc.

    -
    Parameters:
    - - - -
    mThe matrix to set.
    vThe array of values to set the matrix to. These arrays should be 4, 9, or 16 floats long, depending on the matrix size.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoad (rs_matrix3x3m,
    const float * v 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoad (rs_matrix2x2m,
    const float * v 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoad (rs_matrix4x4m,
    const rs_matrix4x4v 
    )
    -
    -
    -

    Set the elements of a matrix from another matrix.

    -

    If the source matrix is smaller than the destination, the rest of the destination is filled with elements of the identity matrix. E.g. loading a rs_matrix2x2 into a rs_matrix4x4 will give:

    - - - - - -
    m00m010.00.0
    m10m110.00.0
    0.00.01.00.0
    0.00.00.01.0
    Parameters:
    - - - -
    mThe matrix to set.
    vThe source matrix.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoad (rs_matrix4x4m,
    const rs_matrix3x3v 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoad (rs_matrix4x4m,
    const rs_matrix2x2v 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoad (rs_matrix3x3m,
    const rs_matrix3x3v 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoad (rs_matrix2x2m,
    const rs_matrix2x2v 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadFrustum (rs_matrix4x4m,
    float left,
    float right,
    float bottom,
    float top,
    float near,
    float far 
    )
    -
    -
    -

    Load a frustum projection matrix.

    -

    Constructs a frustum projection matrix, transforming the box identified by the six clipping planes left, right, bottom, top, near, far.

    -

    To apply this projection to a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -

    See https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf

    -
    Parameters:
    - - - - - - - - -
    mThe matrix to set.
    left
    right
    bottom
    top
    near
    far
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsMatrixLoadIdentity (rs_matrix4x4m)
    -
    -
    -

    Set the elements of a matrix to the identity matrix.

    -
    Parameters:
    - - -
    mThe matrix to set.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsMatrixLoadIdentity (rs_matrix3x3m)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsMatrixLoadIdentity (rs_matrix2x2m)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadMultiply (rs_matrix4x4m,
    const rs_matrix4x4lhs,
    const rs_matrix4x4rhs 
    )
    -
    -
    -

    Multiply two matrices.

    -

    Sets m to the matrix product of lhs * rhs.

    -

    To combine two 4x4 transformaton matrices, multiply the second transformation matrix by the first transformation matrix. E.g. to create a transformation matrix that applies the transformation s1 followed by s2, call rsMatrixLoadMultiply(&combined, &s2, &s1).

    -
    Warning:
    As of version 21, storing the result back into right matrix is not supported and will result in undefined behavior. Use rsMatrixMulitply instead. E.g. instead of doing rsMatrixLoadMultiply (&m2r, &m2r, &m2l), use rsMatrixMultiply (&m2r, &m2l). rsMatrixLoadMultiply (&m2l, &m2r, &m2l) works as expected.
    -
    Parameters:
    - - - - -
    mThe matrix to set.
    lhsThe left matrix of the product.
    rhsThe right matrix of the product.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadMultiply (rs_matrix3x3m,
    const rs_matrix3x3lhs,
    const rs_matrix3x3rhs 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadMultiply (rs_matrix2x2m,
    const rs_matrix2x2lhs,
    const rs_matrix2x2rhs 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadOrtho (rs_matrix4x4m,
    float left,
    float right,
    float bottom,
    float top,
    float near,
    float far 
    )
    -
    -
    -

    Load an orthographic projection matrix.

    -

    Constructs an orthographic projection matrix, transforming the box identified by the six clipping planes left, right, bottom, top, near, far into a unit cube with a corner at (-1, -1, -1) and the opposite at (1, 1, 1).

    -

    To apply this projection to a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -

    See https://en.wikipedia.org/wiki/Orthographic_projection and https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf

    -
    Parameters:
    - - - - - - - - -
    mThe matrix to set.
    left
    right
    bottom
    top
    near
    far
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadPerspective (rs_matrix4x4m,
    float fovy,
    float aspect,
    float near,
    float far 
    )
    -
    -
    -

    Load a perspective projection matrix.

    -

    Constructs a perspective projection matrix, assuming a symmetrical field of view.

    -

    To apply this projection to a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -

    See https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf

    -
    Parameters:
    - - - - - - -
    mThe matrix to set.
    fovyField of view, in degrees along the Y axis.
    aspectRatio of x / y.
    nearThe near clipping plane.
    farThe far clipping plane.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadRotate (rs_matrix4x4m,
    float rot,
    float x,
    float y,
    float z 
    )
    -
    -
    -

    Load a rotation matrix.

    -

    This function creates a rotation matrix. The axis of rotation is the (x, y, z) vector.

    -

    To rotate a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -

    See http://en.wikipedia.org/wiki/Rotation_matrix .

    -
    Parameters:
    - - - - - - -
    mThe matrix to set.
    rotHow much rotation to do, in degrees.
    xThe x component of the vector that is the axis of rotation.
    yThe y component of the vector that is the axis of rotation.
    zThe z component of the vector that is the axis of rotation.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadScale (rs_matrix4x4m,
    float x,
    float y,
    float z 
    )
    -
    -
    -

    Load a scale matrix.

    -

    This function creates a scaling matrix, where each component of a vector is multiplied by a number. This number can be negative.

    -

    To scale a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -
    Parameters:
    - - - - - -
    mThe matrix to set.
    xThe multiple to scale the x components by.
    yThe multiple to scale the y components by.
    zThe multiple to scale the z components by.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixLoadTranslate (rs_matrix4x4m,
    float x,
    float y,
    float z 
    )
    -
    -
    -

    Load a translation matrix.

    -

    This function creates a translation matrix, where a number is added to each element of a vector.

    -

    To translate a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -
    Parameters:
    - - - - - -
    mThe matrix to set.
    xThe number to add to each x component.
    yThe number to add to each y component.
    zThe number to add to each z component.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixMultiply (rs_matrix4x4m,
    const rs_matrix4x4rhs 
    )
    -
    -
    -

    Multiply a matrix into another one.

    -

    Sets m to the matrix product m * rhs.

    -

    When combining two 4x4 transformation matrices using this function, the resulting matrix will correspond to performing the rhs transformation first followed by the original m transformation.

    -
    Parameters:
    - - - -
    mThe left matrix of the product and the matrix to be set.
    rhsThe right matrix of the product.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixMultiply (rs_matrix3x3m,
    const rs_matrix3x3rhs 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsMatrixMultiply (rs_matrix2x2m,
    const rs_matrix2x2rhs 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME float4 rsMatrixMultiply (rs_matrix4x4m,
    float4 in 
    )
    -
    -
    -

    Multiply a vector by a matrix.

    -

    Returns the post-multiplication of the vector by the matrix, ie. m * in.

    -

    When multiplying a float3 to a rs_matrix4x4, the vector is expanded with (1).

    -

    When multiplying a float2 to a rs_matrix4x4, the vector is expanded with (0, 1).

    -

    When multiplying a float2 to a rs_matrix3x3, the vector is expanded with (0).

    -

    This function is available in API version 10-13. Starting with API 14, the function takes a const matrix as the first argument.

    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME float3 rsMatrixMultiply (rs_matrix3x3m,
    float3 in 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME float2 rsMatrixMultiply (rs_matrix2x2m,
    float2 in 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixRotate (rs_matrix4x4m,
    float rot,
    float x,
    float y,
    float z 
    )
    -
    -
    -

    Multiply the matrix m with a rotation matrix.

    -

    This function modifies a transformation matrix to first do a rotation. The axis of rotation is the (x, y, z) vector.

    -

    To apply this combined transformation to a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -
    Parameters:
    - - - - - - -
    mThe matrix to modify.
    rotHow much rotation to do, in degrees.
    xThe x component of the vector that is the axis of rotation.
    yThe y component of the vector that is the axis of rotation.
    zThe z component of the vector that is the axis of rotation.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixScale (rs_matrix4x4m,
    float x,
    float y,
    float z 
    )
    -
    -
    -

    Multiply the matrix m with a scaling matrix.

    -

    This function modifies a transformation matrix to first do a scaling. When scaling, each component of a vector is multiplied by a number. This number can be negative.

    -

    To apply this combined transformation to a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -
    Parameters:
    - - - - - -
    mThe matrix to modify.
    xThe multiple to scale the x components by.
    yThe multiple to scale the y components by.
    zThe multiple to scale the z components by.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME void rsMatrixSet (rs_matrix4x4m,
    uint32_t col,
    uint32_t row,
    float v 
    )
    -
    -
    -

    Set an element of a matrix.

    -
    Parameters:
    - - - - - -
    mThe matrix that will be modified.
    colThe zero-based column of the element to be set.
    rowThe zero-based row of the element to be set.
    vThe value to set.
    -
    -
    -
    Warning:
    The order of the column and row parameters may be unexpected.
    -
    Returns:
    void
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME void rsMatrixSet (rs_matrix3x3m,
    uint32_t col,
    uint32_t row,
    float v 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    _RS_RUNTIME void rsMatrixSet (rs_matrix2x2m,
    uint32_t col,
    uint32_t row,
    float v 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void rsMatrixTranslate (rs_matrix4x4m,
    float x,
    float y,
    float z 
    )
    -
    -
    -

    Multiply the matrix m with a translation matrix.

    -

    This function modifies a transformation matrix to first do a translation. When translating, a number is added to each component of a vector.

    -

    To apply this combined transformation to a vector, multiply the vector by the created matrix using rsMatrixMultiply.

    -
    Parameters:
    - - - - - -
    mThe matrix to modify.
    xThe number to add to each x component.
    yThe number to add to each y component.
    zThe number to add to each z component.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsMatrixTranspose (rs_matrix4x4m)
    -
    -
    -

    Transpose the matrix m in place.

    -
    Parameters:
    - - -
    mThe matrix to transpose.
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsMatrixTranspose (rs_matrix3x3m)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsMatrixTranspose (rs_matrix2x2m)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__matrix_8rsh_source.html b/docs/html/reference/renderscript/rs__matrix_8rsh_source.html deleted file mode 100644 index 77144bd..0000000 --- a/docs/html/reference/renderscript/rs__matrix_8rsh_source.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - -frameworks/rs/scriptc/rs_matrix.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    frameworks/rs/scriptc/rs_matrix.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00050 #ifndef __RS_MATRIX_RSH__
    -00051 #define __RS_MATRIX_RSH__
    -00052 
    -00066 _RS_RUNTIME void __attribute__((overloadable))
    -00067 rsMatrixSet(rs_matrix4x4 *m, uint32_t col, uint32_t row, float v);
    -00071 _RS_RUNTIME void __attribute__((overloadable))
    -00072 rsMatrixSet(rs_matrix3x3 *m, uint32_t col, uint32_t row, float v);
    -00076 _RS_RUNTIME void __attribute__((overloadable))
    -00077 rsMatrixSet(rs_matrix2x2 *m, uint32_t col, uint32_t row, float v);
    -00078 
    -00091 _RS_RUNTIME float __attribute__((overloadable))
    -00092 rsMatrixGet(const rs_matrix4x4 *m, uint32_t col, uint32_t row);
    -00096 _RS_RUNTIME float __attribute__((overloadable))
    -00097 rsMatrixGet(const rs_matrix3x3 *m, uint32_t col, uint32_t row);
    -00101 _RS_RUNTIME float __attribute__((overloadable))
    -00102 rsMatrixGet(const rs_matrix2x2 *m, uint32_t col, uint32_t row);
    -00103 
    -00109 extern void __attribute__((overloadable)) rsMatrixLoadIdentity(rs_matrix4x4 *m);
    -00113 extern void __attribute__((overloadable)) rsMatrixLoadIdentity(rs_matrix3x3 *m);
    -00117 extern void __attribute__((overloadable)) rsMatrixLoadIdentity(rs_matrix2x2 *m);
    -00118 
    -00130 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4 *m, const float *v);
    -00134 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix3x3 *m, const float *v);
    -00138 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix2x2 *m, const float *v);
    -00156 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4 *m, const rs_matrix4x4 *v);
    -00160 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4 *m, const rs_matrix3x3 *v);
    -00164 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix4x4 *m, const rs_matrix2x2 *v);
    -00168 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix3x3 *m, const rs_matrix3x3 *v);
    -00172 extern void __attribute__((overloadable)) rsMatrixLoad(rs_matrix2x2 *m, const rs_matrix2x2 *v);
    -00173 
    -00191 extern void __attribute__((overloadable))
    -00192 rsMatrixLoadRotate(rs_matrix4x4 *m, float rot, float x, float y, float z);
    -00193 
    -00208 extern void __attribute__((overloadable))
    -00209 rsMatrixLoadScale(rs_matrix4x4 *m, float x, float y, float z);
    -00210 
    -00225 extern void __attribute__((overloadable))
    -00226 rsMatrixLoadTranslate(rs_matrix4x4 *m, float x, float y, float z);
    -00227 
    -00247 extern void __attribute__((overloadable))
    -00248 rsMatrixLoadMultiply(rs_matrix4x4 *m, const rs_matrix4x4 *lhs, const rs_matrix4x4 *rhs);
    -00252 extern void __attribute__((overloadable))
    -00253 rsMatrixLoadMultiply(rs_matrix3x3 *m, const rs_matrix3x3 *lhs, const rs_matrix3x3 *rhs);
    -00257 extern void __attribute__((overloadable))
    -00258 rsMatrixLoadMultiply(rs_matrix2x2 *m, const rs_matrix2x2 *lhs, const rs_matrix2x2 *rhs);
    -00259 
    -00272 extern void __attribute__((overloadable))
    -00273 rsMatrixMultiply(rs_matrix4x4 *m, const rs_matrix4x4 *rhs);
    -00277 extern void __attribute__((overloadable))
    -00278 rsMatrixMultiply(rs_matrix3x3 *m, const rs_matrix3x3 *rhs);
    -00282 extern void __attribute__((overloadable))
    -00283 rsMatrixMultiply(rs_matrix2x2 *m, const rs_matrix2x2 *rhs);
    -00284 
    -00300 extern void __attribute__((overloadable))
    -00301 rsMatrixRotate(rs_matrix4x4 *m, float rot, float x, float y, float z);
    -00302 
    -00318 extern void __attribute__((overloadable))
    -00319 rsMatrixScale(rs_matrix4x4 *m, float x, float y, float z);
    -00320 
    -00336 extern void __attribute__((overloadable))
    -00337 rsMatrixTranslate(rs_matrix4x4 *m, float x, float y, float z);
    -00338 
    -00361 extern void __attribute__((overloadable))
    -00362 rsMatrixLoadOrtho(rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far);
    -00363 
    -00384 extern void __attribute__((overloadable))
    -00385 rsMatrixLoadFrustum(rs_matrix4x4 *m, float left, float right, float bottom, float top, float near, float far);
    -00386 
    -00403 extern void __attribute__((overloadable))
    -00404 rsMatrixLoadPerspective(rs_matrix4x4* m, float fovy, float aspect, float near, float far);
    -00405 
    -00406 #if !defined(RS_VERSION) || (RS_VERSION < 14)
    -00407 
    -00421 _RS_RUNTIME float4 __attribute__((overloadable))
    -00422 rsMatrixMultiply(rs_matrix4x4 *m, float4 in);
    -00423 
    -00427 _RS_RUNTIME float4 __attribute__((overloadable))
    -00428 rsMatrixMultiply(rs_matrix4x4 *m, float3 in);
    -00429 
    -00433 _RS_RUNTIME float4 __attribute__((overloadable))
    -00434 rsMatrixMultiply(rs_matrix4x4 *m, float2 in);
    -00435 
    -00439 _RS_RUNTIME float3 __attribute__((overloadable))
    -00440 rsMatrixMultiply(rs_matrix3x3 *m, float3 in);
    -00441 
    -00445 _RS_RUNTIME float3 __attribute__((overloadable))
    -00446 rsMatrixMultiply(rs_matrix3x3 *m, float2 in);
    -00447 
    -00451 _RS_RUNTIME float2 __attribute__((overloadable))
    -00452 rsMatrixMultiply(rs_matrix2x2 *m, float2 in);
    -00453 #else
    -00454 
    -00467 _RS_RUNTIME float4 __attribute__((overloadable))
    -00468 rsMatrixMultiply(const rs_matrix4x4 *m, float4 in);
    -00469 
    -00473 _RS_RUNTIME float4 __attribute__((overloadable))
    -00474 rsMatrixMultiply(const rs_matrix4x4 *m, float3 in);
    -00475 
    -00479 _RS_RUNTIME float4 __attribute__((overloadable))
    -00480 rsMatrixMultiply(const rs_matrix4x4 *m, float2 in);
    -00481 
    -00485 _RS_RUNTIME float3 __attribute__((overloadable))
    -00486 rsMatrixMultiply(const rs_matrix3x3 *m, float3 in);
    -00487 
    -00491 _RS_RUNTIME float3 __attribute__((overloadable))
    -00492 rsMatrixMultiply(const rs_matrix3x3 *m, float2 in);
    -00493 
    -00497 _RS_RUNTIME float2 __attribute__((overloadable))
    -00498 rsMatrixMultiply(const rs_matrix2x2 *m, float2 in);
    -00499 #endif
    -00500 
    -00501 
    -00509 extern bool __attribute__((overloadable)) rsMatrixInverse(rs_matrix4x4 *m);
    -00510 
    -00519 extern bool __attribute__((overloadable)) rsMatrixInverseTranspose(rs_matrix4x4 *m);
    -00520 
    -00526 extern void __attribute__((overloadable)) rsMatrixTranspose(rs_matrix4x4 *m);
    -00530 extern void __attribute__((overloadable)) rsMatrixTranspose(rs_matrix3x3 *m);
    -00534 extern void __attribute__((overloadable)) rsMatrixTranspose(rs_matrix2x2 *m);
    -00535 
    -00536 
    -00537 #endif
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__mesh_8rsh.html b/docs/html/reference/renderscript/rs__mesh_8rsh.html deleted file mode 100644 index 82824adc..0000000 --- a/docs/html/reference/renderscript/rs__mesh_8rsh.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_mesh.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_mesh.rsh File Reference
    -
    -
    - - - - - - - -

    -Functions

    uint32_t rsgMeshGetVertexAllocationCount (rs_mesh m)
    uint32_t rsgMeshGetPrimitiveCount (rs_mesh m)
    rs_allocation rsgMeshGetVertexAllocation (rs_mesh m, uint32_t index)
    rs_allocation rsgMeshGetIndexAllocation (rs_mesh m, uint32_t index)
    rs_primitive rsgMeshGetPrimitive (rs_mesh m, uint32_t index)
    -

    Detailed Description

    -

    Mesh routines.

    - -

    Definition in file rs_mesh.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    rs_allocation rsgMeshGetIndexAllocation (rs_mesh m,
    uint32_t index 
    )
    -
    -
    -

    Returns an allocation containing index data or a null allocation if only the primitive is specified

    -
    Parameters:
    - - - -
    mmesh to get data from
    indexindex of the index allocation
    -
    -
    -
    Returns:
    allocation containing index data
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    rs_primitive rsgMeshGetPrimitive (rs_mesh m,
    uint32_t index 
    )
    -
    -
    -

    Returns the primitive describing how a part of the mesh is rendered

    -
    Parameters:
    - - - -
    mmesh to get data from
    indexindex of the primitive
    -
    -
    -
    Returns:
    primitive describing how the mesh is rendered
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsgMeshGetPrimitiveCount (rs_mesh m)
    -
    -
    -

    Meshes could have multiple index sets, this function returns the number.

    -
    Parameters:
    - - -
    mmesh to get data from
    -
    -
    -
    Returns:
    number of primitive groups in the mesh. This would include simple primitives as well as allocations containing index data
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    rs_allocation rsgMeshGetVertexAllocation (rs_mesh m,
    uint32_t index 
    )
    -
    -
    -

    Returns an allocation that is part of the mesh and contains vertex data, e.g. positions, normals, texcoords

    -
    Parameters:
    - - - -
    mmesh to get data from
    indexindex of the vertex allocation
    -
    -
    -
    Returns:
    allocation containing vertex data
    - -
    -
    - -
    -
    - - - - - - - - -
    uint32_t rsgMeshGetVertexAllocationCount (rs_mesh m)
    -
    -
    -

    Returns the number of allocations in the mesh that contain vertex data

    -
    Parameters:
    - - -
    mmesh to get data from
    -
    -
    -
    Returns:
    number of allocations in the mesh that contain vertex data
    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__mesh_8rsh_source.html b/docs/html/reference/renderscript/rs__mesh_8rsh_source.html deleted file mode 100644 index f9416c8..0000000 --- a/docs/html/reference/renderscript/rs__mesh_8rsh_source.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_mesh.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_mesh.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2012 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_MESH_RSH__
    -00024 #define __RS_MESH_RSH__
    -00025 
    -00026 // New API's
    -00027 #if (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00028 
    -00037 extern uint32_t __attribute__((overloadable))
    -00038     rsgMeshGetVertexAllocationCount(rs_mesh m);
    -00039 
    -00049 extern uint32_t __attribute__((overloadable))
    -00050     rsgMeshGetPrimitiveCount(rs_mesh m);
    -00051 
    -00060 extern rs_allocation __attribute__((overloadable))
    -00061     rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index);
    -00062 
    -00071 extern rs_allocation __attribute__((overloadable))
    -00072     rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index);
    -00073 
    -00082 extern rs_primitive __attribute__((overloadable))
    -00083     rsgMeshGetPrimitive(rs_mesh m, uint32_t index);
    -00084 
    -00085 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00086 
    -00087 #endif // __RS_MESH_RSH__
    -00088 
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__object_8rsh.html b/docs/html/reference/renderscript/rs__object_8rsh.html deleted file mode 100644 index 6ace343..0000000 --- a/docs/html/reference/renderscript/rs__object_8rsh.html +++ /dev/null @@ -1,858 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh File Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    void rsSetObject (rs_element *dst, rs_element src)
    void rsSetObject (rs_type *dst, rs_type src)
    void rsSetObject (rs_allocation *dst, rs_allocation src)
    void rsSetObject (rs_sampler *dst, rs_sampler src)
    void rsSetObject (rs_script *dst, rs_script src)
    void rsSetObject (rs_path *dst, rs_path src)
    void rsSetObject (rs_mesh *dst, rs_mesh src)
    void rsSetObject (rs_program_fragment *dst, rs_program_fragment src)
    void rsSetObject (rs_program_vertex *dst, rs_program_vertex src)
    void rsSetObject (rs_program_raster *dst, rs_program_raster src)
    void rsSetObject (rs_program_store *dst, rs_program_store src)
    void rsSetObject (rs_font *dst, rs_font src)
    void rsClearObject (rs_element *dst)
    void rsClearObject (rs_type *dst)
    void rsClearObject (rs_allocation *dst)
    void rsClearObject (rs_sampler *dst)
    void rsClearObject (rs_script *dst)
    void rsClearObject (rs_path *dst)
    void rsClearObject (rs_mesh *dst)
    void rsClearObject (rs_program_fragment *dst)
    void rsClearObject (rs_program_vertex *dst)
    void rsClearObject (rs_program_raster *dst)
    void rsClearObject (rs_program_store *dst)
    void rsClearObject (rs_font *dst)
    bool rsIsObject (rs_element)
    bool rsIsObject (rs_type)
    bool rsIsObject (rs_allocation)
    bool rsIsObject (rs_sampler)
    bool rsIsObject (rs_script)
    bool rsIsObject (rs_path)
    bool rsIsObject (rs_mesh)
    bool rsIsObject (rs_program_fragment)
    bool rsIsObject (rs_program_vertex)
    bool rsIsObject (rs_program_raster)
    bool rsIsObject (rs_program_store)
    bool rsIsObject (rs_font)
    -

    Detailed Description

    -

    Object routines.

    - -

    Definition in file rs_object.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_elementdst)
    -
    -
    -

    Sets the object to NULL.

    -
    Returns:
    bool
    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_typedst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_allocationdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_samplerdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_scriptdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_pathdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_meshdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_program_fragmentdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_program_vertexdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_program_rasterdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_program_storedst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    void rsClearObject (rs_fontdst)
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_element )
    -
    -
    -

    Tests if the object is valid. Returns true if the object is valid, false if it is NULL.

    -
    Returns:
    bool
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_type )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_allocation )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_sampler )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_script )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_path )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_mesh )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_program_fragment )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_program_vertex )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_program_raster )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_program_store )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsIsObject (rs_font )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_elementdst,
    rs_element src 
    )
    -
    -
    -

    Copy reference to the specified object.

    -
    Parameters:
    - - - -
    dst
    src
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_typedst,
    rs_type src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_allocationdst,
    rs_allocation src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_samplerdst,
    rs_sampler src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_scriptdst,
    rs_script src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_pathdst,
    rs_path src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_meshdst,
    rs_mesh src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_program_fragmentdst,
    rs_program_fragment src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_program_vertexdst,
    rs_program_vertex src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_program_rasterdst,
    rs_program_raster src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_program_storedst,
    rs_program_store src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void rsSetObject (rs_fontdst,
    rs_font src 
    )
    -
    -
    -

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__object_8rsh_source.html b/docs/html/reference/renderscript/rs__object_8rsh_source.html deleted file mode 100644 index 9cd43b4..0000000 --- a/docs/html/reference/renderscript/rs__object_8rsh_source.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_OBJECT_RSH__
    -00024 #define __RS_OBJECT_RSH__
    -00025 
    -00026 
    -00033 extern void __attribute__((overloadable))
    -00034     rsSetObject(rs_element *dst, rs_element src);
    -00038 extern void __attribute__((overloadable))
    -00039     rsSetObject(rs_type *dst, rs_type src);
    -00043 extern void __attribute__((overloadable))
    -00044     rsSetObject(rs_allocation *dst, rs_allocation src);
    -00048 extern void __attribute__((overloadable))
    -00049     rsSetObject(rs_sampler *dst, rs_sampler src);
    -00053 extern void __attribute__((overloadable))
    -00054     rsSetObject(rs_script *dst, rs_script src);
    -00058 extern void __attribute__((overloadable))
    -00059     rsSetObject(rs_path *dst, rs_path src);
    -00063 extern void __attribute__((overloadable))
    -00064     rsSetObject(rs_mesh *dst, rs_mesh src);
    -00068 extern void __attribute__((overloadable))
    -00069     rsSetObject(rs_program_fragment *dst, rs_program_fragment src);
    -00073 extern void __attribute__((overloadable))
    -00074     rsSetObject(rs_program_vertex *dst, rs_program_vertex src);
    -00078 extern void __attribute__((overloadable))
    -00079     rsSetObject(rs_program_raster *dst, rs_program_raster src);
    -00083 extern void __attribute__((overloadable))
    -00084     rsSetObject(rs_program_store *dst, rs_program_store src);
    -00088 extern void __attribute__((overloadable))
    -00089     rsSetObject(rs_font *dst, rs_font src);
    -00090 
    -00096 extern void __attribute__((overloadable))
    -00097     rsClearObject(rs_element *dst);
    -00101 extern void __attribute__((overloadable))
    -00102     rsClearObject(rs_type *dst);
    -00106 extern void __attribute__((overloadable))
    -00107     rsClearObject(rs_allocation *dst);
    -00111 extern void __attribute__((overloadable))
    -00112     rsClearObject(rs_sampler *dst);
    -00116 extern void __attribute__((overloadable))
    -00117     rsClearObject(rs_script *dst);
    -00121 extern void __attribute__((overloadable))
    -00122     rsClearObject(rs_path *dst);
    -00126 extern void __attribute__((overloadable))
    -00127     rsClearObject(rs_mesh *dst);
    -00131 extern void __attribute__((overloadable))
    -00132     rsClearObject(rs_program_fragment *dst);
    -00136 extern void __attribute__((overloadable))
    -00137     rsClearObject(rs_program_vertex *dst);
    -00141 extern void __attribute__((overloadable))
    -00142     rsClearObject(rs_program_raster *dst);
    -00146 extern void __attribute__((overloadable))
    -00147     rsClearObject(rs_program_store *dst);
    -00151 extern void __attribute__((overloadable))
    -00152     rsClearObject(rs_font *dst);
    -00153 
    -00154 
    -00155 
    -00162 extern bool __attribute__((overloadable))
    -00163     rsIsObject(rs_element);
    -00167 extern bool __attribute__((overloadable))
    -00168     rsIsObject(rs_type);
    -00172 extern bool __attribute__((overloadable))
    -00173     rsIsObject(rs_allocation);
    -00177 extern bool __attribute__((overloadable))
    -00178     rsIsObject(rs_sampler);
    -00182 extern bool __attribute__((overloadable))
    -00183     rsIsObject(rs_script);
    -00187 extern bool __attribute__((overloadable))
    -00188     rsIsObject(rs_path);
    -00192 extern bool __attribute__((overloadable))
    -00193     rsIsObject(rs_mesh);
    -00197 extern bool __attribute__((overloadable))
    -00198     rsIsObject(rs_program_fragment);
    -00202 extern bool __attribute__((overloadable))
    -00203     rsIsObject(rs_program_vertex);
    -00207 extern bool __attribute__((overloadable))
    -00208     rsIsObject(rs_program_raster);
    -00212 extern bool __attribute__((overloadable))
    -00213     rsIsObject(rs_program_store);
    -00217 extern bool __attribute__((overloadable))
    -00218     rsIsObject(rs_font);
    -00219 
    -00220 #endif
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__program_8rsh.html b/docs/html/reference/renderscript/rs__program_8rsh.html deleted file mode 100644 index 9988383..0000000 --- a/docs/html/reference/renderscript/rs__program_8rsh.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_program.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_program.rsh File Reference
    -
    -
    - - - - - - - - - - - - - -

    -Functions

    rs_depth_func rsgProgramStoreGetDepthFunc (rs_program_store ps)
    bool rsgProgramStoreIsDepthMaskEnabled (rs_program_store ps)
    bool rsgProgramStoreIsColorMaskRedEnabled (rs_program_store ps)
    bool rsgProgramStoreIsColorMaskGreenEnabled (rs_program_store ps)
    bool rsgProgramStoreIsColorMaskBlueEnabled (rs_program_store ps)
    bool rsgProgramStoreIsColorMaskAlphaEnabled (rs_program_store ps)
    rs_blend_src_func rsgProgramStoreGetBlendSrcFunc (rs_program_store ps)
    rs_blend_dst_func rsgProgramStoreGetBlendDstFunc (rs_program_store ps)
    bool rsgProgramStoreIsDitherEnabled (rs_program_store ps)
    bool rsgProgramRasterIsPointSpriteEnabled (rs_program_raster pr)
    rs_cull_mode rsgProgramRasterGetCullMode (rs_program_raster pr)
    -

    Detailed Description

    -

    Program object routines.

    - -

    Definition in file rs_program.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - -
    rs_cull_mode rsgProgramRasterGetCullMode (rs_program_raster pr)
    -
    -
    -

    Get program raster cull mode

    -
    Parameters:
    - - -
    prprogram raster to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsgProgramRasterIsPointSpriteEnabled (rs_program_raster pr)
    -
    -
    -

    Get program raster point sprite state

    -
    Parameters:
    - - -
    prprogram raster to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_blend_dst_func rsgProgramStoreGetBlendDstFunc (rs_program_store ps)
    -
    -
    -

    Get program store blend destination function

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_blend_src_func rsgProgramStoreGetBlendSrcFunc (rs_program_store ps)
    -
    -
    -

    Get program store blend source function

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_depth_func rsgProgramStoreGetDepthFunc (rs_program_store ps)
    -
    -
    -

    Get program store depth function

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsgProgramStoreIsColorMaskAlphaEnabled (rs_program_store ps)
    -
    -
    -

    Get program store alpha component color mask

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsgProgramStoreIsColorMaskBlueEnabled (rs_program_store ps)
    -
    -
    -

    Get program store blur component color mask

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsgProgramStoreIsColorMaskGreenEnabled (rs_program_store ps)
    -
    -
    -

    Get program store green component color mask

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsgProgramStoreIsColorMaskRedEnabled (rs_program_store ps)
    -
    -
    -

    Get program store red component color mask

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsgProgramStoreIsDepthMaskEnabled (rs_program_store ps)
    -
    -
    -

    Get program store depth mask

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    bool rsgProgramStoreIsDitherEnabled (rs_program_store ps)
    -
    -
    -

    Get program store dither state

    -
    Parameters:
    - - -
    psprogram store to query
    -
    -
    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__program_8rsh_source.html b/docs/html/reference/renderscript/rs__program_8rsh_source.html deleted file mode 100644 index ed326b1..0000000 --- a/docs/html/reference/renderscript/rs__program_8rsh_source.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_program.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_program.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2012 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_PROGRAM_RSH__
    -00024 #define __RS_PROGRAM_RSH__
    -00025 
    -00026 #if (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00027 
    -00033 extern rs_depth_func __attribute__((overloadable))
    -00034     rsgProgramStoreGetDepthFunc(rs_program_store ps);
    -00035 
    -00041 extern bool __attribute__((overloadable))
    -00042     rsgProgramStoreIsDepthMaskEnabled(rs_program_store ps);
    -00048 extern bool __attribute__((overloadable))
    -00049     rsgProgramStoreIsColorMaskRedEnabled(rs_program_store ps);
    -00050 
    -00056 extern bool __attribute__((overloadable))
    -00057     rsgProgramStoreIsColorMaskGreenEnabled(rs_program_store ps);
    -00058 
    -00064 extern bool __attribute__((overloadable))
    -00065     rsgProgramStoreIsColorMaskBlueEnabled(rs_program_store ps);
    -00066 
    -00072 extern bool __attribute__((overloadable))
    -00073     rsgProgramStoreIsColorMaskAlphaEnabled(rs_program_store ps);
    -00074 
    -00080 extern rs_blend_src_func __attribute__((overloadable))
    -00081         rsgProgramStoreGetBlendSrcFunc(rs_program_store ps);
    -00082 
    -00088 extern rs_blend_dst_func __attribute__((overloadable))
    -00089     rsgProgramStoreGetBlendDstFunc(rs_program_store ps);
    -00090 
    -00096 extern bool __attribute__((overloadable))
    -00097     rsgProgramStoreIsDitherEnabled(rs_program_store ps);
    -00098 
    -00104 extern bool __attribute__((overloadable))
    -00105     rsgProgramRasterIsPointSpriteEnabled(rs_program_raster pr);
    -00106 
    -00112 extern rs_cull_mode __attribute__((overloadable))
    -00113     rsgProgramRasterGetCullMode(rs_program_raster pr);
    -00114 
    -00115 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00116 
    -00117 #endif // __RS_PROGRAM_RSH__
    -00118 
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__quaternion_8rsh.html b/docs/html/reference/renderscript/rs__quaternion_8rsh.html deleted file mode 100644 index ce94e04..0000000 --- a/docs/html/reference/renderscript/rs__quaternion_8rsh.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh File Reference
    -
    -
    - - - - - - - - - - - - - - -

    -Functions

    static void rsQuaternionSet (rs_quaternion *q, float w, float x, float y, float z)
    static void rsQuaternionSet (rs_quaternion *q, const rs_quaternion *rhs)
    static void rsQuaternionMultiply (rs_quaternion *q, float s)
    static void rsQuaternionAdd (rs_quaternion *q, const rs_quaternion *rhs)
    static void rsQuaternionLoadRotateUnit (rs_quaternion *q, float rot, float x, float y, float z)
    static void rsQuaternionLoadRotate (rs_quaternion *q, float rot, float x, float y, float z)
    static void rsQuaternionConjugate (rs_quaternion *q)
    static float rsQuaternionDot (const rs_quaternion *q0, const rs_quaternion *q1)
    static void rsQuaternionNormalize (rs_quaternion *q)
    static void rsQuaternionMultiply (rs_quaternion *q, const rs_quaternion *rhs)
    static void rsQuaternionSlerp (rs_quaternion *q, const rs_quaternion *q0, const rs_quaternion *q1, float t)
    static void rsQuaternionGetMatrixUnit (rs_matrix4x4 *m, const rs_quaternion *q)
    -

    Detailed Description

    -

    Quaternion routines.

    - -

    Definition in file rs_quaternion.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionAdd (rs_quaternionq,
    const rs_quaternionrhs 
    ) [static]
    -
    -
    -

    Add two quaternions

    -
    Parameters:
    - - - -
    qdestination quaternion to add to
    rshright hand side quaternion to add
    -
    -
    - -

    Definition at line 74 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - -
    static void rsQuaternionConjugate (rs_quaternionq) [static]
    -
    -
    -

    Conjugates the quaternion

    -
    Parameters:
    - - -
    qquaternion to conjugate
    -
    -
    - -

    Definition at line 127 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    static float rsQuaternionDot (const rs_quaternionq0,
    const rs_quaternionq1 
    ) [static]
    -
    -
    -

    Dot product of two quaternions

    -
    Parameters:
    - - - -
    q0first quaternion
    q1second quaternion
    -
    -
    -
    Returns:
    dot product between q0 and q1
    - -

    Definition at line 140 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionGetMatrixUnit (rs_matrix4x4m,
    const rs_quaternionq 
    ) [static]
    -
    -
    -

    Computes rotation matrix from the normalized quaternion

    -
    Parameters:
    - - - -
    mresulting matrix
    pnormalized quaternion
    -
    -
    - -

    Definition at line 228 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionLoadRotate (rs_quaternionq,
    float rot,
    float x,
    float y,
    float z 
    ) [static]
    -
    -
    -

    Loads a quaternion that represents a rotation about an arbitrary vector (doesn't have to be unit)

    -
    Parameters:
    - - - - - - -
    qquaternion to set
    rotangle to rotate by
    xcomponent of a vector
    ycomponent of a vector
    xcomponent of a vector
    -
    -
    - -

    Definition at line 111 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionLoadRotateUnit (rs_quaternionq,
    float rot,
    float x,
    float y,
    float z 
    ) [static]
    -
    -
    -

    Loads a quaternion that represents a rotation about an arbitrary unit vector

    -
    Parameters:
    - - - - - - -
    qquaternion to set
    rotangle to rotate by
    xcomponent of a vector
    ycomponent of a vector
    xcomponent of a vector
    -
    -
    - -

    Definition at line 90 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionMultiply (rs_quaternionq,
    float s 
    ) [static]
    -
    -
    -

    Multiply quaternion by a scalar

    -
    Parameters:
    - - - -
    qquaternion to multiply
    sscalar
    -
    -
    - -

    Definition at line 61 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionMultiply (rs_quaternionq,
    const rs_quaternionrhs 
    ) [static]
    -
    -
    -

    Multiply quaternion by another quaternion

    -
    Parameters:
    - - - -
    qdestination quaternion
    rhsright hand side quaternion to multiply by
    -
    -
    - -

    Definition at line 163 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - -
    static void rsQuaternionNormalize (rs_quaternionq) [static]
    -
    -
    -

    Normalizes the quaternion

    -
    Parameters:
    - - -
    qquaternion to normalize
    -
    -
    - -

    Definition at line 149 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionSet (rs_quaternionq,
    float w,
    float x,
    float y,
    float z 
    ) [static]
    -
    -
    -

    Set the quaternion components

    -
    Parameters:
    - - - - - -
    wcomponent
    xcomponent
    ycomponent
    zcomponent
    -
    -
    - -

    Definition at line 35 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionSet (rs_quaternionq,
    const rs_quaternionrhs 
    ) [static]
    -
    -
    -

    Set the quaternion from another quaternion

    -
    Parameters:
    - - - -
    qdestination quaternion
    rhssource quaternion
    -
    -
    - -

    Definition at line 48 of file rs_quaternion.rsh.

    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static void rsQuaternionSlerp (rs_quaternionq,
    const rs_quaternionq0,
    const rs_quaternionq1,
    float t 
    ) [static]
    -
    -
    -

    Performs spherical linear interpolation between two quaternions

    -
    Parameters:
    - - - - - -
    qresult quaternion from interpolation
    q0first param
    q1second param
    thow much to interpolate by
    -
    -
    - -

    Definition at line 182 of file rs_quaternion.rsh.

    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__quaternion_8rsh_source.html b/docs/html/reference/renderscript/rs__quaternion_8rsh_source.html deleted file mode 100644 index d286018..0000000 --- a/docs/html/reference/renderscript/rs__quaternion_8rsh_source.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_QUATERNION_RSH__
    -00024 #define __RS_QUATERNION_RSH__
    -00025 
    -00026 
    -00034 static void __attribute__((overloadable))
    -00035 rsQuaternionSet(rs_quaternion *q, float w, float x, float y, float z) {
    -00036     q->w = w;
    -00037     q->x = x;
    -00038     q->y = y;
    -00039     q->z = z;
    -00040 }
    -00041 
    -00047 static void __attribute__((overloadable))
    -00048 rsQuaternionSet(rs_quaternion *q, const rs_quaternion *rhs) {
    -00049     q->w = rhs->w;
    -00050     q->x = rhs->x;
    -00051     q->y = rhs->y;
    -00052     q->z = rhs->z;
    -00053 }
    -00054 
    -00060 static void __attribute__((overloadable))
    -00061 rsQuaternionMultiply(rs_quaternion *q, float s) {
    -00062     q->w *= s;
    -00063     q->x *= s;
    -00064     q->y *= s;
    -00065     q->z *= s;
    -00066 }
    -00067 
    -00073 static void
    -00074 rsQuaternionAdd(rs_quaternion *q, const rs_quaternion *rhs) {
    -00075     q->w *= rhs->w;
    -00076     q->x *= rhs->x;
    -00077     q->y *= rhs->y;
    -00078     q->z *= rhs->z;
    -00079 }
    -00080 
    -00089 static void
    -00090 rsQuaternionLoadRotateUnit(rs_quaternion *q, float rot, float x, float y, float z) {
    -00091     rot *= (float)(M_PI / 180.0f) * 0.5f;
    -00092     float c = cos(rot);
    -00093     float s = sin(rot);
    -00094 
    -00095     q->w = c;
    -00096     q->x = x * s;
    -00097     q->y = y * s;
    -00098     q->z = z * s;
    -00099 }
    -00100 
    -00110 static void
    -00111 rsQuaternionLoadRotate(rs_quaternion *q, float rot, float x, float y, float z) {
    -00112     const float len = x*x + y*y + z*z;
    -00113     if (len != 1) {
    -00114         const float recipLen = 1.f / sqrt(len);
    -00115         x *= recipLen;
    -00116         y *= recipLen;
    -00117         z *= recipLen;
    -00118     }
    -00119     rsQuaternionLoadRotateUnit(q, rot, x, y, z);
    -00120 }
    -00121 
    -00126 static void
    -00127 rsQuaternionConjugate(rs_quaternion *q) {
    -00128     q->x = -q->x;
    -00129     q->y = -q->y;
    -00130     q->z = -q->z;
    -00131 }
    -00132 
    -00139 static float
    -00140 rsQuaternionDot(const rs_quaternion *q0, const rs_quaternion *q1) {
    -00141     return q0->w*q1->w + q0->x*q1->x + q0->y*q1->y + q0->z*q1->z;
    -00142 }
    -00143 
    -00148 static void
    -00149 rsQuaternionNormalize(rs_quaternion *q) {
    -00150     const float len = rsQuaternionDot(q, q);
    -00151     if (len != 1) {
    -00152         const float recipLen = 1.f / sqrt(len);
    -00153         rsQuaternionMultiply(q, recipLen);
    -00154     }
    -00155 }
    -00156 
    -00162 static void __attribute__((overloadable))
    -00163 rsQuaternionMultiply(rs_quaternion *q, const rs_quaternion *rhs) {
    -00164     rs_quaternion qtmp;
    -00165     rsQuaternionSet(&qtmp, q);
    -00166 
    -00167     q->w = qtmp.w*rhs->w - qtmp.x*rhs->x - qtmp.y*rhs->y - qtmp.z*rhs->z;
    -00168     q->x = qtmp.w*rhs->x + qtmp.x*rhs->w + qtmp.y*rhs->z - qtmp.z*rhs->y;
    -00169     q->y = qtmp.w*rhs->y + qtmp.y*rhs->w + qtmp.z*rhs->x - qtmp.x*rhs->z;
    -00170     q->z = qtmp.w*rhs->z + qtmp.z*rhs->w + qtmp.x*rhs->y - qtmp.y*rhs->x;
    -00171     rsQuaternionNormalize(q);
    -00172 }
    -00173 
    -00181 static void
    -00182 rsQuaternionSlerp(rs_quaternion *q, const rs_quaternion *q0, const rs_quaternion *q1, float t) {
    -00183     if (t <= 0.0f) {
    -00184         rsQuaternionSet(q, q0);
    -00185         return;
    -00186     }
    -00187     if (t >= 1.0f) {
    -00188         rsQuaternionSet(q, q1);
    -00189         return;
    -00190     }
    -00191 
    -00192     rs_quaternion tempq0, tempq1;
    -00193     rsQuaternionSet(&tempq0, q0);
    -00194     rsQuaternionSet(&tempq1, q1);
    -00195 
    -00196     float angle = rsQuaternionDot(q0, q1);
    -00197     if (angle < 0) {
    -00198         rsQuaternionMultiply(&tempq0, -1.0f);
    -00199         angle *= -1.0f;
    -00200     }
    -00201 
    -00202     float scale, invScale;
    -00203     if (angle + 1.0f > 0.05f) {
    -00204         if (1.0f - angle >= 0.05f) {
    -00205             float theta = acos(angle);
    -00206             float invSinTheta = 1.0f / sin(theta);
    -00207             scale = sin(theta * (1.0f - t)) * invSinTheta;
    -00208             invScale = sin(theta * t) * invSinTheta;
    -00209         } else {
    -00210             scale = 1.0f - t;
    -00211             invScale = t;
    -00212         }
    -00213     } else {
    -00214         rsQuaternionSet(&tempq1, tempq0.z, -tempq0.y, tempq0.x, -tempq0.w);
    -00215         scale = sin(M_PI * (0.5f - t));
    -00216         invScale = sin(M_PI * t);
    -00217     }
    -00218 
    -00219     rsQuaternionSet(q, tempq0.w*scale + tempq1.w*invScale, tempq0.x*scale + tempq1.x*invScale,
    -00220                         tempq0.y*scale + tempq1.y*invScale, tempq0.z*scale + tempq1.z*invScale);
    -00221 }
    -00222 
    -00228 static void rsQuaternionGetMatrixUnit(rs_matrix4x4 *m, const rs_quaternion *q) {
    -00229     float xx = q->x * q->x;
    -00230     float xy = q->x * q->y;
    -00231     float xz = q->x * q->z;
    -00232     float xw = q->x * q->w;
    -00233     float yy = q->y * q->y;
    -00234     float yz = q->y * q->z;
    -00235     float yw = q->y * q->w;
    -00236     float zz = q->z * q->z;
    -00237     float zw = q->z * q->w;
    -00238 
    -00239     m->m[0]  = 1.0f - 2.0f * ( yy + zz );
    -00240     m->m[4]  =        2.0f * ( xy - zw );
    -00241     m->m[8]  =        2.0f * ( xz + yw );
    -00242     m->m[1]  =        2.0f * ( xy + zw );
    -00243     m->m[5]  = 1.0f - 2.0f * ( xx + zz );
    -00244     m->m[9]  =        2.0f * ( yz - xw );
    -00245     m->m[2]  =        2.0f * ( xz - yw );
    -00246     m->m[6]  =        2.0f * ( yz + xw );
    -00247     m->m[10] = 1.0f - 2.0f * ( xx + yy );
    -00248     m->m[3]  = m->m[7] = m->m[11] = m->m[12] = m->m[13] = m->m[14] = 0.0f;
    -00249     m->m[15] = 1.0f;
    -00250 }
    -00251 
    -00252 #endif
    -00253 
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__sampler_8rsh.html b/docs/html/reference/renderscript/rs__sampler_8rsh.html deleted file mode 100644 index 6393ade..0000000 --- a/docs/html/reference/renderscript/rs__sampler_8rsh.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_sampler.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_sampler.rsh File Reference
    -
    -
    - - - - - - - -

    -Functions

    rs_sampler_value rsSamplerGetMinification (rs_sampler s)
    rs_sampler_value rsSamplerGetMagnification (rs_sampler s)
    rs_sampler_value rsSamplerGetWrapS (rs_sampler s)
    rs_sampler_value rsSamplerGetWrapT (rs_sampler s)
    float rsSamplerGetAnisotropy (rs_sampler s)
    -

    Detailed Description

    -

    Sampler routines.

    - -

    Definition in file rs_sampler.rsh.

    -

    Function Documentation

    - -
    -
    - - - - - - - - -
    float rsSamplerGetAnisotropy (rs_sampler s)
    -
    -
    -

    Get sampler anisotropy

    -
    Parameters:
    - - -
    ssampler to query
    -
    -
    -
    Returns:
    anisotropy
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_sampler_value rsSamplerGetMagnification (rs_sampler s)
    -
    -
    -

    Get sampler magnification value

    -
    Parameters:
    - - -
    ssampler to query
    -
    -
    -
    Returns:
    magnification value
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_sampler_value rsSamplerGetMinification (rs_sampler s)
    -
    -
    -

    Get sampler minification value

    -
    Parameters:
    - - -
    ssampler to query
    -
    -
    -
    Returns:
    minification value
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_sampler_value rsSamplerGetWrapS (rs_sampler s)
    -
    -
    -

    Get sampler wrap S value

    -
    Parameters:
    - - -
    ssampler to query
    -
    -
    -
    Returns:
    wrap S value
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_sampler_value rsSamplerGetWrapT (rs_sampler s)
    -
    -
    -

    Get sampler wrap T value

    -
    Parameters:
    - - -
    ssampler to query
    -
    -
    -
    Returns:
    wrap T value
    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__sampler_8rsh_source.html b/docs/html/reference/renderscript/rs__sampler_8rsh_source.html deleted file mode 100644 index 82a7cfa..0000000 --- a/docs/html/reference/renderscript/rs__sampler_8rsh_source.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_sampler.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_sampler.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2012 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00023 #ifndef __RS_SAMPLER_RSH__
    -00024 #define __RS_SAMPLER_RSH__
    -00025 
    -00026 // New API's
    -00027 #if (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00028 
    -00035 extern rs_sampler_value __attribute__((overloadable))
    -00036     rsSamplerGetMinification(rs_sampler s);
    -00037 
    -00044 extern rs_sampler_value __attribute__((overloadable))
    -00045     rsSamplerGetMagnification(rs_sampler s);
    -00046 
    -00053 extern rs_sampler_value __attribute__((overloadable))
    -00054     rsSamplerGetWrapS(rs_sampler s);
    -00055 
    -00062 extern rs_sampler_value __attribute__((overloadable))
    -00063     rsSamplerGetWrapT(rs_sampler s);
    -00064 
    -00071 extern float __attribute__((overloadable))
    -00072     rsSamplerGetAnisotropy(rs_sampler s);
    -00073 
    -00074 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00075 
    -00076 #endif // __RS_SAMPLER_RSH__
    -00077 
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__time_8rsh.html b/docs/html/reference/renderscript/rs__time_8rsh.html deleted file mode 100644 index 8be550a..0000000 --- a/docs/html/reference/renderscript/rs__time_8rsh.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.rsh File Reference
    -
    -
    - - - - - - - - - - - -

    -Data Structures

    struct  rs_tm

    -Typedefs

    typedef int rs_time_t

    -Functions

    rs_time_t rsTime (rs_time_t *timer)
    rs_tmrsLocaltime (rs_tm *local, const rs_time_t *timer)
    int64_t rsUptimeMillis (void)
    int64_t rsUptimeNanos (void)
    float rsGetDt (void)
    -

    Detailed Description

    -

    RenderScript time routines.

    -

    This file contains RenderScript functions relating to time and date manipulation.

    - -

    Definition in file rs_time.rsh.

    -

    Typedef Documentation

    - -
    -
    - - - - -
    typedef int rs_time_t
    -
    -
    -

    Calendar time interpreted as seconds elapsed since the Epoch (00:00:00 on January 1, 1970, Coordinated Universal Time (UTC)).

    - -

    Definition at line 31 of file rs_time.rsh.

    - -
    -
    -

    Function Documentation

    - -
    -
    - - - - - - - - -
    float rsGetDt (void )
    -
    -
    -

    Returns the time in seconds since this function was last called in this script.

    -
    Returns:
    Time in seconds.
    - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    rs_tm* rsLocaltime (rs_tmlocal,
    const rs_time_ttimer 
    )
    -
    -
    -

    Converts the time specified by timer into broken-down time and stores it in local. This function also returns a pointer to local. If local is NULL, this function does nothing and returns NULL.

    -
    Parameters:
    - - - -
    localBroken-down time.
    timerInput time as calendar time.
    -
    -
    -
    Returns:
    Pointer to broken-down time (same as input local).
    - -
    -
    - -
    -
    - - - - - - - - -
    rs_time_t rsTime (rs_time_ttimer)
    -
    -
    -

    Returns the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970). If timer is non-NULL, the result is also stored in the memory pointed to by this variable. If an error occurs, a value of -1 is returned.

    -
    Parameters:
    - - -
    timerLocation to also store the returned calendar time.
    -
    -
    -
    Returns:
    Seconds since the Epoch.
    - -
    -
    - -
    -
    - - - - - - - - -
    int64_t rsUptimeMillis (void )
    -
    -
    -

    Returns the current system clock (uptime) in milliseconds.

    -
    Returns:
    Uptime in milliseconds.
    - -
    -
    - -
    -
    - - - - - - - - -
    int64_t rsUptimeNanos (void )
    -
    -
    -

    Returns the current system clock (uptime) in nanoseconds.

    -
    Returns:
    Uptime in nanoseconds.
    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__time_8rsh_source.html b/docs/html/reference/renderscript/rs__time_8rsh_source.html deleted file mode 100644 index 482fd77..0000000 --- a/docs/html/reference/renderscript/rs__time_8rsh_source.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2011 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00024 #ifndef __RS_TIME_RSH__
    -00025 #define __RS_TIME_RSH__
    -00026 
    -00031 typedef int rs_time_t;
    -00032 
    -00049 typedef struct {
    -00050     int tm_sec;     
    -00051     int tm_min;     
    -00052     int tm_hour;    
    -00053     int tm_mday;    
    -00054     int tm_mon;     
    -00055     int tm_year;    
    -00056     int tm_wday;    
    -00057     int tm_yday;    
    -00058     int tm_isdst;   
    -00059 } rs_tm;
    -00060 
    -00070 extern rs_time_t __attribute__((overloadable))
    -00071     rsTime(rs_time_t *timer);
    -00072 
    -00083 extern rs_tm * __attribute__((overloadable))
    -00084     rsLocaltime(rs_tm *local, const rs_time_t *timer);
    -00085 
    -00091 extern int64_t __attribute__((overloadable))
    -00092     rsUptimeMillis(void);
    -00093 
    -00099 extern int64_t __attribute__((overloadable))
    -00100     rsUptimeNanos(void);
    -00101 
    -00108 extern float __attribute__((overloadable))
    -00109     rsGetDt(void);
    -00110 
    -00111 #endif
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__types_8rsh.html b/docs/html/reference/renderscript/rs__types_8rsh.html deleted file mode 100644 index cbaa750..0000000 --- a/docs/html/reference/renderscript/rs__types_8rsh.html +++ /dev/null @@ -1,1023 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh File Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh File Reference
    -
    -
    -
    #include "stdbool.h"
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Data Structures

    struct  rs_element
     Opaque handle to a RenderScript element. More...
    struct  rs_type
     Opaque handle to a RenderScript type. More...
    struct  rs_allocation
     Opaque handle to a RenderScript allocation. More...
    struct  rs_sampler
     Opaque handle to a RenderScript sampler object. More...
    struct  rs_script
     Opaque handle to a RenderScript script object. More...
    struct  rs_mesh
     Opaque handle to a RenderScript mesh object. More...
    struct  rs_path
     Opaque handle to a RenderScript Path object. More...
    struct  rs_program_fragment
     Opaque handle to a RenderScript ProgramFragment object. More...
    struct  rs_program_vertex
     Opaque handle to a RenderScript ProgramVertex object. More...
    struct  rs_program_raster
     Opaque handle to a RenderScript ProgramRaster object. More...
    struct  rs_program_store
     Opaque handle to a RenderScript ProgramStore object. More...
    struct  rs_font
     Opaque handle to a RenderScript font object. More...
    struct  rs_matrix4x4
     4x4 float matrix More...
    struct  rs_matrix3x3
     3x3 float matrix More...
    struct  rs_matrix2x2
     2x2 float matrix More...

    -Typedefs

    typedef char int8_t
    typedef short int16_t
    typedef int int32_t
    typedef long long int64_t
    typedef unsigned char uint8_t
    typedef unsigned short uint16_t
    typedef unsigned int uint32_t
    typedef unsigned long long uint64_t
    typedef uint8_t uchar
    typedef uint16_t ushort
    typedef uint32_t uint
    typedef uint64_t ulong
    typedef uint32_t size_t
    typedef int32_t ssize_t
    typedef float float2
    typedef float float3
    typedef float float4
    typedef double double2
    typedef double double3
    typedef double double4
    typedef uchar uchar2
    typedef uchar uchar3
    typedef uchar uchar4
    typedef ushort ushort2
    typedef ushort ushort3
    typedef ushort ushort4
    typedef uint uint2
    typedef uint uint3
    typedef uint uint4
    typedef ulong ulong2
    typedef ulong ulong3
    typedef ulong ulong4
    typedef char char2
    typedef char char3
    typedef char char4
    typedef short short2
    typedef short short3
    typedef short short4
    typedef int int2
    typedef int int3
    typedef int int4
    typedef long long2
    typedef long long3
    typedef long long4
    typedef float4 rs_quaternion

    -Enumerations

    enum  rs_allocation_cubemap_face
     Enum for selecting cube map faces.
    enum  rs_allocation_usage_type
     Bitfield to specify the usage types for an allocation. More...
    enum  rs_primitive {
    -  RS_PRIMITIVE_POINT = 0, -RS_PRIMITIVE_LINE = 1, -RS_PRIMITIVE_LINE_STRIP = 2, -RS_PRIMITIVE_TRIANGLE = 3, -
    -  RS_PRIMITIVE_TRIANGLE_STRIP = 4, -RS_PRIMITIVE_TRIANGLE_FAN = 5, -RS_PRIMITIVE_INVALID = 100 -
    - }
    enum  rs_data_type
     Enumeration for possible element data types. More...
    enum  rs_data_kind
     Enumeration for possible element data kind. More...
    enum  rs_depth_func {
    -  RS_DEPTH_FUNC_ALWAYS = 0, -RS_DEPTH_FUNC_LESS = 1, -RS_DEPTH_FUNC_LEQUAL = 2, -RS_DEPTH_FUNC_GREATER = 3, -
    -  RS_DEPTH_FUNC_GEQUAL = 4, -RS_DEPTH_FUNC_EQUAL = 5, -RS_DEPTH_FUNC_NOTEQUAL = 6, -RS_DEPTH_FUNC_INVALID = 100 -
    - }
    -

    Detailed Description

    -

    Define the standard RenderScript types

    -

    Integers 8 bit: char, int8_t 16 bit: short, int16_t 32 bit: int, in32_t 64 bit: long, long long, int64_t

    -

    Unsigned Integers 8 bit: uchar, uint8_t 16 bit: ushort, uint16_t 32 bit: uint, uint32_t 64 bit: ulong, uint64_t

    -

    Floating point 32 bit: float 64 bit: double

    -

    Vectors of length 2, 3, and 4 are supported for all the types above.

    - -

    Definition in file rs_types.rsh.

    -

    Typedef Documentation

    - -
    -
    - - - - -
    typedef char char2
    -
    -
    -

    Vector version of the basic char type. Provides two char fields packed into a single 16 bit field with 16 bit alignment.

    - -

    Definition at line 292 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef char char3
    -
    -
    -

    Vector version of the basic char type. Provides three char fields packed into a single 32 bit field with 32 bit alignment.

    - -

    Definition at line 297 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef char char4
    -
    -
    -

    Vector version of the basic char type. Provides four char fields packed into a single 32 bit field with 32 bit alignment.

    - -

    Definition at line 302 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef double double2
    -
    -
    -

    Vector version of the basic double type. Provides two double fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 212 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef double double3
    -
    -
    -

    Vector version of the basic double type. Provides three double fields packed into a single 256 bit field with 256 bit alignment.

    - -

    Definition at line 217 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef double double4
    -
    -
    -

    Vector version of the basic double type. Provides four double fields packed into a single 256 bit field with 256 bit alignment.

    - -

    Definition at line 222 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef float float2
    -
    -
    -

    Vector version of the basic float type. Provides two float fields packed into a single 64 bit field with 64 bit alignment.

    - -

    Definition at line 195 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef float float3
    -
    -
    -

    Vector version of the basic float type. Provides three float fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 200 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef float float4
    -
    -
    -

    Vector version of the basic float type. Provides four float fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 206 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef short int16_t
    -
    -
    -

    16 bit integer type

    - -

    Definition at line 67 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef int int2
    -
    -
    -

    Vector version of the basic int type. Provides two int fields packed into a single 64 bit field with 64 bit alignment.

    - -

    Definition at line 324 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef int int3
    -
    -
    -

    Vector version of the basic int type. Provides three int fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 329 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef int int32_t
    -
    -
    -

    32 bit integer type

    - -

    Definition at line 71 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef int int4
    -
    -
    -

    Vector version of the basic int type. Provides two four fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 334 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef long long int64_t
    -
    -
    -

    64 bit integer type

    - -

    Definition at line 75 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef char int8_t
    -
    -
    -

    8 bit integer type

    - -

    Definition at line 63 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef long long2
    -
    -
    -

    Vector version of the basic long type. Provides two long fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 340 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef long long3
    -
    -
    -

    Vector version of the basic long type. Provides three long fields packed into a single 256 bit field with 256 bit alignment.

    - -

    Definition at line 345 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef long long4
    -
    -
    -

    Vector version of the basic long type. Provides four long fields packed into a single 256 bit field with 256 bit alignment.

    - -

    Definition at line 350 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef float4 rs_quaternion
    -
    -
    -

    quaternion type for use with the quaternion functions

    - -

    Definition at line 383 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef short short2
    -
    -
    -

    Vector version of the basic short type. Provides two short fields packed into a single 32 bit field with 32 bit alignment.

    - -

    Definition at line 308 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef short short3
    -
    -
    -

    Vector version of the basic short type. Provides three short fields packed into a single 64 bit field with 64 bit alignment.

    - -

    Definition at line 313 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef short short4
    -
    -
    -

    Vector version of the basic short type. Provides four short fields packed into a single 64 bit field with 64 bit alignment.

    - -

    Definition at line 318 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uint32_t size_t
    -
    -
    -

    Typedef for unsigned int

    - -

    Definition at line 111 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef int32_t ssize_t
    -
    -
    -

    Typedef for int (use for 32-bit integers)

    - -

    Definition at line 115 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uint8_t uchar
    -
    -
    -

    8 bit unsigned integer type

    - -

    Definition at line 95 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uchar uchar2
    -
    -
    -

    Vector version of the basic uchar type. Provides two uchar fields packed into a single 16 bit field with 16 bit alignment.

    - -

    Definition at line 228 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uchar uchar3
    -
    -
    -

    Vector version of the basic uchar type. Provides three uchar fields packed into a single 32 bit field with 32 bit alignment.

    - -

    Definition at line 233 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uchar uchar4
    -
    -
    -

    Vector version of the basic uchar type. Provides four uchar fields packed into a single 32 bit field with 32 bit alignment.

    - -

    Definition at line 238 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uint32_t uint
    -
    -
    -

    32 bit unsigned integer type

    - -

    Definition at line 103 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef unsigned short uint16_t
    -
    -
    -

    16 bit unsigned integer type

    - -

    Definition at line 83 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uint uint2
    -
    -
    -

    Vector version of the basic uint type. Provides two uint fields packed into a single 64 bit field with 64 bit alignment.

    - -

    Definition at line 260 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uint uint3
    -
    -
    -

    Vector version of the basic uint type. Provides three uint fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 265 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef unsigned int uint32_t
    -
    -
    -

    32 bit unsigned integer type

    - -

    Definition at line 87 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uint uint4
    -
    -
    -

    Vector version of the basic uint type. Provides four uint fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 270 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef unsigned long long uint64_t
    -
    -
    -

    64 bit unsigned integer type

    - -

    Definition at line 91 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef unsigned char uint8_t
    -
    -
    -

    8 bit unsigned integer type

    - -

    Definition at line 79 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uint64_t ulong
    -
    -
    -

    Typedef for unsigned long (use for 64-bit unsigned integers)

    - -

    Definition at line 107 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef ulong ulong2
    -
    -
    -

    Vector version of the basic ulong type. Provides two ulong fields packed into a single 128 bit field with 128 bit alignment.

    - -

    Definition at line 276 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef ulong ulong3
    -
    -
    -

    Vector version of the basic ulong type. Provides three ulong fields packed into a single 256 bit field with 256 bit alignment.

    - -

    Definition at line 281 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef ulong ulong4
    -
    -
    -

    Vector version of the basic ulong type. Provides four ulong fields packed into a single 256 bit field with 256 bit alignment.

    - -

    Definition at line 286 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef uint16_t ushort
    -
    -
    -

    16 bit unsigned integer type

    - -

    Definition at line 99 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef ushort ushort2
    -
    -
    -

    Vector version of the basic ushort type. Provides two ushort fields packed into a single 32 bit field with 32 bit alignment.

    - -

    Definition at line 244 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef ushort ushort3
    -
    -
    -

    Vector version of the basic ushort type. Provides three ushort fields packed into a single 64 bit field with 64 bit alignment.

    - -

    Definition at line 249 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    typedef ushort ushort4
    -
    -
    -

    Vector version of the basic ushort type. Provides four ushort fields packed into a single 64 bit field with 64 bit alignment.

    - -

    Definition at line 254 of file rs_types.rsh.

    - -
    -
    -

    Enumeration Type Documentation

    - -
    -
    - - - - -
    enum rs_allocation_usage_type
    -
    -
    - -

    Bitfield to specify the usage types for an allocation.

    -

    These values are ORed together to specify which usages or memory spaces are relevant to an allocation or an operation on an allocation.

    - -

    Definition at line 408 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    enum rs_data_kind
    -
    -
    - -

    Enumeration for possible element data kind.

    -

    The special interpretation of the data if required. This is primarly useful for graphical data. USER indicates no special interpretation is expected. PIXEL is used in conjunction with the standard data types for representing texture formats.

    - -

    Definition at line 524 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    enum rs_data_type
    -
    -
    - -

    Enumeration for possible element data types.

    -

    DataType represents the basic type information for a basic element. The naming convention follows. For numeric types it is FLOAT, SIGNED, or UNSIGNED followed by the _BITS where BITS is the size of the data. BOOLEAN is a true / false (1,0) represented in an 8 bit container. The UNSIGNED variants with multiple bit definitions are for packed graphical data formats and represent vectors with per vector member sizes which are treated as a single unit for packing and alignment purposes.

    -

    MATRIX the three matrix types contain FLOAT_32 elements and are treated as 32 bits for alignment purposes.

    -

    RS_* objects. 32 bit opaque handles.

    - -

    Definition at line 478 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    enum rs_depth_func
    -
    -
    -
    Enumerator:
    - - - - - - - - -
    RS_DEPTH_FUNC_ALWAYS  -

    Always drawn

    -
    RS_DEPTH_FUNC_LESS  -

    Drawn if the incoming depth value is less than that in the depth buffer

    -
    RS_DEPTH_FUNC_LEQUAL  -

    Drawn if the incoming depth value is less or equal to that in the depth buffer

    -
    RS_DEPTH_FUNC_GREATER  -

    Drawn if the incoming depth value is greater than that in the depth buffer

    -
    RS_DEPTH_FUNC_GEQUAL  -

    Drawn if the incoming depth value is greater or equal to that in the depth buffer

    -
    RS_DEPTH_FUNC_EQUAL  -

    Drawn if the incoming depth value is equal to that in the depth buffer

    -
    RS_DEPTH_FUNC_NOTEQUAL  -

    Drawn if the incoming depth value is not equal to that in the depth buffer

    -
    RS_DEPTH_FUNC_INVALID  -

    Invalid depth function

    -
    -
    -
    - -

    Definition at line 538 of file rs_types.rsh.

    - -
    -
    - -
    -
    - - - - -
    enum rs_primitive
    -
    -
    -

    Describes the way mesh vertex data is interpreted when rendering

    -
    Enumerator:
    - - - - - - - -
    RS_PRIMITIVE_POINT  -

    Vertex data will be rendered as a series of points

    -
    RS_PRIMITIVE_LINE  -

    Vertex pairs will be rendered as lines

    -
    RS_PRIMITIVE_LINE_STRIP  -

    Vertex data will be rendered as a connected line strip

    -
    RS_PRIMITIVE_TRIANGLE  -

    Vertices will be rendered as individual triangles

    -
    RS_PRIMITIVE_TRIANGLE_STRIP  -

    Vertices will be rendered as a connected triangle strip defined by the first three vertices with each additional triangle defined by a new vertex

    -
    RS_PRIMITIVE_TRIANGLE_FAN  -

    Vertices will be rendered as a sequence of triangles that all share first vertex as the origin

    -
    RS_PRIMITIVE_INVALID  -

    Invalid primitive

    -
    -
    -
    - -

    Definition at line 425 of file rs_types.rsh.

    - -
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/rs__types_8rsh_source.html b/docs/html/reference/renderscript/rs__types_8rsh_source.html deleted file mode 100644 index f580306..0000000 --- a/docs/html/reference/renderscript/rs__types_8rsh_source.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - -/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh Source File - - - - - - - -
    - - - - -
    -
    -
    /usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh
    -
    -
    -Go to the documentation of this file.
    00001 /*
    -00002  * Copyright (C) 2013 The Android Open Source Project
    -00003  *
    -00004  * Licensed under the Apache License, Version 2.0 (the "License");
    -00005  * you may not use this file except in compliance with the License.
    -00006  * You may obtain a copy of the License at
    -00007  *
    -00008  *      http://www.apache.org/licenses/LICENSE-2.0
    -00009  *
    -00010  * Unless required by applicable law or agreed to in writing, software
    -00011  * distributed under the License is distributed on an "AS IS" BASIS,
    -00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -00013  * See the License for the specific language governing permissions and
    -00014  * limitations under the License.
    -00015  */
    -00016 
    -00041 #ifndef __RS_TYPES_RSH__
    -00042 #define __RS_TYPES_RSH__
    -00043 
    -00044 /* Constants */
    -00045 #define M_E         2.718281828459045235360287471352662498f     /* e */
    -00046 #define M_LOG2E     1.442695040888963407359924681001892137f     /* log_2 e */
    -00047 #define M_LOG10E    0.434294481903251827651128918916605082f     /* log_10 e */
    -00048 #define M_LN2       0.693147180559945309417232121458176568f     /* log_e 2 */
    -00049 #define M_LN10      2.302585092994045684017991454684364208f     /* log_e 10 */
    -00050 #define M_PI        3.141592653589793238462643383279502884f     /* pi */
    -00051 #define M_PI_2      1.570796326794896619231321691639751442f     /* pi/2 */
    -00052 #define M_PI_4      0.785398163397448309615660845819875721f     /* pi/4 */
    -00053 #define M_1_PI      0.318309886183790671537767526745028724f     /* 1/pi */
    -00054 #define M_2_PIl     0.636619772367581343075535053490057448f     /* 2/pi */
    -00055 #define M_2_SQRTPI  1.128379167095512573896158903121545172f     /* 2/sqrt(pi) */
    -00056 #define M_SQRT2     1.414213562373095048801688724209698079f     /* sqrt(2) */
    -00057 #define M_SQRT1_2   0.707106781186547524400844362104849039f     /* 1/sqrt(2) */
    -00058 
    -00059 #include "stdbool.h"
    -00063 typedef char int8_t;
    -00067 typedef short int16_t;
    -00071 typedef int int32_t;
    -00075 typedef long long int64_t;
    -00079 typedef unsigned char uint8_t;
    -00083 typedef unsigned short uint16_t;
    -00087 typedef unsigned int uint32_t;
    -00091 typedef unsigned long long uint64_t;
    -00095 typedef uint8_t uchar;
    -00099 typedef uint16_t ushort;
    -00103 typedef uint32_t uint;
    -00107 typedef uint64_t ulong;
    -00111 typedef uint32_t size_t;
    -00115 typedef int32_t ssize_t;
    -00116 
    -00122 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_element;
    -00128 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_type;
    -00134 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_allocation;
    -00140 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_sampler;
    -00146 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_script;
    -00152 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_mesh;
    -00158 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_path;
    -00164 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_fragment;
    -00170 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_vertex;
    -00176 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_raster;
    -00182 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_program_store;
    -00188 typedef struct { const int* const p; } __attribute__((packed, aligned(4))) rs_font;
    -00189 
    -00195 typedef float float2 __attribute__((ext_vector_type(2)));
    -00200 typedef float float3 __attribute__((ext_vector_type(3)));
    -00206 typedef float float4 __attribute__((ext_vector_type(4)));
    -00207 
    -00212 typedef double double2 __attribute__((ext_vector_type(2)));
    -00217 typedef double double3 __attribute__((ext_vector_type(3)));
    -00222 typedef double double4 __attribute__((ext_vector_type(4)));
    -00223 
    -00228 typedef uchar uchar2 __attribute__((ext_vector_type(2)));
    -00233 typedef uchar uchar3 __attribute__((ext_vector_type(3)));
    -00238 typedef uchar uchar4 __attribute__((ext_vector_type(4)));
    -00239 
    -00244 typedef ushort ushort2 __attribute__((ext_vector_type(2)));
    -00249 typedef ushort ushort3 __attribute__((ext_vector_type(3)));
    -00254 typedef ushort ushort4 __attribute__((ext_vector_type(4)));
    -00255 
    -00260 typedef uint uint2 __attribute__((ext_vector_type(2)));
    -00265 typedef uint uint3 __attribute__((ext_vector_type(3)));
    -00270 typedef uint uint4 __attribute__((ext_vector_type(4)));
    -00271 
    -00276 typedef ulong ulong2 __attribute__((ext_vector_type(2)));
    -00281 typedef ulong ulong3 __attribute__((ext_vector_type(3)));
    -00286 typedef ulong ulong4 __attribute__((ext_vector_type(4)));
    -00287 
    -00292 typedef char char2 __attribute__((ext_vector_type(2)));
    -00297 typedef char char3 __attribute__((ext_vector_type(3)));
    -00302 typedef char char4 __attribute__((ext_vector_type(4)));
    -00303 
    -00308 typedef short short2 __attribute__((ext_vector_type(2)));
    -00313 typedef short short3 __attribute__((ext_vector_type(3)));
    -00318 typedef short short4 __attribute__((ext_vector_type(4)));
    -00319 
    -00324 typedef int int2 __attribute__((ext_vector_type(2)));
    -00329 typedef int int3 __attribute__((ext_vector_type(3)));
    -00334 typedef int int4 __attribute__((ext_vector_type(4)));
    -00335 
    -00340 typedef long long2 __attribute__((ext_vector_type(2)));
    -00345 typedef long long3 __attribute__((ext_vector_type(3)));
    -00350 typedef long long4 __attribute__((ext_vector_type(4)));
    -00351 
    -00358 typedef struct {
    -00359     float m[16];
    -00360 } rs_matrix4x4;
    -00367 typedef struct {
    -00368     float m[9];
    -00369 } rs_matrix3x3;
    -00376 typedef struct {
    -00377     float m[4];
    -00378 } rs_matrix2x2;
    -00379 
    -00383 typedef float4 rs_quaternion;
    -00384 
    -00385 #define RS_PACKED __attribute__((packed, aligned(4)))
    -00386 #define NULL ((void *)0)
    -00387 
    -00388 #if (defined(RS_VERSION) && (RS_VERSION >= 14))
    -00389 
    -00393 typedef enum {
    -00394     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0,
    -00395     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1,
    -00396     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2,
    -00397     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3,
    -00398     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4,
    -00399     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5
    -00400 } rs_allocation_cubemap_face;
    -00401 
    -00408 typedef enum {
    -00409     RS_ALLOCATION_USAGE_SCRIPT = 0x0001,
    -00410     RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002,
    -00411     RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004,
    -00412     RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008,
    -00413     RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010
    -00414 } rs_allocation_usage_type;
    -00415 
    -00416 #endif //defined(RS_VERSION) && (RS_VERSION >= 14)
    -00417 
    -00418 // New API's
    -00419 #if (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00420 
    -00425 typedef enum {
    -00429     RS_PRIMITIVE_POINT              = 0,
    -00433     RS_PRIMITIVE_LINE               = 1,
    -00437     RS_PRIMITIVE_LINE_STRIP         = 2,
    -00441     RS_PRIMITIVE_TRIANGLE           = 3,
    -00447     RS_PRIMITIVE_TRIANGLE_STRIP     = 4,
    -00452     RS_PRIMITIVE_TRIANGLE_FAN       = 5,
    -00453 
    -00457     RS_PRIMITIVE_INVALID            = 100,
    -00458 } rs_primitive;
    -00459 
    -00478 typedef enum {
    -00479     RS_TYPE_NONE             = 0,
    -00480     RS_TYPE_FLOAT_32         = 2,
    -00481     RS_TYPE_FLOAT_64         = 3,
    -00482     RS_TYPE_SIGNED_8         = 4,
    -00483     RS_TYPE_SIGNED_16        = 5,
    -00484     RS_TYPE_SIGNED_32        = 6,
    -00485     RS_TYPE_SIGNED_64        = 7,
    -00486     RS_TYPE_UNSIGNED_8       = 8,
    -00487     RS_TYPE_UNSIGNED_16      = 9,
    -00488     RS_TYPE_UNSIGNED_32      = 10,
    -00489     RS_TYPE_UNSIGNED_64      = 11,
    -00490 
    -00491     RS_TYPE_BOOLEAN          = 12,
    -00492 
    -00493     RS_TYPE_UNSIGNED_5_6_5   = 13,
    -00494     RS_TYPE_UNSIGNED_5_5_5_1 = 14,
    -00495     RS_TYPE_UNSIGNED_4_4_4_4 = 15,
    -00496 
    -00497     RS_TYPE_MATRIX_4X4       = 16,
    -00498     RS_TYPE_MATRIX_3X3       = 17,
    -00499     RS_TYPE_MATRIX_2X2       = 18,
    -00500 
    -00501     RS_TYPE_ELEMENT          = 1000,
    -00502     RS_TYPE_TYPE             = 1001,
    -00503     RS_TYPE_ALLOCATION       = 1002,
    -00504     RS_TYPE_SAMPLER          = 1003,
    -00505     RS_TYPE_SCRIPT           = 1004,
    -00506     RS_TYPE_MESH             = 1005,
    -00507     RS_TYPE_PROGRAM_FRAGMENT = 1006,
    -00508     RS_TYPE_PROGRAM_VERTEX   = 1007,
    -00509     RS_TYPE_PROGRAM_RASTER   = 1008,
    -00510     RS_TYPE_PROGRAM_STORE    = 1009,
    -00511     RS_TYPE_FONT             = 1010,
    -00512 
    -00513     RS_TYPE_INVALID          = 10000,
    -00514 } rs_data_type;
    -00515 
    -00524 typedef enum {
    -00525     RS_KIND_USER         = 0,
    -00526 
    -00527     RS_KIND_PIXEL_L      = 7,
    -00528     RS_KIND_PIXEL_A      = 8,
    -00529     RS_KIND_PIXEL_LA     = 9,
    -00530     RS_KIND_PIXEL_RGB    = 10,
    -00531     RS_KIND_PIXEL_RGBA   = 11,
    -00532     RS_KIND_PIXEL_DEPTH  = 12,
    -00533     RS_KIND_PIXEL_YUV    = 13,
    -00534 
    -00535     RS_KIND_INVALID      = 100,
    -00536 } rs_data_kind;
    -00537 
    -00538 typedef enum {
    -00542     RS_DEPTH_FUNC_ALWAYS        = 0,
    -00547     RS_DEPTH_FUNC_LESS          = 1,
    -00552     RS_DEPTH_FUNC_LEQUAL        = 2,
    -00557     RS_DEPTH_FUNC_GREATER       = 3,
    -00562     RS_DEPTH_FUNC_GEQUAL        = 4,
    -00567     RS_DEPTH_FUNC_EQUAL         = 5,
    -00572     RS_DEPTH_FUNC_NOTEQUAL      = 6,
    -00576     RS_DEPTH_FUNC_INVALID       = 100,
    -00577 } rs_depth_func;
    -00578 
    -00579 typedef enum {
    -00580     RS_BLEND_SRC_ZERO                   = 0,
    -00581     RS_BLEND_SRC_ONE                    = 1,
    -00582     RS_BLEND_SRC_DST_COLOR              = 2,
    -00583     RS_BLEND_SRC_ONE_MINUS_DST_COLOR    = 3,
    -00584     RS_BLEND_SRC_SRC_ALPHA              = 4,
    -00585     RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA    = 5,
    -00586     RS_BLEND_SRC_DST_ALPHA              = 6,
    -00587     RS_BLEND_SRC_ONE_MINUS_DST_ALPHA    = 7,
    -00588     RS_BLEND_SRC_SRC_ALPHA_SATURATE     = 8,
    -00589 
    -00590     RS_BLEND_SRC_INVALID                = 100,
    -00591 } rs_blend_src_func;
    -00592 
    -00593 typedef enum {
    -00594     RS_BLEND_DST_ZERO                   = 0,
    -00595     RS_BLEND_DST_ONE                    = 1,
    -00596     RS_BLEND_DST_SRC_COLOR              = 2,
    -00597     RS_BLEND_DST_ONE_MINUS_SRC_COLOR    = 3,
    -00598     RS_BLEND_DST_SRC_ALPHA              = 4,
    -00599     RS_BLEND_DST_ONE_MINUS_SRC_ALPHA    = 5,
    -00600     RS_BLEND_DST_DST_ALPHA              = 6,
    -00601     RS_BLEND_DST_ONE_MINUS_DST_ALPHA    = 7,
    -00602 
    -00603     RS_BLEND_DST_INVALID                = 100,
    -00604 } rs_blend_dst_func;
    -00605 
    -00606 typedef enum {
    -00607     RS_CULL_BACK     = 0,
    -00608     RS_CULL_FRONT    = 1,
    -00609     RS_CULL_NONE     = 2,
    -00610 
    -00611     RS_CULL_INVALID  = 100,
    -00612 } rs_cull_mode;
    -00613 
    -00614 typedef enum {
    -00615     RS_SAMPLER_NEAREST              = 0,
    -00616     RS_SAMPLER_LINEAR               = 1,
    -00617     RS_SAMPLER_LINEAR_MIP_LINEAR    = 2,
    -00618     RS_SAMPLER_WRAP                 = 3,
    -00619     RS_SAMPLER_CLAMP                = 4,
    -00620     RS_SAMPLER_LINEAR_MIP_NEAREST   = 5,
    -00621     RS_SAMPLER_MIRRORED_REPEAT      = 6,
    -00622 
    -00623     RS_SAMPLER_INVALID              = 100,
    -00624 } rs_sampler_value;
    -00625 
    -00626 #endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
    -00627 
    -00628 #endif // __RS_TYPES_RSH__
    -
    -
    - - - diff --git a/docs/html/reference/renderscript/structrs__allocation.html b/docs/html/reference/renderscript/structrs__allocation.html deleted file mode 100644 index 1ffbc47..0000000 --- a/docs/html/reference/renderscript/structrs__allocation.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_allocation Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_allocation Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript allocation. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript allocation.

    -

    See: android.renderscript.Allocation

    - -

    Definition at line 134 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__element.html b/docs/html/reference/renderscript/structrs__element.html deleted file mode 100644 index d6a1460..0000000 --- a/docs/html/reference/renderscript/structrs__element.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_element Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_element Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript element. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript element.

    -

    See: android.renderscript.Element

    - -

    Definition at line 122 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__font.html b/docs/html/reference/renderscript/structrs__font.html deleted file mode 100644 index dbc4c4d..0000000 --- a/docs/html/reference/renderscript/structrs__font.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_font Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_font Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript font object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript font object.

    -

    See: android.renderscript.Font

    - -

    Definition at line 188 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__matrix2x2.html b/docs/html/reference/renderscript/structrs__matrix2x2.html deleted file mode 100644 index bacfa02..0000000 --- a/docs/html/reference/renderscript/structrs__matrix2x2.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_matrix2x2 Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_matrix2x2 Struct Reference
    -
    -
    - -

    2x2 float matrix - More...

    -

    Detailed Description

    -

    2x2 float matrix

    -

    Native holder for RS matrix. Elements are stored in the array at the location [row*2 + col]

    - -

    Definition at line 376 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__matrix3x3.html b/docs/html/reference/renderscript/structrs__matrix3x3.html deleted file mode 100644 index 3745608..0000000 --- a/docs/html/reference/renderscript/structrs__matrix3x3.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_matrix3x3 Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_matrix3x3 Struct Reference
    -
    -
    - -

    3x3 float matrix - More...

    -

    Detailed Description

    -

    3x3 float matrix

    -

    Native holder for RS matrix. Elements are stored in the array at the location [row*3 + col]

    - -

    Definition at line 367 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__matrix4x4.html b/docs/html/reference/renderscript/structrs__matrix4x4.html deleted file mode 100644 index 26b57d1..0000000 --- a/docs/html/reference/renderscript/structrs__matrix4x4.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_matrix4x4 Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_matrix4x4 Struct Reference
    -
    -
    - -

    4x4 float matrix - More...

    -

    Detailed Description

    -

    4x4 float matrix

    -

    Native holder for RS matrix. Elements are stored in the array at the location [row*4 + col]

    - -

    Definition at line 358 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__mesh.html b/docs/html/reference/renderscript/structrs__mesh.html deleted file mode 100644 index fed96d9..0000000 --- a/docs/html/reference/renderscript/structrs__mesh.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_mesh Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_mesh Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript mesh object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript mesh object.

    -

    See: android.renderscript.Mesh

    - -

    Definition at line 152 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__path.html b/docs/html/reference/renderscript/structrs__path.html deleted file mode 100644 index ef7f650..0000000 --- a/docs/html/reference/renderscript/structrs__path.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_path Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_path Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript Path object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript Path object.

    -

    See: android.renderscript.Path

    - -

    Definition at line 158 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__program__fragment.html b/docs/html/reference/renderscript/structrs__program__fragment.html deleted file mode 100644 index 707e899..0000000 --- a/docs/html/reference/renderscript/structrs__program__fragment.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_program_fragment Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_program_fragment Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript ProgramFragment object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript ProgramFragment object.

    -

    See: android.renderscript.ProgramFragment

    - -

    Definition at line 164 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__program__raster.html b/docs/html/reference/renderscript/structrs__program__raster.html deleted file mode 100644 index 444aaf9..0000000 --- a/docs/html/reference/renderscript/structrs__program__raster.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_program_raster Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_program_raster Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript ProgramRaster object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript ProgramRaster object.

    -

    See: android.renderscript.ProgramRaster

    - -

    Definition at line 176 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__program__store.html b/docs/html/reference/renderscript/structrs__program__store.html deleted file mode 100644 index c187392..0000000 --- a/docs/html/reference/renderscript/structrs__program__store.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_program_store Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_program_store Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript ProgramStore object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript ProgramStore object.

    -

    See: android.renderscript.ProgramStore

    - -

    Definition at line 182 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__program__vertex.html b/docs/html/reference/renderscript/structrs__program__vertex.html deleted file mode 100644 index c3688b7..0000000 --- a/docs/html/reference/renderscript/structrs__program__vertex.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_program_vertex Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_program_vertex Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript ProgramVertex object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript ProgramVertex object.

    -

    See: android.renderscript.ProgramVertex

    - -

    Definition at line 170 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__sampler.html b/docs/html/reference/renderscript/structrs__sampler.html deleted file mode 100644 index daba2bb..0000000 --- a/docs/html/reference/renderscript/structrs__sampler.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_sampler Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_sampler Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript sampler object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript sampler object.

    -

    See: android.renderscript.Sampler

    - -

    Definition at line 140 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__script.html b/docs/html/reference/renderscript/structrs__script.html deleted file mode 100644 index ea39d95..0000000 --- a/docs/html/reference/renderscript/structrs__script.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_script Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_script Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript script object. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript script object.

    -

    See: android.renderscript.ScriptC

    - -

    Definition at line 146 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__script__call.html b/docs/html/reference/renderscript/structrs__script__call.html deleted file mode 100644 index e4c0820..0000000 --- a/docs/html/reference/renderscript/structrs__script__call.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - -rs_script_call Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_script_call Struct Reference
    -
    -
    -

    Detailed Description

    -

    Structure to provide extra information to a rsForEach call. Primarly used to restrict the call to a subset of cells in the allocation.

    - -

    Definition at line 110 of file rs_core.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__tm.html b/docs/html/reference/renderscript/structrs__tm.html deleted file mode 100644 index b6447b5..0000000 --- a/docs/html/reference/renderscript/structrs__tm.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - -rs_tm Struct Reference - - - - - - - -
    - - - - -
    -
    - -
    -
    rs_tm Struct Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - -

    -Data Fields

    -int tm_sec
     seconds
    -int tm_min
     minutes
    -int tm_hour
     hours
    -int tm_mday
     day of the month
    -int tm_mon
     month
    -int tm_year
     year
    -int tm_wday
     day of the week
    -int tm_yday
     day of the year
    -int tm_isdst
     daylight savings time
    -

    Detailed Description

    -

    Data structure for broken-down time components.

    -

    tm_sec - Seconds after the minute. This ranges from 0 to 59, but possibly up to 60 for leap seconds. tm_min - Minutes after the hour. This ranges from 0 to 59. tm_hour - Hours past midnight. This ranges from 0 to 23. tm_mday - Day of the month. This ranges from 1 to 31. tm_mon - Months since January. This ranges from 0 to 11. tm_year - Years since 1900. tm_wday - Days since Sunday. This ranges from 0 to 6. tm_yday - Days since January 1. This ranges from 0 to 365. tm_isdst - Flag to indicate whether daylight saving time is in effect. The value is positive if it is in effect, zero if it is not, and negative if the information is not available.

    - -

    Definition at line 49 of file rs_time.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/structrs__type.html b/docs/html/reference/renderscript/structrs__type.html deleted file mode 100644 index ef95ed1..0000000 --- a/docs/html/reference/renderscript/structrs__type.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -rs_type Struct Reference - - - - - - - -
    - - - - -
    -
    -
    -
    rs_type Struct Reference
    -
    -
    - -

    Opaque handle to a RenderScript type. - More...

    -

    Detailed Description

    -

    Opaque handle to a RenderScript type.

    -

    See: android.renderscript.Type

    - -

    Definition at line 128 of file rs_types.rsh.

    -

    The documentation for this struct was generated from the following file: -
    - - - diff --git a/docs/html/reference/renderscript/tab_a.png b/docs/html/reference/renderscript/tab_a.png deleted file mode 100644 index 2d99ef2..0000000 Binary files a/docs/html/reference/renderscript/tab_a.png and /dev/null differ diff --git a/docs/html/reference/renderscript/tab_b.png b/docs/html/reference/renderscript/tab_b.png deleted file mode 100644 index b2c3d2b..0000000 Binary files a/docs/html/reference/renderscript/tab_b.png and /dev/null differ diff --git a/docs/html/reference/renderscript/tab_h.png b/docs/html/reference/renderscript/tab_h.png deleted file mode 100644 index c11f48f..0000000 Binary files a/docs/html/reference/renderscript/tab_h.png and /dev/null differ diff --git a/docs/html/reference/renderscript/tab_s.png b/docs/html/reference/renderscript/tab_s.png deleted file mode 100644 index 978943a..0000000 Binary files a/docs/html/reference/renderscript/tab_s.png and /dev/null differ diff --git a/docs/html/reference/renderscript/tabs.css b/docs/html/reference/renderscript/tabs.css deleted file mode 100644 index 2192056..0000000 --- a/docs/html/reference/renderscript/tabs.css +++ /dev/null @@ -1,59 +0,0 @@ -.tabs, .tabs2, .tabs3 { - background-image: url('tab_b.png'); - width: 100%; - z-index: 101; - font-size: 13px; -} - -.tabs2 { - font-size: 10px; -} -.tabs3 { - font-size: 9px; -} - -.tablist { - margin: 0; - padding: 0; - display: table; -} - -.tablist li { - float: left; - display: table-cell; - background-image: url('tab_b.png'); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:url('tab_s.png'); - background-repeat:no-repeat; - background-position:right; - color: #283A5D; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: url('tab_h.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); - text-decoration: none; -} - -.tablist li.current a { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} -- cgit v1.1