# Linear Computation Coding: A Framework for Joint Quantization and Computing
## 6 Simulation Results
### Number of Additions Per Matrix Entry
#### 6.3.1 IID Gaussian Target Matrices  
If the target matrix is IID Gaussian, it is well-suited to self-design the codebook, as IID Gaussian codebooks work excellently. As in Section 6.1, we use wiring matrices with \(S_{\ell}=1,\forall\ell\). Table 1 shows the average number of additions per matrix entry to achieve a certain accuracy ranging from 24 dB to 144 dB SQNR. SQNRs of 24 dB, 48 dB, 72 dB, 96 dB, 120 dB, and 144 dB are commonly associated with the accuracy of 4, 8, 12, 16, 20, and 24-bit integer arithmetic, respectively. This correspondence is pretty accurate for uniformly distributed random variables. For Gaussian random variables, a few additional bits are required to achieve that accuracy, in practice, as one has to avoid clipping effects and to encode the sign.  
A integer number of matrix factors clearly does not to lead to an integer multiple of 24 dB in SQNR. Therefore, we used interpolation to find the fractional number of matrix factors that are required to achieve a certain SQNR. A fractional number of matrix factors is not impossible, in practice. It simply means that the last wiring matrix contains only a single nonzero entry in some, but not all of its rows.  
For higher and lower accuracies, higher and lower code rates are favored, respectively. This behavior is explained as follows: There is the fixed computational cost of about \(K\) additions for the codebook matrix. The higher the code rate, the fewer rows share this cost. This increases the computational burden per row (and also per matrix entry) for higher code rates. For high accuracy, the wiring matrices clearly dominate the computational cost, so the computation of the codebook is secondary. Thus, higher rates are favored, as they generally result in lower distortions, see Figure 3. For low accuracy, only few wiring matrices are needed, and the relative cost of the codebook is more important. This shifts the optimum rate towards lower values.  
In the last two rows of Table 1, we compare linear computation coding to our benchmark set by [PERSON]'s CSD representation, cf. Section 3. For Gaussian distributed random variables, (5) is not valid. Therefore, we obtained an equivalent relation by means of computer simulation averaging of \(10^{6}\) Gaussian random numbers--which turns out to be very close to (5), though--to obtain the penultimate row in the table.  
CSD, however, can do better than that. Instead of using a fixed number of CSDs for each entry of the matrix, one could also adaptively assign more or less digits to the various entries, based on the overall gain in reducing the total quantization error. Such a procedure leads to the last row in Table 1 and is marked as CSDa.  
The number of additions per matrix entry hardly depends on the size of the matrix, as CSD works element-wise. It reduces the effort of scalar multiplications, which are required exactly once per matrix entry. Only when it comes to summing these scalar products to obtain the output vector, does the number of columns of the matrix matter. This is, as summing \(N\) numbers only required \(N-1\) additions. After normalization, this yields the \(-\frac{1}{N}\) corrections in the table.  
Returning to the \(4096\times 512\) matrix of Examples 1 and 2, we cut this matrix into 32 tall submatrices of size \(4096\times 16\). According to Table 1, we need \(32\times 4096\times 16\times 1.549\) additions for the 32 submatrix-vector products to obtain 96 dB SQNR, if the matrix has IID Gaussian entries. Furthermore, we need \(31\times 512\) additions to sum the subvectors in (10). In total, that gives \(512\times(4096\times 1.549+31)\approx 3.26\) million additions. This means 1.557 additions per matrix entry. Note that the number of additions per matrix entry in Table 1 is 1.549 for a \(4096\times 16\) matrix, while we actually need 1.557 for the \(4096\times 512\) matrix. Apparently, the surplus effort for summing the subvectors in (10) is insignificant. For the two CSD methods,