A quick way to multiply two one-dimensional arrays

I have the following data:

A = [a0 a1 a2 a3 a4 a5 .... a24]
B = [b0 b1 b2 b3 b4 b5 .... b24]

which then I want to multiply as follows:

C = A * B' = [a0b0 a1b1 a2b2 ... a24b24]

This clearly implies 25 multiplications.

However, in my scenario, only 5 new values ​​are shifted in by "loop iteration" (and 5 old values ​​are shifted from A). Is there any quick way to take advantage of the fact that data moves through A rather than being completely new? Ideally, I want to minimize the number of multiplication operations (due to possibly more additions / subtractions / accumulations). Initially, I thought a systolic array might help, but it is not (I think !?)

Update 1: Note B is fixed for a long time, but can be reprogrammed.

Update 2: the offset A is as follows: a [24] <= a [19], a [23] <= a [18] ... a [1] <= new01, a [0] <= new00. And so on, every beat

Many thanks!

+5
source share
3 answers

Is there any quick way to take advantage of the fact that data moves through A rather than being completely new?

, , , A, C , , , , , . , A B, . , 25 .

( , , //).

0 . , , , , , .

+2

5 50 . . 5 .

, . , 50 , .

, 50, , ?

: a , b. a, a[0] a[4] c. 25 .

: a[0] a[4] ( ) b[0] b[4] . a[0] a[4], a[0->9] c. 5

3- : a[0] a[9] b[0] b[9] a[0->14] c. 10

4- : a[0] a[14] b , a[0->19] c. 15 .

5- : mutiply a[0] to a[19] b , a[0->24] - c. 20 .

: 50.

6- : . 25 . , a , , .

+1

D, / A. , , , .

0

All Articles