/* OpenACC Runtime Library: acc_device_host.
- Copyright (C) 2013-2019 Free Software Foundation, Inc.
+ Copyright (C) 2013-2020 Free Software Foundation, Inc.
Contributed by Mentor Embedded.
return true;
}
+static union goacc_property_value
+host_openacc_get_property (int n, enum goacc_property prop)
+{
+ union goacc_property_value nullval = { .val = 0 };
+
+ if (n >= host_get_num_devices ())
+ return nullval;
+
+ switch (prop)
+ {
+ case GOACC_PROPERTY_NAME:
+ return (union goacc_property_value) { .ptr = "GOMP" };
+ case GOACC_PROPERTY_VENDOR:
+ return (union goacc_property_value) { .ptr = "GNU" };
+ case GOACC_PROPERTY_DRIVER:
+ return (union goacc_property_value) { .ptr = VERSION };
+ case GOACC_PROPERTY_MEMORY:
+ case GOACC_PROPERTY_FREE_MEMORY:
+ default:
+ return nullval;
+ }
+}
+
static void *
host_openacc_create_thread_data (int ord __attribute__ ((unused)))
{
.host2dev_func = host_openacc_async_host2dev,
},
+ .get_property_func = host_openacc_get_property,
+
.cuda = {
.get_current_device_func = NULL,
.get_current_context_func = NULL,