JPH0259961A - Information processor - Google Patents
Information processorInfo
- Publication number
- JPH0259961A JPH0259961A JP21194388A JP21194388A JPH0259961A JP H0259961 A JPH0259961 A JP H0259961A JP 21194388 A JP21194388 A JP 21194388A JP 21194388 A JP21194388 A JP 21194388A JP H0259961 A JPH0259961 A JP H0259961A
- Authority
- JP
- Japan
- Prior art keywords
- vector
- array
- register
- instruction
- element number
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000010365 information processing Effects 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 4
- 238000003491 array Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000000034 method Methods 0.000 description 3
- 230000008685 targeting Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005406 washing Methods 0.000 description 1
Landscapes
- Complex Calculations (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はマスク機能付きのベクトル演算を行なうことが
できる情報処理装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an information processing device capable of performing vector operations with a mask function.
科学技術計算等に於いては配列データを扱う場合が非常
に多く、配列データに対する演算はしばしば各々の配列
要素に対する同一演算の繰返しとなる。このような配列
データに対する演算を高速に行なうため、いわゆるベク
トル命令を使用できるようにした情報処理装置が従来よ
り実用化されている。Array data is often handled in scientific and technical calculations, and operations on array data often involve repeating the same operation on each array element. In order to perform operations on such array data at high speed, information processing apparatuses that can use so-called vector instructions have been put into practical use.
ところで、配列データに対する演算に於いては、無条件
に全配列要素に対して演算操作を行なって良い場合と、
特定の条件を満足させる配列要素に対してしか演算操作
を行なってはならない場合とがある、後者の一例として
第3図に示すようなFORTRAN言語で記述したプロ
グラムがある。By the way, when performing operations on array data, there are cases in which operations can be performed on all array elements unconditionally;
An example of the latter example is a program written in the FORTRAN language as shown in FIG. 3, in which arithmetic operations may only be performed on array elements that satisfy specific conditions.
第3図に示したプログラムは、各々N個の配列要素から
なる配列データA (i) 、 B (i)、 C(
i)、D (i)と、別の数値データEとに対して、配
列AO1番目(i=1〜N)の配列要素が1ゼロ”以上
である場合は配列Cと配列りとのそれぞれi番目の配列
要素の積を計算し、その結果を配列Bのi番目の配列要
素とし、配列Aのi番目の配列要素が負の値である場合
は配列Bのi番目の配列要素に固定値Eを入れることを
示している。The program shown in FIG. 3 uses array data A (i), B (i), C (
i), D (i) and another numerical data E, if the first array element of array AO (i = 1 to N) is 1 zero" or more, each of array C and array i Calculate the product of the ith array element, set the result as the ith array element of array B, and if the ith array element of array A is a negative value, fix the value to the ith array element of array B. This indicates that E should be inserted.
ところで、第3図のプログラムに示したような配列デー
タに対する条件付きの演算を行なう場合、演算を高速に
実行するためマスク制御付ベクトル命令が一般に使用さ
れる。第4図はマスク制御付ベクトル命令を使用してプ
ログラムを実行する際の実行手順を示したフローチャー
トであり、先ず、マスク生成命令が実行され、第3図の
プログラムの文番号20に対応するベクトルマスクデー
タが得られる。即ち、Ai≧00場合は対応するベクト
ルマスクデータMASKiの内容を“1”として、そか
でない場合は“0”とする。このベクトルマスクデータ
MASKiは一般には主記憶装置上に格納されたり、或
いはベクトルマスクレジスタとして専用に設けられたレ
ジスタファイル等に格納される。By the way, when performing a conditional operation on array data as shown in the program of FIG. 3, vector instructions with mask control are generally used to execute the operation at high speed. FIG. 4 is a flowchart showing the execution procedure when executing a program using vector instructions with mask control. First, a mask generation instruction is executed, and the vector corresponding to statement number 20 of the program in FIG. Mask data is obtained. That is, when Ai≧00, the content of the corresponding vector mask data MASKi is set to “1”, and otherwise, it is set to “0”. This vector mask data MASKi is generally stored on the main storage device or in a register file or the like provided exclusively as a vector mask register.
次に、マスク生成命令によって生成されたベクトルマス
クデータMへSKiに従ってマスク制御付ベクトル乗算
命令が実行される。この命令が実行されることにより、
ベクトルマスクデータMASKi=1に対応する配列要
素iに関してのみ乗算が行なわれ、乗算結果が配列Bに
格納される。Next, a vector multiplication instruction with mask control is executed on the vector mask data M generated by the mask generation instruction according to SKi. By executing this command,
Multiplication is performed only on array element i corresponding to vector mask data MASKi=1, and the multiplication result is stored in array B.
それが終了すると、更にマスク制御付ベクトル移送命令
が実行され、ベクトルマスクデータMASKi=Oに対
応する配列要素iに関してのみ数値データEの移送が行
なわれる。尚、この例では、演算を行なう配列要素対応
のベクトルマスクデータMASKiを“1”、移送を行
なう配列要素対応のベクトルマスクデータMASKiを
“0″としたが、演算を行なう配列要素対応のベクトル
マスクデータMASKiを10”、移送を行なう配列要
素対応のベクトルマスクデータMASKiを1″として
も良く、ベクトルマスクデータMASKi力びO”、“
1“の何れの時に演算を有効にするかはソフトウェアの
命令コード等によって指定することができるものである
。When this is completed, a vector transfer command with mask control is further executed, and numerical data E is transferred only with respect to array element i corresponding to vector mask data MASKi=O. In this example, the vector mask data MASKi corresponding to the array element to be operated on is set to "1", and the vector mask data MASKi corresponding to the array element to be transferred is set to "0". The data MASKi may be set to 10'', and the vector mask data MASKi corresponding to the array element to be transferred may be set to 1''.
1" at which the operation is enabled can be specified by a software instruction code or the like.
上述したように、マスク制御付ベクトル命令を使用する
ことにより、ループ中に条件文を含むような配列処理の
プログラムを実行する場合に於いても、情報処理装置上
での高速なベクトル演算の実行比率を高めることができ
るようになってきた。As mentioned above, by using vector instructions with mask control, it is possible to execute vector operations at high speed on an information processing device even when executing an array processing program that includes a conditional statement in a loop. It has become possible to increase the ratio.
しかし、上述した従来例は、全ての配列要素について対
応するベクトルマスクデータが“1″になっているか、
“0”になっているかを判定し、判定結果に基づいてベ
クトル演算を行なうか否かを決定するようにしているた
め、判定動作によるオーバヘッドが大きく、ベクトル演
算を行なうことによる効果を十分発揮できない場合があ
るという問題がある。However, in the conventional example described above, whether the corresponding vector mask data for all array elements is "1" or
Since it is determined whether it is "0" and it is decided whether or not to perform vector calculation based on the determination result, the overhead of the determination operation is large and the effect of vector calculation cannot be fully demonstrated. The problem is that there are cases.
本発明の目的はベクトルマスクデータの判定動作による
オーバヘフとを小さなものとすることにより、処理を高
速化することにある。An object of the present invention is to speed up processing by reducing overheavy caused by vector mask data determination operations.
本発明は上記目的を達成するため、
配列データの演算を行なうベクトル命令と、条件によっ
て特定の配列要素の演算を抑止するためのベクトルマス
クデータを生成するベクトルマスク生成命令と、前記ベ
クトルマスクデータにより演算を抑止されている配列要
素以外の配列要素に対する演算を行なうマスク制御付ベ
クトル命令とを実行可能な情報処理装置に於いて、
配列要素列中の同一のベクトルマスクデータが最も長く
連続する部分の配列要素数を示す値が格納される最大要
素数保持レジスタと、
最大要素数保持レジスタに配列要素数を示す値が格納さ
れた部分の先頭の配列要素の要素番号が格納される反転
要素番号代表レジスタとを設け、前記配列要素列中の前
記最大要素数保持レジス夕に格納されている配列要素数
と前記反転要素番号代表レジスタに格納されている要素
番号によって示される部分については前記ベクトル命令
を実行し、他の部分については前記マスク制御付ベクト
ル命令を実行するようにしたものである。In order to achieve the above object, the present invention provides a vector instruction that performs an operation on array data, a vector mask generation instruction that generates vector mask data for suppressing operations on a specific array element depending on a condition, and a vector mask generation instruction that generates vector mask data based on the vector mask data. In an information processing device capable of executing a vector instruction with mask control that performs an operation on an array element other than the array element whose operation is suppressed, A maximum element number holding register that stores a value indicating the number of array elements, and an inverted element number representative that stores the element number of the first array element in the part where the value indicating the number of array elements is stored in the maximum element number holding register. and execute the vector instruction for the part indicated by the number of array elements stored in the maximum element number holding register in the array element string and the element number stored in the inverted element number representative register. The vector command with mask control is executed for other parts.
最大要素数保持レジスタには配列要素列中の同一のベク
トルマスクデータが最も長く連続する部分の配列要素数
が格納され、反転要素番号代表レジスタにはその部分の
先頭の配列要素の要素番号が格納される。そして、最大
要素数保持レジスタ及び反転要素番号代表レジスタの内
容によって示される部分についてはベクトルマスクデー
タを参照する必要のないベクトル命令を実行し、他の部
分についてはマスク制御付ベクトル命令を実行すする。The maximum number of elements holding register stores the number of array elements in the longest consecutive part of the same vector mask data in the array element sequence, and the inverted element number representative register stores the element number of the first array element in that part. be done. Then, for the portion indicated by the contents of the maximum element number holding register and the inverted element number representative register, a vector instruction that does not require reference to vector mask data is executed, and for other portions, a vector instruction with mask control is executed. .
従って、同一のベクトルマスクデータが連続する部分の
内の最も配列要素数が多い部分については、ベクトルマ
スクデータの判定動作が行なわれないことになるので、
ベクトルマスクデータの判定動作によるオーバヘッドを
小さくし、ベクトル演算の処理速度を向上させることが
できる。Therefore, the vector mask data determination operation will not be performed for the part with the largest number of array elements among the consecutive parts of the same vector mask data.
The overhead due to the vector mask data determination operation can be reduced, and the processing speed of vector calculations can be improved.
次に本発明の実施例について図面を参照して詳細に説明
する。Next, embodiments of the present invention will be described in detail with reference to the drawings.
第1図は本発明の実施例のブロック図であり、マスク生
成用オペランドレジスタ1.2と、比較回路3.13と
、マスクデータレジスタ4と、命令語レジスタ5と、命
令デコーダ6と、演算制御部7と、要素番号レジスタ8
と、反転要素番号レジスタ9と、要素数保持レジスタ1
0と、要素数履歴レジスタ11と、要素数比較レジスタ
12と、最大要素数保持レジスタ14と、排他的論理和
回路15と、反転要素番号代表レジスタ16と、上位制
御部17とを含んでいる。FIG. 1 is a block diagram of an embodiment of the present invention, which includes a mask generation operand register 1.2, a comparison circuit 3.13, a mask data register 4, an instruction word register 5, an instruction decoder 6, and an operation Control unit 7 and element number register 8
, inverted element number register 9, and element number holding register 1
0, an element number history register 11, an element number comparison register 12, a maximum element number holding register 14, an exclusive OR circuit 15, an inverted element number representative register 16, and an upper control unit 17. .
次に第3図に示したプログラムを実行する場合を例にと
って本実施例の動作を説明する。Next, the operation of this embodiment will be explained by taking as an example the case where the program shown in FIG. 3 is executed.
先ず、第2図のフローチャートに示すように、マスク生
成命令が命令語レジスタ5にセントされ(ステップ31
)、ベクトルマスクデータが生成される。ベクトルマス
クデータの生成時、マスク生成用オペランドレジスタ1
,2にはマスク生成用の配列データが順次入力され、命
令語レジスフ5には上位制御部17によりマスク生成命
令がセットされる。この例の場合、マスク生成用オペラ
ンドレジスタ1,2の内の一方(例えばマスク生成用オ
ペランドレジスタ1)には配列データA(1)が、他方
(例えばマスク生成用オペランドレジスタ2)には数値
データ“0”がセットされる。First, as shown in the flowchart of FIG. 2, a mask generation instruction is sent to the instruction word register 5 (step 31).
), vector mask data is generated. When generating vector mask data, mask generation operand register 1
. In this example, one of mask generation operand registers 1 and 2 (for example, mask generation operand register 1) contains array data A(1), and the other (for example, mask generation operand register 2) contains numerical data. “0” is set.
命令デコーダ6は命令語レジスタ5にマスク生成命令が
セットされると、それをデコードし、比較回路3に対し
て大小比較指示を送出する。比較回路3は大小比較指示
が加えられることにより、マスク生成用オペランドレジ
スタ1.2にセットされている配列データA (i)と
数値データ“0”とを比較し、そして、比較結果がA
(i)≧0であれば“1′を、A (+)<Oであれば
“0″を出力する。即ち、比較回路3の出力信号はマス
ク生成用オペランドレジスタ1にセントされている配列
要素対応のベクトルマスクデータとなる。When the mask generation instruction is set in the instruction word register 5, the instruction decoder 6 decodes it and sends a magnitude comparison instruction to the comparison circuit 3. When the comparison circuit 3 receives a magnitude comparison instruction, it compares the array data A (i) set in the mask generation operand register 1.2 with the numerical data "0", and the comparison result is A.
(i) If ≧0, output “1”; if A (+) < O, output “0”. In other words, the output signal of comparator circuit 3 is the array that is stored in operand register 1 for mask generation. It becomes vector mask data corresponding to elements.
比較回路3から出力されたベクトルマスクデータはマス
クデータレジスタ4に加えられると共に排他的論理和回
路15に加えられる。マスクデータレジスタ4はベクト
ルマスクデータが加えられると、それを最下位ビットに
セットすると共に、それ以前にセットされていたベクト
ルマスクデータを1ビツトずつ上位ヘシフトする。マス
クデータレジスタ4に1ワ一ド分のベクトルマスクデー
タが格納される毎に、マスクデータレジスタ4から図示
しない主記憶装置へ上記lツー1分のベクトルマスクデ
ータが転送され、格納される。The vector mask data output from the comparator circuit 3 is added to the mask data register 4 and also to the exclusive OR circuit 15. When vector mask data is added, the mask data register 4 sets it to the least significant bit and shifts the previously set vector mask data bit by bit to the upper bit. Every time vector mask data for one word is stored in the mask data register 4, the vector mask data for one word is transferred from the mask data register 4 to a main storage device (not shown) and stored therein.
要素番号レジスタ8はベクトルデータの演算或いはベク
トルマスクデータの生成時に於いて、現在処理中の配列
要素の要素番号を保持するレジスフであり、その出力は
反転要素番号レジスタ9に加えられている。反転要素番
号レジスタ9はマスクデータレジスタ4の最下位ビット
にセットされているベクトルマスクデータと比較回路3
から出力されたベクトルマスクデータとの排他的論理和
をとる排他的論理和回路15の出力信号が“1”となっ
た場合に限って要素番号レジスタ8の出力を保持する。The element number register 8 is a register that holds the element number of the array element currently being processed during vector data calculation or vector mask data generation, and its output is added to the inverted element number register 9. The inversion element number register 9 compares the vector mask data set in the least significant bit of the mask data register 4 with the comparison circuit 3.
The output of the element number register 8 is held only when the output signal of the exclusive OR circuit 15 which calculates the exclusive OR with the vector mask data output from the element number register 8 becomes "1".
ここで、排他的論理和回路15の出力信号が“1”とな
るのは、現在マスク生成用オペランドレジスタlにセッ
トされている配列要素対応のベクトルマスクデータが直
前の配列要素対応のベクトルマスクデータと異なるもの
になった時であるので、反転要素番号レジスタ9には対
応するベクトルマスクデータが直前の配列要素のベクト
ルマスクデータと異なるものとなった配列要素の内の最
も新しい配列要素の要素番号が格納される。Here, the output signal of the exclusive OR circuit 15 becomes "1" because the vector mask data corresponding to the array element currently set in the mask generation operand register l is the vector mask data corresponding to the immediately preceding array element. Therefore, the element number of the newest array element among the array elements whose corresponding vector mask data differs from the vector mask data of the immediately preceding array element is stored in the inverted element number register 9. is stored.
要素数保持レジスタ10は新たな配列要素についての処
理が開始される毎にその内容がカウントアツプされ、排
他的論理和回路15の出力信号が“1”となることによ
りリセットされる。また、要素数履歴レジスタ11には
リセットされる直前の要素数保持レジスタIOの内容が
格納される。従って、要素数履歴レジスタ11にはベク
トルマスクデータが同一の配列要素が何個連続したかを
示す値が格納されることになる。The contents of the element number holding register 10 are counted up each time processing for a new array element is started, and is reset when the output signal of the exclusive OR circuit 15 becomes "1". Further, the contents of the element number holding register IO immediately before being reset are stored in the element number history register 11. Therefore, the element count history register 11 stores a value indicating how many consecutive array elements have the same vector mask data.
要素数履歴レジスタ11の内容は要素数比較レジスタ1
2の内容と比較回路13に於いて比較される。The contents of the number of elements history register 11 are the number of elements comparison register 1.
It is compared with the contents of No. 2 in the comparator circuit 13.
尚、要素数比較レジスタ12の初期値は「0」になって
いるものである。比較回路13は要素数濯歴レジスタ1
1の内容と要素数比較レジスタ12の内容との内、大き
い方の値を要素数比較レジスタ12及び最大要素数保持
レジスタ14に格納する。また、比較回路13は要素数
雇歴レジスタ11の内容が要素数比較レジスタ12の内
容よりも大きい時、反転要素番号代表レジスタ16にセ
ット信号を加え、反転要素番号レジスタ9の内容を格納
させる。従って、最大要素数保持レジスタ14には配列
要素列中の同一のベクトルマスクデータが最も長く連続
する部分の配列要素数を示す値が格納され、反転要素番
号代表レジスタ16にはその部分の先頭要素番号が格納
される。Note that the initial value of the element number comparison register 12 is "0". Comparison circuit 13 is element number washing history register 1
1 and the contents of the element number comparison register 12, the larger value is stored in the element number comparison register 12 and the maximum element number holding register 14. Further, when the contents of the element number employment history register 11 are larger than the contents of the element number comparison register 12, the comparison circuit 13 applies a set signal to the inverted element number representative register 16 to store the contents of the inverted element number register 9. Therefore, the maximum number of elements holding register 14 stores a value indicating the number of array elements in the longest consecutive part of the same vector mask data in the array element sequence, and the inverted element number representative register 16 stores the value indicating the number of array elements in the longest continuous part of the same vector mask data in the array element string. The number is stored.
マスク生成命令の実行が終了すると、上位制御部17は
最大要素数保持レジスタ14に格納されている配列要素
数を示す値(mが格納されているとする)及び反転要素
番号代表レジスタ16に格納されている先頭要素番号(
nが格納されているとする。When the execution of the mask generation instruction is completed, the upper control unit 17 stores the value indicating the number of array elements stored in the maximum number of elements holding register 14 (assuming that m is stored) and the value stored in the inverted element number representative register 16. The first element number (
Suppose that n is stored.
但し、n−1とする)を読込み、主記憶装置に格納され
ている上記先頭要素番号n対応のベクトルマスクデータ
が“1″であるかO″であるかを調べる。However, n-1) is read, and it is checked whether the vector mask data corresponding to the first element number n stored in the main storage device is "1" or "O".
次いで、上位制御部17は第2図に示すように、配列C
,DΦ1番目から(n−1)番目までの要素を対象にし
たマスク制御付ベクトル乗算命令、即ち、1番目の要素
から反転要素番号代表レジスタ16に格納されている要
素番号の要素の1つ前の要素までを対象にしたマスク制
御付ベクトル乗算命令を命令語レジスタ5にセットする
(ステップ32)。これにより、演算制御部7に於いて
配列C,Dの1番目の要素から(n−1)番目の要素の
内の対応するベクトルマスクデータが“l゛となってい
る要素同志の乗算が行なわれ、乗算結果が配列Bに格納
される。Next, as shown in FIG.
,DΦVector multiplication instruction with mask control targeting the 1st to (n-1)th elements, that is, from the 1st element to the one before the element with the element number stored in the inverted element number representative register 16. A vector multiplication instruction with mask control that targets elements up to is set in the instruction word register 5 (step 32). As a result, the arithmetic control unit 7 multiplies the elements whose corresponding vector mask data is "l" among the first to (n-1)th elements of the arrays C and D. and the multiplication result is stored in array B.
次いで、上位制御部17は第2図に示すように、1番目
から(n−1)番目までの要素を対象にしたマスク制御
付ベクトル移送命令を命令語レジスタ5にセントする(
ステップS3)、これにより、演算制御部7に於いて、
配列Bの1番目から(n−1)番目までの要素の内の対
応するベクトルマスクデータが“0”の要素に数値デー
タEが格納される。Next, as shown in FIG. 2, the higher-level control unit 17 sends a mask-controlled vector transfer instruction targeting the first to (n-1)th elements to the instruction register 5 (
Step S3), as a result, in the calculation control section 7,
Numerical data E is stored in the elements whose corresponding vector mask data is "0" among the first to (n-1)th elements of array B.
1番目から(n−1)番目までの要素を対象にしたマス
ク制御付ベクトル移送命令の実行が終了すると、上位制
御部17は既に調べである要素番号n対応のベクトルマ
スクデータが“1”である場合は配列C,Dのn番目か
ら(04m)番目までの要素、即ち同一のベクトルマス
クデータが最も長(連続する部分対応の要素を対象とし
たマスク制御なしのベクトル乗算命令を命令語レジスタ
5にセットし、“0″である場合はn番目から(04m
)番目までの要素を対象にしたマスク制御なしのベクト
ル移送命令を命令語レジスタ5にセットする(ステップ
34)。ベクトル乗算命令が命令語レジスタ5にセット
された場合は、演算制御部7に於いて、配列C,Dのn
番目から(04m)番目までの要素の対応するもの同志
の乗算が行なわれ、乗算結果が配列Bの対応する要素に
格納される。また、ベクトル移送命令が命令語レジスク
5にセットされた場合は演算制御部7に於いて、配列B
のn番目の要素から(n8m)番目の要素までに数値デ
ータEが格納される。When the execution of the vector transfer command with mask control for the 1st to (n-1)th elements is completed, the upper control unit 17 has already checked that the vector mask data corresponding to element number n is "1". In some cases, the nth to (04m)th elements of arrays C and D, that is, the same vector mask data, are the longest (a vector multiplication instruction without mask control that targets consecutive partially corresponding elements is stored in the instruction word register). 5, and if it is “0”, start from the nth (04m
) A vector transfer instruction without mask control is set in the instruction register 5 (step 34). When a vector multiplication instruction is set in the instruction word register 5, the arithmetic control unit 7
Corresponding elements of the (04m)th to (04m)th elements are multiplied, and the multiplication results are stored in the corresponding elements of the array B. Furthermore, when a vector transfer instruction is set in the instruction word register 5, the arithmetic control unit 7
Numerical data E is stored from the nth element to the (n8m)th element.
ヘクトル制御なしのベクトル乗算命令或いはベクトル移
送命令の実行が終了すると、上位制御部17は配列C,
Dの第(n+m+1)番目から最後の要素までを対象に
したマスク制御付ベクトル乗算命令を命令語レジスタ5
にセントする(ステップS5)、これにより、演算制御
部7に於いて配列C,Dの(n+m+1)番目の要素か
ら最後の要素までの内の対応するベクトルマスクデータ
が“1”とならでいる要素同志の乗算が行なわれ、乗算
結果が配列Bの対応する要素に格納される。When the execution of the vector multiplication instruction or vector transfer instruction without vector control is completed, the upper control unit 17 transfers the array C,
A vector multiplication instruction with mask control that targets the (n+m+1)th to the last element of D is sent to the instruction word register 5.
(step S5), so that the corresponding vector mask data from the (n+m+1)th element to the last element of arrays C and D becomes "1" in the arithmetic control unit 7. Multiplying the elements is performed, and the multiplication result is stored in the corresponding element of array B.
次いで、上位制御部17は(n +m+1)番目の要素
から最後の要素までを対象にしたマスク制御付ベクトル
移送命令を命令語レジスタ5にセントする(ステップS
6)、これにより、演算制御部7に於いて、配列Bの(
n+m+1)番目の要素から最後の要素までの内の対応
するベクトルマスクデータが“1′となっている要素に
数値データEが格納される。Next, the upper control unit 17 stores a vector transfer command with mask control for the (n + m + 1)th element to the last element into the command register 5 (step S
6), As a result, in the arithmetic control unit 7, (
Numerical data E is stored in elements whose corresponding vector mask data is "1" from the (n+m+1)th element to the last element.
従って、配列要素中の最大要素数保持レジスタ14と反
転要素番号代表レジスタ16との内容によって示される
部分(上述した例はn番目の要素からn+m番目の要素
までの部分であって、同一のベクトルマスクデータが最
も長く連続する部分)についてはマスク制御なしのベク
トル命令が実行され、それ以外の部分についてはマスク
制御付きのベクトル命令が実行されることになる。Therefore, the portion indicated by the contents of the maximum element number holding register 14 and the inverted element number representative register 16 in the array element (the above example is the portion from the n-th element to the n+m-th element, and the same vector A vector instruction without mask control is executed for the part where the mask data is longest continuous, and a vector instruction with mask control is executed for the other parts.
(発明の効果〕
以上説明したように、本発明は配列要素列中の同一のベ
クトルマスクデータが最も長く連続する部分については
マスク制御付ヘクトル命令を実行せずにベクトル命令を
実行するようにしたものであり、その部分についてはベ
クトルマスクデータのチエツクを行なう必要がなくなる
ので、ベクトル演算を高速化することができる効果があ
る。特に、ベクトルマスクデータに於ける“1”と“0
″との割合が極端に違い、同一のベクトルマスクデータ
が連続する部分が長い場合はその効果は非常に大きい。(Effects of the Invention) As explained above, the present invention executes a vector instruction without executing a hector instruction with mask control for the longest continuous portion of the same vector mask data in an array element sequence. Since there is no need to check the vector mask data for that part, it has the effect of speeding up vector calculations.In particular, "1" and "0" in the vector mask data
'' is extremely different and the same vector mask data continues for a long time, the effect is very large.
第1図は本発明の実施例のブロック図、第2図は実施例
に於けるFORTRANプログラムの実行手順を示すフ
ローチャート、第3図はFORTRANプログラムの一
例を示す図及び、
第4図は従来例に於は不FORTRANプログラムの実
行手順を示すフローチャートである。
図に於いて、l、2・・・マスク生成用オペランドレジ
スタ、3.13・・・比較回路、4・・・マスクデータ
レジスタ、5・・・命令語レジスタ、6・・・命令デコ
ーダ、7・・・演算制御部、8・・・要素番号レジスタ
、9・・・反転要素番号レジスタ、10・・・要素数保
持レジスタ、11・・・要素数層層レジスタ、12・・
・要素数比較レジスタ、14・・・最大要素数保持レジ
スタ、15・・・排他的論理和回路、16・・・反転要
素番号代表レジスタ、17・・・上位制御部。Fig. 1 is a block diagram of an embodiment of the present invention, Fig. 2 is a flowchart showing the execution procedure of a FORTRAN program in the embodiment, Fig. 3 is a diagram showing an example of a FORTRAN program, and Fig. 4 is a conventional example. 2 is a flowchart showing the execution procedure of a non-FORTRAN program. In the figure, l, 2...operand register for mask generation, 3.13...comparison circuit, 4...mask data register, 5...instruction word register, 6...instruction decoder, 7 ... Arithmetic control unit, 8... Element number register, 9... Inverted element number register, 10... Element number holding register, 11... Element number layer layer register, 12...
- Element number comparison register, 14... Maximum element number holding register, 15... Exclusive OR circuit, 16... Inverted element number representative register, 17... Upper control unit.
Claims (1)
て特定の配列要素の演算を抑止するためのベクトルマス
クデータを生成するベクトルマスク生成命令と、前記ベ
クトルマスクデータにより演算を抑止されている配列要
素以外の配列要素に対する演算を行なうマスク制御付ベ
クトル命令とを実行可能な情報処理装置に於いて、 配列要素列中の同一のベクトルマスクデータが最も長く
連続する部分の配列要素数を示す値が格納される最大要
素数保持レジスタと、 最大要素数保持レジスタに配列要素数を示す値が格納さ
れた部分の先頭の配列要素の要素番号が格納される反転
要素番号代表レジスタとを具備し、前記配列要素列中の
前記最大要素数保持レジスタに格納されている配列要素
数と前記反転要素番号代表レジスタに格納されている要
素番号によって示される部分については前記ベクトル命
令を実行し、他の部分については前記マスク制御付ベク
トル命令を実行することを特徴とする情報処理装置。[Scope of Claims] A vector instruction that performs an operation on array data, a vector mask generation instruction that generates vector mask data for suppressing an operation on a specific array element depending on a condition, and a vector mask generation instruction that generates vector mask data for suppressing an operation on a specific array element based on a condition. In an information processing device capable of executing a vector instruction with mask control that performs an operation on an array element other than the array element in which The maximum element number holding register stores the value indicating the number of array elements, and the inverted element number representative register stores the element number of the first array element in the part where the value indicating the number of array elements is stored in the maximum element number holding register. The vector instruction is executed for the part indicated by the number of array elements stored in the maximum number of elements holding register in the array element string and the element number stored in the inverted element number representative register, and the other An information processing apparatus characterized in that the vector instruction with mask control is executed for the part shown in FIG.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP21194388A JPH0259961A (en) | 1988-08-26 | 1988-08-26 | Information processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP21194388A JPH0259961A (en) | 1988-08-26 | 1988-08-26 | Information processor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0259961A true JPH0259961A (en) | 1990-02-28 |
Family
ID=16614262
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP21194388A Pending JPH0259961A (en) | 1988-08-26 | 1988-08-26 | Information processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0259961A (en) |
-
1988
- 1988-08-26 JP JP21194388A patent/JPH0259961A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4879676A (en) | Method and apparatus for precise floating point exceptions | |
| US5051896A (en) | Apparatus and method for nullifying delayed slot instructions in a pipelined computer system | |
| US4740893A (en) | Method for reducing the time for switching between programs | |
| JP2645669B2 (en) | Data processing system | |
| JPH0766329B2 (en) | Information processing equipment | |
| US11416261B2 (en) | Group load register of a graph streaming processor | |
| US11481223B2 (en) | Reducing operations of sum-of-multiply-accumulate (SOMAC) instructions | |
| US5390306A (en) | Pipeline processing system and microprocessor using the system | |
| US5729723A (en) | Data processing unit | |
| JPH0259961A (en) | Information processor | |
| JPH0512751B2 (en) | ||
| JPS581246A (en) | Controlling system for order of instruction processing | |
| US20250390304A1 (en) | Systems and methods for executing an instruction by an arithmetic logic unit pipeline | |
| JP2979108B2 (en) | Synchronization method for asynchronous processing in data processing equipment | |
| JPH06324861A (en) | System and method for controlling cpu | |
| JPH01223565A (en) | Information processor | |
| JPH01223563A (en) | Information processor | |
| JPH01319863A (en) | Vector mask control system | |
| JP2843844B2 (en) | Parallel processing unit | |
| JP2583614B2 (en) | Vector arithmetic unit | |
| JPH0222417B2 (en) | ||
| EP0634717B1 (en) | Data processing unit | |
| JPH01223564A (en) | Information processor | |
| JPH04316127A (en) | Information processor | |
| JPH04227541A (en) | Method for processing control function of processer and loop |