oper1.f

来自「网络带宽测试工具」· F 代码 · 共 26 行

F
26
字号
      Subroutine oper1( sy, nmult, linc, hash )! -------------------------------------------------------------------! --- 'oper1' does a multiplication with a stride in the index of!     array 'a ' to generate memory bank read conflicts. 'linc' is!     the stride.!     'sy' is the target variable.! -------------------------------------------------------------------      Use                    numerics      Use                    sizes !Defines type & size of array 'a'.      Implicit               None      Integer             :: nmult      Integer*8           :: hash, linc      Real(l_)            :: sy      Real(l_), Parameter :: sa = 0.5, sb = 0.5      Integer*8           :: i, l! -------------------------------------------------------------------!$omp parallel do      Do i = 1, nmult         l  = Abs( Mod( i*linc, hash ) )         sy = a(l)*sa + a(l)*sb      End Do! -------------------------------------------------------------------      End Subroutine oper1

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?