asm ("s_sleep 64");
unsigned int slot = index % 1024;
- uint64_t addrs_sizes_kind[3] = {(uint64_t) hostaddrs, (uint64_t) sizes,
- (uint64_t) kinds};
- data->queue[slot].msg_u64[0] = (uint64_t) fn;
- data->queue[slot].msg_u64[1] = (uint64_t) mapnum;
- data->queue[slot].value_u64[0] = (uint64_t) &addrs_sizes_kind[0];
- data->queue[slot].value_u64[1] = (uint64_t) GOMP_ADDITIONAL_ICVS.device_num;
+ data->queue[slot].value_u64[0] = (uint64_t) fn;
+ data->queue[slot].value_u64[1] = (uint64_t) mapnum;
+ data->queue[slot].value_u64[2] = (uint64_t) hostaddrs;
+ data->queue[slot].value_u64[3] = (uint64_t) sizes;
+ data->queue[slot].value_u64[4] = (uint64_t) kinds;
+ data->queue[slot].value_u64[5] = (uint64_t) GOMP_ADDITIONAL_ICVS.device_num;
data->queue[slot].type = 4; /* Reverse offload. */
__atomic_store_n (&data->queue[slot].written, 1, __ATOMIC_RELEASE);
}
static void
-process_reverse_offload (uint64_t fn, uint64_t mapnum, uint64_t rev_data,
- uint64_t dev_num64)
+process_reverse_offload (uint64_t fn, uint64_t mapnum, uint64_t hostaddrs,
+ uint64_t sizes, uint64_t kinds, uint64_t dev_num64)
{
int dev_num = dev_num64;
- uint64_t addrs_sizes_kinds[3];
- GOMP_OFFLOAD_host2dev (dev_num, &addrs_sizes_kinds, (void *) rev_data,
- sizeof (addrs_sizes_kinds));
- GOMP_PLUGIN_target_rev (fn, mapnum, addrs_sizes_kinds[0],
- addrs_sizes_kinds[1], addrs_sizes_kinds[2],
- dev_num, NULL, NULL, NULL);
+ GOMP_PLUGIN_target_rev (fn, mapnum, hostaddrs, sizes, kinds, dev_num,
+ NULL, NULL, NULL);
}
/* Output any data written to console output from the kernel. It is expected
case 2: printf ("%.128s%.128s\n", data->msg, data->text); break;
case 3: printf ("%.128s%.128s", data->msg, data->text); break;
case 4:
- process_reverse_offload (data->msg_u64[0], data->msg_u64[1],
- data->value_u64[0],data->value_u64[1]);
+ process_reverse_offload (data->value_u64[0], data->value_u64[1],
+ data->value_u64[2], data->value_u64[3],
+ data->value_u64[4], data->value_u64[5]);
break;
default: printf ("GCN print buffer error!\n"); break;
}