From 256dec4768da48ee1acbe201a6ffcc01d63e6764 Mon Sep 17 00:00:00 2001 From: Blaise Tine Date: Sun, 5 Apr 2020 01:32:57 -0400 Subject: [PATCH] changing demo to use addition --- driver/tests/demo/demo.cpp | 2 +- driver/tests/demo/kernel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/tests/demo/demo.cpp b/driver/tests/demo/demo.cpp index 3e84bbd0..da2f22b7 100644 --- a/driver/tests/demo/demo.cpp +++ b/driver/tests/demo/demo.cpp @@ -80,7 +80,7 @@ int run_test(vx_device_h device, int errors = 0; auto buf_ptr = (int*)vx_host_ptr(buffer); for (uint32_t i = 0; i < num_points; ++i) { - int ref = i * i; + int ref = i + i; int cur = buf_ptr[i]; if (cur != ref) { ++errors; diff --git a/driver/tests/demo/kernel.c b/driver/tests/demo/kernel.c index 130d6872..226fb673 100644 --- a/driver/tests/demo/kernel.c +++ b/driver/tests/demo/kernel.c @@ -16,7 +16,7 @@ void kernel_body(void* arg) { unsigned i = ((wNo * _arg->num_threads) + tid) * _arg->stride; for (unsigned j = 0; j < _arg->stride; ++j) { - z[i+j] = x[i+j] * y[i+j]; + z[i+j] = x[i+j] + y[i+j]; } }