Multithreaded execution of certain general reduction kernels; reduction test overhaul.

A reduction kernel is eligible for multithreaded execution if it has a
combiner function and it is launched over a 1D iteration space.

Note: Properties debug.rs.reduce-accum and debug.rs.reduce-split-accum
are added for debugging multithreaded reduction.

The following changes are made to reduction tests in RsTest:
- Overhaul the test framework -- now data-driven, and can execute the same
  test multiple times with different seeds and input sizes, features
  separate sets of quick correctness tests, full correctness tests,
  and performance tests.  (Performance tests are not run by default.)
- Report timing information for test execution.
- Report more information for fz* kernel testing.
- Remove dp kernel testing -- this involved floating-point arithmetic
  which is not guaranteed to produce identical results between java
  and rs or for different rs multithreaded executions.
- Add sumgcd kernel testing.  This is intended to be representative of
  a compute-heavy kernel.
- findMinAndMax kernel testing must compare cell value not cell index
  -- two or more cells might have the same min or max value, and java
  and various rs multithreaded executions are not guaranteed to find
  the same cell.
- Fix bug in findMinAndMax kernel's combiner function.  (It behaved
  incorrectly when operating on an accumulator datum that has been
  initialized but never passed to the accumulator function.)
- RsTest now requests largeHeap.

Bug: 27299475
Change-Id: I58f99c21389dbae5c8e3ad85d98700dc165664bb
(cherry picked from commit 10adb0c2029f112b5738228617d5645f6ecea0c5)
17 files changed
tree: 9f2aefb9af0f868a53d4bb023c2e6c611c01f6d6
  1. api/
  2. cpp/
  3. cpu_ref/
  4. driver/
  5. java/
  6. scriptc/
  7. server/
  8. tests/
  9. Android.mk
  10. CleanSpec.mk
  11. libRS.map
  12. rs.h
  13. rs.spec
  14. rs_compat.spec
  15. rs_hal.h
  16. rsAllocation.cpp
  17. rsAllocation.h
  18. rsAnimation.cpp
  19. rsAnimation.h
  20. rsApiAllocation.cpp
  21. rsApiContext.cpp
  22. rsApiDevice.cpp
  23. rsApiElement.cpp
  24. rsApiFileA3D.cpp
  25. rsApiMesh.cpp
  26. rsApiType.cpp
  27. rsClosure.cpp
  28. rsClosure.h
  29. rsCompatibilityLib.cpp
  30. rsCompatibilityLib.h
  31. rsComponent.cpp
  32. rsComponent.h
  33. rsContext.cpp
  34. rsContext.h
  35. rsCppUtils.cpp
  36. rsCppUtils.h
  37. rsDebugHelper.h
  38. rsDefines.h
  39. rsDevice.cpp
  40. rsDevice.h
  41. rsDriverLoader.cpp
  42. rsElement.cpp
  43. rsElement.h
  44. rsEnv.h
  45. rsFBOCache.cpp
  46. rsFBOCache.h
  47. rsFifo.h
  48. rsFifoSocket.cpp
  49. rsFifoSocket.h
  50. rsFileA3D.cpp
  51. rsFileA3D.h
  52. rsFont.cpp
  53. rsFont.h
  54. rsg.spec
  55. rsg_generator.c
  56. rsgApi.cpp.rsg
  57. rsgApiFuncDecl.h.rsg
  58. rsgApiReplay.cpp.rsg
  59. rsgApiStructs.h.rsg
  60. rsGrallocConsumer.cpp
  61. rsGrallocConsumer.h
  62. rsInternalDefines.h
  63. rsList.h
  64. rsMap.h
  65. rsMatrix2x2.cpp
  66. rsMatrix2x2.h
  67. rsMatrix3x3.cpp
  68. rsMatrix3x3.h
  69. rsMatrix4x4.cpp
  70. rsMatrix4x4.h
  71. rsMesh.cpp
  72. rsMesh.h
  73. rsMutex.cpp
  74. rsMutex.h
  75. rsObjectBase.cpp
  76. rsObjectBase.h
  77. rsProgram.cpp
  78. rsProgram.h
  79. rsProgramBase.h
  80. rsProgramFragment.cpp
  81. rsProgramFragment.h
  82. rsProgramRaster.cpp
  83. rsProgramRaster.h
  84. rsProgramStore.cpp
  85. rsProgramStore.h
  86. rsProgramVertex.cpp
  87. rsProgramVertex.h
  88. rsRuntime.h
  89. rsSampler.cpp
  90. rsSampler.h
  91. rsScript.cpp
  92. rsScript.h
  93. rsScriptC.cpp
  94. rsScriptC.h
  95. rsScriptC_Lib.cpp
  96. rsScriptC_LibGL.cpp
  97. rsScriptGroup.cpp
  98. rsScriptGroup.h
  99. rsScriptGroup2.cpp
  100. rsScriptGroup2.h
  101. rsScriptGroupBase.h
  102. rsScriptIntrinsic.cpp
  103. rsScriptIntrinsic.h
  104. rsSignal.cpp
  105. rsSignal.h
  106. rsStream.cpp
  107. rsStream.h
  108. rsThreadIO.cpp
  109. rsThreadIO.h
  110. rsType.cpp
  111. rsType.h
  112. rsUtils.h
  113. run_rs_cts.sh
  114. spec.h
  115. spec.l
  116. update_rs_prebuilts.sh