On Thu, 21 May 2015 14:38:19 +0100 Julian Brown <jul...@codesourcery.com> wrote:
> On Thu, 21 May 2015 15:21:54 +0200 > Jakub Jelinek <ja...@redhat.com> wrote: > > > On Thu, May 21, 2015 at 02:05:12PM +0100, Julian Brown wrote: > > > OpenACC handles function calls specially (calling them "routines" > > > -- of varying sorts, gang, worker, vector or seq, affecting where > > > they can be invoked from). The plan is that all threads will call > > > such routines -- and then some threads will be "neutered" as > > > appropriate within the routines themselves, as appropriate. > > > > All functions will behave that way, or just some using some magic > > attribute etc.? Say will newlib functions behave this way (math > > functions, printf, ...)? > > It's actually unclear at this point if "regular" functions are > supported by OpenACC at all (the spec says nothing about them). They > probably raise "interesting" questions about re-entrancy, > synchronisation, and so on. ...actually, replied too soon: regular math functions, etc. will be handled the same as routines declared with "seq". They won't contain partitioned loops, and can be called from anywhere in an offloaded region. Julian