Repository: ggerganov/llama.cpp
File: ggml/src/ggml-cpu/llamafile/sgemm.cpp (C++)

Code before:
        float * aoffsets[8];
        float *aoffset = NULL, *boffset = NULL;
        __vector_pair arr[8];
        vector float c[8][2] = {0};
        vector float c1[8] = {0};
        vector float c2[8] = {0};
        aoffset = const_cast<float*>(a);
        boffset = vec;
        j = (rows >> 3);
        if (j > 0) {

            do {
                aoffsets[0] = aoffset;
                for (int it = 1; it< 8; it++)
                    aoffsets[it] = aoffsets[it-1] + lda;
                aoffset += 8 * lda;
                i = (cols >> 3);
                if (i > 0) {
                    do {
                        for (int it = 0; it< 8; it++) {
                            arr[it] = __builtin_vsx_lxvp(0, (__vector_pair*)aoffsets[it]);
                            __builtin_vsx_disassemble_pair(c[it], &arr[it]);
                            c1[it] = c[it][0];
                            c2[it] = c[it][1];
                        }

                        vector_permute_store_8(c1, boffset);
                        vector_permute_store_8(c2, boffset+32);
                        for (int it = 0; it < 4; it++)
                            aoffsets[it] = aoffsets[it] + 8*lda;
                        boffset += 64;
                        i--;
                    } while(i > 0);
                }
                if (cols & 4) {
                    for (int it = 0; it < 8 ; it++)
                        c1[it] = vec_xl(0, aoffsets[it]);
                    vector_permute_store_8(c1, boffset);
                }
            j--;
            } while(j > 0);
        }

        if (rows & 4) {
            aoffsets[0] = aoffset;
            for (int it = 1; it < 4; it++)
                aoffsets[it] = aoffsets[it-1] + lda;
            aoffset += 4 * lda;
            i = (cols >> 3);
            if (i > 0) {
                do {

Review comment (suggestion):
```suggestion
        float * aoffsets[8];
        float * aoffset = NULL, * boffset = NULL;
```

Keep it consistent. Either `float *aoffset = NULL` or `float * aoffset = NULL` across the codebase, although CONTRIBUTING.md prefers the latter.

Code after:

        vec_xst(t5, 0, vecOffset);
        vec_xst(t6, 0, vecOffset + 4);
        vec_xst(t7, 0, vecOffset + 8);
        vec_xst(t8, 0, vecOffset + 12);

        t1 = vec_mergel(src[0], src[1]);
        t2 = vec_mergel(src[2], src[3]);
        t3 = vec_mergel(src[4], src[5]);
        t4 = vec_mergel(src[6], src[7]);

        t5 = vec_xxpermdi(t1, t2, 0);
        t6 = vec_xxpermdi(t3, t4, 0);
        t7 = vec_xxpermdi(t1, t2, 3);
        t8 = vec_xxpermdi(t3, t4, 3);

        vec_xst(t5, 0, vecOffset + 16);
        vec_xst(t6, 0, vecOffset + 20);
        vec_xst(t7, 0, vecOffset + 24);
        vec_xst(t8, 0, vecOffset + 28);
    }

    void packTranspose(const float * a, int64_t lda, int rows, int cols, float * vec) {
        int64_t i, j;
        float * aoffsets[8];
        float * aoffset = NULL, * boffset = NULL;
        __vector_pair arr[8];
        vector float c[8][2] = {0};
        vector float c1[8] = {0};
        vector float c2[8] = {0};
        aoffset = const_cast<float *>(a);
        boffset = vec;
        j = (rows >> 3);
        if (j > 0) {
            do {
                aoffsets[0] = aoffset;
                for (int it = 1; it < 8; it++)
                    aoffsets[it] = aoffsets[it-1] + lda;
                aoffset += 8 * lda;
                i = (cols >> 3);
                if (i > 0) {
                    do {
                        for (int it = 0; it < 8; it++) {
                            arr[it] = __builtin_vsx_lxvp(0, (__vector_pair*)aoffsets[it]);
                            __builtin_vsx_disassemble_pair(c[it], &arr[it]);
                            c1[it] = c[it][0];
                            c2[it] = c[it][1];
                        }

                        vector_permute_store_8(c1, boffset);
                        vector_permute_store_8(c2, boffset + 32);