向量对矩阵列空间的投影_向量(阵列)处理和超标量处理器

向量对矩阵列空间的投影

A Scalar processor is a normal processor, which works on simple instruction at a time, which operates on single data items. But in today's world, this technique will prove to be highly inefficient, as the overall processing of instructions will be very slow.

标量处理器是一种普通处理器,它一次处理简单的指令,对单个数据项进行操作。 但是在当今世界,由于指令的整体处理将非常缓慢,因此该技术将被证明效率极低。

什么是向量(数组)处理? (What is Vector(Array) Processing?)

There is a class of computational problems that are beyond the capabilities of a conventional computer. These problems require vast number of computations on multiple data items, that will take a conventional computer(with scalar processor) days or even weeks to complete.

一类计算问题超出了常规计算机的功能。 这些问题需要对多个数据项进行大量计算,而这将需要一台常规计算机(带有标量处理器)花费数天甚至数周才能完成。

Such complex instructions, which operates on multiple data at the same time, requires a better way of instruction execution, which was achieved by Vector processors.

这种同时对多个数据进行操作的复杂指令,需要一种更好的指令执行方式,这是由Vector处理器实现的。

Scalar CPUs can manipulate one or two data items at a time, which is not very efficient. Also, simple instructions like ADD A to B, and store into C are not practically efficient.

标量CPU一次只能处理一个或两个数据项,效率不是很高。 同样,简单的指令(如ADD A到B并存储到C中)实际上并不有效。

Addresses are used to point to the memory location where the data to be operated will be found, which leads to added overhead of data lookup. So until the data is found, the CPU would be sitting ideal, which is a big performance issue.

地址用于指向将要操作的数据的存储位置,这会增加数据查找的开销。 因此,在找到数据之前,CPU将处于理想状态,这是一个很大的性能问题。

Hence, the concept of Instruction Pipeline comes into picture, in which the instruction passes through several sub-units in turn. These sub-units perform various independent functions, for example: the first one decodes the instruction, the second sub-unit fetches the data and the third sub-unit performs the math itself. Therefore, while the data is fetched for one instruction, CPU does not sit idle, it rather works on decoding the next instruction set, ending up working like an assembly line.

因此, 指令流水线的概念出现了,其中指令依次经过几个子单元。 这些子单元执行各种独立的功能, 例如第一个子单元对指令进行解码, 第二个子单元获取数据,而第三个子单元本身执行数学运算。 因此,在为一条指令获取数据时,CPU不会处于空闲状态,而是对下一条指令集进行解码,最终像汇编流水线一样工作。

Vector processor, not only use Instruction pipeline, but it also pipelines the data, working on multiple data at the same time.

向量处理器不仅使用指令流水线,而且还流水线处理数据,同时处理多个数据。

A normal scalar processor instruction would be ADD A, B, which leads to addition of two operands, but what if we can instruct the processor to ADD a group of numbers(from 0 to n memory location) to another group of numbers(lets say, n to k memory location). This can be achieved by vector processors.

普通的标量处理器指令为ADD A, B ,这会导致两个操作数相加,但是如果我们可以指示处理器将一组数字(从0n存储位置)添加到另一组数字(如说) ,从nk存储位置)。 这可以通过矢量处理器来实现。

In vector processor a single instruction, can ask for multiple data operations, which saves time, as instruction is decoded once, and then it keeps on operating on different data items.

在向量处理器中,一条指令可以请求多个数据操作,从而节省了时间,因为一条指令被解码一次,然后继续对不同的数据项进行操作。

向量处理器的应用 (Applications of Vector Processors)

Computer with vector processing capabilities are in demand in specialized applications. The following are some areas where vector processing is used:

具有矢量处理能力的计算机在专门的应用中是需要的。 以下是一些使用矢量处理的领域:

  1. Petroleum exploration.

    石油勘探。

  2. Medical diagnosis.

    医学诊断。

  3. Data analysis.

    数据分析。

  4. Weather forecasting.

    天气预报。

  5. Aerodynamics and space flight simulations.

    空气动力学和太空飞行模拟。

  6. Image processing.

    图像处理。

  7. Artificial intelligence.

    人工智能。

超标量处理器 (Superscalar Processors)

It was first invented in 1987. It is a machine which is designed to improve the performance of the scalar processor. In most applications, most of the operations are on scalar quantities. Superscalar approach produces the high performance general purpose processors.

它最早于1987年发明。这是一种旨在改善标量处理器性能的机器。 在大多数应用中,大多数操作都是按标量进行的。 超标量方法可产生高性能的通用处理器。

The main principle of superscalar approach is that it executes instructions independently in different pipelines. As we already know, that Instruction pipelining leads to parallel processing thereby speeding up the processing of instructions. In Superscalar processor, multiple such pipelines are introduced for different operations, which further improves parallel processing.

超标量方法的主要原理是它在不同的流水线中独立执行指令。 众所周知,指令流水线导致并行处理,从而加快了指令的处理速度。 在超标量处理器中,针对不同的操作引入了多个这样的流水线,这进一步改善了并行处理。

There are multiple functional units each of which is implemented as a pipeline. Each pipeline consists of multiple stages to handle multiple instructions at a time which support parallel execution of instructions.

有多个功能单元,每个功能单元都实现为管道。 每个流水线包含多个阶段,一次可处理多个指令,这些指令支持并行执行指令。

It increases the throughput because the CPU can execute multiple instructions per clock cycle. Thus, superscalar processors are much faster than scalar processors.

因为CPU可以在每个时钟周期执行多个指令,所以可以提高吞吐量。 因此,超标量处理器比标量处理器快得多。

A scalar processor works on one or two data items, while the vector processor works with multiple data items. A superscalar processor is a combination of both. Each instruction processes one data item, but there are multiple execution units within each CPU thus multiple instructions can be processing separate data items concurrently.

标量处理器处理一个或两个数据项,而矢量处理器处理多个数据项。 超标量处理器是两者的结合。 每个指令处理一个数据项,但是每个CPU中有多个执行单元,因此多个指令可以同时处理单独的数据项。

While a superscalar CPU is also pipelined, there are two different performance enhancement techniques. It is possible to have a non-pipelined superscalar CPU or pipelined non-superscalar CPU. The superscalar technique is associated with some characteristics, these are:

同时也流水线超标量CPU,有两种不同的性能增强技术。 可能有非流水线的超标量CPU或流水线的非超标量CPU。 超标量技术具有一些特性,这些特性包括:

  1. Instructions are issued from a sequential instruction stream.

    指令是从顺序指令流中发出的。

  2. CPU must dynamically check for data dependencies.

    CPU必须动态检查数据依赖性。

  3. Should accept multiple instructions per clock cycle.

    每个时钟周期应接受多个指令。

翻译自: https://www.studytonight.com/computer-architecture/vector-and-superscalar

向量对矩阵列空间的投影

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值