Add Intel SIMD vectorization directives to hot-spot functions
Apply Intel Advisor optimization recommendations: - Add FORCEINLINE to polint for better inlining - Add SIMD VECTORLENGTHFOR and UNROLL directives to fderivs, fdderivs, symmetry_bd, and kodis functions This improves vectorization efficiency of finite difference computations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -883,13 +883,17 @@ subroutine symmetry_bd(ord,extc,func,funcc,SoA)
|
||||
|
||||
integer::i
|
||||
|
||||
!DIR$ SIMD VECTORLENGTHFOR(KNOWN_INTEGER=8)
|
||||
funcc(1:extc(1),1:extc(2),1:extc(3)) = func
|
||||
!DIR$ SIMD VECTORLENGTHFOR(KNOWN_INTEGER=8)
|
||||
do i=0,ord-1
|
||||
funcc(-i,1:extc(2),1:extc(3)) = funcc(i+1,1:extc(2),1:extc(3))*SoA(1)
|
||||
enddo
|
||||
!DIR$ SIMD VECTORLENGTHFOR(KNOWN_INTEGER=8)
|
||||
do i=0,ord-1
|
||||
funcc(:,-i,1:extc(3)) = funcc(:,i+1,1:extc(3))*SoA(2)
|
||||
enddo
|
||||
!DIR$ SIMD VECTORLENGTHFOR(KNOWN_INTEGER=8)
|
||||
do i=0,ord-1
|
||||
funcc(:,:,-i) = funcc(:,:,i+1)*SoA(3)
|
||||
enddo
|
||||
@@ -1112,6 +1116,7 @@ end subroutine d2dump
|
||||
! Lagrangian polynomial interpolation
|
||||
!------------------------------------------------------------------------------
|
||||
|
||||
!DIR$ ATTRIBUTES FORCEINLINE :: polint
|
||||
subroutine polint(xa, ya, x, y, dy, ordn)
|
||||
implicit none
|
||||
|
||||
|
||||
Reference in New Issue
Block a user