一种基于向量处理器排序的运算方法
本发明提供了一种基于向量处理器排序的运算方法,该方法包括以下两种情况:第一种情况是待处理的数据量小,二级高速缓存:Level2 Cache,简称L2Cache能全部装入数据,此时,从片外存储器DDR中选取所有偶数列元素传输到L2Cache上半区,选取所有奇数列元素传输到L2Cache的下半区;首先,上半区元素与下半区元素一对一比较;然后,上半区元素错位与下半区元素一对一比较;循环进行,直至结束。第二种情况是L2Cache不能全部装入待处理数据,首先将片外存储器DDR中数据根据L2Cache大小分为N+1块。将N+1块数据分别传输到L2Cache中按第一种情况进行排序运算。然后将DDR的各块有序...
Saved in:
| Format | Patent |
|---|---|
| Language | Chinese |
| Published |
09.09.2025
|
| Subjects | |
| Online Access | Get full text |
Cover
| Summary: | 本发明提供了一种基于向量处理器排序的运算方法,该方法包括以下两种情况:第一种情况是待处理的数据量小,二级高速缓存:Level2 Cache,简称L2Cache能全部装入数据,此时,从片外存储器DDR中选取所有偶数列元素传输到L2Cache上半区,选取所有奇数列元素传输到L2Cache的下半区;首先,上半区元素与下半区元素一对一比较;然后,上半区元素错位与下半区元素一对一比较;循环进行,直至结束。第二种情况是L2Cache不能全部装入待处理数据,首先将片外存储器DDR中数据根据L2Cache大小分为N+1块。将N+1块数据分别传输到L2Cache中按第一种情况进行排序运算。然后将DDR的各块有序数据传输sizeof(L2Cache)/(N+1)大小的数据到L2Cache空间,将L2Cache装满,然后按第一种情况进行排序运算,min为当次排序好的最后一个数据。从DDR中各块有序数据中找到大于min的最小数据的位置ddrLocAddr,从ddrLocAddr开始,传输sizeof(L2Cache)/(N+1)大小的数据到L2Cache空间,将L2Cache装满,然后按第一种情况进行排序运算。依次进行,直到DDR中各块数据排序完成。
The invention provides an operation method based on vector processor sorting, which comprises the following two conditions: the first condition is that the data volume to be processed is small, and a second-level cache: Level2 Cache (L2Cache for short) can completely load data, at the moment, all elements in even columns are selected from an off-chip memory DDR and are transmitted to an upper half region of the L2Cache, and all elements in even columns are transmitted to a lower half region of the |
|---|---|
| Bibliography: | Application Number: CN202211386006 |