mirror of
https://github.com/xiph/opus.git
synced 2025-05-31 23:57:42 +00:00
Sparse matrix indexing optimization
The 4* is now stored in the table to avoid computing it in the loop
This commit is contained in:
parent
2681822c18
commit
54abdb6f5d
4 changed files with 10 additions and 10 deletions
|
@ -80,7 +80,7 @@ def printSparseVector(f, A, name):
|
|||
qblock = AQ[j*4:(j+1)*4, i*8:(i+1)*8]
|
||||
if np.sum(np.abs(block)) > 1e-10:
|
||||
nb_nonzero = nb_nonzero + 1
|
||||
idx = np.append(idx, j)
|
||||
idx = np.append(idx, j*4)
|
||||
vblock = qblock.transpose((1,0)).reshape((-1,))
|
||||
W0 = np.concatenate([W0, block.reshape((-1,))])
|
||||
W = np.concatenate([W, vblock])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue