JP2008090769A - Parallel computing method, computing unit, and program for computing unit - Google Patents

Parallel computing method, computing unit, and program for computing unit Download PDF

Info

Publication number
JP2008090769A
JP2008090769A JP2006273557A JP2006273557A JP2008090769A JP 2008090769 A JP2008090769 A JP 2008090769A JP 2006273557 A JP2006273557 A JP 2006273557A JP 2006273557 A JP2006273557 A JP 2006273557A JP 2008090769 A JP2008090769 A JP 2008090769A
Authority
JP
Japan
Prior art keywords
vector
unit
recording
component
arithmetic
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.)
Granted
Application number
JP2006273557A
Other languages
Japanese (ja)
Other versions
JP4976800B2 (en
Inventor
Kazumaro Aoki
和麻呂 青木
Takeshi Yamamoto
剛 山本
Takeshi Shimoyama
武司 下山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Nippon Telegraph and Telephone Corp
Original Assignee
Fujitsu Ltd
Nippon Telegraph and Telephone Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd, Nippon Telegraph and Telephone Corp filed Critical Fujitsu Ltd
Priority to JP2006273557A priority Critical patent/JP4976800B2/en
Publication of JP2008090769A publication Critical patent/JP2008090769A/en
Application granted granted Critical
Publication of JP4976800B2 publication Critical patent/JP4976800B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the number of network communication paths between computing units without increasing the number of times of communication. <P>SOLUTION: A parallel computing method includes calculating, using a ring network, the sum of K-dimensional vectors that N computing units record at random, and letting the N computing units share the result; more specifically, dividing K components into N groups, with each of the computing units delivering the components of one group to an adjacent computing unit. The receiving computing unit calculates the sum of the components and the components of the group that it owns, and delivers this result to the next computing unit. This operation is repeated (N-1) times. From the N-th time on, the receiving computing unit records the result as the sum of the components of the group, and delivers data about it to the next computing unit. This operation is repeated up to (2N-2) times. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、複数の演算装置を用いてベクトルの和もしくは行列の積を求める並列演算方法、演算装置、演算装置用プログラムに関する。   The present invention relates to a parallel computing method, a computing device, and a computing device program for obtaining a vector sum or matrix product using a plurality of computing devices.

ベクトルの和を求める演算や行列の積を求める演算は、多くの情報処理で行われている。例えば、セキュリティ関連では、素因数分解の難しさが、いくつかの公開鍵暗号、電子署名などに利用され、暗号解読の難しさの根拠となっているため、素因数分解がどれだけのリソースで可能かを調べることは、暗号方式の安全性評価として重要である。このような素因数分解の難しさの評価は、複数の演算装置を用いて行われ、その処理の中に、行列の積を求める過程が含まれている。また、行列の積を求める過程にはベクトルの和を求める過程が含まれている。   An operation for obtaining a sum of vectors and an operation for obtaining a product of matrices are performed in many information processing. For example, in security, the difficulty of prime factorization is used for some public key cryptography, digital signatures, etc., and is the basis for the difficulty of decryption. It is important to evaluate the security of cryptographic methods. Evaluation of the difficulty of such prime factorization is performed using a plurality of arithmetic units, and the process includes a process of obtaining a matrix product. Further, the process of obtaining the matrix product includes the process of obtaining the sum of the vectors.

代表的な素因数分解の手法としては、数体ふるい法がある。数体ふるい法の線形代数部で扱う行列は、巨大であることに加え、0以外の成分の割合が極端に小さい、いわゆる疎行列であるため、ガウスの消去法などの通常の線型方程式に対する解法では、明らかに効率が悪い。このような行列に対する効率的なアルゴリズムとしてBlock Lanczos法が知られている。なお、数体ふるい法におけるBlock Lanczos法は、非特許文献1に具体的に示されており、この方法の処理の中には、疎行列とその行列の転置行列を繰り返し乗算する演算が含まれている。   A typical prime factorization method is a number field sieving method. The matrix handled in the linear algebra part of the number field sieving method is a so-called sparse matrix with a very small ratio of non-zero components in addition to being huge, so it can be used to solve ordinary linear equations such as Gaussian elimination. Then it is clearly inefficient. The Block Lanczos method is known as an efficient algorithm for such a matrix. The Block Lanczos method in the number field sieving method is specifically shown in Non-Patent Document 1, and the processing of this method includes an operation of repeatedly multiplying a sparse matrix and a transposed matrix of the matrix. ing.

N個の演算装置(Nは2以上の整数)がそれぞれK次元のベクトル(Kは2以上の整数)を記録している場合に、それらのベクトルの和を求める最も単純な方法は、ある1つの演算装置(親演算装置)に他のすべての演算装置がベクトルの情報を送り、親演算装置がベクトルの和を求める方法である。なお、すべての演算装置でベクトルの和の結果を共有する必要があるときは、親演算装置が他のすべての演算装置に、結果を送る。この方法の場合、(N−1)個の演算装置が、K個ずつのベクトルの要素を、送受信するので、2K(N−1)回の通信が必要である。この方法の場合、親演算装置と他のすべての演算装置との間に通信路が必要であり、通信路に流れる情報は常に片方向にのみ送られているので、半二重の(N−1)個の通信路(スター型)を有するネットワークを構築する必要がある。   When N computing devices (N is an integer of 2 or more) record K-dimensional vectors (K is an integer of 2 or more), the simplest method for obtaining the sum of these vectors is 1 In this method, all the other arithmetic devices send vector information to one arithmetic device (parent arithmetic device), and the parent arithmetic device calculates the sum of the vectors. When it is necessary for all the arithmetic devices to share the result of the vector sum, the parent arithmetic device sends the result to all the other arithmetic devices. In the case of this method, since (N−1) arithmetic devices transmit and receive K vector elements, 2K (N−1) times of communication are required. In this method, a communication path is required between the parent arithmetic unit and all other arithmetic units, and information flowing in the communication channel is always sent only in one direction. 1) It is necessary to construct a network having a single communication path (star type).

非特許文献1では、上述のベクトルの和を求める方法を改良した方法が示されている。非特許文献1の方法を実現するシステム構成(N=4の場合)を図1に示す。図2は情報の収集の様子、図3は情報の分配の様子を示す。この方法では、各演算装置9000、9100、9200、9300は、計算部9010、9110、9210、9310と記録部9020、9120、9220、9320と通信部9030、9130、9230、9330とを備えており、各演算装置9000、9100、9200、9300は、他の演算装置との間に通信路を有している。   Non-Patent Document 1 discloses a method in which the above-described method for obtaining the sum of vectors is improved. A system configuration (in the case of N = 4) for realizing the method of Non-Patent Document 1 is shown in FIG. FIG. 2 shows how information is collected, and FIG. 3 shows how information is distributed. In this method, each arithmetic device 9000, 9100, 9200, 9300 includes a calculation unit 9010, 9110, 9210, 9310, a recording unit 9020, 9120, 9220, 9320, and a communication unit 9030, 9130, 9230, 9330. Each of the arithmetic devices 9000, 9100, 9200, and 9300 has a communication path with other arithmetic devices.

N個の演算装置(Nは2以上の整数)がそれぞれK次元のベクトル(Kは2以上の整数)を記録している場合に、あらかじめK個の要素をN個のグループに分ける。ここで、各グループの要素の数を、[K/N]と{K/N}に揃えると効率がよい。ただし、本明細書内では[x]は実数x以下の最大の整数、{x}は実数x以上の最小の整数を示す。KがNの倍数の時には、すべてのグループが同じ要素の数K/Nとなる。また、K<Nの場合には、いくつかのグループは要素の数が0となる。n番目の演算装置以外の演算装置(nは1以上N以下の整数)は、当該演算装置が記録するベクトルのn番目のグループに属する要素を、n番目の演算装置に送る。図2は、N=4の場合の情報の収集の様子を示している。n番目の演算装置では、n番目のグループに属する要素ごとに和を求め、それぞれの要素の和を、他の演算装置に送る。図3は、N=4の場合の情報の分配の様子を示している。このように情報の収集と分配を行うと、最大で2{K/N}(N−1)回の通信が必要となる。この方法の場合、単純な方法よりも通信の回数は大きく減っている。しかし、すべての演算装置間に通信路が必要であり、通信路では双方向に情報が送られることになる。つまり、N(N−1)/2個の全二重の通信路(すべての演算装置の間で完全グラフ)を有するネットワークが必要である。
下山武司、青木和麻呂、植田広樹、木田祐司“一般数体篩法実装実験(4)−線形代数”、電子情報通信学会技術研究報告、ISEC2003-154、2004.
When N computing devices (N is an integer of 2 or more) each record a K-dimensional vector (K is an integer of 2 or more), the K elements are divided into N groups in advance. Here, it is efficient if the number of elements in each group is aligned with [K / N] and {K / N}. However, in this specification, [x] represents a maximum integer less than or equal to a real number x, and {x} represents a minimum integer greater than or equal to the real number x. When K is a multiple of N, all groups have the same number of elements K / N. When K <N, some groups have 0 elements. Arithmetic devices other than the nth arithmetic device (n is an integer of 1 to N) send elements belonging to the nth group of vectors recorded by the arithmetic device to the nth arithmetic device. FIG. 2 shows how information is collected when N = 4. In the nth arithmetic device, a sum is obtained for each element belonging to the nth group, and the sum of each element is sent to another arithmetic device. FIG. 3 shows how information is distributed when N = 4. When information is collected and distributed in this way, communication of 2 {K / N} (N−1) times is required at maximum. In this method, the number of times of communication is greatly reduced as compared with the simple method. However, a communication path is required between all the arithmetic devices, and information is sent in both directions on the communication path. That is, a network having N (N-1) / 2 full-duplex communication paths (complete graphs among all the arithmetic devices) is required.
Takeshi Shimoyama, Kazuo Aoki, Hiroki Ueda, Yuji Kida "General Number Field Sieve Method Implementation Experiment (4)-Linear Algebra", IEICE Technical Report, ISEC2003-154, 2004.

従来の技術では、複数の演算装置に記録されているベクトルの和を求め、結果をそれらの演算装置で共有する場合に、通信回数が多くなるか、通信路が多くなるという問題があった。複数の演算装置を用いてベクトルの和を求める並列演算および行列の積を求める並列演算で、通信回数を少なくすることと、演算装置間のネットワークの通信路の数を少なくすることを、本発明の目的とする。   In the conventional technique, when the sum of vectors recorded in a plurality of arithmetic devices is obtained and the result is shared by the arithmetic devices, there has been a problem that the number of communication increases or the number of communication paths increases. Reducing the number of communication and reducing the number of communication paths of the network between the arithmetic units in the parallel arithmetic for calculating the sum of vectors using a plurality of arithmetic units and the parallel operation for calculating the product of the matrix The purpose.

本発明の並列演算方法は、以下のステップによって、計算部と記録部と通信部とを有する複数の演算装置を用いてN個(Nは2以上の整数)のK次元のベクトル(Kは2以上の整数)の和を求める。   The parallel operation method according to the present invention includes N (N is an integer equal to or greater than 2) K-dimensional vectors (K is 2) using a plurality of operation devices each having a calculation unit, a recording unit, and a communication unit according to the following steps. The sum of the above integers) is obtained.

ベクトル記録ステップで、各演算装置が、演算の対象となるK次元のベクトルc(nは1からNの整数)の中の1つまたは複数を当該演算装置の記録部に記録する。
初期設定ステップで、各演算装置が、記録部にτ=0を記録する。
成分送信ステップで、ベクトルc(pは(n−1−τ(mod N)+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcの第n成分を取り出し、(2)当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置に送信する。
In the vector recording step, each arithmetic device records one or a plurality of K-dimensional vectors c n (n is an integer from 1 to N) to be calculated in the recording unit of the arithmetic device.
In the initial setting step, each arithmetic unit records τ = 0 in the recording unit.
In the component transmission step, each arithmetic device having the vector c p (p is (n−1−τ (mod N) +1) in the recording unit) (1) the nth component of the vector c p from the recording unit of the arithmetic device (2) If the arithmetic unit and the vector c q (q is p−1, where q = N when p = 1) are different from the arithmetic unit in the recording unit, the communication unit is used. Te n-th component of the vector c p, and transmits to the processing unit having a vector c q in the recording unit.

成分受信ステップで、ベクトルcを記録部に有する各演算装置が、当該演算装置とベクトルcを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置から受信する。 A component receiving step, each arithmetic unit having a vector c q in the recording unit, if the computing device including the arithmetic unit and the vector c p to the recording portion are different, the vector c p using the communication section n the component receives from the computing device having the vector c p to the recording unit.

演算結果記録ステップで、ベクトルcを記録部に有する各演算装置が、(1)τ≦N−2の場合は、記録部からベクトルcの第n成分を取り出し、計算部でベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部に記録し、(2)τ>N−2の場合は、ベクトルcの第n成分を、ベクトルcの第n成分として記録部に記録する。
τ増加ステップで、各演算装置が、τにτ+1を代入して記録部に記録する。
繰り返しステップで、各演算装置が、τが2N−3以下の場合は、成分送信ステップに戻る。
そして、各演算装置の記録部に記録されたベクトルcmx(xは、1からNの任意の整数)をベクトルの和とする。
In the calculation result recording step, each calculation device having the vector c q in the recording unit (1) If τ ≦ N−2, the nth component of the vector c q is extracted from the recording unit, and the calculation unit calculates the vector c p And the result is recorded in the recording unit as the n-th component of the vector c q . When (2) τ> N−2, the n-th component of the vector c p is changed to the vector c q Is recorded in the recording unit as the n-th component.
In the τ increasing step, each arithmetic unit substitutes τ + 1 for τ and records it in the recording unit.
In the repetition step, each arithmetic device returns to the component transmission step when τ is 2N−3 or less.
Then, a vector c mx (x is an arbitrary integer from 1 to N) recorded in the recording unit of each arithmetic device is set as the sum of the vectors.

なお、K次元のベクトルを1つずつ各演算装置に記録した場合は、ベクトルcを記録部に有する演算装置は、必ずベクトルcを記録部に有する演算装置と異なるので、処理が少し簡単になる。 Note that if the recording to the arithmetic unit one by one K-dimensional vector, the computing device having the vector c q in the recording unit, so always different from the computing device having the vector c p to the recording unit, processing bit easier become.

また、本発明の並列演算方法は、計算部と記録部と通信部とを有するI個の演算装置(Iは2以上の整数)を用いて、M行N列の行列A(Mは2以上の整数、Nは2以上の整数、かつMN≧I)とN行K列の行列B(Kは2以上の整数)との積ABを求める場合にも適用できる。この場合は、あらかじめ、行列AのMN個の成分amn(mは1からMまでの整数、nは1からNまでの整数)をI個のグループ(1番目のグループからI番目のグループ)に分けておく。そして、各演算装置は、i番目のグループのすべての成分amn(ただし、iは当該演算装置の番号であって、1からIの整数)と、当該成分に乗算する行列Bの成分bn1〜bnKとを当該演算装置の記録部に記録する成分記録ステップを最初に行う。 ベクトル記録ステップでは、各演算装置が、(1)記録部に記録された成分amnのそれぞれについて、計算部でamnn1〜amnnKを計算し、(2)結果をK次元のベクトルcmn=(cmn1,cmn2,…,cmnK)=(amnn1,amnn2,…,amnnK)として記録部に記録する。MN個のK次元のベクトルcmnが、ベクトルの和を求める方法でもK次元のベクトルに相当する。この後のステップでは、M組のN個のベクトルの和を求める並列演算を行う。 Further, the parallel calculation method of the present invention uses an M number of arithmetic units (I is an integer equal to or greater than 2) using an I number of arithmetic units (I is an integer equal to or greater than 2), and a matrix A (M is equal to or greater than 2). And N is an integer equal to or greater than 2, and MN ≧ I) and a matrix AB of N rows and K columns B (K is an integer equal to or greater than 2). In this case, in advance, MN components a mn of the matrix A (m is an integer from 1 to M, n is an integer from 1 to N) are grouped into I groups (from the first group to the Ith group). It is divided into. Each arithmetic device has all the components a mn of the i-th group (where i is the number of the arithmetic device and is an integer from 1 to I) and the component b n1 of the matrix B that multiplies the component. First, a component recording step of recording ˜b nK in the recording unit of the arithmetic unit is performed. In the vector recording step, each arithmetic unit (1) calculates a mn b n1 to a mn b nK in the calculation unit for each of the components a mn recorded in the recording unit, and (2) the result is K-dimensional. vector c mn = (c mn1, c mn2, ..., c mnK) = (a mn b n1, a mn b n2, ..., a mn b nK) recorded in the recording unit as. The MN K-dimensional vectors c mn also correspond to K-dimensional vectors in the method for obtaining the vector sum. In the subsequent steps, a parallel operation for calculating the sum of the M sets of N vectors is performed.

さらに、本発明の並列演算方法は、計算部と記録部と通信部とを有するI個の演算装置(Iは2以上の整数)を用いて、M行N列の行列A(Mは2以上の整数、Nは2以上の整数、かつMN≧I)と行列Aの転置行列AとN行K列の行列B(Kは2以上の整数)との積AABを求める場合にも適用できる。積ABを求めるまでは、上述の方法と同じである。転置行列Aを掛ける際には、行列Aのn行m列の成分の演算を行う演算装置を、積ABの演算で、行列Aのm行n列の成分の演算を行った演算装置と同一にする。 Furthermore, the parallel computing method of the present invention uses an M computing device (I is an integer of 2 or more) having an arithmetic unit, a recording unit, and a communication unit, and a matrix A (M is 2 or more). And N is an integer greater than or equal to 2 and MN ≧ I) and the product A T AB of the transposed matrix AT of the matrix A and the matrix B of N rows and K columns (K is an integer of 2 or more) Applicable. The process is the same as described above until the product AB is obtained. When multiplying the transposed matrix AT , an arithmetic unit that calculates an n-row m-column component of the matrix AT is an arithmetic unit that calculates an m-row n-column component of the matrix A by calculating the product AB. Same as

本発明によれば、1組のN個のK次元のベクトルの和をN個の演算装置で行う場合、最大で2{K/N}(N−1)回の通信で、情報の収集と結果の分配が実現できる。また、データはリング状かつ片方向に送られるため、N個の片方向通信路(リング状)を有するネットワークを備えればよい。これは、単純な方法の、2K(N−1)回の通信回数、半二重の(N−1)個の通信路に比べ、大幅に通信回数を削減している。また、非特許文献1の方法の、最大で2{K/N}(N−1)回の通信回数、N(N−1)/2個の全二重の通信路に比べ、大幅に通信路を削減している。   According to the present invention, when the sum of a set of N K-dimensional vectors is performed by N arithmetic devices, the information can be collected and transmitted in a maximum of 2 {K / N} (N-1) times. Distribution of results can be realized. Further, since data is sent in a ring shape and in one direction, a network having N unidirectional communication paths (ring shape) may be provided. This significantly reduces the number of communication times compared to the simple method of 2K (N-1) communication times and half-duplex (N-1) communication paths. In addition, compared with the method of Non-Patent Document 1, the communication frequency is 2 {K / N} (N-1) times at the maximum, and communication is significantly more than N (N-1) / 2 full-duplex communication paths. The road has been reduced.

また、同様に、I個の演算装置(Iは2以上の整数)を用いて、M行N列の行列A(Mは2以上の整数、Nは2以上の整数、かつMN≧I)とN行K列の行列B(Kは2以上の整数)との積ABを求める場合にも、M組のN個のベクトルの和を求める場合に、通信回数と通信路を大幅に削減できる。   Similarly, by using I arithmetic units (I is an integer of 2 or more), an M-row N-column matrix A (M is an integer of 2 or more, N is an integer of 2 or more, and MN ≧ I) Even when the product AB with the matrix B of N rows and K columns (K is an integer of 2 or more) is obtained, the number of communication and the communication path can be greatly reduced when obtaining the sum of M sets of N vectors.

さらに、行列の積AABを求める場合には、転置行列Aを掛ける演算では、行列ABのm行目の各成分(m行目のベクトル)の情報が必要であるが、この情報は、積ABの演算で、行列Aのm行目の成分の演算を行った演算装置が記録している情報である。本発明によれば、転置行列Aを掛ける際には、行列Aのn行m列の成分の演算を行う演算装置を、積ABの演算で、行列Aのm行n列の成分の演算を行った演算装置と同一にするので、転置行列Aを掛ける演算の前に、情報を授受するための通信が不要である。したがって、通信回数と通信路を大幅に削減できる。 Further, when obtaining the matrix product A T AB, the multiplication by the transposed matrix A T requires information on each component (vector in the m-th row) of the m-th row of the matrix AB. , The information recorded by the arithmetic unit that performed the calculation of the component of the m-th row of the matrix A in the calculation of the product AB. According to the present invention, when multiplying the transposed matrix AT , the arithmetic unit that performs the operation of the n-row m-column component of the matrix AT is performed by the product AB, and the m-row n-column component of the matrix A is calculated. Since the calculation device is the same as the calculation device that performs the calculation, communication for exchanging information is not required before the calculation of multiplying the transposed matrix AT . Therefore, the number of communication times and communication paths can be greatly reduced.

以下では、説明の重複を避けるため同じ機能を有する構成部や同じ処理を行う処理ステップには同一の番号を付与し、説明を省略する。
[第1実施形態]
図4に、N個の演算装置(N=4)を用いてK次元のベクトル(Kは2以上の整数)の和を求める並列演算システムの構成例を示す。この並列演算システムは、演算装置1000、1100、1200、1300と、隣り合う演算装置とをつなぐ通信路から構成されている。各演算装置1000、1100、1200、1300は、計算部1010、1110、1210、1310と記録部1020、1120、1220、1320と通信部1030、1130、1230、1330とを備えている。図5に演算装置1000の機能構成例を示す。計算部1010は、τ増加手段1001と繰り返し手段1002と演算結果記録手段1012とを備える。なお、τ増加手段1001と繰り返し手段1002は、計算部1010以外の構成部(たとえば、図示していないが制御部などの構成部が考えられる。)が備えてもよい。記録部1020は、ベクトル記録手段1022とτ記録手段1023とを有する。通信部1030は、送信手段1031と受信手段1032とを有する。なお、他の演算装置1100、1200、1300も同じ機能構成である。
Below, in order to avoid duplication of description, the same number is attached | subjected to the process step which performs the process part which performs the same process and the same function, and abbreviate | omits description.
[First Embodiment]
FIG. 4 shows a configuration example of a parallel operation system that calculates the sum of K-dimensional vectors (K is an integer of 2 or more) using N operation devices (N = 4). This parallel computing system is composed of a communication path that connects computing devices 1000, 1100, 1200, and 1300 and adjacent computing devices. Each arithmetic device 1000, 1100, 1200, 1300 includes calculation units 1010, 1110, 1210, 1310, recording units 1020, 1120, 1220, 1320 and communication units 1030, 1130, 1230, 1330. FIG. 5 shows a functional configuration example of the arithmetic device 1000. The calculation unit 1010 includes a τ increasing unit 1001, a repeating unit 1002, and a calculation result recording unit 1012. Note that the τ increasing unit 1001 and the repeating unit 1002 may be provided in a configuration unit other than the calculation unit 1010 (for example, although not shown, a configuration unit such as a control unit may be considered). The recording unit 1020 includes a vector recording unit 1022 and a τ recording unit 1023. The communication unit 1030 includes a transmission unit 1031 and a reception unit 1032. The other arithmetic devices 1100, 1200, and 1300 have the same functional configuration.

原理1
図6に、図4の並列演算システムを用いて4個の4次元ベクトルの和を求める方法の原理を示す。図中の○内の数字xは、処理の順番を示しており、以下では第xの処理と表現する。なお、同じ番号は同時に(並列に)行う処理を示している。あらかじめ、演算装置1000がベクトルcを、演算装置1100がベクトルcを、演算装置1200がベクトルcを、演算装置1300がベクトルcを記録している。
Principle 1
FIG. 6 shows the principle of a method for obtaining the sum of four four-dimensional vectors using the parallel operation system of FIG. The numbers x in the circles in the figure indicate the order of processing, and are expressed as the x-th processing below. In addition, the same number has shown the process performed simultaneously (in parallel). In advance, the arithmetic device 1000 records the vector c 1 , the arithmetic device 1100 records the vector c 2 , the arithmetic device 1200 records the vector c 3 , and the arithmetic device 1300 records the vector c 4 .

第1の処理では、以下の処理を並列に行う。演算装置1000は、ベクトルcの第1成分c11を演算装置1300に送信するとともに、ベクトルcの第2成分c21を演算装置1100から受信する。演算装置1100は、ベクトルcの第2成分c22を演算装置1000に送信するとともに、ベクトルcの第3成分c33を演算装置1200から受信する。演算装置1200は、ベクトルcの第3成分c33を演算装置1100に送信するとともに、ベクトルcの第4成分c44を演算装置1300から受信する。演算装置1300は、ベクトルcの第4成分c44を演算装置1200に送信するとともに、ベクトルcの第1成分c11を演算装置1000から受信する。 In the first process, the following processes are performed in parallel. The arithmetic device 1000 transmits the first component c 11 of the vector c 1 to the arithmetic device 1300 and receives the second component c 21 of the vector c 2 from the arithmetic device 1100. Arithmetic unit 1100 sends the second component c 22 of the vector c 2 to the arithmetic unit 1000, it receives a third component c 33 of the vector c 3 from the computing device 1200. Computing device 1200 transmits a third component c 33 of the vector c 3 to the processing unit 1100 receives the fourth component c 44 of the vector c 4 from the computing device 1300. Arithmetic unit 1300 sends the fourth component c 44 of the vector c 4 to the processing unit 1200 receives the first component c 11 of the vector c 1 from the arithmetic unit 1000.

第2の処理では、以下の処理を並列に行う。演算装置1000は、ベクトルcの第2成分c12と受信したベクトルcの第2成分c22との和を、ベクトルcの第2成分c12として記録する。演算装置1100は、ベクトルcの第3成分c23と受信したベクトルcの第3成分c33との和を、ベクトルcの第3成分c23として記録する。演算装置1200は、ベクトルcの第4成分c34と受信したベクトルcの第4成分c44との和を、ベクトルcの第4成分c34として記録する。演算装置1300は、ベクトルcの第1成分c41と受信したベクトルcの第1成分c11との和を、ベクトルcの第1成分c41として記録する。 In the second process, the following processes are performed in parallel. Computing device 1000, the sum of the second component c 22 of the vector c 2 and the received second component c 12 of the vector c 1, is recorded as the second component c 12 of the vector c 1. Computing device 1100, the sum of the third component c 33 of the vector c 3 received a third component c 23 of the vector c 2, is recorded as a third component c 23 of the vector c 2. Computing device 1200, the sum of the fourth component c 44 of the vector c 4 received a fourth component c 34 of the vector c 3, recorded as a fourth component c 34 of the vector c 3. Computing device 1300, the sum of the first component c 11 of the vector c 1 and the received first component c 41 of the vector c 4, is recorded as the first component c 41 of the vector c 4.

第1の処理と第2の処理によって、演算前のベクトルcとベクトルcの第1成分の合計c41+c11が、演算装置1300にベクトルcの第1成分として記録されている。第3の処理から第6の処理は、第1の処理と第2の処理の繰り返しである。第3の処理と第4の処理が終了すると、演算前のベクトルcとベクトルcとベクトルcの第1成分の合計c31+c41+c11が、演算装置1200にベクトルcの第1成分として記録される。第5の処理と第6の処理が終了すると、演算前のベクトルcとベクトルcとベクトルcとベクトルcの第1成分の合計c21+c31+c41+c11が、演算装置1100にベクトルcの第1成分として記録される。つまり、第6の処理までで、ベクトルの各成分の合計は求められている。ただし、第1成分の合計は演算装置1100、第2成分の合計は演算装置1200、第3成分の合計は演算装置1300、第4成分の合計は演算装置1000がそれぞれ記録している。 By the first process and the second process, the first component sum c 41 + c 11 of the operation before the vector c 4 and the vector c 1 is recorded as the first component of the vector c 4 to the processing unit 1300. The third to sixth processes are repetitions of the first process and the second process. When the third process and the fourth process are finished, the sum c 31 + c 41 + c 11 of the first component of the vector c 3 , the vector c 4, and the vector c 1 before the calculation is sent to the calculation device 1200 of the vector c 3 . Recorded as one component. When the fifth process and the sixth process are finished, the sum c 21 + c 31 + c 41 + c 11 of the first component of the vector c 2 , the vector c 3 , the vector c 4, and the vector c 1 before the calculation is calculated by the calculation device 1100. It is recorded as the first component of the vector c 2 in. That is, up to the sixth process, the sum of each component of the vector is obtained. However, the arithmetic unit 1100 records the total of the first component, the arithmetic device 1200 records the total of the second component, the arithmetic device 1300 records the total of the third component, and the arithmetic device 1000 records the total of the fourth component.

第7の処理では、以下の処理を並列に行う。演算装置1000は、ベクトルcの第4成分c14(第4成分の合計)を演算装置1300に送信するとともに、ベクトルcの第1成分c21(第1成分の合計)を演算装置1100から受信する。演算装置1100は、ベクトルcの第1成分c21(第1成分の合計)を演算装置1000に送信するとともに、ベクトルcの第2成分c32(第2成分の合計)を演算装置1200から受信する。演算装置1200は、ベクトルcの第2成分c32(第2成分の合計)を演算装置1100に送信するとともに、ベクトルcの第3成分c43(第3成分の合計)を演算装置1300から受信する。演算装置1300は、ベクトルcの第3成分c43(第3成分の合計)を演算装置1200に送信するとともに、ベクトルcの第4成分c14(第4成分の合計)を演算装置1000から受信する。 In the seventh process, the following processes are performed in parallel. The arithmetic device 1000 transmits the fourth component c 14 (total of the fourth components) of the vector c 1 to the arithmetic device 1300, and transmits the first component c 21 (total of the first components) of the vector c 2 to the arithmetic device 1100. Receive from. The arithmetic device 1100 transmits the first component c 21 (total of the first components) of the vector c 2 to the arithmetic device 1000, and also calculates the second component c 32 (total of the second components) of the vector c 3 to the arithmetic device 1200. Receive from. The computing device 1200 transmits the second component c 32 (sum of the second components) of the vector c 3 to the computing device 1100, and sends the third component c 43 (sum of the third components) of the vector c 4 to the computing device 1300. Receive from. The arithmetic device 1300 transmits the third component c 43 (total of the third components) of the vector c 4 to the arithmetic device 1200, and transmits the fourth component c 14 (total of the fourth components) of the vector c 1 to the arithmetic device 1000. Receive from.

第8の処理では、以下の処理を並列に行う。演算装置1000は、受信したベクトルcの第1成分c21(第1成分の合計)を、ベクトルcの第1成分c11として記録する。演算装置1100は、受信したベクトルcの第2成分c32(第2成分の合計)を、ベクトルcの第2成分c22として記録する。演算装置1200は、受信したベクトルcの第3成分c43(第3成分の合計)を、ベクトルcの第3成分c33として記録する。演算装置1300は、受信したベクトルcの第4成分c14(第1成分の合計)を、ベクトルcの第4成分c44として記録する。 In the eighth process, the following processes are performed in parallel. Computing device 1000, the first component c 21 of the vector c 2 received (sum of the first component), is recorded as a first component c 11 of the vector c 1. Computing device 1100, the second component c 32 of the vector c 3 received (total of the second component) is recorded as the second component c 22 of the vector c 2. Arithmetic unit 1200, a third component c 43 of the vector c 4 has been received (total of the third component) is recorded as a third component c 33 of the vector c 3. Arithmetic unit 1300, a fourth component c 14 of the vector c 1 received (sum of the first component), is recorded as a fourth component c 44 of the vector c 4.

第7の処理と第8の処理によって、第1成分の合計は演算装置1100から演算装置1000に分配され、第2成分の合計は演算装置1200から演算装置1100に分配され、第3成分の合計は演算装置1300から演算装置1200に分配され、第4成分の合計は演算装置1000から演算装置1300に分配された。第9の処理から第12の処理は、第7の処理と第8の処理の繰り返しである。この繰り返しによって、各成分の合計はすべての演算装置に分配される。   By the seventh process and the eighth process, the total of the first component is distributed from the arithmetic device 1100 to the arithmetic device 1000, the total of the second component is distributed from the arithmetic device 1200 to the arithmetic device 1100, and the total of the third component Is distributed from the arithmetic device 1300 to the arithmetic device 1200, and the total of the fourth component is distributed from the arithmetic device 1000 to the arithmetic device 1300. The ninth process to the twelfth process are repetitions of the seventh process and the eighth process. By repeating this, the sum of each component is distributed to all the arithmetic units.

原理2
図7に、図4の並列演算システムを用いて4個の5次元ベクトルの和を求める方法の原理を示す。この例は、ベクトルの次元がベクトルの数よりも多い例である。この場合、あらかじめ、ベクトルの成分を4つのグループに分けておく。この例では、第1成分と第5成分を1番目のグループ、第2成分を2番目のグループ、第3成分を3番目のグループ、第4成分を4番目のグループとする。この例では、演算装置1000が1番目の演算装置、演算装置1100が2番目の演算装置、演算装置1200が3番目の演算装置、演算装置1300が4番目の演算装置とする。あらかじめ、n番目の演算装置が、それぞれベクトルc=(cn1,cn2,cn3,cn4,cn5)を記録部に記録している。ただし、nは1から4の整数である。
原理2の処理も、第1の処理から第12の処理であり、原理1と同じである。原理1との違いは、ベクトルの次元が異なることである。原理2では、1番目のグループに属する第5成分が第1成分と一緒に処理される。
Principle 2
FIG. 7 shows the principle of a method for obtaining the sum of four five-dimensional vectors using the parallel operation system of FIG. In this example, the dimension of the vector is larger than the number of vectors. In this case, the vector components are divided into four groups in advance. In this example, the first component and the fifth component are the first group, the second component is the second group, the third component is the third group, and the fourth component is the fourth group. In this example, the computing device 1000 is the first computing device, the computing device 1100 is the second computing device, the computing device 1200 is the third computing device, and the computing device 1300 is the fourth computing device. In advance, the n-th arithmetic unit records the vectors c n = (c n1 , c n2 , c n3 , c n4 , c n5 ) in the recording unit. However, n is an integer of 1 to 4.
The process of the principle 2 is also the first process to the twelfth process and is the same as the principle 1. The difference from Principle 1 is that the dimensions of the vectors are different. In principle 2, the fifth component belonging to the first group is processed together with the first component.

原理3
図8に、図4の並列演算システムを用いて4個の2次元ベクトルの和を求める方法の原理を示す。この例は、ベクトルの次元がベクトルの数よりも少ない例である。この場合、あらかじめ、ベクトルの成分を4つのグループに分けておく。この例では、第1成分を1番目のグループ、第2成分を2番目のグループとする。3番目のグループと4番目のグループに属する成分はない。この例でも、演算装置1000が1番目の演算装置、演算装置1100が2番目の演算装置、演算装置1200が3番目の演算装置、演算装置1300が4番目の演算装置とする。あらかじめ、n番目の演算装置が、それぞれベクトルc=(cn1,cn2)を記録部に記録している。ただし、nは1から4の整数である。
原理3の処理も、第1の処理から第12の処理であり、原理1と同じである。原理1との違いは、ベクトルの次元が異なることである。原理3では、属する成分がない3番目のグループと4番目のグループの処理では、演算装置は動作しない。
Principle 3
FIG. 8 shows the principle of a method for obtaining the sum of four two-dimensional vectors using the parallel operation system of FIG. In this example, the dimension of the vector is smaller than the number of vectors. In this case, the vector components are divided into four groups in advance. In this example, the first component is the first group and the second component is the second group. There are no components belonging to the third and fourth groups. Also in this example, the arithmetic device 1000 is the first arithmetic device, the arithmetic device 1100 is the second arithmetic device, the arithmetic device 1200 is the third arithmetic device, and the arithmetic device 1300 is the fourth arithmetic device. In advance, the n-th arithmetic unit records the vectors c n = (c n1 , c n2 ) in the recording unit. However, n is an integer of 1 to 4.
The process of the principle 3 is also the first process to the twelfth process and is the same as the principle 1. The difference from Principle 1 is that the dimensions of the vectors are different. In principle 3, the arithmetic unit does not operate in the processing of the third group and the fourth group that do not have any component.

演算方法1
図9は、N個の演算装置でN個のN次元のベクトルの和を求める並列演算システムの処理フローを示す図である。なお、この処理フローは原理1に対応している。
Calculation method 1
FIG. 9 is a diagram illustrating a processing flow of a parallel operation system that obtains the sum of N N-dimensional vectors by N operation devices. This processing flow corresponds to Principle 1.

まず、N個の演算装置が、それぞれの記録部のベクトル記録手段に1つずつベクトルを記録しておく(S110)。また、τに0を代入し、τ記録手段に記録しておく(S120)。
n番目の演算装置(1000など)は、記録部(1020など)のベクトル記録手段(1022など)から、第(n−1+τ(mod N))+1成分を取り出し、通信部(1030など)の送信手段(1031など)を用いて(n−2(mod N))+1番目の演算装置(1300など)に送信する(S130)。n番目の演算装置(1000など)は、通信部(1030など)の受信手段(1032など)を用いて第(n+τ(mod N))+1成分をn(mod N))+1番目の演算装置(1100など)から受信する(S140)。なお、τ=0のときのステップS130とS140が図6の第1の処理、τ=1のときのステップS130とS140が図6の第3の処理、τ=2のときのステップS130とS140が図6の第5の処理、τ=3のときのステップS130とS140が図6の第7の処理、τ=4のときのステップS130とS140が図6の第9の処理、τ=5のときのステップS130とS140が図6の第11の処理に該当する。
First, N computing devices record one vector at a time in the vector recording means of each recording unit (S110). Also, 0 is substituted for τ and recorded in the τ recording means (S120).
The n-th arithmetic device (such as 1000) takes out the (n−1 + τ (mod N)) + 1 component from the vector recording means (such as 1022) of the recording unit (such as 1020), and transmits it to the communication unit (such as 1030). Using means (1031 etc.), it is transmitted to (n-2 (mod N)) + 1st arithmetic unit (1300 etc.) (S130). The n-th arithmetic device (1000, etc.) uses the receiving means (1032, etc.) of the communication unit (1030, etc.) to convert the (n + τ (mod N)) + 1 component to n (mod N)) + 1-th arithmetic device ( 1100) (S140). Note that steps S130 and S140 when τ = 0 are the first processing in FIG. 6, steps S130 and S140 when τ = 1 are the third processing in FIG. 6, and steps S130 and S140 when τ = 2. Is the fifth process of FIG. 6, steps S130 and S140 when τ = 3 are the seventh process of FIG. 6, steps S130 and S140 when τ = 4 are the ninth process of FIG. 6, τ = 5 Steps S130 and S140 at this time correspond to the eleventh process of FIG.

n番目の演算装置(1000など)は、(1)τ≦N−2の場合は、記録部(1020など)のベクトル記録手段(1022など)から、第(n+τ(mod N))+1成分を取り出し、ステップS140で受信した第(n+τ(mod N))+1成分との和を求め、結果を第(n+τ(mod N))+1成分として記録部(1020など)のベクトル記録手段(1022など)に記録し、(2)τ>N−2の場合は、ステップS140で受信した第(n+τ(mod N))+1成分を第(n+τ(mod N))+1成分として記録部(1020など)のベクトル記録手段(1022など)に記録する(S150)。τ=0のときのステップS150が図6の第2の処理、τ=1のときのステップS150が図6の第4の処理、τ=2のときのステップS150が図6の第6の処理、τ=3のときのステップS150が図6の第8の処理、τ=4のときのステップS150が図6の第10の処理、τ=5のときのステップS150が図6の第12の処理に該当する。
各演算装置は、τにτ+1を代入して記録部に記録する(S160)。各演算装置は、τが2N−3以下の場合はステップS130に戻り、2N−3より大きい場合は処理を終了する(S170)。図6の場合は、2N−3=5なので、τ=5(第12の処理)までで繰り返し処理は終了する。
In the case of (1) τ ≦ N−2, the n-th arithmetic unit (such as 1000) obtains the (n + τ (mod N)) + 1 component from the vector recording means (such as 1022) of the recording unit (such as 1020). The sum of the extracted (n + τ (mod N)) + 1 component received in step S140 is obtained, and the result is used as the (n + τ (mod N)) + 1 component to record the vector recording means (1022, etc.) of the recording unit (1020, etc.) (2) If τ> N−2, the (n + τ (mod N)) + 1 component received in step S140 is used as the (n + τ (mod N)) + 1 component of the recording unit (1020, etc.). Recording is performed in vector recording means (1022 or the like) (S150). Step S150 when τ = 0 is the second process of FIG. 6, Step S150 when τ = 1 is the fourth process of FIG. 6, and Step S150 when τ = 2 is the sixth process of FIG. Step S150 when τ = 3 is the eighth process of FIG. 6, Step S150 when τ = 4 is the tenth process of FIG. 6, and Step S150 when τ = 5 is the twelfth process of FIG. Applicable to processing.
Each arithmetic device substitutes τ + 1 for τ and records it in the recording unit (S160). Each arithmetic device returns to step S130 if τ is 2N−3 or less, and ends the process if larger than 2N−3 (S170). In the case of FIG. 6, since 2N−3 = 5, the iterative process is completed until τ = 5 (the twelfth process).

演算方法2
図10は、N個の演算装置でN個のK次元のベクトルの和を求める並列演算システムの処理フローを示す図である。なお、この処理フローは原理1から原理3に対応できる。
Calculation method 2
FIG. 10 is a diagram showing a processing flow of a parallel computing system that obtains the sum of N K-dimensional vectors by N computing devices. This processing flow can correspond to principles 1 to 3.

あらかじめ、ベクトルのK個の成分をN個のグループ(1番目のグループからN番目のグループ)に分けておく。まず、N個の演算装置が、それぞれの記録部のベクトル記録手段に1つずつベクトルを記録しておく(S110)。また、τに0を代入し、τ記録手段に記録しておく(S120)。   In advance, the K components of the vector are divided into N groups (from the first group to the Nth group). First, N computing devices record one vector at a time in the vector recording means of each recording unit (S110). Also, 0 is substituted for τ and recorded in the τ recording means (S120).

(n−1−τ(mod N))+1番目の演算装置(ただし、nは1からNの整数。)が、(1)当該演算装置の記録部からn番目のグループのベクトルの成分を取り出し、(2)当該演算装置の通信部を用いて(n−2−τ(mod N))+1番目の演算装置に送信する(S131)。(n−2−τ(mod N))+1番目の演算装置が、当該演算装置の通信部を用いてn番目のグループのベクトルの成分を(n−1−τ(mod N))+1番目の演算装置から受信する(S141)。なお、τ=0のときのステップS131とS141が図6〜8の第1の処理、τ=1のときのステップS131とS141が図6〜8の第3の処理、τ=2のときのステップS131とS141が図6〜8の第5の処理、τ=3のときのステップS131とS141が図6〜8の第7の処理、τ=4のときのステップS131とS141が図6〜8の第9の処理、τ=5のときのステップS131とS141が図6〜8の第11の処理に対応できる。   (N−1−τ (mod N)) + 1st arithmetic device (where n is an integer from 1 to N) (1) extracts the vector component of the nth group from the recording unit of the arithmetic device. (2) Using the communication unit of the arithmetic device, (n-2-τ (mod N)) + 1 is transmitted to the first arithmetic device (S131). The (n-2-τ (mod N)) + 1st arithmetic device uses the communication unit of the arithmetic device to calculate the nth group of vector components as (n-1-τ (mod N)) + 1st Received from the arithmetic unit (S141). Steps S131 and S141 when τ = 0 are the first processing of FIGS. 6 to 8, steps S131 and S141 when τ = 1 are the third processing of FIGS. 6 to 8, and when τ = 2. Steps S131 and S141 are the fifth processes of FIGS. 6 to 8, steps S131 and S141 when τ = 3 are the seventh processes of FIGS. 6 to 8, and steps S131 and S141 when τ = 4 are FIGS. Eighth ninth process, steps S131 and S141 when τ = 5 can correspond to the eleventh process of FIGS.

(n−2−τ(mod N))+1番目の各演算装置が、(1)τ≦N−2の場合は、当該演算装置の記録部からn番目のグループのベクトルの成分を取り出し、当該演算装置の記録部で、受信したn番目のグループのベクトルの成分との和を求め、結果をn番目のグループのベクトルの成分として記録部に記録し、(2)τ>N−2の場合は、受信したn番目のグループのベクトルの成分を、n番目のグループのベクトルの成分として記録部に記録する(S151)。なお、τ=0のときのステップS151が図6〜8の第2の処理、τ=1のときのステップS151が図6〜8の第4の処理、τ=2のときのステップS151が図6〜8の第6の処理、τ=3のときのステップS151が図6〜8の第8の処理、τ=4のときのステップS151が図6〜8の第10の処理、τ=5のときのステップS151が図6〜8の第12の処理に対応できる。
各演算装置は、τにτ+1を代入して記録部に記録する(S160)。各演算装置は、τが2N−3以下の場合はステップS130に戻り、2N−3より大きい場合は処理を終了する(S170)。図6〜8の場合は、2N−3=5なので、τ=5(第12の処理)までで繰り返し処理は終了する。
When each (n-2-τ (mod N)) + 1st arithmetic device is (1) τ ≦ N−2, the vector component of the nth group is extracted from the recording unit of the arithmetic device, When the recording unit of the arithmetic unit calculates the sum of the received vector components of the nth group and records the result as a vector component of the nth group in the recording unit. (2) When τ> N−2 Records the received n-th group vector component in the recording unit as the n-th group vector component (S151). Note that step S151 when τ = 0 is the second process in FIGS. 6 to 8, step S151 when τ = 1 is the fourth process in FIGS. 6 to 8, and step S151 when τ = 2 is shown in FIG. 6-8, 6th process, step S151 when τ = 3 is the 8th process of FIGS. 6-8, step S151 when τ = 4 is the 10th process of FIGS. 6-8, τ = 5 Step S151 at this time can correspond to the twelfth process of FIGS.
Each arithmetic device substitutes τ + 1 for τ and records it in the recording unit (S160). Each arithmetic device returns to step S130 if τ is 2N−3 or less, and ends the process if larger than 2N−3 (S170). In the case of FIGS. 6 to 8, since 2N−3 = 5, the repetitive process is completed up to τ = 5 (the twelfth process).

このように処理するので、1組のN個のK次元のベクトルの和をN個の演算装置で行う場合、最大で2{K/N}(N−1)回の通信で、情報の収集と結果の分配が実現できる。また、データはリング状かつ片方向に送られるため、N個の片方向の通信路(リング状)を有するネットワークを備えればよい。   Since processing is performed in this way, when the sum of a set of N K-dimensional vectors is performed by N arithmetic devices, information is collected with a maximum of 2 {K / N} (N-1) communications. And distribution of results. Moreover, since data is sent in a ring shape and in one direction, a network having N unidirectional communication paths (ring shapes) may be provided.

[変形例1]
第1実施形態では、ベクトルの数と演算装置の数が同じ場合を説明した。本変形例では、ベクトルの数が演算装置の数よりも多い場合について説明する。なお、ベクトルの数が演算装置よりも少ない場合、ベクトルを記録していない演算装置が存在することになる。このような演算装置は、並列演算システムに含めなければよい。したがって、ベクトルの数は演算装置の数以上とする。
また、同じ演算装置内の複数のベクトルの和を最初に計算してしまい、1つのベクトルにし、その後、複数の装置間に分散しているベクトルの和を求めることもできる。この場合は、同じ演算装置内のベクトルの和を計算する処理と第1実施形態の処理を組み合わせることで実現できる。
本変形例では、同じ演算装置内のベクトルの和を最初に計算しなくても、1つの演算装置に複数のベクトルがある場合に、本発明の並列演算方法を適用できることを示す。本変形例の演算装置も図4、5に示した演算装置と同じ機能構成である。
[Modification 1]
In the first embodiment, the case where the number of vectors is the same as the number of arithmetic units has been described. In this modification, a case where the number of vectors is larger than the number of arithmetic devices will be described. When the number of vectors is smaller than that of the arithmetic device, there is an arithmetic device that does not record the vector. Such an arithmetic unit may not be included in the parallel arithmetic system. Therefore, the number of vectors is equal to or greater than the number of arithmetic units.
It is also possible to first calculate the sum of a plurality of vectors in the same arithmetic unit, to obtain one vector, and then to obtain the sum of vectors distributed among the plurality of units. This case can be realized by combining the process of calculating the sum of vectors in the same arithmetic unit with the process of the first embodiment.
This modification shows that the parallel operation method of the present invention can be applied when there is a plurality of vectors in one arithmetic device without first calculating the sum of the vectors in the same arithmetic device. The arithmetic device of this modification also has the same functional configuration as the arithmetic device shown in FIGS.

原理
図11に、図4の並列演算システムを用いて5個の5次元ベクトルの和を求める方法の原理を示す。あらかじめ、演算装置1000がベクトルcとcを、演算装置1100がベクトルcを、演算装置1200がベクトルcを、演算装置1300がベクトルcを記録している。
Principle FIG. 11 shows the principle of a method for obtaining the sum of five five-dimensional vectors using the parallel computing system of FIG. In advance, the arithmetic device 1000 records the vectors c 1 and c 5 , the arithmetic device 1100 records the vector c 2 , the arithmetic device 1200 records the vector c 3 , and the arithmetic device 1300 records the vector c 4 .

第1の処理では、以下の処理を並列に行う。演算装置1000は、ベクトルcの第5成分c55を演算装置1300に送信するとともに、ベクトルcの第2成分c22を演算装置1100から受信する。演算装置1100は、ベクトルcの第2成分c22を演算装置1000に送信するとともに、ベクトルcの第3成分c33を演算装置1200から受信する。演算装置1200は、ベクトルcの第3成分c33を演算装置1100に送信するとともに、ベクトルcの第4成分c44を演算装置1300から受信する。演算装置1300は、ベクトルcの第4成分c44を演算装置1200に送信するとともに、ベクトルcの第5成分c55を演算装置1000から受信する。この処理では、ベクトルcとベクトルcを記録している演算装置が同じなので、ベクトルcを記録している演算装置からベクトルcを記録している演算装置へのベクトルcの第1成分c11の送信は行わない。 In the first process, the following processes are performed in parallel. Computing device 1000 transmits a fifth component c 55 of the vector c 5 to the processing unit 1300 receives the second component c 22 of the vector c 2 from the operation unit 1100. Arithmetic unit 1100 sends the second component c 22 of the vector c 2 to the arithmetic unit 1000, it receives a third component c 33 of the vector c 3 from the computing device 1200. Computing device 1200 transmits a third component c 33 of the vector c 3 to the processing unit 1100 receives the fourth component c 44 of the vector c 4 from the computing device 1300. Arithmetic unit 1300 sends the fourth component c 44 of the vector c 4 to the processing unit 1200 receives the fifth component c 55 of the vector c 5 from the operation unit 1000. In this process, since the arithmetic device that records the vector c 1 and the vector c 5 is the same, the first operation of the vector c 1 from the arithmetic device that records the vector c 1 to the arithmetic device that records the vector c 5 is performed. transmission of one component c 11 is not performed.

第2の処理では、以下の処理を並列に行う。演算装置1000は、ベクトルcの第2成分c12と受信したベクトルcの第2成分c22との和を、ベクトルcの第2成分c12として記録する。さらに、演算装置1000は、ベクトルcの第1成分c51とベクトルcの第1成分c11との和を、ベクトルcの第1成分c51として記録する。演算装置1100は、ベクトルcの第3成分c23と受信したベクトルcの第3成分c33との和を、ベクトルcの第3成分c23として記録する。演算装置1200は、ベクトルcの第4成分c34と受信したベクトルcの第4成分c44との和を、ベクトルcの第4成分c34として記録する。演算装置1300は、ベクトルcの第5成分c45と受信したベクトルcの第5成分c55との和を、ベクトルcの第5成分c45として記録する。 In the second process, the following processes are performed in parallel. Computing device 1000, the sum of the second component c 22 of the vector c 2 and the received second component c 12 of the vector c 1, is recorded as the second component c 12 of the vector c 1. Additionally, computing device 1000, the sum of the first component c 51 a first component c 11 of the vector c 1 vector c 5, recorded as the first component c 51 of the vector c 5. Computing device 1100, the sum of the third component c 33 of the vector c 3 received a third component c 23 of the vector c 2, is recorded as a third component c 23 of the vector c 2. Computing device 1200, the sum of the fourth component c 44 of the vector c 4 received a fourth component c 34 of the vector c 3, recorded as a fourth component c 34 of the vector c 3. Computing device 1300, the sum of the fifth component c 55 of the vector c 5 received a fifth component c 45 of the vector c 4, is recorded as a fifth component c 45 of the vector c 4.

第3の処理から第8の処理は、第1の処理と第2の処理の繰り返しである。第8の処理が終了すると、第1成分の合計は演算装置1100、第2成分の合計は演算装置1200、第3成分の合計は演算装置1300、第4成分の合計は演算装置1000、第5成分の合計は演算装置1000がそれぞれ記録している。   The third process to the eighth process are repetitions of the first process and the second process. When the eighth process ends, the total of the first component is the arithmetic device 1100, the total of the second component is the arithmetic device 1200, the total of the third component is the arithmetic device 1300, the total of the fourth component is the arithmetic device 1000, the fifth The arithmetic component 1000 records the total of the components.

第9の処理では、以下の処理を並列に行う。演算装置1000は、ベクトルcの第4成分c54(第4成分の合計)を演算装置1300に送信するとともに、ベクトルcの第1成分c21(第1成分の合計)を演算装置1100から受信する。演算装置1100は、ベクトルcの第1成分c21(第1成分の合計)を演算装置1000に送信するとともに、ベクトルcの第2成分c32(第2成分の合計)を演算装置1200から受信する。演算装置1200は、ベクトルcの第2成分c32(第2成分の合計)を演算装置1100に送信するとともに、ベクトルcの第3成分c43(第3成分の合計)を演算装置1300から受信する。演算装置1300は、ベクトルcの第3成分c43(第3成分の合計)を演算装置1200に送信するとともに、ベクトルcの第4成分c54(第4成分の合計)を演算装置1000から受信する。この処理では、ベクトルcとベクトルcを記録している演算装置が同じなので、ベクトルcを記録している演算装置からベクトルcを記録している演算装置へのベクトルcの第5成分c15の送信は行わない。 In the ninth process, the following processes are performed in parallel. The arithmetic device 1000 transmits the fourth component c 54 (total of the fourth components) of the vector c 5 to the arithmetic device 1300, and transmits the first component c 21 (total of the first components) of the vector c 2 to the arithmetic device 1100. Receive from. The arithmetic device 1100 transmits the first component c 21 (total of the first components) of the vector c 2 to the arithmetic device 1000, and also calculates the second component c 32 (total of the second components) of the vector c 3 to the arithmetic device 1200. Receive from. The computing device 1200 transmits the second component c 32 (sum of the second components) of the vector c 3 to the computing device 1100, and sends the third component c 43 (sum of the third components) of the vector c 4 to the computing device 1300. Receive from. The computing device 1300 transmits the third component c 43 (sum of the third components) of the vector c 4 to the computing device 1200 and also sends the fourth component c 54 (sum of the fourth components) of the vector c 5 to the computing device 1000. Receive from. In this process, since the arithmetic device that records the vector c 1 and the vector c 5 is the same, the first operation of the vector c 1 from the arithmetic device that records the vector c 1 to the arithmetic device that records the vector c 5 is performed. 5 transmission components c 15 is not performed.

第10の処理では、以下の処理を並列に行う。演算装置1000は、受信したベクトルcの第1成分c21(第1成分の合計)を、ベクトルcの第1成分c11として記録する。さらに、演算装置1000は、ベクトルcの第5成分c15(第5成分の合計)を、ベクトルcの第5成分c55として記録する。演算装置1100は、受信したベクトルcの第2成分c32(第2成分の合計)を、ベクトルcの第2成分c22として記録する。演算装置1200は、受信したベクトルcの第3成分c43(第3成分の合計)を、ベクトルcの第3成分c33として記録する。演算装置1300は、受信したベクトルcの第4成分c14(第1成分の合計)を、ベクトルcの第4成分c44として記録する。
第11の処理から第16の処理は、第9の処理と第10の処理の繰り返しである。この繰り返しによって、各成分の合計はすべての演算装置に分配される。
In the tenth process, the following processes are performed in parallel. Computing device 1000, the first component c 21 of the vector c 2 received (sum of the first component), is recorded as a first component c 11 of the vector c 1. Additionally, computing device 1000, a fifth component c 15 of the vector c 1 (total of the fifth component) is recorded as a fifth component c 55 of the vector c 5. Computing device 1100, the second component c 32 of the vector c 3 received (total of the second component) is recorded as the second component c 22 of the vector c 2. Arithmetic unit 1200, a third component c 43 of the vector c 4 has been received (total of the third component) is recorded as a third component c 33 of the vector c 3. Arithmetic unit 1300, a fourth component c 14 of the vector c 1 received (sum of the first component), is recorded as a fourth component c 44 of the vector c 4.
The eleventh to sixteenth processes are repetitions of the ninth process and the tenth process. By repeating this, the sum of each component is distributed to all the arithmetic units.

演算方法
図12は、I個の演算装置でN個のK次元のベクトルの和を求める並列演算システムの処理フローを示す図である。ただし、Iは2以上N以下の整数とする。
各演算装置が、演算の対象となるK次元のベクトルc(nは1からNの整数)の中の1つまたは複数を当該演算装置の記録部のベクトル記録手段に記録する(S115)。また、各演算装置が、τに0を代入し、τ記録手段に記録しておく(S120)。
Arithmetic Method FIG. 12 is a diagram showing a processing flow of a parallel arithmetic system for obtaining the sum of N K-dimensional vectors with I arithmetic devices. However, I is an integer of 2 or more and N or less.
Each arithmetic device records one or a plurality of K-dimensional vectors c n (n is an integer from 1 to N) to be calculated in the vector recording means of the recording unit of the arithmetic device (S115). Each arithmetic unit substitutes 0 for τ and records it in the τ recording means (S120).

ベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcの第n成分を取り出し、(2)当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置に送信する(S135)。ベクトルcを記録部に有する演算装置が、当該演算装置とベクトルcを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置から受信する(S145)。なお、τ=0のときのステップS135とS145が図11の第1の処理、τ=1のときのステップS135とS145が図11の第3の処理、τ=2のときのステップS135とS145が図11の第5の処理、τ=3のときのステップS135とS145が図11の第7の処理、τ=4のときのステップS135とS145が図11の第9の処理、τ=5のときのステップS135とS145が図11の第11の処理、τ=6のときのステップS135とS145が図11の第13の処理、τ=7のときのステップS135とS145が図11の第15の処理に該当する。 Each arithmetic device having the vector c p (p is (n−1−τ (mod N)) + 1) in the recording unit (1) extracts the n-th component of the vector c p from the recording unit of the arithmetic device, and ( 2) When the arithmetic unit and the vector c q (q is p−1, where q = N when p = 1) are different from the arithmetic unit having the recording unit, the vector c p is used using the communication unit. Are transmitted to the arithmetic unit having the vector c q in the recording unit (S135). Computing device having a vector c q in the recording unit, if the computing device including the arithmetic unit and the vector c p to the recording portion are different, the first n components of the vector c p using the communication unit, the vector c p Is received from the arithmetic unit having the recording unit (S145). Steps S135 and S145 when τ = 0 are the first processing of FIG. 11, steps S135 and S145 when τ = 1 are the third processing of FIG. 11, and steps S135 and S145 when τ = 2. Is the fifth process of FIG. 11, steps S135 and S145 when τ = 3 are the seventh process of FIG. 11, steps S135 and S145 when τ = 4 are the ninth process of FIG. 11, τ = 5 Steps S135 and S145 in FIG. 11 are the eleventh processing of FIG. 11, Steps S135 and S145 when τ = 6 are the thirteenth processing of FIG. 11, and Steps S135 and S145 when τ = 7 are the This corresponds to 15 processes.

ベクトルcを記録部に有する各演算装置が、(1)τ≦N−2の場合は、当該演算装置の記録部からベクトルcの第n成分を取り出し、当該演算装置の計算部で、ベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部に記録し、(2)τ>N−2の場合は、ベクトルcの第n成分を、ベクトルcの第n成分として記録部に記録する(S155)。なお、τ=0のときのステップS155が図11の第2の処理、τ=1のときのステップS155が図11の第4の処理、τ=2のときのステップS155が図11の第6の処理、τ=3のときのステップS155が図11の第8の処理、τ=4のときのステップS155が図11の第10の処理、τ=5のときのステップS155が図11の第12の処理、τ=6のときのステップS155が図11の第14の処理、τ=7のときのステップS155が図11の第16の処理に該当する。 When each computing device having the vector c q in the recording unit is (1) τ ≦ N−2, the n-th component of the vector c q is taken out from the recording unit of the computing device, and the computing unit of the computing device The sum of the vector c p and the n-th component is obtained, and the result is recorded in the recording unit as the n-th component of the vector c q . (2) If τ> N−2, the n-th component of the vector c p is recorded in the recording unit as the n components of the vector c q (S155). Note that step S155 when τ = 0 is the second process in FIG. 11, step S155 when τ = 1 is the fourth process in FIG. 11, and step S155 when τ = 2 is the sixth process in FIG. Step S155 when τ = 3 is the eighth processing of FIG. 11, Step S155 when τ = 4 is the tenth processing of FIG. 11, and Step S155 when τ = 5 is the step of FIG. 12, step S155 when τ = 6 corresponds to the fourteenth processing of FIG. 11, and step S155 when τ = 7 corresponds to the sixteenth processing of FIG.

各演算装置は、τにτ+1を代入して記録部に記録する(S160)。各演算装置は、τが2N−3以下の場合はステップS130に戻り、2N−3より大きい場合は処理を終了する(S170)。図11の場合は、2N−3=7なので、τ=7(第16の処理)までで繰り返し処理は終了する。
このように処理するので、1組のN個のK次元のベクトルの和をN個の演算装置で行う場合、最大で2{K/N}(N−1)回の通信で、情報の収集と結果の分配が実現できる。また、データはリング状かつ片方向に送られるため、N個の片方向の通信路(リング状)を有するネットワークを備えればよい。
Each arithmetic device substitutes τ + 1 for τ and records it in the recording unit (S160). Each arithmetic device returns to step S130 if τ is 2N−3 or less, and ends the process if larger than 2N−3 (S170). In the case of FIG. 11, since 2N−3 = 7, the iterative process is completed up to τ = 7 (sixteenth process).
Since processing is performed in this way, when the sum of a set of N K-dimensional vectors is performed by N arithmetic devices, information is collected with a maximum of 2 {K / N} (N-1) communications. And distribution of results. Moreover, since data is sent in a ring shape and in one direction, a network having N unidirectional communication paths (ring shapes) may be provided.

本変形例では、ベクトルcを記録部に有する各演算装置が、ベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置に情報を送った。また、第1実施形態でも、情報を降順(演算装置の番号が小さくなる方向)に送った。しかし、ベクトルcを記録部に有する各演算装置が、ベクトルc(qはp+1。ただし、p=Nのときはr=1)を記録部に有する演算装置(昇順)に情報を送ってもよい。また、番号の付け方を逆(n番目をN−n番目に変更)にすれば、物理的な送受信の方向を逆にできる。つまり、番号の付け方は、単に人があらかじめ定めるだけなので、q=p−1としてもq=p+1としても実質的に等価である。本明細書では、特に明記しない限り、装置やベクトルなどの順番とは、降順と昇順の両方を含んでいるものとする。 In this modification, each arithmetic unit having a vector c p to the recording unit, the vector c q (p-1 is q. However, when the p = 1 q = N) information to the processing unit having a recording unit sent. Also in the first embodiment, the information is sent in descending order (the direction in which the arithmetic unit number decreases). However, each arithmetic device having the vector c p in the recording unit sends information to the arithmetic device (ascending order) having the vector c q (q is p + 1, where r = 1 when p = N) in the recording unit. Also good. If the numbering method is reversed (n-th is changed to N-n-th), the physical transmission / reception direction can be reversed. In other words, since the numbering method is simply determined in advance by a person, both q = p−1 and q = p + 1 are substantially equivalent. In this specification, unless otherwise specified, the order of devices and vectors includes both descending and ascending order.

なお、1つの演算装置に複数のベクトルが記録されている場合には、先に演算装置内のベクトルの和を求め、1つのベクトルとする方が処理の回数が少なくなる。しかし、N個のK次元ベクトルの和をM組並列に(同時に)演算するような場合に、組ごとに計算方法が異なると煩雑となるため、本変形例の方法も有効である。また、本変形例は各演算装置に1つずつベクトルを記録しておく場合にも適用できるので、本変形例の方法の方が、第1実施形態の用法よりも適用できる範囲は広い。   When a plurality of vectors are recorded in one arithmetic device, the number of processes is reduced when the sum of the vectors in the arithmetic device is first obtained and set as one vector. However, in the case where the sum of N K-dimensional vectors is calculated in parallel (simultaneously) in M sets, it becomes complicated if the calculation method is different for each set. Therefore, the method of this modification is also effective. In addition, since the present modification can be applied to the case where one vector is recorded in each arithmetic device, the method of the present modification has a wider range of application than the usage of the first embodiment.

[変形例2]
第1実施形態、変形例1では、収集も分配も、情報の流れは同じ方向であった。しかし、収集での情報の流れと分配での情報の流れを逆向きにしてもよい。
原理
図13に、図4の並列演算システムを用いて4個の4次元ベクトルの和を求める方法の原理を示す。あらかじめ、演算装置1000がベクトルcを、演算装置1100がベクトルcを、演算装置1200がベクトルcを、演算装置1300がベクトルcを記録している。第6の処理までは、図6に示した原理と同じである。第7の処理から情報の流れを逆にしている。
演算方法
図12を用いて処理フローを説明する。本変形例では、τ≦N−2までは変形例1と同じ処理フローであり、以下のようになる。
[Modification 2]
In the first embodiment and the first modification, the flow of information is the same in both collection and distribution. However, the information flow in collection and the information flow in distribution may be reversed.
Principle FIG. 13 shows the principle of a method for obtaining the sum of four four-dimensional vectors using the parallel computing system of FIG. In advance, the arithmetic device 1000 records the vector c 1 , the arithmetic device 1100 records the vector c 2 , the arithmetic device 1200 records the vector c 3 , and the arithmetic device 1300 records the vector c 4 . The principle up to the sixth process is the same as that shown in FIG. The flow of information is reversed from the seventh process.
Calculation Method The processing flow will be described with reference to FIG. In this modification, up to τ ≦ N−2 is the same processing flow as that in Modification 1, and is as follows.

τ≦N−2の場合には、ベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcの第n成分を取り出し、(2)当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置に送信する(S135’)。ベクトルcを記録部に有する演算装置が、当該演算装置とベクトルcを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置から受信する(S145’)。ベクトルcを記録部に有する各演算装置が、当該演算装置の記録部からベクトルcの第n成分を取り出し、当該演算装置の計算部で、ベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部に記録する(S155’)。
τ>N−2の場合には、 ベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcの第n成分を取り出し、(2)当該演算装置とベクトルc(rはp+1。ただし、p=Nのときはr=1)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置に送信する(S135’)。ベクトルcを記録部に有する演算装置が、当該演算装置とベクトルcを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置から受信する(S145’)。ベクトルcを記録部に有する各演算装置が、ベクトルcの第n成分を、ベクトルcの第n成分として記録部に記録する(S155’)。
この後の処理も、変形例1と同じである。
In the case of τ ≦ N−2, each arithmetic device having the vector c p (p is (n−1−τ (mod N)) + 1) in the recording unit is (1) a vector from the recording unit of the arithmetic device. When the n-th component of c p is extracted, and (2) the arithmetic device is different from the arithmetic device having the vector c q (q is p−1, where q = N when p = 1) in the recording unit. Transmits the n-th component of the vector c p to the arithmetic unit having the vector c q in the recording unit using the communication unit (S135 ′). Computing device having a vector c q in the recording unit, if the computing device including the arithmetic unit and the vector c p to the recording portion are different, the first n components of the vector c p using the communication unit, the vector c p Is received from the arithmetic unit having the recording unit (S145 ′). Each arithmetic device having the vector c q in the recording unit extracts the n-th component of the vector c q from the recording unit of the arithmetic device, and the calculation unit of the arithmetic device obtains the sum of the vector c p and the n-th component. The result is recorded in the recording unit as the n-th component of the vector c q (S155 ′).
In the case of τ> N−2, each arithmetic unit having the vector c p (p is (n−1−τ (mod N)) + 1) in the recording unit is (1) a vector from the recording unit of the arithmetic unit. When the n-th component of c p is extracted, and (2) the arithmetic unit is different from the arithmetic unit having the vector c r (r is p + 1, where r = 1 when p = N) in the recording unit, the first n components of the vector c p using the communication unit, and transmits to the processing unit having a vector c r in the recording unit (S135 '). Computing device having a vector c r in the recording unit, if the computing device including the arithmetic unit and the vector c p to the recording portion are different, the first n components of the vector c p using the communication unit, the vector c p Is received from the arithmetic unit having the recording unit (S145 ′). Each arithmetic unit having a vector c r in the recording section, the n-th component of the vector c p, is recorded in the recording unit as the n components of the vector c r (S155 ').
The subsequent processing is the same as that of the first modification.

このように処理するので、1組のN個のK次元のベクトルの和をN個の演算装置で行う場合、最大で2{K/N}(N−1)回の通信で、情報の収集と結果の分配が実現できる。また、データはリング状かつ双方向に送られるため、N個の半二重の通信路(リング状)を有するネットワークを備えればよい。   Since processing is performed in this way, when a set of N K-dimensional vectors is summed by N computing devices, information is collected with a maximum of 2 {K / N} (N-1) communications. And distribution of results. Further, since data is transmitted in a ring shape and in both directions, a network having N half-duplex communication paths (ring shape) may be provided.

[変形例3]
第1実施形態、変形例1、変形例2では、ベクトルの各成分の情報の収集と分配を行ったが、収集するだけでも、各成分の合計値はいずれかの演算装置に記録されている。したがって、τ≦N−2までの収集の処理までで処理フローを終了させる方法もありうる。
[Modification 3]
In the first embodiment, the first modification, and the second modification, the information of each component of the vector is collected and distributed, but the total value of each component is recorded in one of the arithmetic devices even by collecting the information. . Therefore, there may be a method of terminating the processing flow until the collection processing up to τ ≦ N−2.

[第2実施形態]
本実施形態では、まず、I個の演算装置(Iは2以上の整数)を用いて、M行N列の行列A(Mは2以上の整数、Nは2以上の整数、かつMN≧I)とN行K列の行列B(Kは2以上の整数)との積ABを求める方法を示す。次に積ABにさらに行列Aの転置行列Aを乗算する方法を示す。
原理1
図14に4行4列の行列Aと4行4列の行列Bとの積を求める場合、および行列Aの転置行列Aを乗算する場合の原理を示す。図14(A)の内容を説明する。行列Aのm行n列の成分をamn、行列Bのm行n列の成分をbmnとすると、積ABのm行n列の成分は、am11n+am22n+am33n+am44nとなる。行列の積を求める並列演算システムが、行列Aの成分amnごとに演算する演算装置を決めるとする。このような並列演算システムでは、例えば、積a1111は、成分a11の演算を行う演算装置(言い換えると、記録部に成分a11を有する演算装置)が計算する。この演算装置は、積a1112、積a1113、積a1114の計算も行うので、これらの結果を成分とする4次元ベクトル(a1111,a1112,a1113,a1114)を記録部に記録することとなる。積ABの1行目を構成する4次元ベクトルは、成分a11の演算を行う演算装置の結果(a1111,a1112,a1113,a1114)、成分a12の演算を行う演算装置の結果(a1221,a1222,a1223,a1224)、成分a13の演算を行う演算装置の結果(a1331,a1332,a1333,a1334)、成分a14の演算を行う演算装置の結果(a1441,a1442,a1443,a1444)の和である。
[Second Embodiment]
In this embodiment, first, by using I computing devices (I is an integer of 2 or more), an M-row N-column matrix A (M is an integer of 2 or more, N is an integer of 2 or more, and MN ≧ I) ) And a matrix B of N rows and K columns (K is an integer of 2 or more). Next, a method of multiplying the product AB by the transposed matrix AT of the matrix A will be described.
Principle 1
FIG. 14 shows the principle for obtaining the product of the matrix A of 4 rows and 4 columns and the matrix B of 4 rows and 4 columns and for multiplying the transposed matrix AT of the matrix A. The contents of FIG. 14A will be described. When the component of m rows and n columns of matrix A is a mn and the component of m rows and n columns of matrix B is b mn , the components of m rows and n columns of product AB are a m1 b 1n + a m2 b 2n + a m3 b 3n + a m4 b 4n . It is assumed that a parallel operation system for obtaining a matrix product determines an arithmetic device that performs an operation for each component a mn of the matrix A. In such a parallel arithmetic system, for example, the product a 11 b 11 is calculated by an arithmetic device that performs an operation on the component a 11 (in other words, an arithmetic device having the component a 11 in the recording unit). Since this arithmetic unit also calculates the product a 11 b 12 , the product a 11 b 13 , and the product a 11 b 14 , a four-dimensional vector (a 11 b 11 , a 11 b 12 , a having these results as components). 11 b 13 , a 11 b 14 ) are recorded in the recording unit. The four-dimensional vector constituting the first row of the product AB is the result (a 11 b 11 , a 11 b 12 , a 11 b 13 , a 11 b 14 ), the component a 12 , which calculates the component a 11. the result of the operation unit for performing operations (a 12 b 21, a 12 b 22, a 12 b 23, a 12 b 24), the result of the arithmetic unit for performing arithmetic components a 13 (a 13 b 31, a 13 b 32 , a 13 b 33 , a 13 b 34 ) and the result (a 14 b 41 , a 14 b 42 , a 14 b 43 , a 14 b 44 ) of the arithmetic unit that performs the calculation of the component a 14 .

つまり、図14(B)に示すように、cmn=(amnn1,amnn2,amnn3,amnn4)とすれば、積ABのm行目を構成するベクトルは、cm1+cm2+cm3+cm4となる。また、第1実施形態のベクトルの和を求める並列演算方法を用いれば、積ABの演算が終了した時には、成分amnの演算を行う演算装置(成分amnを記録部に有する演算装置)は、cm1+cm2+cm3+cm4の計算結果を記録している。なお、このような行列の計算では、各行でcm1+cm2+cm3+cm4の計算を行うので、N個のK次元ベクトルの和をM組並列に計算することになる。 That is, as shown in FIG. 14B, if c mn = (a mn b n1 , a mn b n2 , a mn b n3 , a mn b n4 ), the vector constituting the m-th row of the product AB Becomes c m1 + c m2 + c m3 + c m4 . Further, by using the parallel calculation method for obtaining the vector sum of the first embodiment, when the operation of the product AB has been completed, (computing device having components a mn in the recording unit) arithmetic unit for performing arithmetic component a mn is , C m1 + c m2 + c m3 + c m4 are recorded. In such a matrix calculation, since the calculation of c m1 + c m2 + c m3 + c m4 is performed in each row, the sum of N K-dimensional vectors is calculated in parallel.

図14(C)は、転置行列Aを乗算する場合の原理を示す。行列Aのm行n列の成分amnが転置行列Aのn行m列の成分となる。そこで、転置行列Aの演算では、行列Aのm行n列の成分amnの演算を行った演算装置が、転置行列Aのn行m列の成分の演算を行う。この場合、転置行列Aのn行m列の成分の演算を行う演算装置には、積ABのm行の各成分の情報が必要である。ところが、積ABのm行の各成分の情報とは、cm1+cm2+cm3+cm4の計算結果のことである。つまり、転置行列Aの演算のためにデータを通信する必要はない。
原理2
図15に、3行4列の行列Aと4行2列の行列Bとの積を求める場合、および行列Aの転置行列Aを乗算する場合の原理を示す。この場合も考え方は原理1と同じである。この場合は、積ABのm行目は、4個の2次元ベクトルcmn=(amnn1,amnn2)の和となる。
原理3
図16に、4行2列の行列Aと2行4列の行列Bとの積を求める場合、および行列Aの転置行列Aを乗算する場合の原理を示す。この場合も考え方は原理1と同じである。この場合は、積ABのm行目は、2個の4次元ベクトルcmn=(amnn1,amnn2,amnn3,amnn4)の和となる。
FIG. 14C illustrates the principle when multiplying the transposed matrix AT . The component a mn of the matrix A with m rows and n columns becomes the component with n rows and m columns of the transposed matrix AT . Therefore, in the computation of the transposed matrix AT, the computing device that has computed the m-by-n component a mn of the matrix A computes the n-by-m component of the transposed matrix AT . In this case, the arithmetic unit that performs the operation of the n rows and m columns of the transposed matrix AT needs information on each component of the m rows of the product AB. However, the components of the information m rows of product AB, is that the calculation result of c m1 + c m2 + c m3 + c m4. That is, there is no need to communicate data for the computation of the transposed matrix AT .
Principle 2
FIG. 15 shows the principle for obtaining the product of the matrix A of 3 rows and 4 columns and the matrix B of 4 rows and 2 columns and for multiplying the transposed matrix AT of the matrix A. In this case, the idea is the same as in Principle 1. In this case, the m-th row of the product AB is the sum of four two-dimensional vectors c mn = (a mn b n1 , a mn b n2 ).
Principle 3
FIG. 16 shows the principle for obtaining the product of the matrix A of 4 rows and 2 columns and the matrix B of 2 rows and 4 columns and for multiplying the transposed matrix AT of the matrix A. In this case, the idea is the same as in Principle 1. In this case, the m-th row of the product AB is the sum of two four-dimensional vectors c mn = (a mn b n1 , a mn b n2 , a mn b n3 , a mn b n4 ).

演算方法1
図17に、I個の演算装置を用いて、M行N列の行列AとN行K列の行列Bとの積ABを求める場合の、1つの演算装置の機能構成例を示す。並列演算システムの構成は図4と同じである。また、図18に、I個の演算装置を用いて、M行N列の行列AとN行K列の行列Bとの積ABを求める場合の処理フローを示す。
Calculation method 1
FIG. 17 shows an example of the functional configuration of one arithmetic device when the product AB of the matrix A of M rows and N columns and the matrix B of N rows and K columns is obtained using I arithmetic devices. The configuration of the parallel computing system is the same as that in FIG. FIG. 18 shows a processing flow in the case where the product AB of the matrix A of M rows and N columns and the matrix B of N rows and K columns is obtained using I arithmetic devices.

演算装置2000は、計算部2010、記録部2020、通信部2030から構成される。計算部2010は、τ増加手段2001、繰り返し手段2002、成分計算手段2011、演算結果記録手段2012を備える。なお、τ増加手段2001と繰り返し手段2002は、計算部2010以外の構成部(たとえば、図示していないが制御部などの構成部が考えられる。)が備えてもよい。記録部2020は、成分記録手段2021、ベクトル記録手段2022、τ記録手段2023を有する。通信部2030は、送信手段2031と受信手段2032とを有する。なお、他の演算装置も同じ機能構成である。   The arithmetic device 2000 includes a calculation unit 2010, a recording unit 2020, and a communication unit 2030. The calculation unit 2010 includes a τ increasing unit 2001, a repeating unit 2002, a component calculating unit 2011, and an operation result recording unit 2012. Note that the τ increasing unit 2001 and the repeating unit 2002 may be provided in a configuration unit other than the calculation unit 2010 (for example, a configuration unit such as a control unit is not shown). The recording unit 2020 includes a component recording unit 2021, a vector recording unit 2022, and a τ recording unit 2023. The communication unit 2030 includes a transmission unit 2031 and a reception unit 2032. The other arithmetic units have the same functional configuration.

あらかじめ、行列AのMN個の成分amnをI個のグループに分けておき、各演算装置(2000など)が、i番目のグループのすべての成分amnと、当該成分に乗算する行列Bの成分bn1〜bnKとを記録部(2020など)の成分記録手段(2021など)に記録する(S210)。次に、各演算装置(2000など)が、(1)記録部(2020など)の成分記録手段(2021など)に記録された成分amnのそれぞれについて、計算部でamnn1〜amnnKを計算し、(2)結果をK次元のベクトルcmn=(cmn1,cmn2,…,cmnK)=(amnn1,amnn2,…,amnnK)として記録部(2020など)のベクトル記録手段(2022など)に記録する(S215)。各演算装置(2000など)が、記録部(2020)のτ記録手段(2023など)にτ=0を記録する(S220)。 The MN components a mn of the matrix A are divided into I groups in advance, and each arithmetic device (2000, etc.) uses all the components a mn of the i-th group and the matrix B to be multiplied by the components. The components b n1 to b nK are recorded in the component recording means (2021, etc.) of the recording unit (2020, etc.) (S210). Next, the processing unit (such as 2000) is, (1) for each of the components a mn recorded in the component record unit (such as 2021) of the recording unit (such as 2020), the calculation unit a mn b n1 ~a mn the b nK calculated, (2) results of the K-dimensional vector c mn = (c mn1, c mn2, ..., c mnK) = (a mn b n1, a mn b n2, ..., a mn b nK) as Recording is performed on the vector recording means (2022, etc.) of the recording unit (2020, etc.) (S215). Each arithmetic device (2000 or the like) records τ = 0 in the τ recording means (2023 or the like) of the recording unit (2020) (S220).

ベクトルcmp(mは1からM、pは(n−1−τ(mod N))+1)を記録部(2020など)のベクトル記録手段(2022など)に有する各演算装置(2000など)が、(1)記録部(2020など)のベクトル記録手段(2022など)からベクトルcmpの第n成分を取り出し、(2)当該演算装置とベクトルcmq(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合(同じ演算装置がベクトルcmpとベクトルcmqとを記録していない場合)には、通信部(2030など)の送信手段(2031など)を用いてベクトルcmpの第n成分を、ベクトルcmqを記録部に有する演算装置に送信する(S230)。ベクトルcmqを記録部に有する各演算装置(2000など)が、当該演算装置とベクトルcmpを記録部に有する演算装置とが異なる場合には、通信部(2030など)の受信手段(2032など)を用いてベクトルcmpの第n成分を、ベクトルcmpを記録部に有する演算装置からそれぞれ受信する(S240)。 Each arithmetic unit (2000, etc.) having the vector c mp (m is 1 to M, p is (n-1-τ (mod N)) + 1) in the vector recording means (2022, etc.) of the recording unit (2020, etc.) (1) The nth component of the vector mp is taken out from the vector recording means (2022 etc.) of the recording unit (2020 etc.), and (2) the arithmetic unit and the vector cmq (q is p-1 where p = In the case where the arithmetic unit having q = N in the recording unit is different (when the same arithmetic unit does not record the vector mp and the vector cmq ), the transmission of the communication unit (2030, etc.) Using means (2031 etc.), the nth component of the vector mp is transmitted to the arithmetic unit having the vector c mq in the recording unit (S230). When each arithmetic device (such as 2000) having the vector c mq in the recording unit is different from the arithmetic device having the vector mp in the recording unit, the receiving unit (such as 2032) of the communication unit (such as 2030) the first n components of the vector c mp using), respectively receive from the computing device having the vector c mp in the recording unit (S240).

ベクトルcmqを記録部に有する各演算装置(2000など)が、(1)τ≦N−2の場合は、当該演算装置の記録部(2020など)のベクトル記録手段(2022など)からベクトルcmqの第n成分を取り出し、当該演算装置の計算部(2010など)の演算結果記録手段(2012など)で、ベクトルcmpの第n成分との和を求め、結果をベクトルcmqの第n成分として記録部(2020など)のベクトル記録手段(2022など)に記録し、(2)τ>N−2の場合は、ベクトルcmpの第n成分を、ベクトルcmqの第n成分として記録部(2020など)のベクトル記録手段(2022など)に記録する(S250)。 When each arithmetic device (2000, etc.) having the vector c mq in the recording unit is (1) when τ ≦ N−2, the vector recording means (2022, etc.) of the recording unit (2020, etc.) of the arithmetic device The n-th component of mq is taken out, and the operation result recording means (2012, etc.) of the calculation unit (2010, etc.) of the arithmetic unit calculates the sum with the n-th component of vector mp , and the result is the n-th of vector c mq As a component, it is recorded in the vector recording means (2022, etc.) of the recording unit (2020, etc.). When (2) τ> N−2, the n-th component of the vector mp is recorded as the n-th component of the vector c mq Is recorded in the vector recording means (2022, etc.) of the part (2020, etc.) (S250).

各演算装置(2000など)が、τにτ+1を代入して記録部(2020など)のτ記録手段(2023など)に記録する(S260)。各演算装置(2000など)の折り返し手段(2002など)が、τが2N−3以下の場合は処理フローをステップS230に戻し、それ以外の場合は処理を終了する(S270)。
このような処理によるので、ベクトルの和を求める並列演算と同様に、行列と行列の積を求める並列演算を、通信回数と通信路を少なくしながら実現できる。
Each arithmetic device (2000 or the like) substitutes τ + 1 for τ and records it in the τ recording means (2023 or the like) of the recording unit (2020 or the like) (S260). When the wrapping means (such as 2002) of each arithmetic device (such as 2000) returns τ to 2230 when the τ is 2N−3 or less, the process flow is terminated otherwise (S270).
Due to such processing, parallel operation for obtaining the product of a matrix and a matrix can be realized while reducing the number of communication times and the communication path, as in the parallel operation for obtaining the sum of vectors.

演算方法2
図19に、I個の演算装置を用いて、M行N列の行列AとN行K列の行列Bとの積AABを求める場合の、1つの演算装置の機能構成例を示す。並列演算システムの構成は図4と同じである。また、図20に、I個の演算装置を用いて、M行N列の行列AとN行K列の行列Bとの積AABを求める場合の処理フローを示す。
Calculation method 2
FIG. 19 shows an example of the functional configuration of one arithmetic device when the product A T AB of the matrix A of M rows and N columns and the matrix B of N rows and K columns is obtained using I arithmetic devices. The configuration of the parallel computing system is the same as that in FIG. FIG. 20 shows a processing flow in the case where the product A T AB of the matrix A with M rows and N columns and the matrix B with N rows and K columns is obtained using I arithmetic devices.

演算装置3000は、計算部3010、記録部3020、通信部3030から構成される。計算部3010は、τ増加手段2001、繰り返し手段2002、成分計算手段2011、演算結果記録手段2012、Aτ増加手段3006、A繰り返し手段3007、A成分計算手段3016、A演算結果記録手段3017を備える。なお、τ増加手段2001、繰り返し手段2002、Aτ増加手段3006、A繰り返し手段3007は、計算部3010以外の構成部(たとえば、図示していないが制御部などの構成部が考えられる。)が備えてもよい。記録部3020は、成分記録手段2021、ベクトル記録手段2022、τ記録手段2023、Aベクトル記録手段3022、Aτ記録手段3023を有する。通信部3030は、送信手段2031、受信手段2032、A送信手段3036、A受信手段3037を有する。なお、他の演算装置も同じ機能構成である。
ステップS210からS270までの処理は、図18の演算方法1と同じである。
The arithmetic device 3000 includes a calculation unit 3010, a recording unit 3020, and a communication unit 3030. The calculation unit 3010 includes a τ increasing unit 2001, a repeating unit 2002, a component calculating unit 2011, an operation result recording unit 2012, an AT τ increasing unit 3006, an AT repeating unit 3007, an AT component calculating unit 3016, and an AT operation result recording. Means 3017 are provided. Note that the τ increasing means 2001, the repeating means 2002, the AT τ increasing means 3006, and the AT repeating means 3007 may be constituent parts other than the calculating part 3010 (for example, constituent parts such as a control part although not shown). ) May be provided. The recording unit 3020 includes component recording means 2021, vector recording means 2022, τ recording means 2023, AT vector recording means 3022, and AT τ recording means 3023. The communication unit 3030 includes a transmission unit 2031, a reception unit 2032, an AT transmission unit 3036, and an AT reception unit 3037. The other arithmetic units have the same functional configuration.
The processing from step S210 to S270 is the same as the calculation method 1 in FIG.

各演算装置(3000など)が、(1)記録部(3020など)のベクトル記録手段(2022など)に記録された成分amnのそれぞれについて、計算部(3010など)のA成分計算手段(3016など)でamnm1〜amnmKを計算し、(2)結果をK次元のベクトルbnm=(bnm1,bnm2,…,bnmK)=(amnm1,amnm2,…,amnmK)として記録部(3020など)のAベクトル記録手段(3027など)に記録する(S315)。各演算装置(3000など)が、記録部(3020)のAτ記録手段(3028など)にτ=0を記録する(S320)。なお、Aτ記録手段(3028など)は、τ記録手段(2023など)と同じでも良い。 Each arithmetic unit (3000, etc.) (1) for each component a mn recorded in the vector recording means (2022, etc.) of the recording unit (3020, etc.), the AT component calculation means (3030, etc.) of the calculation unit (3010, etc.) A mn c m1 to a mn c mK in (3016, etc.), and (2) the result is obtained as a K-dimensional vector b nm = (b nm1 , b nm2 ,..., B nmK ) = (a mn c m1 , a mn c m2 ,..., a mn c mK ) are recorded in the AT vector recording means (3027, etc.) of the recording unit (3020, etc.) (S315). Each arithmetic unit (such as 3000) records τ = 0 in the A T τ recording unit (such as 3028) of the recording unit (3020) (S320). The A T τ recording means (3028, etc.) may be the same as the τ recording means (2023, etc.).

ベクトルbnp(nは1からN、pは(n−1−τ(mod M)+1)を記録部に有する各演算装置(3000など)が、(1)記録部(3020など)のAベクトル記録手段(3027など)からベクトルbnpの第n成分を取り出し、(2)当該演算装置とベクトルbnq(qはp−1。ただし、p=1のときはq=M)を記録部に有する演算装置とが異なる場合には、通信部(3030など)のA送信手段(3036など)を用いてベクトルbnpの第n成分を、ベクトルbnqを記録部に有する演算装置に送信する(S330)。ベクトルbnqを記録部に有する各演算装置(3000など)が、当該演算装置とベクトルbnpを記録部に有する演算装置とが異なる場合には、通信部(3030など)のA受信手段(3037など)を用いてベクトルbnpの第n成分を、ベクトルbnpを記録部に有する演算装置からそれぞれ受信する(S340)。なお、A送信手段(3036など)は送信手段(2031など)と同じでもよく、A受信手段(3037など)は受信手段(2032など)と同じでも良い。 Each arithmetic unit (such as 3000) having a vector b np (n is 1 to N, p is (n−1−τ (mod M) +1) in the recording unit) is (1) AT of the recording unit (3020 or the like). The n-th component of the vector b np is extracted from the vector recording means (3027, etc.), and (2) the arithmetic unit and the vector b nq (q is p-1, where q = 1 when p = 1) are recorded If the processing device is different from the arithmetic device, the AT transmission means (3036, etc.) of the communication unit (3030, etc.) is used to transmit the n-th component of the vector b np and the vector b nq to the arithmetic device having the recording unit. (S330) If each arithmetic unit (such as 3000) having the vector b nq in the recording unit is different from the arithmetic unit having the vector b np in the recording unit, the communication unit (such as 3030) A T reception means ( The n-th component of the vector b np with 037, etc.), respectively receive from the computing device with a vector b np in the recording unit (S340). Incidentally, etc. A T transmitting means (3036) is such transmission means (2031) The AT receiving means (such as 3037) may be the same as the receiving means (such as 2032).

ベクトルbnqを記録部に有する各演算装置(3000など)が、(1)τ≦N−2の場合は、記録部(3020など)のAベクトル記録手段(3027など)からベクトルbnqの第n成分を取り出し、計算部(3010など)のA演算結果記録手段3017で、ベクトルbnpの第n成分との和を求め、結果をベクトルbnqの第n成分として記録部(3020など)のAベクトル記録手段(3027など)に記録し、(2)τ>N−2の場合は、ベクトルbnpの第n成分を、ベクトルbnqの第n成分として記録部(3020など)のAベクトル記録手段(3027など)に記録する(S350)。 When each computing device (such as 3000) having the vector b nq in the recording unit is (1) when τ ≦ N−2, the AT vector recording means (such as 3027) of the recording unit (such as 3020) receives the vector b nq The n-th component is extracted, and the AT calculation result recording means 3017 of the calculation unit (3010, etc.) calculates the sum of the vector b np and the n-th component, and the result is used as the n-th component of the vector b nq . ) In the AT vector recording means (3027, etc.), and when (2) τ> N-2, the recording unit (3020, etc.) uses the n-th component of the vector b np as the n-th component of the vector b nq Are recorded in the AT vector recording means (3027, etc.) (S350).

各演算装置(3000など)が、τにτ+1を代入して記録部(3020など)のAτ記録手段(3028など)に記録する(S360)。各演算装置(3000など)の折り返し手段(3007など)が、τが2N−3以下の場合は処理フローをステップS330に戻し、それ以外の場合は処理を終了する(S370)。
このような処理によるので、ベクトルの和を求める並列演算と同様に、行列と行列の積を求める並列演算を、通信回数と通信路を少なくしながら実現できる。さらに、転置行列Aの演算のためにデータを通信する必要はない。したがって、Block Lanczos法のように、疎行列とその転置行列とを掛ける演算を含む場合には、通信回数を大幅に削減できる。
Each arithmetic unit (such as 3000) substitutes τ + 1 for τ and records it in the A T τ recording means (such as 3028) of the recording unit (such as 3020) (S360). When the return means (3007 or the like) of each arithmetic device (3000 or the like) returns τ to step S330 if τ is 2N−3 or less, the processing is terminated otherwise (S370).
Due to such processing, parallel operation for obtaining the product of a matrix and a matrix can be realized while reducing the number of communication times and the communication path, as in the parallel operation for obtaining the sum of vectors. Furthermore, there is no need to communicate data for the computation of the transpose matrix AT . Therefore, the number of communications can be greatly reduced when the calculation includes multiplication of a sparse matrix and its transposed matrix as in the Block Lanczos method.

演算方法3
さらに、Block Lanczos法のように、疎行列とその行列の転置行列を繰り返し乗算する演算が含まれている演算の例もある。このような場合には、第2実施形態の演算方法2を繰り返すことができる。この場合は、演算装置3000は、図19に点線で示す、AAB計算繰り返し手段3008も備えている。図21に行列とその転置行列との乗算を繰り返す場合の処理フローを示す。ステップS210とS300とは、図20と同じである。本変形例の方法では、図20の処理フローに、繰り返しを判断するステップS270が付加されている。
このような処理によって、さらにBlock Lanczos法のように、疎行列とその転置行列とを掛ける演算を繰り返す場合には、通信回数を大幅に削減できる。
Calculation method 3
In addition, there is an example of an operation including an operation of repeatedly multiplying a sparse matrix and a transposed matrix of the matrix like the Block Lanczos method. In such a case, the calculation method 2 of the second embodiment can be repeated. In this case, the arithmetic unit 3000 also includes an AT AB calculation repetition unit 3008 indicated by a dotted line in FIG. FIG. 21 shows a processing flow when the multiplication of a matrix and its transposed matrix is repeated. Steps S210 and S300 are the same as those in FIG. In the method of this modification, step S270 for determining repetition is added to the processing flow of FIG.
Through such processing, the number of times of communication can be greatly reduced when the operation of multiplying the sparse matrix and its transposed matrix is repeated as in the Block Lanczos method.

なお、上記の実施形態は、図22に示すコンピュータの記録部5020に読み込ませたプログラムによって、制御部5010、記録部5020、通信部5030などに上記方法の各ステップを実行させることができる。また、コンピュータに読み込ませる方法としては、プログラムをコンピュータ読み取り可能な記録媒体に記録しておき、記録媒体からコンピュータに読み込ませる方法、サーバ等に記録されたプログラムを、電気通信回線等を通じてコンピュータに読み込ませる方法などがある。   In the above embodiment, the control unit 5010, the recording unit 5020, the communication unit 5030, and the like can be caused to execute each step of the above method by a program read into the recording unit 5020 of the computer shown in FIG. In addition, as a method of causing the computer to read, the program is recorded on a computer-readable recording medium, and the program recorded on the server or the like is read into the computer through a telecommunication line or the like. There is a method to make it.

本発明は、ベクトルの和を求める演算や行列の積を求める演算を用いる大規模な情報処理システムに利用できる。例えば、暗号を用いたセキュリティシステムの安全性評価システムなどに利用できる。   The present invention can be used for a large-scale information processing system using an operation for obtaining a sum of vectors or an operation for obtaining a product of matrices. For example, it can be used for a safety evaluation system of a security system using encryption.

従来の方法を実現するシステム構成例を示す図。The figure which shows the system configuration example which implement | achieves the conventional method. 従来の情報の収集の様子を示す図。The figure which shows the mode of the collection of the conventional information. 従来の情報の分配の様子を示す図。The figure which shows the mode of the distribution of the conventional information. N個の演算装置(N=4)を用いてK次元のベクトルの和を求める並列演算システムの構成例を示す図。The figure which shows the structural example of the parallel arithmetic system which calculates | requires the sum of a K-dimensional vector using N arithmetic units (N = 4). 演算装置1000の機能構成例を示す図。The figure which shows the function structural example of the arithmetic unit 1000. 並列演算システムを用いて4個の4次元ベクトルの和を求める方法の原理を示す図。The figure which shows the principle of the method of calculating | requiring the sum of four 4-dimensional vectors using a parallel arithmetic system. 並列演算システムを用いて4個の5次元ベクトルの和を求める方法の原理を示す図。The figure which shows the principle of the method of calculating | requiring the sum of four 5-dimensional vectors using a parallel computing system. 並列演算システムを用いて4個の2次元ベクトルの和を求める方法の原理を示す図。The figure which shows the principle of the method of calculating | requiring the sum of four two-dimensional vectors using a parallel arithmetic system. N個の演算装置でN個のN次元のベクトルの和を求める並列演算システムの処理フローを示す図。The figure which shows the processing flow of the parallel arithmetic system which calculates | requires the sum of N N-dimensional vectors with N arithmetic units. N個の演算装置でN個のK次元のベクトルの和を求める並列演算システムの処理フローを示す図。The figure which shows the processing flow of the parallel arithmetic system which calculates | requires the sum of N K-dimensional vectors with N arithmetic units. 並列演算システムを用いて5個の4次元ベクトルの和を求める方法の原理を示す図。The figure which shows the principle of the method of calculating | requiring the sum of five 4-dimensional vectors using a parallel computing system. I個の演算装置でN個のK次元のベクトルの和を求める並列演算システムの処理フローを示す図。The figure which shows the processing flow of the parallel arithmetic system which calculates | requires the sum of N K-dimensional vectors with I arithmetic devices. 並列演算システムを用いて4個の4次元ベクトルの和を求める方法の別の原理を示す図。The figure which shows another principle of the method of calculating | requiring the sum of four 4-dimensional vectors using a parallel computing system. 4行4列の行列Aと4行4列の行列Bとの積を求める場合、および行列Aの転置行列Aを乗算する場合の原理を示す図。The figure which shows the principle in the case of calculating | requiring the product of the matrix A of 4 rows 4 columns, and the matrix B of 4 rows 4 columns, and multiplying the transposed matrix AT of the matrix A. 3行4列の行列Aと4行2列の行列Bとの積を求める場合、および行列Aの転置行列Aを乗算する場合の原理を示す図。The figure which shows the principle in the case of calculating | requiring the product of the matrix A of 3 rows 4 columns, and the matrix B of 4 rows 2 columns, and multiplying the transposed matrix AT of the matrix A. 4行2列の行列Aと2行4列の行列Bとの積を求める場合、および行列Aの転置行列Aを乗算する場合の原理を示す図。The figure which shows the principle in the case of calculating | requiring the product of the matrix A of 4 rows 2 columns and the matrix B of 2 rows 4 columns, and multiplying the transposed matrix AT of the matrix A. I個の演算装置を用いて、M行N列の行列AとN行K列の行列Bとの積ABを求める場合の、1つの演算装置の機能構成例を示す図。The figure which shows the function structural example of one arithmetic unit in the case of calculating | requiring the product AB of the matrix A of M rows and N columns, and the matrix B of N rows and K columns using I arithmetic units. I個の演算装置を用いて、M行N列の行列AとN行K列の行列Bとの積ABを求める場合の処理フローを示す図。The figure which shows the processing flow in the case of calculating | requiring the product AB of the matrix A of M rows and N columns, and the matrix B of N rows and K columns using I arithmetic units. I個の演算装置を用いて、M行N列の行列AとN行K列の行列Bとの積AABを求める場合の、1つの演算装置の機能構成例を示す図。Using I-number of the arithmetic unit, when determining the product A T AB with matrix B of the matrix A and N rows and K columns of M rows and N columns, diagram of a functional configuration example of one operation device. I個の演算装置を用いて、M行N列の行列AとN行K列の行列Bとの積AABを求める場合の処理フローを示す図。Using I-number of the arithmetic unit, illustrates a process flow when determining the product A T AB with matrix B of the matrix A and N rows and K columns of M rows and N columns. 行列とその転置行列との乗算を繰り返す場合の処理フローを示す図。The figure which shows the processing flow in the case of repeating the multiplication with a matrix and its transpose matrix. コンピュータの機能構成例を示す図。The figure which shows the function structural example of a computer.

Claims (17)

計算部と記録部と通信部とを有するN個の演算装置(Nは2以上の整数)を用いてN個のN次元のベクトルの和を求める並列演算方法であって、
各演算装置が、演算の対象となるN次元のベクトルを1つずつ当該演算装置の記録部に記録するベクトル記録ステップと、
各演算装置が、記録部にτ=0を記録する初期設定ステップと、
n番目の演算装置(nは1からNの整数)が、第(n−1+τ(mod N))+1成分を取り出し、通信部の送信手段を用いて(n−2(mod N))+1番目の演算装置に送信する成分送信ステップと、
n番目の演算装置が、通信部の受信手段を用いて第(n+τ(mod N))+1成分をn(mod N))+1番目の演算装置から受信する成分受信ステップと、
n番目の演算装置が、(1)τ≦N−2の場合は、記録部のベクトル記録手段から、第(n+τ(mod N))+1成分を取り出し、受信した第(n+τ(mod N))+1成分との和を求め、結果を第(n+τ(mod N))+1成分として記録部に記録し、(2)τ>N−2の場合は、受信した第(n+τ(mod N))+1成分を第(n+τ(mod N))+1成分として記録部に記録する演算結果記録ステップと、
各演算装置が、τにτ+1を代入して記録部に記録するτ増加ステップと、
各演算装置が、τが2N−3以下の場合は、成分送信ステップに戻る繰り返しステップと、
を有する並列演算方法。
A parallel calculation method for obtaining a sum of N N-dimensional vectors using N calculation devices (N is an integer of 2 or more) having a calculation unit, a recording unit, and a communication unit,
A vector recording step in which each arithmetic device records one-dimensional N-dimensional vectors to be operated one by one in a recording unit of the arithmetic device;
An initial setting step in which each arithmetic unit records τ = 0 in the recording unit;
The nth arithmetic unit (n is an integer from 1 to N) takes out the (n−1 + τ (mod N)) + 1 component and uses the transmission means of the communication unit to (n−2 (mod N)) + 1 A component transmission step for transmitting to the computing device of
a component receiving step in which the nth arithmetic device receives the (n + τ (mod N)) + 1 component from the n (mod N)) + 1 arithmetic device using the receiving means of the communication unit;
When the (n) arithmetic unit is (1) τ ≦ N−2, the (n + τ (mod N)) + 1 component is extracted from the vector recording means of the recording unit, and the received (n + τ (mod N)) The sum with the +1 component is obtained, and the result is recorded in the recording unit as the (n + τ (mod N)) + 1 component. When (2) τ> N−2, the received (n + τ (mod N)) + 1 A calculation result recording step of recording the component as the (n + τ (mod N)) + 1 component in the recording unit;
Each arithmetic device assigns τ + 1 to τ and records it in the recording unit τ increasing step,
When each arithmetic device has τ of 2N−3 or less, a repetition step for returning to the component transmission step;
A parallel operation method having:
計算部と記録部と通信部とを有するN個の演算装置(Nは2以上の整数)を用いてN個のK次元のベクトル(Kは2以上の整数)の和を求める並列演算方法であって、
あらかじめ、ベクトルのK個の成分をN個のグループ(1番目のグループからN番目のグループ)に分けておき、
各演算装置が、演算の対象となるK次元のベクトルを1つずつ当該演算装置の記録部に記録するベクトル記録ステップと、
各演算装置が、記録部にτ=0を記録する初期設定ステップと、
(n−1−τ(mod N))+1番目の各演算装置(nは1からNの整数。)が、(1)当該演算装置の記録部からn番目のグループのベクトルの成分を取り出し、(2)当該演算装置の通信部を用いて(n−2−τ(mod N))+1番目の演算装置に送信する成分送信ステップと、
(n−2−τ(mod N))+1番目の各演算装置が、当該演算装置の通信部を用いてn番目のグループのベクトルの成分を(n−1−τ(mod N))+1番目の演算装置から受信する成分受信ステップと、
(n−2−τ(mod N))+1番目の各演算装置が、(1)τ≦N−2の場合は、当該演算装置の記録部からn番目のグループのベクトルの成分を取り出し、当該演算装置の計算部で、受信したn番目のグループのベクトルの成分との和を求め、結果をn番目のグループのベクトルの成分として記録部に記録し、(2)τ>N−2の場合は、受信したn番目のグループのベクトルの成分を、n番目のグループのベクトルの成分として記録部に記録する演算結果記録ステップと、
各演算装置が、τにτ+1を代入して記録部に記録するτ増加ステップと、
各演算装置が、τが2N−3以下の場合は、成分送信ステップに戻る繰り返しステップと、
を有する並列演算方法。
A parallel operation method for obtaining a sum of N K-dimensional vectors (K is an integer of 2 or more) using N calculation devices (N is an integer of 2 or more) having a calculation unit, a recording unit, and a communication unit. There,
In advance, the K components of the vector are divided into N groups (from the first group to the Nth group),
A vector recording step in which each computing device records one K-dimensional vector to be computed one by one in a recording unit of the computing device;
An initial setting step in which each arithmetic unit records τ = 0 in the recording unit;
(N−1−τ (mod N)) + 1-th arithmetic device (n is an integer from 1 to N) (1) extracts the vector component of the n-th group from the recording unit of the arithmetic device, (2) A component transmission step of transmitting to the (n-2-τ (mod N)) + 1st arithmetic device using the communication unit of the arithmetic device;
Each (n-2-τ (mod N)) + 1st computing device uses the communication unit of the computing device to calculate the nth group of vector components as (n-1-τ (mod N)) + 1st. A component receiving step for receiving from the computing device of
When each (n-2-τ (mod N)) + 1st arithmetic device is (1) τ ≦ N−2, the vector component of the nth group is extracted from the recording unit of the arithmetic device, In the calculation unit of the arithmetic device, the sum of the received vector components of the nth group is obtained, and the result is recorded in the recording unit as the vector component of the nth group. (2) When τ> N−2 A calculation result recording step of recording the received nth group vector component in the recording unit as an nth group vector component;
Each arithmetic device assigns τ + 1 to τ and records it in the recording unit τ increasing step,
When each arithmetic device has τ of 2N−3 or less, a repetition step for returning to the component transmission step;
A parallel operation method having:
計算部と記録部と通信部とを有する複数の演算装置を用いてN個(Nは2以上の整数)のK次元のベクトル(Kは2以上の整数)の和を求める並列演算方法であって、
各演算装置が、演算の対象となるK次元のベクトルc(nは1からNの整数)の中の1つまたは複数を当該演算装置の記録部に記録するベクトル記録ステップと、
各演算装置が、記録部にτ=0を記録する初期設定ステップと、
ベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcの第n成分を取り出し、(2)当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置に送信する成分送信ステップと、
ベクトルcを記録部に有する各演算装置が、当該演算装置とベクトルcを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置からそれぞれ受信する成分受信ステップと、
ベクトルcを記録部に有する各演算装置が、(1)τ≦N−2の場合は、当該演算装置の記録部からベクトルcの第n成分を取り出し、当該演算装置の計算部で、ベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部に記録し、(2)τ>N−2の場合は、ベクトルcの第n成分を、ベクトルcの第n成分として記録部に記録する演算結果記録ステップと、
各演算装置が、τにτ+1を代入して記録部に記録するτ増加ステップと、
各演算装置が、τが2N−3以下の場合は、成分送信ステップに戻る繰り返しステップと、
を有し、ベクトルc(xは、1からNの任意の整数)をベクトルの和とする並列演算方法。
This is a parallel operation method for calculating the sum of N (N is an integer of 2 or more) K-dimensional vectors (K is an integer of 2 or more) using a plurality of arithmetic units having a calculation unit, a recording unit, and a communication unit. And
A vector recording step in which each computing device records one or more of the K-dimensional vectors c n (n is an integer from 1 to N) to be computed in a recording unit of the computing device;
An initial setting step in which each arithmetic unit records τ = 0 in the recording unit;
Each arithmetic device having the vector c p (p is (n−1−τ (mod N)) + 1) in the recording unit (1) extracts the n-th component of the vector c p from the recording unit of the arithmetic device, and ( 2) When the arithmetic unit and the vector c q (q is p−1, where q = N when p = 1) are different from the arithmetic unit having the recording unit, the vector c p is used using the communication unit. A component transmission step of transmitting the n-th component of the vector c q to an arithmetic unit having the vector c q in the recording unit;
When each arithmetic device having the vector c q in the recording unit is different from the arithmetic device having the vector c p in the recording unit, the communication unit is used to determine the nth component of the vector c p as the vector c a component receiving step of receiving p from each of the arithmetic units having the recording unit;
When each computing device having the vector c q in the recording unit is (1) τ ≦ N−2, the n-th component of the vector c q is taken out from the recording unit of the computing device, and the computing unit of the computing device calculates the sum of the first n components of the vector c p, the result is recorded in the recording unit as the n components of the vector c q, a (2) tau> for n-2, the n-th component of the vector c p, A calculation result recording step of recording in the recording unit as the n-th component of the vector c q ;
Each arithmetic device assigns τ + 1 to τ and records it in the recording unit τ increasing step,
When each arithmetic device has τ of 2N−3 or less, a repetition step for returning to the component transmission step;
, And a vector c x (x is an arbitrary integer from 1 to N) is used as a sum of vectors.
計算部と記録部と通信部とを有する複数の演算装置を用いてN個(Nは2以上の整数)のK次元のベクトル(Kは2以上の整数)の和を求める並列演算方法であって、
各演算装置が、演算の対象となるK次元のベクトルc(nは1からNの整数)の中の1つまたは複数を当該演算装置の記録部に記録するベクトル記録ステップと、
各演算装置が、記録部にτ=0を記録する初期設定ステップと、
ベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcの第n成分を取り出し、(2)τ≦N−2のときは、当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置に送信し、(3)τ>N−2のときは、当該演算装置とベクトルc(rはp+1。ただし、p=Nのときはr=1)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置に送信する成分送信ステップと、
・ (1)τ≦N−2の場合は、ベクトルcを記録部に有する各演算装置が、当該演算装置とベクトルcを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置からそれぞれ受信し、(2)τ>N−2の場合は、ベクトルcを記録部に有する各演算装置が、当該演算装置とベクトルcを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置からそれぞれ受信する成分受信ステップと、
(1)τ≦N−2の場合は、ベクトルcを記録部に有する各演算装置が、当該演算装置の記録部からベクトルcの第n成分を取り出し、当該演算装置の計算部で、ベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部に記録し、(2)τ>N−2の場合は、ベクトルcを記録部に有する各演算装置が、ベクトルcの第n成分を、ベクトルcの第n成分として記録部に記録する演算結果記録ステップと、
各演算装置が、τにτ+1を代入して記録部に記録するτ増加ステップと、
各演算装置が、τが2N−3以下の場合は、成分送信ステップに戻る繰り返しステップと、
を有し、ベクトルc(xは、1からNの任意の整数)をベクトルの和とする並列演算方法。
This is a parallel operation method for calculating the sum of N (N is an integer of 2 or more) K-dimensional vectors (K is an integer of 2 or more) using a plurality of arithmetic units having a calculation unit, a recording unit, and a communication unit. And
A vector recording step in which each computing device records one or more of the K-dimensional vectors c n (n is an integer from 1 to N) to be computed in a recording unit of the computing device;
An initial setting step in which each arithmetic unit records τ = 0 in the recording unit;
Each arithmetic device having the vector c p (p is (n−1−τ (mod N)) + 1) in the recording unit (1) extracts the n-th component of the vector c p from the recording unit of the arithmetic device, and ( 2) When τ ≦ N−2, if the arithmetic unit is different from the arithmetic unit having the vector c q (q is p−1, where q = N when p = 1), the first n components of the vector c p using the communication unit, and sends to the processing unit having a vector c q in the recording unit, (3) tau> when the n-2, the arithmetic unit and the vector c r (r the p + 1. However, the r = 1) when the p = n when the calculation device having a recording unit are different, the first n components of the vector c p using the communication unit, the vector c r in the recording unit A component transmission step for transmitting to a computing device having;
- (1) In the case of tau ≦ N-2, the computing device having the vector c q in the recording unit, if the computing device including the arithmetic unit and the vector c p to the recording portion are different, the communication unit the first n components of the vector c p with, respectively received from the computing device having the vector c p to the recording unit, (2) in the case of tau> n-2, each computing device having a vector c r in the recording unit , when the computing device having the arithmetic unit and the vector c p to the recording portion are different, the first n components of the vector c p using the communication unit, respectively receive from the computing device having the vector c p to the recording unit A component receiving step;
(1) In the case of τ ≦ N−2, each arithmetic device having the vector c q in the recording unit extracts the n-th component of the vector c q from the recording unit of the arithmetic device, and the calculation unit of the arithmetic device The sum of the vector c p and the n-th component is obtained, and the result is recorded in the recording unit as the n-th component of the vector c q . (2) If τ> N−2, each vector having the vector cr in the recording unit computing device, a first n components of the vector c p, and the calculation result recording step of recording in the recording unit as the n components of the vector c r,
Each arithmetic device assigns τ + 1 to τ and records it in the recording unit τ increasing step,
When each arithmetic device has τ of 2N−3 or less, a repetition step for returning to the component transmission step;
, And a vector c x (x is an arbitrary integer from 1 to N) is used as a sum of vectors.
計算部と記録部と通信部とを有する複数の演算装置を用いてN個(Nは2以上の整数)のK次元のベクトル(Kは2以上の整数)の和を求める並列演算方法であって、
各演算装置が、演算の対象となるK次元のベクトルc(nは1からNの整数)の中の1つまたは複数を当該演算装置の記録部に記録するベクトル記録ステップと、
各演算装置が、記録部にτ=0を記録する初期設定ステップと、
ベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcの第n成分を取り出し、(2)少なくともτ≦N−2のときは、当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置に送信する成分送信ステップと、
少なくともτ≦N−2の場合は、ベクトルcを記録部に有する各演算装置が、当該演算装置とベクトルcを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcの第n成分を、ベクトルcを記録部に有する演算装置からそれぞれ受信する成分受信ステップと、
少なくともτ≦N−2の場合は、ベクトルcを記録部に有する各演算装置が、当該演算装置の記録部からベクトルcの第n成分を取り出し、当該演算装置の計算部で、ベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部に記録する演算結果記録ステップと、
各演算装置が、τにτ+1を代入して記録部に記録するτ増加ステップと、
各演算装置が、少なくともτがN−2以下の場合は、成分送信ステップに戻る繰り返しステップと、
を有し、ベクトルc(xは、1からNの任意の整数)をベクトルの和とする並列演算方法。
This is a parallel operation method for calculating the sum of N (N is an integer of 2 or more) K-dimensional vectors (K is an integer of 2 or more) using a plurality of arithmetic units having a calculation unit, a recording unit, and a communication unit. And
A vector recording step in which each computing device records one or more of the K-dimensional vectors c n (n is an integer from 1 to N) to be computed in a recording unit of the computing device;
An initial setting step in which each arithmetic unit records τ = 0 in the recording unit;
Each arithmetic device having the vector c p (p is (n−1−τ (mod N)) + 1) in the recording unit (1) extracts the n-th component of the vector c p from the recording unit of the arithmetic device, and ( 2) At least when τ ≦ N−2, when the arithmetic unit is different from the arithmetic unit having the vector c q (q is p−1, where q = N when p = 1) in the recording unit. Includes a component transmission step of transmitting the n-th component of the vector c p to the arithmetic unit having the vector c q in the recording unit using the communication unit;
At least in the case of tau ≦ N-2, the computing device having the vector c q in the recording unit, the arithmetic unit and the vector c p in the case where the arithmetic unit having a recording unit are different, by using the communication unit vector the n-th component of the c p, and component receiving step of receiving from each arithmetic unit having a vector c p to the recording unit,
When at least τ ≦ N−2, each arithmetic device having the vector c q in the recording unit extracts the n-th component of the vector c q from the recording unit of the arithmetic device, and the calculation unit of the arithmetic device uses the vector c a calculation result recording step of calculating a sum of the p and the n-th component and recording the result in the recording unit as the n-th component of the vector c q ;
Each arithmetic device assigns τ + 1 to τ and records it in the recording unit τ increasing step,
When each arithmetic device has at least τ equal to or smaller than N-2, a repetition step for returning to the component transmission step;
, And a vector c x (x is an arbitrary integer from 1 to N) is used as a sum of vectors.
計算部と記録部と通信部とを有するI個の演算装置(Iは2以上の整数)を用いて、M行N列の行列A(Mは2以上の整数、Nは2以上の整数、かつMN≧I)とN行K列の行列B(Kは2以上の整数)との積ABを求める並列演算方法であって、
あらかじめ、行列AのMN個の成分amn(mは1からMまでの整数、nは1からNまでの整数)をI個のグループ(1番目のグループからI番目のグループ)に分けておき、
各演算装置が、i番目のグループのすべての成分amn(ただし、iは当該演算装置の番号であって、1からIの整数)と、当該成分に乗算する行列Bの成分bn1〜bnKとを当該演算装置の記録部に記録する成分記録ステップと、
各演算装置が、(1)記録部に記録された成分amnのそれぞれについて、計算部でamnn1〜amnnKを計算し、(2)結果をK次元のベクトルcmn=(cmn1,cmn2,…,cmnK)=(amnn1,amnn2,…,amnnK)として記録部に記録するベクトル記録ステップと、
各演算装置が、記録部にτ=0を記録する初期設定ステップと、
ベクトルcmp(mは1からM、pは(n−1−τ(mod N))+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcmpの第n成分を取り出し、(2)当該演算装置とベクトルcmq(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcmpの第n成分を、ベクトルcmqを記録部に有する演算装置に送信する成分送信ステップと、
ベクトルcmqを記録部に有する各演算装置が、当該演算装置とベクトルcmpを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcmpの第n成分を、ベクトルcmpを記録部に有する演算装置からそれぞれ受信する成分受信ステップと、
ベクトルcmqを記録部に有する各演算装置が、(1)τ≦N−2の場合は、当該演算装置の記録部からベクトルcmqの第n成分を取り出し、当該演算装置の計算部で、ベクトルcmpの第n成分との和を求め、結果をベクトルcmqの第n成分として記録部に記録し、(2)τ>N−2の場合は、ベクトルcmpの第n成分を、ベクトルcmqの第n成分として記録部に記録する演算結果記録ステップと、
各演算装置が、τにτ+1を代入して記録部に記録するτ増加ステップと、
各演算装置が、τが2N−3以下の場合は、成分送信ステップに戻る繰り返しステップと、
を有し、ベクトルcmx(xは、1からNの任意の整数)を積ABのM行目のベクトルとする並列演算方法。
Using I computing devices (I is an integer of 2 or more) having a calculation unit, a recording unit, and a communication unit, an M-row N-column matrix A (M is an integer of 2 or more, N is an integer of 2 or more, And MN ≧ I) and an N-by-K matrix B (K is an integer of 2 or more), a parallel operation method for obtaining a product AB,
In advance, MN components a mn (m is an integer from 1 to M, n is an integer from 1 to N) of the matrix A are divided into I groups (from the first group to the Ith group). ,
Each arithmetic device has all the components a mn of the i-th group (where i is the number of the arithmetic device and is an integer from 1 to I) and the components b n1 to b of the matrix B to be multiplied by the components a component recording step of recording nK in the recording unit of the arithmetic unit;
Each arithmetic unit (1) calculates a mn b n1 to a mn b nK in the calculation unit for each component a mn recorded in the recording unit, and (2) the result is a K-dimensional vector c mn = ( c mn1, c mn2, ..., c mnK) = (a mn b n1, a mn b n2, ..., and vector recording step of recording in the recording unit as a mn b nK),
An initial setting step in which each arithmetic unit records τ = 0 in the recording unit;
Each arithmetic unit having a vector mp (m is 1 to M, p is (n−1−τ (mod N)) + 1) in the recording unit, (1) the vector mp is obtained from the recording unit of the arithmetic unit. When the n component is extracted, and (2) the arithmetic unit and the vector c mq (q is p−1, where q = N when p = 1) are different from the arithmetic unit in the recording unit, the communication unit A component transmission step of transmitting the n-th component of the vector mp to the arithmetic unit having the vector c mq in the recording unit using
When each arithmetic device having the vector c mq in the recording unit is different from the arithmetic device having the vector mp in the recording unit, the n-th component of the vector mp is changed to the vector c using the communication unit. a component receiving step for receiving each mp from an arithmetic unit having a recording unit;
When each computing device having the vector c mq in the recording unit is (1) when τ ≦ N−2, the n-th component of the vector c mq is extracted from the recording unit of the computing device, and the computing unit of the computing device The sum of the vector mp and the nth component is obtained, and the result is recorded in the recording unit as the nth component of the vector cmq . (2) When τ> N−2, the nth component of the vector mp is A calculation result recording step of recording in the recording unit as the n-th component of the vector cmq ;
Each arithmetic device assigns τ + 1 to τ and records it in the recording unit τ increasing step,
When each arithmetic device has τ of 2N−3 or less, a repetition step for returning to the component transmission step;
And a vector c mx (x is an arbitrary integer from 1 to N) as a vector of the Mth row of the product AB.
計算部と記録部と通信部とを有するI個の演算装置(Iは2以上の整数)を用いて、M行N列の行列A(Mは2以上の整数、Nは2以上の整数、かつMN≧I)と行列Aの転置行列AとN行K列の行列B(Kは2以上の整数)との積AABを求める並列演算方法であって、
あらかじめ、行列AのMN個の成分amn(mは1からMまでの整数、nは1からNまでの整数)をI個のグループ(1番目のグループからI番目のグループ)に分けておき、
各演算装置が、i番目のグループのすべての成分amn(ただし、iは当該演算装置の番号であって、1からIの整数)と、当該成分に乗算する行列Bの成分bn1〜bnKとを当該演算装置の記録部に記録する成分記録ステップと、
各演算装置が、(1)記録部に記録された成分amnのそれぞれについて、計算部でamnn1〜amnnKを計算し、(2)結果をK次元のベクトルcmn=(cmn1,cmn2,…,cmnK)=(amnn1,amnn2,…,amnnK)として記録部に記録するAベクトル記録ステップと、
各演算装置が、記録部にτ=0を記録するA初期設定ステップと、
ベクトルcmp(mは1からM、pは(n−1−τ(mod N))+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルcmpの第n成分を取り出し、(2)当該演算装置とベクトルcmq(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcmpの第n成分を、ベクトルcmqを記録部に有する演算装置に送信するA成分送信ステップと、
ベクトルcmqを記録部に有する各演算装置が、当該演算装置とベクトルcmpを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルcmpの第n成分を、ベクトルcmpを記録部に有する演算装置からそれぞれ受信するA成分受信ステップと、
ベクトルcmqを記録部に有する各演算装置が、(1)τ≦N−2の場合は、当該演算装置の記録部からベクトルcmqの第n成分を取り出し、当該演算装置の計算部で、ベクトルcmpの第n成分との和を求め、結果をベクトルcmqの第n成分として記録部に記録し、(2)τ>N−2の場合は、ベクトルcmpの第n成分を、ベクトルcmqの第n成分として記録部に記録するA演算結果記録ステップと、
各演算装置が、τにτ+1を代入して記録部に記録するAτ増加ステップと、
各演算装置が、τが2N−3以下の場合は、成分送信ステップに戻るA繰り返しステップと、
各演算装置が、(1)記録部に記録された成分amnのそれぞれについて、計算部でamnm1〜amnmKを計算し、(2)結果をK次元のベクトルbnm=(bnm1,bnm2,…,bnmK)=(amnm1,amnm2,…,amnmK)として記録部に記録するAベクトル記録ステップと、
各演算装置が、記録部にτ=0を記録するA初期設定ステップと、
ベクトルbnp(nは1からN、pは(n−1−τ(mod M)+1)を記録部に有する各演算装置が、(1)当該演算装置の記録部からベクトルbnpの第n成分を取り出し、(2)当該演算装置とベクトルbnq(qはp−1。ただし、p=1のときはq=M)を記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルbnpの第n成分を、ベクトルbnqを記録部に有する演算装置に送信するA成分送信ステップと、
ベクトルbnqを記録部に有する各演算装置が、当該演算装置とベクトルbnpを記録部に有する演算装置とが異なる場合には、通信部を用いてベクトルbnpの第n成分を、ベクトルbnpを記録部に有する演算装置からそれぞれ受信するA成分受信ステップと、
ベクトルbnqを記録部に有する各演算装置が、(1)τ≦N−2の場合は、当該演算装置の記録部からベクトルbnqの第n成分を取り出し、当該演算装置の計算部で、ベクトルbnpの第n成分との和を求め、結果をベクトルbnqの第n成分として記録部に記録し、(2)τ>N−2の場合は、ベクトルbnpの第n成分を、ベクトルbnqの第n成分として記録部に記録するA演算結果記録ステップと、
各演算装置が、τにτ+1を代入して記録部に記録するAτ増加ステップと、
各演算装置が、τが2N−3以下の場合は、成分送信ステップに戻るA繰り返しステップと、
を有し、ベクトルbnx(xは、1からMの任意の整数)を積AABのN行目のベクトルとする並列演算方法。
Using I computing devices (I is an integer of 2 or more) having a calculation unit, a recording unit, and a communication unit, a matrix A of M rows and N columns (M is an integer of 2 or more, N is an integer of 2 or more, And a parallel operation method for obtaining a product A T AB of MN ≧ I), a transposed matrix AT of a matrix A, and a matrix B of N rows and K columns (K is an integer of 2 or more),
In advance, MN components a mn (m is an integer from 1 to M, n is an integer from 1 to N) of the matrix A are divided into I groups (from the first group to the Ith group). ,
Each arithmetic device has all the components a mn of the i-th group (where i is the number of the arithmetic device and is an integer from 1 to I) and the components b n1 to b of the matrix B to be multiplied by the components a component recording step of recording nK in the recording unit of the arithmetic unit;
Each arithmetic unit (1) calculates a mn b n1 to a mn b nK for each component a mn recorded in the recording unit, and (2) outputs the result as a K-dimensional vector c mn = ( c mn1, c mn2, ..., c mnK) = (a mn b n1, a mn b n2, ..., a a vector recording step of recording in the recording unit as a mn b nK),
An A initial setting step in which each arithmetic unit records τ = 0 in the recording unit;
Each arithmetic unit having a vector mp (m is 1 to M, p is (n−1−τ (mod N)) + 1) in the recording unit, (1) the vector mp is obtained from the recording unit of the arithmetic unit. When the n component is extracted, and (2) the arithmetic unit and the vector c mq (q is p−1, where q = N when p = 1) are different from the arithmetic unit in the recording unit, the communication unit A component transmission step of transmitting the n-th component of the vector mp to the arithmetic unit having the vector c mq in the recording unit using
When each arithmetic device having the vector c mq in the recording unit is different from the arithmetic device having the vector mp in the recording unit, the n-th component of the vector mp is changed to the vector c using the communication unit. A component receiving step for receiving each mp from the arithmetic unit having the recording unit;
When each computing device having the vector c mq in the recording unit is (1) when τ ≦ N−2, the n-th component of the vector c mq is extracted from the recording unit of the computing device, and the computing unit of the computing device The sum of the vector mp and the nth component is obtained, and the result is recorded in the recording unit as the nth component of the vector cmq . (2) When τ> N−2, the nth component of the vector mp is An A calculation result recording step of recording in the recording unit as the nth component of the vector cmq ;
Each arithmetic unit assigns τ + 1 to τ and records it in the recording unit, Aτ increasing step,
When each arithmetic unit is τ is 2N−3 or less, the A repetition step for returning to the component transmission step;
Each arithmetic unit (1) calculates a mn c m1 to a mn c mK in the calculation unit for each component a mn recorded in the recording unit, and (2) the result is a K-dimensional vector b nm = ( b nm1, b nm2, ..., b nmK) = (a mn c m1, a mn c m2, ..., and a T vector recording step of recording in the recording unit as a mn c mK),
An AT initial setting step in which each arithmetic unit records τ = 0 in the recording unit;
Each arithmetic unit having the vector b np (n is 1 to N, p is (n−1−τ (mod M) +1) in the recording unit) (1) The nth of the vector b np from the recording unit of the arithmetic unit (2) When the arithmetic unit and the vector b nq (q is p−1, where q = M when p = 1) are different from the arithmetic unit having the recording unit, the communication unit is An AT component transmission step of transmitting the n-th component of the vector b np to the arithmetic unit having the vector b nq in the recording unit,
When each arithmetic unit having the vector b nq in the recording unit is different from the arithmetic unit having the vector b np in the recording unit, the communication unit is used to convert the nth component of the vector b np to the vector b an AT component receiving step for receiving np from the arithmetic unit having the recording unit, respectively;
When each computing device having the vector b nq in the recording unit is (1) when τ ≦ N−2, the n-th component of the vector b nq is extracted from the recording unit of the computing device, and the computing unit of the computing device The sum of the vector b np and the n-th component is obtained, and the result is recorded in the recording unit as the n-th component of the vector b nq . (2) If τ> N−2, the n-th component of the vector b np is An AT calculation result recording step of recording in the recording unit as the n-th component of the vector b nq ;
Each arithmetic unit substitutes τ + 1 for τ and records it in the recording unit, and increases AT τ.
When each arithmetic device has τ of 2N−3 or less, an AT repeating step for returning to the component transmission step;
And a vector b nx (x is an arbitrary integer from 1 to M) as a vector in the Nth row of the product A T AB.
請求項7記載の並列演算方法であって、
積AABの演算によって求められた前記ベクトルbnxをN行目とするN行K列の行列を行列Bとして、前記Aベクトル記録ステップから前記A繰り返しステップまでを繰り返すこと
を特徴とする並列演算方法。
The parallel operation method according to claim 7, wherein
A matrix of N rows and K columns with the vector b nx obtained by calculation of the product A T AB as the Nth row is defined as a matrix B, and the steps from the A vector recording step to the AT repetition step are repeated. Parallel operation method.
計算部と記録部と通信部とを有するN個の演算装置(Nは2以上の整数)を用いてN個のN次元のベクトルの和を求める並列演算システムを構成するn番目の演算装置(nは1からNの整数)であって、
演算の対象となるN次元のベクトルを1つ記録する記録部内のベクトル記録手段と、
τの値を記録する記録部内のτ記録手段と、
第(n−1+τ(mod N))+1成分を取り出し、(n−2(mod N))+1番目の演算装置に送信する通信部の送信手段と、
第(n+τ(mod N))+1成分をn(mod N))+1番目の演算装置から受信する受信手段と、
(1)τ≦N−2の場合は、記録部のベクトル記録手段から、第(n+τ(mod N))+1成分を取り出し、受信した第(n+τ(mod N))+1成分との和を求め、結果を第(n+τ(mod N))+1成分として記録部に記録し、(2)τ>N−2の場合は、受信した第(n+τ(mod N))+1成分を第(n+τ(mod N))+1成分として記録部に記録する演算結果記録手段と、
τにτ+1を代入して記録部のτ記録手段に記録するτ増加手段と、
τが2N−3以下の場合は、演算を繰り返させる繰り返し手段と、
を備える演算装置。
An n-th arithmetic unit that constitutes a parallel arithmetic system that calculates a sum of N N-dimensional vectors using N arithmetic units (N is an integer of 2 or more) having a calculation unit, a recording unit, and a communication unit ( n is an integer from 1 to N),
Vector recording means in the recording unit for recording one N-dimensional vector to be calculated;
τ recording means in the recording unit for recording the value of τ;
A transmission unit of a communication unit that extracts the (n−1 + τ (mod N)) + 1 component and transmits it to the (n−2 (mod N)) + 1st arithmetic device;
Receiving means for receiving the (n + τ (mod N)) + 1 component from the n (mod N)) + 1 th computing device;
(1) When τ ≦ N−2, the (n + τ (mod N)) + 1 component is taken out from the vector recording means of the recording unit, and the sum with the received (n + τ (mod N)) + 1 component is obtained. The result is recorded in the recording unit as the (n + τ (mod N)) + 1 component, and when (2) τ> N−2, the received (n + τ (mod N)) + 1 component is (n + τ (mod) N)) a calculation result recording means for recording in the recording unit as a +1 component;
τ increasing means for substituting τ + 1 for τ and recording the τ recording means of the recording unit;
When τ is 2N−3 or less, repeating means for repeating the calculation;
An arithmetic device comprising:
計算部と記録部と通信部とを有するN個の演算装置(Nは2以上の整数)を用いてN個のK次元のベクトル(Kは2以上の整数)の和を求める並列演算システムを構成する演算装置であって、
あらかじめ、ベクトルのK個の成分をN個のグループ(1番目のグループからN番目のグループ)に分けておき、
演算の対象となるK次元のベクトルを1つ記録部に記録するベクトル記録手段と、
τの値を記録する記録部内のτ記録手段と、
あるn(nは1からNの整数)に対して、当該演算装置の番号が(n−1−τ(mod N))+1の場合、(1)記録部からn番目のグループのベクトルの成分を取り出し、(2)(n−2−τ(mod N))+1番目の演算装置に送信する通信部の送信手段と、
あるnに対して、当該演算装置の番号が(n−2−τ(mod N))+1の場合、n番目のグループのベクトルの成分を(n−1−τ(mod N))+1番目の演算装置から受信する通信部の受信手段と、
あるnに対して、当該演算装置の番号が(n−2−τ(mod N))+1の場合、(1)τ≦N−2のときは、記録部のベクトル記録手段からn番目のグループのベクトルの成分を取り出し、受信したn番目のグループのベクトルの成分との和を求め、結果をn番目のグループのベクトルの成分として記録部に記録し、(2)τ>N−2のときは、受信したn番目のグループのベクトルの成分を、n番目のグループのベクトルの成分として記録部に記録する演算結果記録手段と、
τにτ+1を代入して記録部のτ記録手段に記録するτ増加手段と、
τが2N−3以下の場合は、演算を繰り返させる繰り返し手段と、
を備える演算装置。
A parallel computing system for obtaining a sum of N K-dimensional vectors (K is an integer of 2 or more) using N computing devices (N is an integer of 2 or more) having a calculation unit, a recording unit, and a communication unit. A computing device comprising:
In advance, the K components of the vector are divided into N groups (from the first group to the Nth group),
Vector recording means for recording one K-dimensional vector to be calculated in a recording unit;
τ recording means in the recording unit for recording the value of τ;
For a certain n (where n is an integer from 1 to N), when the number of the arithmetic unit is (n−1−τ (mod N)) + 1, (1) vector components of the nth group from the recording unit And (2) (n-2-τ (mod N)) + 1 transmitting unit of the communication unit for transmitting to the first arithmetic unit;
For a certain n, if the number of the arithmetic unit is (n-2-τ (mod N)) + 1, the vector component of the nth group is (n-1-τ (mod N)) + 1 Receiving means of the communication unit for receiving from the arithmetic device;
For a certain n, when the number of the arithmetic unit is (n-2-τ (mod N)) + 1, and (1) when τ ≦ N−2, the nth group from the vector recording means of the recording unit The vector component is extracted, the sum of the received vector component and the received n-th group vector component is obtained, and the result is recorded in the recording unit as the n-th group vector component. (2) When τ> N−2 Is a calculation result recording means for recording the received vector component of the nth group in the recording unit as a vector component of the nth group;
τ increasing means for substituting τ + 1 for τ and recording the τ recording means of the recording unit;
When τ is 2N−3 or less, repeating means for repeating the calculation;
An arithmetic device comprising:
計算部と記録部と通信部とを有する複数の演算装置を用いてN個(Nは2以上の整数)のK次元のベクトル(Kは2以上の整数)の和を求める並列演算システムを構成する演算装置であって、
演算の対象となるK次元のベクトルc(nは1からNの整数)の中の1つまたは複数を記録する記録部内のベクトル記録手段と、
τの値を記録する記録部内のτ記録手段と、
あるnに対してベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する場合に、(1)記録部のベクトル記録手段からベクトルcの第n成分を取り出し、(2)当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置が異なる場合には、ベクトルcを記録部に有する演算装置に送信する通信部内の送信手段と、
あるnに対してベクトルcを記録部に有し、かつ、ベクトルcを記録部に有する演算装置と異なる場合には、ベクトルcの第n成分を、ベクトルcを記録部に有する演算装置から受信する通信部内の受信手段と、
あるnに対してベクトルcを記録部に有する場合に、(1)τ≦N−2のときは、記録部のベクトル記録手段からベクトルcの第n成分を取り出し、ベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部のベクトル記録手段に記録し、(2)τ>N−2のときは、ベクトルcの第n成分を、ベクトルcの第n成分として記録部のベクトル記録手段に記録する計算部の演算結果記録手段と、
τにτ+1を代入して記録部のτ記録手段に記録するτ増加手段と、
τが2N−3以下の場合は、演算を繰り返させる繰り返し手段と、
を備える演算装置。
A parallel computing system for calculating the sum of N (N is an integer greater than or equal to 2) K-dimensional vectors (K is an integer greater than or equal to 2) using a plurality of arithmetic units having a calculation unit, a recording unit, and a communication unit. An arithmetic unit for
Vector recording means in the recording unit for recording one or more of K-dimensional vectors c n (n is an integer from 1 to N) to be calculated;
τ recording means in the recording unit for recording the value of τ;
When a vector c p (p is (n−1−τ (mod N)) + 1) in a recording unit for a certain n, (1) the n-th component of the vector c p is obtained from the vector recording unit of the recording unit. (2) When the arithmetic unit and the arithmetic unit having the vector c q (q is p−1, q = N when p = 1) in the recording unit are different, the vector c q is recorded in the recording unit. Transmitting means in the communication unit for transmitting to the arithmetic device included in
Has a vector c q in the recording unit for a n, and, if different from the computing device having the vector c p to the recording unit includes a first n components of the vector c p, the vector c p to the recording unit Receiving means in the communication unit for receiving from the arithmetic unit;
When the recording unit has a vector c q for a certain n, and (1) when τ ≦ N−2, the n-th component of the vector c q is extracted from the vector recording means of the recording unit, and the vector c p th calculates the sum of n components, the result is recorded in the vector recording means of the recording unit as the n components of the vector c q, a (2) τ> of time n-2, the n-th component of the vector c p, vector an operation result recording unit of the calculation unit for recording in the vector recording unit of the recording unit as the nth component of c q ;
τ increasing means for substituting τ + 1 for τ and recording the τ recording means of the recording unit;
When τ is 2N−3 or less, repeating means for repeating the calculation;
An arithmetic device comprising:
計算部と記録部と通信部とを有する複数の演算装置を用いてN個(Nは2以上の整数)のK次元のベクトル(Kは2以上の整数)の和を求める並列演算システムを構成する演算装置であって、
演算の対象となるK次元のベクトルc(nは1からNの整数)の中の1つまたは複数を記録する記録部内のベクトル記録手段と、
τの値を記録する記録部内のτ記録手段と、
あるnに対してベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する場合に、(1)記録部のベクトル記録手段からベクトルcの第n成分を取り出し、(2)τ≦N−2のときは、当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置が異なる場合には、ベクトルcを記録部に有する演算装置に送信し、(3)τ>N−2のときは、当該演算装置とベクトルc(rはp+1。ただし、p=Nのときはr=1)を記録部に有する演算装置が異なる場合には、ベクトルcを記録部に有する演算装置に送信する通信部内の送信手段と、
(1)τ≦N−2のときは、あるnに対してベクトルcを記録部に有し、かつ、ベクトルcを記録部に有する演算装置と異なる場合には、ベクトルcの第n成分を、ベクトルcを記録部に有する演算装置から受信し、(2)τ>N−2のときは、あるnに対してベクトルcを記録部に有し、かつ、ベクトルcを記録部に有する演算装置と異なる場合には、ベクトルcの第n成分を、ベクトルcを記録部に有する演算装置から受信する通信部内の受信手段と、
(1)τ≦N−2のときは、あるnに対してベクトルcを記録部に有する場合に、記録部のベクトル記録手段からベクトルcの第n成分を取り出し、ベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部のベクトル記録手段に記録し、 (2)τ>N−2のときは、あるnに対してベクトルcを記録部に有する場合に、ベクトルcの第n成分を、ベクトルcの第n成分として記録部のベクトル記録手段に記録する計算部の演算結果記録手段と、
τにτ+1を代入して記録部のτ記録手段に記録するτ増加手段と、
τが2N−3以下の場合は、演算を繰り返させる繰り返し手段と、
を備える演算装置。
A parallel computing system for calculating the sum of N (N is an integer greater than or equal to 2) K-dimensional vectors (K is an integer greater than or equal to 2) using a plurality of arithmetic units having a calculation unit, a recording unit, and a communication unit. An arithmetic unit for
Vector recording means in the recording unit for recording one or more of K-dimensional vectors c n (n is an integer from 1 to N) to be calculated;
τ recording means in the recording unit for recording the value of τ;
When a vector c p (p is (n−1−τ (mod N)) + 1) in a recording unit for a certain n, (1) the n-th component of the vector c p is obtained from the vector recording unit of the recording unit. When (2) τ ≦ N−2, when the calculation device and the calculation device having the vector c q (q is p−1; where p = 1, q = N) in the recording unit are different. Transmits the vector c q to the arithmetic unit having the recording unit. (3) When τ> N−2, the arithmetic unit and the vector c r (r is p + 1. However, when p = N, r = 1) when the arithmetic unit having the recording unit is different, the transmission unit in the communication unit for transmitting the vector c q to the arithmetic unit having the recording unit,
(1) When the tau ≦ N-2, has for some n the vector c q in the recording unit, and, if different from the computing device having the vector c p to the recording unit, the vector c p the n components, received from the computing device having the vector c p to the recording unit, (2) tau> of time n-2, have a vector c r in the recording unit for a n, and the vector c p the if computing device different from that having the recording section, the n-th component of the vector c p, a receiving unit in a communication unit for receiving from the computing device having the vector c p to the recording unit,
(1) When τ ≦ N−2, when the recording unit has the vector c q for a certain n, the n-th component of the vector c q is extracted from the vector recording means of the recording unit, and the vector c p th The sum with the n component is obtained, and the result is recorded in the vector recording means of the recording unit as the nth component of the vector c q . (2) When τ> N−2, the vector cr is recorded for a certain n if you have the parts, the first n components of the vector c p, and the operation result recording means calculating unit that records the vector recording means of the recording unit as the n components of the vector c r,
τ increasing means for substituting τ + 1 for τ and recording the τ recording means of the recording unit;
When τ is 2N−3 or less, repeating means for repeating the calculation;
An arithmetic device comprising:
計算部と記録部と通信部とを有する複数の演算装置を用いてN個(Nは2以上の整数)のK次元のベクトル(Kは2以上の整数)の和を求める並列演算システムを構成する演算装置であって、
演算の対象となるK次元のベクトルc(nは1からNの整数)の中の1つまたは複数を記録する記録部内のベクトル記録手段と、
τの値を記録する記録部内のτ記録手段と、
あるnに対してベクトルc(pは(n−1−τ(mod N))+1)を記録部に有する場合に、(1)記録部のベクトル記録手段からベクトルcの第n成分を取り出し、(2)少なくともτ≦N−2のときは、当該演算装置とベクトルc(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置が異なる場合には、ベクトルcを記録部に有する演算装置に送信する通信部内の送信手段と、
少なくともτ≦N−2のときは、あるnに対してベクトルcを記録部に有し、かつ、ベクトルcを記録部に有する演算装置と異なる場合には、ベクトルcの第n成分を、ベクトルcを記録部に有する演算装置から受信する通信部内の受信手段と、
少なくともτ≦N−2のときは、あるnに対してベクトルcを記録部に有する場合に、記録部のベクトル記録手段からベクトルcの第n成分を取り出し、ベクトルcの第n成分との和を求め、結果をベクトルcの第n成分として記録部のベクトル記録手段に記録する計算部の演算結果記録手段と、
τにτ+1を代入して記録部のτ記録手段に記録するτ増加手段と、
少なくともτがN−2以下の場合は、演算を繰り返させる繰り返し手段と、
を備える演算装置。
A parallel computing system for calculating the sum of N (N is an integer greater than or equal to 2) K-dimensional vectors (K is an integer greater than or equal to 2) using a plurality of arithmetic units having a calculation unit, a recording unit, and a communication unit. An arithmetic unit for
Vector recording means in the recording unit for recording one or more of K-dimensional vectors c n (n is an integer from 1 to N) to be calculated;
τ recording means in the recording unit for recording the value of τ;
When a vector c p (p is (n−1−τ (mod N)) + 1) in a recording unit for a certain n, (1) the n-th component of the vector c p is obtained from the vector recording unit of the recording unit. (2) When at least τ ≦ N−2, the arithmetic unit is different from the arithmetic unit having the vector c q (q is p−1. However, when p = 1, q = N) in the recording unit. In the case, the transmission means in the communication unit for transmitting the vector c q to the arithmetic unit having the recording unit,
When at least τ ≦ N-2, has for some n the vector c q in the recording unit, and, if different from the computing device having the vector c p to the recording section, the n components of the vector c p and a receiving unit in a communication unit for receiving from the computing device having the vector c p to the recording unit,
When at least τ ≦ N−2, when the recording unit has a vector c q for a certain n, the n-th component of the vector c q is extracted from the vector recording means of the recording unit, and the n-th component of the vector c p And a calculation result recording means of the calculation unit for recording the result as the nth component of the vector c q in the vector recording means of the recording unit;
τ increasing means for substituting τ + 1 for τ and recording the τ recording means of the recording unit;
When at least τ is less than or equal to N−2, repeating means for repeating the operation;
An arithmetic device comprising:
計算部と記録部と通信部とを有するI個の演算装置(Iは2以上の整数)を用いて、M行N列の行列A(Mは2以上の整数、Nは2以上の整数、かつMN≧I)とN行K列の行列B(Kは2以上の整数)との積ABを求める並列演算システムを構成する演算装置であって、
演算の対象となる行列Aのすべての成分amnと、当該成分に乗算する行列Bの成分bn1〜bnKとを記録する記録部内の成分記録手段と、
記録部の成分記録手段に記録された成分amnのそれぞれについて、amnn1〜amnnKを計算する計算部内の成分計算手段と、
結果をK次元のベクトルcmn=(cmn1,cmn2,…,cmnK)=(amnn1,amnn2,…,amnnK)として記録する記録部内のベクトル記録手段と、
τ=0を記録する記録部内のτ記録手段と、
あるnに対してベクトルcmp(mは1からM、pは(n−1−τ(mod N))+1)を記録部に有する場合に、(1)記録部のベクトル記録手段からベクトルcmpの第n成分を取り出し、(2)ベクトルcmq(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置が当該演算装置と異なる場合には、ベクトルcmpの第n成分を、ベクトルcmqを記録部に有する演算装置に送信する通信部内の送信手段と、
あるnに対してベクトルcmqを記録部に有し、かつ、ベクトルcmpを記録部に有する演算装置と異なる場合には、ベクトルcmpの第n成分を、ベクトルcmpを記録部に有する演算装置から受信する通信部内の受信手段と、
あるnに対してベクトルcmqを記録部に有する場合に、(1)τ≦N−2のときは、記録部のベクトル記録手段からベクトルcmqの第n成分を取り出し、ベクトルcmpの第n成分との和を求め、結果をベクトルcmqの第n成分として記録部のベクトル記録手段に記録し、(2)τ>N−2のときは、ベクトルcmpの第n成分を、ベクトルcmqの第n成分として記録部のベクトル記録手段に記録する計算部の演算結果記録手段と、
τにτ+1を代入して記録部のτ記録手段に記録するτ増加手段と、
τが2N−3以下の場合は、演算を繰り返させる繰り返し手段と、
を備える演算装置。
Using I computing devices (I is an integer of 2 or more) having a calculation unit, a recording unit, and a communication unit, an M-row N-column matrix A (M is an integer of 2 or more, N is an integer of 2 or more, And an arithmetic unit constituting a parallel arithmetic system for obtaining a product AB of MN ≧ I) and a matrix B of N rows and K columns (K is an integer of 2 or more),
Component recording means in the recording unit for recording all the components a mn of the matrix A to be calculated and the components b n1 to b nK of the matrix B to be multiplied by the components;
Component calculation means in the calculation unit for calculating a mn b n1 to a mn b nK for each of the components a mn recorded in the component recording means of the recording unit;
The results of the K-dimensional vector c mn = (c mn1, c mn2, ..., c mnK) = (a mn b n1, a mn b n2, ..., a mn b nK) and vector recording means in the recording unit to record as ,
τ recording means in the recording unit for recording τ = 0,
When a recording unit has a vector c mp (m is 1 to M, p is (n−1−τ (mod N)) + 1) for a certain n, (1) the vector c from the recording unit of the recording unit When the arithmetic unit having (2) the vector c mq (q is p−1, where q = N when p = 1) is different from the arithmetic unit, the n-th component of mp is extracted. Transmission means in the communication unit for transmitting the n-th component of the vector mp to the arithmetic unit having the vector c mq in the recording unit;
Has a vector c mq in the recording unit for a n, and, if different from the computing device having the vector c mp in the recording unit includes a first n components of the vector c mp, the vector c mp to the recording unit Receiving means in the communication unit for receiving from the arithmetic unit;
When a recording unit has a vector c mq for a certain n, and (1) when τ ≦ N−2, the n-th component of the vector c mq is extracted from the vector recording means of the recording unit, and the vector c mp The sum with the n component is obtained, and the result is recorded in the vector recording means of the recording unit as the nth component of the vector c mq . (2) When τ> N−2, the nth component of the vector mp is a calculation result recording unit of the calculation unit for recording in the vector recording unit of the recording unit as the nth component of c mq ;
τ increasing means for substituting τ + 1 for τ and recording the τ recording means of the recording unit;
When τ is 2N−3 or less, repeating means for repeating the calculation;
An arithmetic device comprising:
計算部と記録部と通信部とを有するI個の演算装置(Iは2以上の整数)を用いて、M行N列の行列A(Mは2以上の整数、Nは2以上の整数、かつMN≧I)と行列Aの転置行列AとN行K列の行列B(Kは2以上の整数)との積AABを求める並列演算システムを構成する演算装置であって、
演算の対象となる行列Aのすべての成分amnと、当該成分に乗算する行列Bの成分bn1〜bnKとを記録する記録部内の成分記録手段と、
記録部に記録された成分amnのそれぞれについて、計算部でamnn1〜amnnKを計算する計算部内のA成分計算手段と、
結果をK次元のベクトルcmn=(cmn1,cmn2,…,cmnK)=(amnn1,amnn2,…,amnnK)として記録する記録部内のAベクトル記録手段と、
τ=0を記録する記録部内のAτ記録手段と、
あるnに対してベクトルcmp(mは1からM、pは(n−1−τ(mod N))+1)を記録部に有する場合に、(1)記録部のAベクトル記録手段からベクトルcmpの第n成分を取り出し、(2)ベクトルcmq(qはp−1。ただし、p=1のときはq=N)を記録部に有する演算装置が当該演算装置と異なる場合には、ベクトルcmpの第n成分を、ベクトルcmqを記録部に有する演算装置に送信する通信部内のA送信手段と、
あるnに対してベクトルcmqを記録部に有し、かつ、ベクトルcmpを記録部に有する演算装置と異なる場合には、ベクトルcmpの第n成分を、ベクトルcmpを記録部に有する演算装置から受信する通信部内のA受信手段と、
あるnに対してベクトルcmqを記録部に有する場合に、(1)τ≦N−2のときは、記録部のAベクトル記録手段からベクトルcmqの第n成分を取り出し、ベクトルcmpの第n成分との和を求め、結果をベクトルcmqの第n成分として記録部のAベクトル記録手段に記録し、(2)τ>N−2のときは、ベクトルcmpの第n成分を、ベクトルcmqの第n成分として記録部のAベクトル記録手段に記録する計算部のA演算結果記録手段と、
τにτ+1を代入して記録部のτ記録手段に記録するAτ増加手段と、
τが2N−3以下の場合は、演算を繰り返させるA繰り返し手段と、
記録部に記録された成分amnのそれぞれについて、計算部でamnm1〜amnmKを計算する計算部内のA成分計算手段と、
結果をK次元のベクトルbnm=(bnm1,bnm2,…,bnmK)=(amnm1,amnm2,…,amnmK)として記録する記録部内のAベクトル記録手段と、
τ=0を記録する記録部内のAτ記録手段と、
あるnに対してベクトルbnp(nは1からN、pは(n−1−τ(mod M))+1)を記録部に有する場合に、(1)記録部のAベクトル記録手段からベクトルbnpの第n成分を取り出し、(2)ベクトルbnq(qはp−1。ただし、p=1のときはq=M)を記録部に有する演算装置が当該演算装置と異なる場合には、ベクトルbnpの第n成分を、ベクトルbnqを記録部に有する演算装置に送信する通信部内のA送信手段と、
あるnに対してベクトルbnqを記録部に有し、かつ、ベクトルbnpを記録部に有する演算装置と異なる場合には、ベクトルbnpの第n成分を、ベクトルbnpを記録部に有する演算装置から受信する通信部内のA受信手段と、
あるnに対してベクトルbnqを記録部に有する場合に、(1)τ≦N−2のときは、記録部のAベクトル記録手段からベクトルbnqの第n成分を取り出し、ベクトルbnpの第n成分との和を求め、結果をベクトルbnqの第n成分として記録部に記録し、(2)τ>N−2のときは、ベクトルbnpの第n成分を、ベクトルbnqの第n成分として記録部のAベクトル記録手段に記録するA演算結果記録手段と、
τにτ+1を代入して記録部のτ記録手段に記録するAτ増加手段と、
τが2N−3以下の場合は、演算を繰り返させるA繰り返し手段と、
を備える演算装置。
Using I computing devices (I is an integer of 2 or more) having a calculation unit, a recording unit, and a communication unit, a matrix A of M rows and N columns (M is an integer of 2 or more, N is an integer of 2 or more, and an arithmetic unit for a parallel computing system determining the product a T AB with matrix B MN ≧ I) and transposed matrix a T and N rows and K columns of the matrix a (K is an integer of 2 or more),
Component recording means in the recording unit for recording all the components a mn of the matrix A to be calculated and the components b n1 to b nK of the matrix B to be multiplied by the components;
A component calculation means in the calculation unit for calculating a mn b n1 to a mn b nK in the calculation unit for each of the components a mn recorded in the recording unit;
The results of the K-dimensional vector c mn = (c mn1, c mn2, ..., c mnK) = (a mn b n1, a mn b n2, ..., a mn b nK) A vector recording means in the recording unit to record as When,
Aτ recording means in the recording unit for recording τ = 0,
When a recording unit has a vector c mp (m is 1 to M, p is (n−1−τ (mod N)) + 1) for a certain n, (1) the vector from the A vector recording means of the recording unit removed the n components of the c mp, (2) the vector c mq (q is p-1. However, when the p = 1 q = n) when the computing device having the recording portion is different from the said arithmetic unit A transmission means in the communication unit for transmitting the n-th component of the vector mp to the arithmetic unit having the vector c mq in the recording unit;
Has a vector c mq in the recording unit for a n, and, if different from the computing device having the vector c mp in the recording unit includes a first n components of the vector c mp, the vector c mp to the recording unit A receiving means in the communication unit for receiving from the arithmetic unit;
When the recording unit has a vector c mq for a certain n, and (1) when τ ≦ N−2, the n-th component of the vector c mq is extracted from the A vector recording means of the recording unit, and the vector c mp The sum with the n-th component is obtained, and the result is recorded in the A vector recording means of the recording unit as the n-th component of the vector c mq . (2) When τ> N−2, the n-th component of the vector mp is A calculation result recording means of the calculation unit for recording in the A vector recording means of the recording unit as the n-th component of the vector cmq ,
Aτ increasing means for substituting τ + 1 for τ and recording the τ recording means of the recording unit;
When τ is 2N−3 or less, A repeating means for repeating the operation;
An AT component calculation means in the calculation unit for calculating a mn c m1 to a mn c mK in the calculation unit for each of the components a mn recorded in the recording unit;
AT vector recording in the recording unit for recording the result as a K-dimensional vector b nm = (b nm1 , b nm2 ,..., B nmK ) = (a mn c m1 , a mn c m2 ,..., A mn c mK ) Means,
A T τ recording means in the recording unit for recording τ = 0,
When a recording unit has a vector b np (n is 1 to N, p is (n−1−τ (mod M)) + 1) for a certain n, (1) From the AT vector recording means of the recording unit The n-th component of the vector b np is extracted, and (2) when the arithmetic unit having the vector b nq (q is p−1, where q = M when p = 1) is different from the arithmetic unit AT transmission means in the communication unit for transmitting the n-th component of the vector b np to the arithmetic unit having the vector b nq in the recording unit;
Has a vector b nq to the recording unit for a n, and, if different from the computing device with a vector b np in the recording unit includes a first n components of the vector b np, the vector b np in the recording unit AT receiving means in the communication unit for receiving from the arithmetic unit;
When the recording unit has a vector b nq for a certain n, (1) When τ ≦ N−2, the n-th component of the vector b nq is extracted from the AT vector recording means of the recording unit, and the vector b np And the result is recorded in the recording unit as the n-th component of the vector b nq . (2) When τ> N−2, the n-th component of the vector b np is changed to the vector b nq AT calculation result recording means for recording in the AT vector recording means of the recording unit as the n-th component of
A T τ increasing means for substituting τ + 1 for τ and recording the τ recording means of the recording unit;
When τ is 2N−3 or less, AT repeating means for repeating the operation;
An arithmetic device comprising:
請求項15記載の演算装置であって、
積AABの演算によって求められた前記ベクトルbnxをN行目とするN行K列の行列を行列Bとして、前記Aベクトル記録ステップから前記A繰り返しステップまでを繰り返すAAB計算繰り返し手段も
備えることを特徴とする演算装置。
The arithmetic device according to claim 15, wherein
A T AB calculation repetition that repeats from the A vector recording step to the A T repetition step using a matrix of N rows and K columns with the vector b nx obtained by calculation of the product A T AB as the Nth row as a matrix B An arithmetic device comprising means.
請求項1から8のいずれかに記載の演算方法の各ステップを、コンピュータにより実現させる演算装置用プログラム。
A computer program for causing each step of the calculation method according to any one of claims 1 to 8 to be realized by a computer.
JP2006273557A 2006-10-05 2006-10-05 Parallel calculation method, calculation device, and program for calculation device Expired - Fee Related JP4976800B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006273557A JP4976800B2 (en) 2006-10-05 2006-10-05 Parallel calculation method, calculation device, and program for calculation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006273557A JP4976800B2 (en) 2006-10-05 2006-10-05 Parallel calculation method, calculation device, and program for calculation device

Publications (2)

Publication Number Publication Date
JP2008090769A true JP2008090769A (en) 2008-04-17
JP4976800B2 JP4976800B2 (en) 2012-07-18

Family

ID=39374819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006273557A Expired - Fee Related JP4976800B2 (en) 2006-10-05 2006-10-05 Parallel calculation method, calculation device, and program for calculation device

Country Status (1)

Country Link
JP (1) JP4976800B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021111491A1 (en) * 2019-12-02 2021-06-10 日本電信電話株式会社 Distributed deep learning system and distributed deep learning method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03105584A (en) * 1989-09-20 1991-05-02 Fujitsu Ltd Parallel data processing system
JPH06175986A (en) * 1992-12-10 1994-06-24 Nippon Telegr & Teleph Corp <Ntt> Parallel processing method for matrix operation
JPH07253954A (en) * 1994-03-14 1995-10-03 Fujitsu Ltd Parallel computer
JP2000339296A (en) * 1999-05-26 2000-12-08 Motoki Yagawa Method for finding solution of simultaneous linear equations and calculating device therefor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03105584A (en) * 1989-09-20 1991-05-02 Fujitsu Ltd Parallel data processing system
JPH06175986A (en) * 1992-12-10 1994-06-24 Nippon Telegr & Teleph Corp <Ntt> Parallel processing method for matrix operation
JPH07253954A (en) * 1994-03-14 1995-10-03 Fujitsu Ltd Parallel computer
JP2000339296A (en) * 1999-05-26 2000-12-08 Motoki Yagawa Method for finding solution of simultaneous linear equations and calculating device therefor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021111491A1 (en) * 2019-12-02 2021-06-10 日本電信電話株式会社 Distributed deep learning system and distributed deep learning method
JPWO2021111491A1 (en) * 2019-12-02 2021-06-10
JP7283577B2 (en) 2019-12-02 2023-05-30 日本電信電話株式会社 Distributed deep learning system and distributed deep learning method

Also Published As

Publication number Publication date
JP4976800B2 (en) 2012-07-18

Similar Documents

Publication Publication Date Title
Yang et al. Quantum Hash function and its application to privacy amplification in quantum key distribution, pseudo-random number generation and image encryption
Dick et al. High-dimensional integration: the quasi-Monte Carlo way
EP2000900B1 (en) Extending a repetition period of a random sequence
Priyadarsini A survey on some applications of graph theory in cryptography
Mandal et al. Cryptographically strong de Bruijn sequences with large periods
Kanso Self-shrinking chaotic stream ciphers
Banegas et al. Low-communication parallel quantum multi-target preimage search
Zou et al. Image encryption algorithm with matrix semi-tensor product
Telem et al. A simple and robust gray image encryption scheme using chaotic logistic map and artificial neural network
Dăscălescu et al. A novel fast chaos-based algorithm for generating random permutations with high shift factor suitable for image scrambling
Doliskani et al. Faster cryptographic hash function from supersingular isogeny graphs
Mandal et al. Feedback reconstruction and implementations of pseudorandom number generators from composited de Bruijn sequences
CN114691167A (en) Method and device for updating machine learning model
Devi et al. Entropy influenced RNA diffused quantum chaos to conserve medical data privacy
Gentry et al. Obfuscation using tensor products
Bian et al. APAS: Application-specific accelerators for RLWE-based homomorphic linear transformations
Mehdi et al. Image encryption based on the novel 5D hyper-chaotic system via improved AES algorithm
Courtois et al. A new general-purpose method to multiply 3x3 matrices using only 23 multiplications
Coron et al. On Kilian’s randomization of multilinear map encodings
Cardell et al. Linearity in decimation-based generators: an improved cryptanalysis on the shrinking generator
SundaraKrishnan et al. A symmetric key multiple color image cipher based on cellular automata, chaos theory and image mixing
JP4976800B2 (en) Parallel calculation method, calculation device, and program for calculation device
US5737425A (en) Cryptosystem employing worst-case difficult-to solve lattice problem
Picek et al. PRNGs for masking applications and their mapping to evolvable hardware
US20040005053A1 (en) Cryptographical pseudo-random number generation apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110208

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20111121

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20111121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120321

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120403

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120413

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150420

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees