minor update

This commit is contained in:
Blaise Tine
2021-06-04 20:46:34 -07:00
parent b14825c8b9
commit 84391c1a06
3 changed files with 5 additions and 5 deletions

View File

@@ -185,8 +185,8 @@ int run_kernel_test(const kernel_arg_t& kernel_arg,
int32_t curr = ((int32_t*)vx_host_ptr(staging_buf))[i];
int32_t ref = i;
if (curr != ref) {
std::cout << "error at result #" << i
<< ": actual 0x" << curr << ", expected 0x" << ref << std::endl;
std::cout << "error at result #" << std::dec << i
<< std::hex << ": actual 0x" << curr << ", expected 0x" << ref << std::endl;
++errors;
}
}

View File

@@ -82,8 +82,8 @@ int run_test(const kernel_arg_t& kernel_arg,
int ref = i + i;
int cur = buf_ptr[i];
if (cur != ref) {
std::cout << "error at result #" << i
<< ": actual 0x" << cur << ", expected 0x" << ref << std::endl;
std::cout << "error at result #" << std::dec << i
<< std::hex << ": actual 0x" << cur << ", expected 0x" << ref << std::endl;
++errors;
}
}

View File

@@ -114,7 +114,7 @@ void gen_input_data(uint32_t num_points) {
test_data.resize(num_points);
addr_table.resize(num_points + NUM_LOADS - 1);
for (uint32_t i = 0; i < test_data.size(); ++i) {
for (uint32_t i = 0; i < num_points; ++i) {
float r = static_cast<float>(std::rand()) / RAND_MAX;
test_data[i] = r;
}