History log of /frameworks/rs/cpu_ref/rsCpuCore.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
82e135c4bbe18855d8ed02632bb074f8da0b96e0 28-Feb-2017 Miao Wang <miaowang@google.com> Remove libutils.so dependency from libRSDriver, libRSCpuRef, and most
parts of libRS_internal.

NOTE: we're resolving dependencies to provide a model for vendors.
For us, all this code is above the HAL, thus the dependencies
are acceptable; whereas for vendors, their equivalent of this code is
below the HAL, and so the dependencies are not acceptable.

This CL resolves the libutils dependency by:
- Implement the timings functions in android::renderscript namespace
using NDK APIs, instead of using libutils counterparts.
- Replace android::Vector and android::String8 by std::vector and
std::string.
- PROPERTY_VALUE_MAX is replaced as PROP_VALUE_MAX.

This CL didn't resolve the libutils dependency of rsFont.cpp and
rsDebugger.cpp in libRS_internal:
The dependent functionality in rsDebugHelper.h is off by default, and
only intended for use during development; and rsFont.cpp is part of
graphics API which is not implemented below the HAL and is not used as
a model by vendors.

Additionally, this CL fixed the bug that mNodes was sorted in a
decreasing order. Nodes in ScriptGroup should be executed in
ascending order. The bad sort was only for support lib; so there was a
previously-unknown bug in support lib implementation of ScriptGroup.

Background:
libutils contains a collection of things like Vector, String8,
CallStack. It served the purpose similar to a STL library, when there
was no stable STL implementation available in Android. And most
importantly, it is not part of NDK.
Support lib used to use our own implementations of android::Vector and
android::String8, because it can only depend on NDK, similarly for the
timing related functions.
As part of the Treble requirements, native RS, including vendor version
libRS_internal, libRSDriver, libRSCpuRef could only depend on NDK
too. So we need to break the dependency on libutils. And since we now
have reasonable support of STLs, we should use that instead.

Bug: 34396220
Test: mm, and all CTS tests pass on Bullhead;
RsTest and RSTest_CompatLib (both native and compat path) also pass.
Change-Id: Ib9a37d16235c1dcd0f5bae3b95c374e394483c91
/frameworks/rs/cpu_ref/rsCpuCore.h
7974fc03e11f3a8dd40f794f3b33b4889483090c 09-Feb-2017 Rahul Chaudhry <rahulchaudhry@google.com> frameworks/rs: fix typos and clang-tidy warnings

This change fixes a few typos and clang tidy warnings related to the
"llvm-namespace-comment" checks.

Bug: 26936282
Test: WITH_TIDY=1 WITH_TIDY_CHECKS="llvm-namespace-comment" mm
Change-Id: Ic65182e5b4999fbd48d6a8ad7172e4bfeeb541f4
/frameworks/rs/cpu_ref/rsCpuCore.h
4fcef498e1508f2f3a0b9332ea89b0064c2dc6e9 01-Jul-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in frameworks/rs.

* Declare explicit conversion constructors.
* Add parentheses around macro arguments beside operators.

Bug: 28341362
Bug: 28705665
Change-Id: I2eef68ab0edd33f765bcc5dd73f6baf25b6f7585
Test: build with clang-tidy
/frameworks/rs/cpu_ref/rsCpuCore.h
fc7ab793ea2db91f330272d9470433bbb1a505ce 01-Jun-2016 David Gross <dgross@google.com> Delete simple reduction implementation.

Bug: 27298560
Change-Id: I8c3d568e98aaf0b7d86881c985d13ed5b8e95338
(cherry picked from commit ae2ec3febedfc29376b9104413fb4042028f1265)
/frameworks/rs/cpu_ref/rsCpuCore.h
013ff53dc8d6c2464e1b5e1ea8c50b68f7b4aa73 01-Apr-2016 David Gross <dgross@google.com> Guard general reduction logging output under property "debug.rs.reduce".

Bug: 27299475
Change-Id: I5be634fe38d20b9fe6867ad3c0c0b982442b52fd
(cherry picked from commit 6760f7ba7934ddd51938a8d0206fc41c2a7cb419)
/frameworks/rs/cpu_ref/rsCpuCore.h
35dbc8c20814997a00e06d7798a5633c37706978 29-Mar-2016 David Gross <dgross@google.com> 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)
/frameworks/rs/cpu_ref/rsCpuCore.h
6c1876bbef1b2c89975dce91230a168bd2d2ce4c 15-Jan-2016 David Gross <dgross@google.com> Support for general reduction kernels.

Requires coordinated change in frameworks/base.

Requires coordinated change in frameworks/compile/libbcc in order
for RsTest to run.

At present, general reduction kernels are run single-threaded.

Also: Remove dead struct field MTLaunchStructForEach::sig.

Bug: 23535724
Change-Id: Ice17ccf20a902f8a106eaa62ec071d46e3c0ad8c
/frameworks/rs/cpu_ref/rsCpuCore.h
14ce007a633b10e3b9a3fae29d8f53a7e8c9b59f 31-Jul-2015 Matt Wala <wala@google.com> Add a basic implementation of the reduce kernel API to the CPU
reference implementation.

Bug: 22631253

For now, this just runs a serial reduction on one thread.

Change-Id: I34c96d24bb6f44274de72bb53160abcf79d143b0
/frameworks/rs/cpu_ref/rsCpuCore.h
11fd9ec1ab8dfa7ae45c6edeea48dddc4633efea 11-Jul-2015 Matt Wala <wala@google.com> CPU ref: Fix potential buffer over-read / uninitialized memory access.

GetCpuInfo() was reading /proc/cpuinfo into a string without properly
null terminating the result. The resulting unterminated string was
being passed to strstr().

Change the code to read the file with fgets(), which ensures the
result is null terminated. Also, document the GetCpuInfo() function
and the global variable that it sets.

Change-Id: I041331fdc25d79217ff7c1bf36a4aff2be8e0192
/frameworks/rs/cpu_ref/rsCpuCore.h
b043df0676fef226336deb3a00ead2f31e02343f 29-May-2015 David Gross <dgross@google.com> Remove dead uses of RSCompilerDriver and of compiler callbacks.

Change-Id: Ibe8725074724b75e35c25a404daaba07ffbca2ab
/frameworks/rs/cpu_ref/rsCpuCore.h
c060f1435e7b9405f3be8974417fa6f410f03753 14-May-2015 Stephen Hines <srhines@google.com> Use "override" instead of "virtual" when replacing methods.

Bug: 20306487

Change-Id: Ic83cb04cac153a7556f5d516e8f5ec88b5527b6f
/frameworks/rs/cpu_ref/rsCpuCore.h
8409d6414dd4a42aa59779fcfe9fce18648cb135 29-Apr-2015 Stephen Hines <srhines@google.com> Add RSGlobalInfoPass information to RS driver.

Bug: 20306487

This change enables vendor drivers to configure support for including
additional information about global variables in the emitted CPU code.
This information includes the number of total global variables, the
names of these variables, the addresses of these variables and the
sizes of these variables. The driver can also select whether the
information includes constant (immutable) globals or not.

The reference driver defaults to embedding information about each of
the existing, non-constant global variables.

Change-Id: I1e55fc3f08e518f04eeee3e4f9dc7b6ea3b80d7c
/frameworks/rs/cpu_ref/rsCpuCore.h
b0abb140ac51b93d1a85aadaa63fe057f2d29850 12-Mar-2015 David Gross <dgross@google.com> Pass RsExpandKernelDriverInfo not RsExpandKernelParams.

Which is to say: retire RsExpandKernelParams and pass RsExpandKernelDriverInfo
directly to kernel wrapper functions instead.

Requires related change in frameworks/compile/libbcc.

Change-Id: I453f45ec18f389e88e27fcfa57ddf245d077cb98
/frameworks/rs/cpu_ref/rsCpuCore.h
dced5c96bc53c45a1aac782ea9bd738b0d50fd09 12-Mar-2015 David Gross <dgross@google.com> Add new APIs rsGetDim[XYZ]() and add RSTest test cases to exercise them.

Test UT_kernel3d does not pass reliably, so it is disabled for now.

Tests will not compile without related
platform/frameworks/compile/libbcc and
platform/frameworks/compile/slang changes.

Bug: 18964628

Change-Id: I39660400953306ceb47c8b5e9665e8f0084775dd
/frameworks/rs/cpu_ref/rsCpuCore.h
c31585b8ca865bf2b35abc79c8a8ee42de27bee8 15-Feb-2015 Yang Ni <yangni@google.com> Remove STL references from header files

b/19148482

Replaced std::string with android::String8, and std::pair with
android::renderscript::Pair, in header files.

Change-Id: I20ac1a3b7a019e5eee12fac46ad6adf64d850459
/frameworks/rs/cpu_ref/rsCpuCore.h
bf2111d3b3de310932099514f06924e48fa1d7b2 27-Jan-2015 Jason Sams <jsams@google.com> add array launch support.

Change-Id: I66cd89b5b44eafa92f391708a06464cd7cdde3ed
/frameworks/rs/cpu_ref/rsCpuCore.h
c0d68470b978a79ce024fde56f23ea3690603ccd 20-Jan-2015 Jason Sams <jsams@google.com> Cleanup of ForEachParams in cpu ref

Change-Id: I8cc51915b2a605c240d98e3010619b741a13bae2
/frameworks/rs/cpu_ref/rsCpuCore.h
dc0d8f7c0f1f43f25c34fbc04656ad578f6e953b 03-Dec-2014 Pirama Arumuga Nainar <pirama@google.com> Skip linkloader, use shared object files

Bug: 18322681

- In rsCpuScript, if property rs.skip.linkloader is set, look for a .so
file in the cache directory and load it. If it is not available, use
bcc to generate relocatable object file and link it to a .so using
ld.mc. Use the embedded symbols in .rs.info and follow steps similar
to the compatibility library to invoke script functions or access
script variables.
- Add rs* symbols like rsGetAllocation to libRSCpuRef (ala
libRSSupport). Do necessary changes to argument types to get mangled
names correct.
- Make 64-bit version of rsSetObject take two pointers instead of a
pointer and a large object. rsIsObject takes a pointer instead of a
large object. Otherwise, we get failures in x86_64 due to calling
convention mismatch. To match the function names in the shared object
path, define these functions as 'extern "C"' with their mangled names.
- Add stubbed Math functions from rsCpuRuntimeMath and
rsCpuRuntimeMathFuncs into libRSCpuRef.so.
- Coalesce separate #ifdef paths in libRSCpuRef. Function parameters
for runtime callbacks and bcc plugin are needed in the
non-compatibilty path, but take default NULL arguments. This patch
introduces these parameters into the compatibility path as well, and
passes default NULL arguments.

Change-Id: I8a853350e39d30b4d852c30e4b5da5a75a2f2820
/frameworks/rs/cpu_ref/rsCpuCore.h
1ffd86b448d78366190c540f98f8b6d641cdb6cf 07-Jan-2015 Yang Ni <yangni@google.com> New Script Group API: runtime and cpu driver support.

Change-Id: I9c612cf8874aabaf0ca7d1640567464c71ed3070
/frameworks/rs/cpu_ref/rsCpuCore.h
44bef6fba6244292b751387f3d6c31cca96c28ad 12-Aug-2014 Chris Wailes <chriswailes@google.com> Replace NULL macros with nullptr literals.

Change-Id: I918c40879aa547438f77e7d1a95fa2aa33bec398
/frameworks/rs/cpu_ref/rsCpuCore.h
f37121300217d3b39ab66dd9c8881bcbcad932df 17-Jul-2014 Chris Wailes <chriswailes@google.com> Collapse code paths for single- and multi-input kernels.

This patch simplifies the RenderScript driver and CPU reference implementation
by removing the distinction between sing- and multi-input kernels in many
places. The distinction is maintained in some places due to the need to
maintain backwards compatibility. This permits the deletion of some functions
and struct members that are no longer needed. Several related functions were
also cleaned up.

Change-Id: Id70a223ea5e3aa2b0b935b2b7f9af933339ae8a4
/frameworks/rs/cpu_ref/rsCpuCore.h
4b2bea3dc20865f3a198797702e19912a6a2171c 13-Aug-2014 Stephen Hines <srhines@google.com> Revert "Collapse code paths for single- and multi-input kernels."

This reverts commit 818cfa034e257c7bb48356257f5cb67334e19aa6.

Change-Id: I59f39f52e6c8f60bb01cbcb8ccf2215eaf46a57f
/frameworks/rs/cpu_ref/rsCpuCore.h
818cfa034e257c7bb48356257f5cb67334e19aa6 17-Jul-2014 Chris Wailes <chriswailes@google.com> Collapse code paths for single- and multi-input kernels.

This patch simplifies the RenderScript driver and CPU reference implementation
by removing the distinction between sing- and multi-input kernels in many
places. The distinction is maintained in some places due to the need to
maintain backwards compatibility. This permits the deletion of some functions
and struct members that are no longer needed. Several related functions were
also cleaned up.

Change-Id: I77e4b155cc7ca1581b05bf901c70ae53a9ff0b12
/frameworks/rs/cpu_ref/rsCpuCore.h
80ef693674f69c0343c41564e30f80e7fb513b60 08-Jul-2014 Chris Wailes <chriswailes@google.com> Split the RsForEachStubParamStruct in two.

This patch splits the RsForEachStubParamStruct into two smaller structs, one
used specifically by the driver and the other by the expanded kernels. Doing
so makes it clearer what data is used where. In addition, fewer data are
copied between memory locations during kernel invocation.

Several fields that were not being used were removed from the structs.

Change-Id: I7788ef754add44463b17a6b571c7cde6e73b9712
/frameworks/rs/cpu_ref/rsCpuCore.h
4b3c34e6833e39bc89c2128002806b654b8e623d 11-Jun-2014 Chris Wailes <chriswailes@google.com> Adds support for multi-input kernels to Frameworks/RS.

This patch modifies Frameworks/RS in the following ways:
* Adjusted the data-layout of the C/C++ version of RsForEachStubParamStruct to
accommodate a pointer to an array of input allocations and a pointer to an
array of stride sizes for each of these allocatoins.
* Adds a new code path for Java code to pass multiple allocations to a RS
kernel.
* Packs base pointers and step values for multi-input kernels into the new
RsForEachStubParamStruct members.

Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
/frameworks/rs/cpu_ref/rsCpuCore.h
cb51798a0379409c0f9927c44bbcdd772ed7ec18 08-Jul-2014 Chris Wailes <chriswailes@google.com> Moved RsForEachStubParamStruct out of rs_hal.h and into rsCpuCore.h.

Change-Id: Iea673ccd9db5077abef373457f51c6b0d09cea92
/frameworks/rs/cpu_ref/rsCpuCore.h
005113297b19ed256b6db9d6bc293ed9266899fc 31-Jan-2014 Stephen Hines <srhines@google.com> Configure standalone bcc compiler to work with plugin libraries.

Bug: 7342767

This change adds support (hidden behind the EXTERNAL_BCC_COMPILER ifdef)
for loading plugin libraries via the external bcc toolchain. The external
bcc compiler loads the named library and will then invoke a customized
rsCompilerDriverInit() from that library.

Change-Id: I07c2ea68be54c2255d36926fd37e395db790ef8f
/frameworks/rs/cpu_ref/rsCpuCore.h
5cb36d9b36617f6b0493602ef61d620dc8f7e0ae 09-Aug-2013 Jason Sams <jsams@google.com> Merge commit 'b10a68c3' into manualmerge

Conflicts:
cpu_ref/rsCpuIntrinsicColorMatrix.cpp

Change-Id: Ibc2f1514f8858d99f08380f698bc9ae533c69212
f5ef8df639ba6363aa5d546e57ce872d04144cb6 06-Aug-2013 Jason Sams <jsams@google.com> Neon detection for RS SDK compat lib.

Change-Id: I3887158c7ec97ba116c28dc7b1d0c789b81fae60
/frameworks/rs/cpu_ref/rsCpuCore.h
b7d9c80c98fc96aa7c638e3124be24f13a6436b2 30-Apr-2013 Stephen Hines <srhines@google.com> Provide a mechanism for adjusting RSCompilerDriver after construction.

We add a simple callback to the reference implementation of libRSDriver.so,
such that additional BCC flags can be toggled/adjusted before doing any actual
CPU compilation.

Change-Id: Iaf253b7d967d0382937369b1c5dae2d23a99e8be
/frameworks/rs/cpu_ref/rsCpuCore.h
1d476620399d54774e4fd386c1d23cc583d49522 30-Mar-2013 Stephen Hines <srhines@google.com> Add callback to allow replacement of runtime support library.

Change-Id: I84ec56dfb29a0158015ebf31b3a73ac5bf34ef98
/frameworks/rs/cpu_ref/rsCpuCore.h
cadfac411e6690e39de36c4f9e94deb9b7d2d08e 07-Mar-2013 Jason Sams <jsams@google.com> Sync with compat lib.

Change-Id: Id8ace103814cf126f0d157100d1d4a12cc0b8664
/frameworks/rs/cpu_ref/rsCpuCore.h
f218bf115af4ae4fd79adbb8842608b308a4cf07 13-Feb-2013 Stephen Hines <srhines@google.com> Support LinkRuntimeCallback() with RS compiler.

Change-Id: I28ada4e7c462cb9673de6886d934dce855fac339
/frameworks/rs/cpu_ref/rsCpuCore.h
c44d6706868749abe37780fc28b2cc627ddcf269 29-Nov-2012 Jason Sams <jsams@google.com> Fix uchar blur with neon offsets

fix hardcoded width limit in blur.

Change-Id: I4f56b8454181110133c4a637b66f1df3c79da33e
/frameworks/rs/cpu_ref/rsCpuCore.h
709a0978ae141198018ca9769f8d96292a8928e6 16-Nov-2012 Jason Sams <jsams@google.com> Separate CPU driver impl from reference driver.

Change-Id: Ifb484edda665959b81d7b1f890d108bfa20a535d
/frameworks/rs/cpu_ref/rsCpuCore.h