Padding is not a supported feature of the library element. For matrices whose dimensions are not multiples of vecSampleNum, the input matrix must be padded such that it is a multiple of vecSampleNum (the output locations corresponding to the pads should be ignored). TP_DIM must be set to the padded dimension size.
The following is an example of a 6x6 matrix with vecSampleNum of 4 (thus TP_DIM set to 8):
+----------------------+ |1 2 3 4 5 6 0 0| |2 7 8 9 10 11 0 0| |3 8 12 13 14 15 0 0| |4 9 13 16 17 18 0 0| |5 10 14 17 19 20 0 0| |6 11 15 18 20 21 0 0| |0 0 0 0 0 0 0 0| |0 0 0 0 0 0 0 0| +----------------------+