zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Linux设备驱动之Ioctl控制
    虚拟内存与物理内存的区别
    怎么远程控制他人电脑
    二维数组和指针
    二维数组和指针(C语言)
    帧率、码流与分辨率相关知识
    深入理解FIFO
    安装lsb_release
    Linux初学之vmware Workstation 网络连接三种模式
    RTSP协议学习笔记
  • 原文地址:https://www.cnblogs.com/lsgxeva/p/11175851.html
Copyright © 2011-2022 走看看