From 99e76023ff0759925403b43e19612fb859c3759e Mon Sep 17 00:00:00 2001
From: Julian Brown <julian@codesourcery.com>
Date: Fri, 19 Sep 2014 11:28:11 -0700
Subject: [PATCH 2/5] Work around lack of __builtin_acc_on_device for now
xxxx-xx-xx Julian Brown <julian@codesourcery.com>
libgomp/
* oacc-init.c (acc_on_device): Temporarily hard-code for host
instead of using __builtin_acc_on_device.
---
libgomp/oacc-init.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -545,8 +545,20 @@ acc_on_device (acc_device_t dev)
&& acc_device_type (thr->dev->type) == acc_device_host_nonshm)
return dev == acc_device_host_nonshm || dev == acc_device_not_host;
+#if 1
+ /* Support for __builtin_acc_on_device comes in later patches. */
+ switch (dev)
+ {
+ case acc_device_none:
+ case acc_device_host:
+ return 1;
+ default:
+ return 0;
+ }
+#else
/* Just rely on the compiler builtin. */
return __builtin_acc_on_device (dev);
+#endif
}
ialias (acc_on_device)
--
1.7.10.4