I'm in the process of taking an application with a lot of long (~200 element) vector operations performed in FORALL loops, and replacing them with VML calls. As the vectors are so long I would expect to get a performance enhancement from doing this, though I haven't got as far as testing this yet.
I notice, however, that the compiler won't let me have VML calls inside FORALL loops. If I replace the FORALL loops with more prosaic DO loops, then everything works fine. Is this because the VML procedures aren't 'pure', or is there some other reason? The 'mkl_vml.fi' interface doesn't declare the functions as pure, but can I safely write my own interface declaring them thus?
I'm concerned about this because some of my functions need to be passed as arguments and I believe that they need to be pure themselves for this reason. I can forsee problems if they contain calls to VML subroutines that aren't pure.