diff options
author | Tim Murray <timmurray@google.com> | 2012-11-06 14:38:06 -0800 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2012-11-08 16:50:48 -0800 |
commit | 97960af1f651349fba21fc67be644e49711a4263 (patch) | |
tree | e49f2be0af4ebd588a8f89f57004107d843759be /tests | |
parent | 7f0d56899840f071c81bbbcbebfbd880ac31c043 (diff) | |
download | rs-97960af1f651349fba21fc67be644e49711a4263.tar.gz |
Add some more options to latency test.
Change-Id: I941a9cb8a82fe8db90c537d6a61272d12c779f4d
Diffstat (limited to 'tests')
-rw-r--r-- | tests/latency/latency.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/latency/latency.cpp b/tests/latency/latency.cpp index 3a17f65b..e6aaac91 100644 --- a/tests/latency/latency.cpp +++ b/tests/latency/latency.cpp @@ -9,8 +9,8 @@ using namespace renderscriptCpp; int main(int argc, char** argv) { int iters = 100; - int numElems = 1000; + bool forceCpu = false; if (argc >= 2) { iters = atoi(argv[1]); @@ -30,11 +30,20 @@ int main(int argc, char** argv) } } + if (argc >= 4) { + int temp = atoi(argv[3]); + if (temp != 0) + forceCpu = true; + } + + if (forceCpu) + printf("forcing CPU\n"); + printf("numElems = %d\n", numElems); sp<RS> rs = new RS(); - bool r = rs->init(true); // force CPU execution + bool r = rs->init(forceCpu); // force CPU execution sp<const Element> e = Element::U32(rs); |