Tobias Burnus wrote:
Sandra Loosemore wrote:
From: Kwok Cheung Yeung<k...@codesourcery.com>
This patch implements the libgomp runtime support for the dynamic
target_device selector via the GOMP_evaluate_target_device function.
...
+GOMP_evaluate_target_device (int device_num, const char *kind,
+ const char *arch, const char *isa)
+{
+ bool result = true;
+
+ if (device_num < 0)
+ device_num = omp_get_default_device ();
+
+ if (kind && strcmp (kind, "any") == 0)
+ kind = NULL;
I wonder whether we shouldn't be able to do an early return here,
given that:
"If trait-property 'any' is specified in the 'kind' trait-selector of
the device selector set or the target_device selector sets, no other
trait-property may be specified in the same selector set."
[From "Restrictions to context selectors are as follows:", here quoting
TR12]
Tobias