Quantcast
Viewing all articles
Browse latest Browse all 3270

Fortran Preprocessor: #endif creates a blank line

Hi ,


I have a quick question regarding the #ifdef and #endif for preprocessing. I have the following code piece in my fpp file:

#ifdef USE_SIMD
              !DIR$ SIMD
#endif
              do i = is, ie
                dF(i + offset_kj) = dF(i + offset_kj) + value * F(i + offset_ii)
              end do

 


After preprocessing, I got the following code piece in the f90 file:

!DIR$ SIMD

              do i = is, ie
                dF(i + offset_kj) = dF(i + offset_kj) + value * F(i + offset_ii)
              end do

 


There is a blank line between the SIMD directive and the do i loop. I think it is generated by the #endif directive. Is there an easy way to avoid this? I want the SIMD directive to be next to the do i loop.


I would truly appreciate your help!


Best regards,
    Wentao


Viewing all articles
Browse latest Browse all 3270


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>