public void optTranspose ()
    {  
        int num_procs = 4;
    
        for (int index = 0; index < (dim/(num_procs*32)); index++) {
            for (int p = 0; p < num_procs; p++) {
                for (int k = 0; k < dim/32; k++) {
                    for (int j = 0; j < 32; j++) {
                        for (int i = 0; i < 32; i++) {
                            opt_result[k*32 + j][p*(dim/num_procs)+(index*32) + i] = source[p*(dim/num_procs)+(index*32) + i][k*32 + j];
                        }
                    }
                }
            }
        }
    }