oper2.f

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

F
25
字号
      Subroutine oper2( nmult, linc, hash )! -------------------------------------------------------------------! --- 'oper2' does a multiplication with a stride in the index of!     array 'a 'to generate memory bank write conflicts. 'linc' is!     the stride.!     'a' is it's own target array; 'sb' is the scalar multiplier.! -------------------------------------------------------------------      Use                    numerics      Use                    sizes !Defines type & size of array 'a'.      Implicit               None                 Integer              :: nmult      Integer*8            :: hash, linc      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 ) )         a(l) = a(i)*sa + a(i+1)*sb      End Do! -------------------------------------------------------------------      End Subroutine oper2

⌨️ 快捷键说明

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