void acc_shutdown (acc_device_t d) { gomp_mutex_lock (&acc_device_lock); acc_shutdown_1 (d); gomp_mutex_unlock (&acc_device_lock); }
void acc_shutdown (acc_device_t d) { gomp_init_targets_once (); gomp_mutex_lock (&acc_device_lock); acc_shutdown_1 (d); gomp_mutex_unlock (&acc_device_lock); }
static struct gomp_device_descr * lazy_init (acc_device_t d) { if (base_dev) { /* Re-initializing the same device, do nothing. */ if (d == init_key) return base_dev; acc_shutdown_1 (init_key); } assert (!base_dev); return acc_init_1 (d); }