Hi Thomas,

Thanks for your response.

> "Changes init, shutdown, and set directives to accept just a single   
> device_type argument rather than a list".) So, no need for you to     
> invent a libgomp function that is accepting a list of device types.   

Oh, actually my current implementation emits the corresponding libgomp  
builtin call as many devices are inside the list, then I have a         
(rookie?) question:                                                     

    - Is it better to implement the builtin with variable number of     
    parameters rather than emiting separate builtin calls? Why?         

> In Fortran ('gcc/fortran/openmp.cc:gfc_match_omp_clauses'), you just  
> re-use 'OMP_CLAUSE_DEVICE_TYPE' also for OpenACC, and disambiguate    
> the two cases with 'if (openacc)' (as done, for example, for          
> 'OMP_CLAUSE_DEVICE', which also is shared for the OpenACC and OpenMP  
> 'device' clauses, with different semantics).                          

Thanks! I saw the specific code to handle the OMP_CLAUSE_DEVICE_TYPE    
and I realized that I was overthinking it. Oops.                        

> Therefore, in clause parsing, do a simple '!strcmp ("nvidia",         
> [...])' etc. (see, for example, the OpenACC/OpenMP 'default' clause   
> parsing), and then, for your 'GOACC_[...]' function calls, you may    
> use 'GOMP_DEVICE_NVIDIA_PTX' etc. (see 'include/gomp-constants.h',    
> which defines the "Communication between GCC and libgomp").           

I'll change the implementation following this.

Thanks for your clarifications and your time!

Best, 
Sebastian                                                         

Reply via email to