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

  • 相关阅读:
    正方形矩阵顺时针旋转90度
    225. Implement Stack using Queues
    leetcode上题目的分类
    215. Kth Largest Element in an Array
    Android基础_Service
    Android基础_ContentProvider组件
    java struts学习-拦截器
    Jquery_基础(三) ajax与json
    Jquery_基础(二) 包装集
    Jquery_基础(一) 常用方法与选择器
  • 原文地址:https://www.cnblogs.com/lsgxeva/p/11175851.html
Copyright © 2011-2022 走看看