anchor.diff:    END SUBROUTINE
   
     ! Non-dispatched matrix-matrix multiplication using inline code; double-precision.
  -  !DIR$ ATTRIBUTES OFFLOAD:MIC :: LIBXSMM_DIMM
  -  !DIR$ ATTRIBUTES INLINE :: LIBXSMM_DIMM
  -  PURE SUBROUTINE LIBXSMM_DIMM(m, n, k, a, b, c)
  +  !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_dimm
  +  !DIR$ ATTRIBUTES INLINE :: libxsmm_dimm
  +  PURE SUBROUTINE libxsmm_dimm(m, n, k, a, b, c)
       INTEGER, INTENT(IN) :: m, n, k
       REAL(LIBXSMM_DOUBLE_PRECISION), INTENT(IN) :: a($SHAPE_A), b($SHAPE_B)
       REAL(LIBXSMM_DOUBLE_PRECISION), INTENT(INOUT) :: c($SHAPE_C)
  
positive.code:   END SUBROUTINE
  
    ! Non-dispatched matrix-matrix multiplication using BLAS; double-precision.
    !DIR$ ATTRIBUTES OFFLOAD:MIC :: LIBXSMM_DBLASMM
    !DIR$ ATTRIBUTES INLINE :: LIBXSMM_DBLASMM
    PURE SUBROUTINE LIBXSMM_DBLASMM(m, n, k, a, b, c)
      INTEGER, INTENT(IN) :: m, n, k
      REAL(LIBXSMM_DOUBLE_PRECISION), INTENT(IN) :: a($SHAPE_A), b($SHAPE_B)
      REAL(LIBXSMM_DOUBLE_PRECISION), INTENT(INOUT) :: c($SHAPE_C)
  
negative.code:   END SUBROUTINE
  
    ! Query the pointer of a generated function; zero if it does not exist.
    !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_smm_dispatch
    !DIR$ ATTRIBUTES INLINE :: libxsmm_smm_dispatch
    FUNCTION libxsmm_smm_dispatch(m, n, k) RESULT(f)
      PROCEDURE(LIBXSMM_SMM_FUNCTION), POINTER :: f
      INTEGER, INTENT(IN) :: m, n, k
      INTERFACE
        !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_smm_dispatch_aux
        TYPE(C_FUNPTR) PURE FUNCTION libxsmm_smm_dispatch_aux(m, n, k) BIND(C, NAME="libxsmm_smm_dispatch")
          USE, INTRINSIC :: ISO_C_BINDING
          INTEGER(C_INT), INTENT(IN) :: m, n, k
        END FUNCTION
      END INTERFACE
      CALL C_F_PROCPOINTER(libxsmm_smm_dispatch_aux(m, n, k), f)
    END FUNCTION
  
    ! Query the pointer of a generated function; zero if it does not exist.
    !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_dmm_dispatch
    !DIR$ ATTRIBUTES INLINE :: libxsmm_dmm_dispatch
    FUNCTION libxsmm_dmm_dispatch(m, n, k) RESULT(f)
      PROCEDURE(LIBXSMM_DMM_FUNCTION), POINTER :: f
      INTEGER, INTENT(IN) :: m, n, k
      INTERFACE
        !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_dmm_dispatch_aux
        TYPE(C_FUNPTR) PURE FUNCTION libxsmm_dmm_dispatch_aux(m, n, k) BIND(C, NAME="libxsmm_dmm_dispatch")
          USE, INTRINSIC :: ISO_C_BINDING
          INTEGER(C_INT), INTENT(IN) :: m, n, k
        END FUNCTION
      END INTERFACE
      CALL C_F_PROCPOINTER(libxsmm_dmm_dispatch_aux(m, n, k), f)
    END FUNCTION
  
    ! Dispatched matrix-matrix multiplication; single-precision.
    !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_smm
    !DIR$ ATTRIBUTES INLINE :: libxsmm_smm
    SUBROUTINE libxsmm_smm(m, n, k, a, b, c)
      INTEGER, INTENT(IN) :: m, n, k
      REAL(LIBXSMM_SINGLE_PRECISION), INTENT(IN) :: a($SHAPE_A), b($SHAPE_B)
      REAL(LIBXSMM_SINGLE_PRECISION), INTENT(INOUT) :: c($SHAPE_C)
      PROCEDURE(LIBXSMM_SMM_FUNCTION), POINTER :: f
      IF (LIBXSMM_MAX_MNK.GE.(m * n * k)) THEN
        f => libxsmm_smm_dispatch(m, n, k)
        IF (ASSOCIATED(f)) THEN
          CALL f(a, b, c)
        ELSE
          CALL libxsmm_simm(m, n, k, a, b, c)
        ENDIF
      ELSE
        CALL libxsmm_sblasmm(m, n, k, a, b, c)
      ENDIF
    END SUBROUTINE
  
    ! Dispatched matrix-matrix multiplication; double-precision.
    !DIR$ ATTRIBUTES OFFLOAD:MIC :: libxsmm_dmm
    !DIR$ ATTRIBUTES INLINE :: libxsmm_dmm
    SUBROUTINE libxsmm_dmm(m, n, k, a, b, c)
      INTEGER, INTENT(IN) :: m, n, k
      REAL(LIBXSMM_DOUBLE_PRECISION), INTENT(IN) :: a($SHAPE_A), b($SHAPE_B)
      REAL(LIBXSMM_DOUBLE_PRECISION), INTENT(INOUT) :: c($SHAPE_C)
      PROCEDURE(LIBXSMM_DMM_FUNCTION), POINTER :: f
      IF (LIBXSMM_MAX_MNK.GE.(m * n * k)) THEN
        f => libxsmm_dmm_dispatch(m, n, k)
        IF (ASSOCIATED(f)) THEN
          CALL f(a, b, c)
        ELSE
          CALL libxsmm_dimm(m, n, k, a, b, c)
        ENDIF
      ELSE
        CALL libxsmm_dblasmm(m, n, k, a, b, c)
      ENDIF
    END SUBROUTINE
  END MODULE
  