Bug 38: Broken Broadword Matrix Multiplication
- This multiplies two 4x4 matrices (a and b) and adds a third 4x4 matrix (c) to the result.
- Each 4x4 matrix has 1-bit elements and is represented in the low 16 bits of a 64-bit integer.
- The matrices are row-major: A matrix element at some row and column is at bit row*4+column.
- The 16-bit matrix a is expanded from: (msb) ponm_lkji_hgfe_dcba (lsb)
- To: pppp_llll_hhhh_dddd_oooo_kkkk_gggg_cccc_nnnn_jjjj_ffff_bbbb_mmmm_iiii_eeee_aaaa
- The 16-bit matrix b is expanded from: (msb) ponm_lkji_hgfe_dcba (lsb)
- To: ponm_ponm_ponm_ponm_lkji_lkji_lkji_lkji_hgfe_hgfe_hgfe_hgfe_dcba_dcba_dcba_dcba
- All 64 elementwise multiplications are performed together by a single 64-bit AND.
- Addition is XOR in this implementation, but OR could be used instead.
Fix The Tiny Bug In This Go Code: