• CPU vector operations


    CPU vector operations

    原文:https://blog.csdn.net/wangeen/article/details/8602028 

    vector operations 是现代CPU优化速度的一个技巧,就是把通过大寄存器把多个数据同时处理来加速,一般ICC GCC都会简单的预测做出vector operations的优化,但是也不纯粹,自己添加相关代码还是可以有一定的优化空间。

    Today's microprocessors have vector instructions that make it possible to do operations on
    all elements of a vector simultaneously. This is also called Single-Instruction-Multiple-Data
    (SIMD) operations. The total size of each vector can be 64 bits (MMX), 128 bits (XMM) or
    256 bits (YMM).
    Vector operations are useful when doing calculations on large data sets where the same
    operation is performed on multiple data elements and the program logic allows parallel
    calculations. Examples are image processing, sound processing, and mathematical
    operations on vectors and matrixes. Algorithms that are inherently serial, such as most
    sorting algorithms, are not suited for vector operations. Algorithms that rely heavily on table
    lookup or require a lot of data shuffling, such as many encryption algorithms, cannot easily
    be implemented as vector operations.
    The vector operations use a set of special vector registers. The maximum size of each
    vector register is 128 bits (XMM) if the SSE2 instruction set is available, or 256 bits (YMM) if
    the AVX instruction set is supported by the microprocessor and the operating system. The
    number of elements in each vector depends on the size and type of data elements

    http://www.agner.org/optimize/#vectorclass

    http://www.codeproject.com/Articles/332437/Fast-SIMD-Prototyping

    ============== End

  • 相关阅读:
    什么是二进制补码
    第四章 VB程序的控制结构
    第三章 VB的程序设计基础
    C#學習基礎方法
    C#學習基礎繼承
    C#學習基礎變量和常量
    C#學習基礎域和屬性
    第八章 VB中ActiveX控件的使用
    写给WEB2.0的站长 不仅仅是泼冷水(转)
    常见错误和难点分析
  • 原文地址:https://www.cnblogs.com/lsgxeva/p/11175851.html
Copyright © 2020-2023  润新知