Padding matrix in C
<p>I try to use SSE to transpose my matrix. But it can only fit matrix whose N is divisible by 4. So I want to pad matrix to reformat it. </p>

<p>For example, if a 3 * 3 matrix, it should pad into 4 * 4 matrix:</p>

<pre><code>1 2 3    1 2 3 0 
4 5 6 =&gt; 4 5 6 0
7 8 9    7 8 9 0
         0 0 0 0
</code></pre>

<p>Any efficient way to do this? And I am not sure if cost time padding it, would the SSE transpose be even slower than just loop every index...</p>