minor updates
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
|
||||
void kernel_body(int task_id, kernel_arg_t* arg) {
|
||||
int* src_ptr = (int*)arg->src_addr;
|
||||
vx_printf("task=%d, value=%d\n", task_id, src_ptr[task_id]);
|
||||
char value = 'A' + src_ptr[task_id];
|
||||
vx_printf("task=%d, value=%c\n", task_id, value);
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
||||
@@ -126,9 +126,9 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// upload source buffer0
|
||||
{
|
||||
auto buf_ptr = (float*)vx_host_ptr(staging_buf);
|
||||
auto buf_ptr = (int*)vx_host_ptr(staging_buf);
|
||||
for (uint32_t i = 0; i < num_points; ++i) {
|
||||
buf_ptr[i] = i-1;
|
||||
buf_ptr[i] = i;
|
||||
}
|
||||
}
|
||||
std::cout << "upload source buffer" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user