On 29/10/2019 17:15, Jakub Jelinek wrote:
> +void f03 (void);
> +#pragma omp declare variant (f03) match 
> (device={kind(any),arch(x86_64),isa(avx512f,avx512bw)})
> +void f04 (void);

1) it's not clear from the omp spec what is the intended
syntax for isa-name, arch-name and extension-name, but
i expected strings in "".

what if an arch or isa name contains ',' ')' etc?

we were planing to use things like

isa("sve")
arch("armv8.2-a+sve")
extension("scalable")

i think we can drop the ", but it looks a bit weird:
normal pp-token parsing of directives would break
the arch name up into multiple tokens (unless it's
special cased like include <...>, at least inside
_Pragma("omp ...") there is no expectation of normal
pp-token parsing), either way is fine with me, but
it may be worth asking clarification from omp?


2) does f03 need to be declared before the declare variant
pragma appears?

for simd variants it means i need to declare the function
with the right simd types and attributes.

Reply via email to