Print code to "p" for copying "array" back from the device to the host * in its entirety. The bounds on the extent of "array" have * been precomputed in extract_array_info and are used in * gpu_array_info_print_size. */
| 161 | * gpu_array_info_print_size. |
| 162 | */ |
| 163 | static __isl_give isl_printer *copy_array_from_device( |
| 164 | __isl_take isl_printer *p, struct gpu_array_info *array) |
| 165 | { |
| 166 | p = isl_printer_start_line(p); |
| 167 | p = isl_printer_print_str(p, "cudaCheckReturn(cudaMemcpy("); |
| 168 | if (gpu_array_is_scalar(array)) |
| 169 | p = isl_printer_print_str(p, "&"); |
| 170 | p = isl_printer_print_str(p, array->name); |
| 171 | p = isl_printer_print_str(p, ", dev_"); |
| 172 | p = isl_printer_print_str(p, array->name); |
| 173 | p = isl_printer_print_str(p, ", "); |
| 174 | p = gpu_array_info_print_size(p, array); |
| 175 | p = isl_printer_print_str(p, ", cudaMemcpyDeviceToHost));"); |
| 176 | p = isl_printer_end_line(p); |
| 177 | |
| 178 | return p; |
| 179 | } |
| 180 | |
| 181 | static void print_reverse_list(FILE *out, int len, int *list) |
| 182 | { |
no test coverage detected