zoukankan      html  css  js  c++  java
  • Stream使用教程

    现在,计算机CPU运行速度的快速发展已经远远超过了内存的访问速度。越来越多的程序性能被内存带宽所限制,而不是计算机的CPU运行速率。

    Stream benchmark是一个简单的合成基准测试程序,衡量内存带宽(MB /秒)和相应的内核向量的计算速度。

     Each of the four tests adds independent information to the results:

    1. copy”:在没有算术的衡量传输速率;

    2. Scale

    • ``Copy'' measures transfer rates in the absence of arithmetic.
    • ``Scale'' adds a simple arithmetic operation.
    • ``Sum'' adds a third operand to allow multiple load/store ports on vector machines to be tested.
    • ``Triad'' allows chained/overlapped/fused multiply/add operations.

     

    [root@RedHat stream]# make

    gcc -O2 stream.c -o stream

    [root@RedHat stream]# ls

    Makefile  stream  stream.c  stream.f

    [root@RedHat stream]# ./stream

    -------------------------------------------------------------

    STREAM version $Revision: 5.9 $

    -------------------------------------------------------------

    This system uses 8 bytes per DOUBLE PRECISION word.

    -------------------------------------------------------------

    Array size = 2000000, Offset = 0

    Total memory required = 45.8 MB.

    Each test is run 10 times, but only

    the *best* time for each is used.

    -------------------------------------------------------------

    Printing one line per active thread....

    -------------------------------------------------------------

    Your clock granularity/precision appears to be 6 microseconds.

    Each test below will take on the order of 17340 microseconds.

       (= 2890 clock ticks)

    Increase the size of the arrays if this shows that

    you are not getting at least 20 clock ticks per test.

    -------------------------------------------------------------

    WARNING -- The above is only a rough guideline.

    For best results, please be sure you know the

    precision of your system timer.

    -------------------------------------------------------------

    Function      Rate (MB/s)   Avg time     Min time     Max time

    Copy:        2264.0171       0.0154       0.0141       0.0169

    Scale:       2212.8422       0.0154       0.0145       0.0164

    Add:         2936.3309       0.0196       0.0163       0.0214

    Triad:       2673.8123       0.0199       0.0180       0.0216

    -------------------------------------------------------------

    Solution Validates

    -------------------------------------------------------------

    [root@RedHat stream]#

     

  • 相关阅读:
    [转]SubVersion 和 CVSNT在Windows下的安装及初步管理
    [Java20071101]JDK配置
    [English20071023]疯狂英语永恒不变的18条黄金法则
    [文摘20071020]富人和穷人的经典差异
    [English20071024]疯狂突破高中句型300句
    [文摘20071017]回家真好 (工作是为了生活)
    [文摘20071020]老婆和老妈掉水里终于有答案啦
    [转]flash与后台数据交换方法整理
    Repeater使用:绑定时 结合 前台JS及后台共享方法
    [文摘20071019]九九重阳节的来历 重阳节传说故事 重阳节的活动习俗 重阳节诗篇
  • 原文地址:https://www.cnblogs.com/jiangu66/p/3223817.html
Copyright © 2011-2022 走看看