@@ -501,7 +501,8 @@ acc_unmap_data (void *h)
/* Enter dynamic mapping for a single datum. Return the device pointer. */
static void *
-goacc_enter_datum (void **hostaddrs, size_t *sizes, void *kinds, int async)
+goacc_enter_datum (void **hostaddrs, size_t *sizes, unsigned short kind,
+ int async)
{
void *d;
splay_tree_key n;
@@ -560,7 +561,7 @@ goacc_enter_datum (void **hostaddrs, size_t *sizes, void *kinds, int async)
struct target_mem_desc *tgt
= gomp_map_vars_async (acc_dev, aq, mapnum, hostaddrs, NULL, sizes,
- kinds, true, GOMP_MAP_VARS_ENTER_DATA);
+ &kind, true, GOMP_MAP_VARS_ENTER_DATA);
assert (tgt);
assert (tgt->list_count == 1);
n = tgt->list[0].key;
@@ -584,15 +585,13 @@ goacc_enter_datum (void **hostaddrs, size_t *sizes, void *kinds, int async)
void *
acc_create (void *h, size_t s)
{
- unsigned short kinds[1] = { GOMP_MAP_ALLOC };
- return goacc_enter_datum (&h, &s, &kinds, acc_async_sync);
+ return goacc_enter_datum (&h, &s, GOMP_MAP_ALLOC, acc_async_sync);
}
void
acc_create_async (void *h, size_t s, int async)
{
- unsigned short kinds[1] = { GOMP_MAP_ALLOC };
- goacc_enter_datum (&h, &s, &kinds, async);
+ goacc_enter_datum (&h, &s, GOMP_MAP_ALLOC, async);
}
/* acc_present_or_create used to be what acc_create is now. */
@@ -617,15 +616,13 @@ acc_pcreate (void *h, size_t s)
void *
acc_copyin (void *h, size_t s)
{
- unsigned short kinds[1] = { GOMP_MAP_TO };
- return goacc_enter_datum (&h, &s, &kinds, acc_async_sync);
+ return goacc_enter_datum (&h, &s, GOMP_MAP_TO, acc_async_sync);
}
void
acc_copyin_async (void *h, size_t s, int async)
{
- unsigned short kinds[1] = { GOMP_MAP_TO };
- goacc_enter_datum (&h, &s, &kinds, async);
+ goacc_enter_datum (&h, &s, GOMP_MAP_TO, async);
}
/* acc_present_or_copyin used to be what acc_copyin is now. */