summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2012-11-06 14:38:06 -0800
committerTim Murray <timmurray@google.com>2012-11-08 16:50:48 -0800
commit97960af1f651349fba21fc67be644e49711a4263 (patch)
treee49f2be0af4ebd588a8f89f57004107d843759be /tests
parent7f0d56899840f071c81bbbcbebfbd880ac31c043 (diff)
downloadrs-97960af1f651349fba21fc67be644e49711a4263.tar.gz
Add some more options to latency test.
Change-Id: I941a9cb8a82fe8db90c537d6a61272d12c779f4d
Diffstat (limited to 'tests')
-rw-r--r--tests/latency/latency.cpp13
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);