diff options
Diffstat (limited to 'modules/remote-hip/examples')
-rw-r--r-- | modules/remote-hip/examples/hip_transfer_data.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/remote-hip/examples/hip_transfer_data.cpp b/modules/remote-hip/examples/hip_transfer_data.cpp index badd8cd..18c82df 100644 --- a/modules/remote-hip/examples/hip_transfer_data.cpp +++ b/modules/remote-hip/examples/hip_transfer_data.cpp @@ -8,6 +8,18 @@ __global__ void print_value(saw::data<saw::schema::Int16,saw::encode::Native>* v printf("Hello world: %d\n", v); } +__global__ void print_array_vals(saw::data<saw::schema::Array<saw::schema::Int16>* val){ + uint64_t orig_len = val->size(); + long len = (long) orig_len; + + printf("Array size: %ld\n", len); + for(uint64_t i = 0; i < orig_len; +i){ + int v = val->at(i); + printf("%d ", v); + } + printf("\n"); +} + namespace sch { using namespace saw::schema; } |