Content

Lösungsvorschlag

Packen von Blöcken in Matrix \(A\)

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <sys/times.h>
#include <unistd.h>

//-- setup and print matrices --------------------------------------------------

void
initGeMatrix(int m, int n, double *A, int incRowA, int incColA)
{
    int i, j;

    for (i=0; i<m; ++i) {
        for (j=0; j<n; ++j) {
            A[i*incRowA+j*incColA] = i*n + j + 1;
        }
    }
}

void
printGeMatrix(int m, int n, const double *A, int incRowA, int incColA)
{
    int i, j;

    for (i=0; i<m; ++i) {
        for (j=0; j<n; ++j) {
            printf("%10.4lf ", A[i*incRowA+j*incColA]);
        }
        printf("\n");
    }
    printf("\n\n");
}

//------------------------------------------------------------------------------

#ifndef DGEMM_MC
#define DGEMM_MC 8
#endif

#ifndef DGEMM_NC
#define DGEMM_NC 9
#endif

#ifndef DGEMM_KC
#define DGEMM_KC 10
#endif

#ifndef DGEMM_MR
#define DGEMM_MR 4
#endif

#ifndef DGEMM_NR
#define DGEMM_NR 3
#endif



//------------------------------------------------------------------------------

void
dpack_A(int m, int k, const double *A, int incRowA, int incColA, double *p)
{
    int i, i0, j, l, nu;
    int mp = (m+DGEMM_MR-1) / DGEMM_MR;

    for (j=0; j<k; ++j) {
        for (l=0; l<mp; ++l) {
            for (i0=0; i0<DGEMM_MR; ++i0) {
                i     = l*DGEMM_MR + i0;
                nu    = l*DGEMM_MR*k + j*DGEMM_MR + i0;
                p[nu] = (i<m) ? A[i*incRowA+j*incColA]
                              : 0;
            }
        }
    }
}

//------------------------------------------------------------------------------

#ifndef DIM_M
#define DIM_M 10
#endif

#ifndef DIM_K
#define DIM_K 12
#endif

#ifndef ROWMAJOR
#define INCROW_A 1
#define INCCOL_A DIM_M
#else
#define INCROW_A DIM_K
#define INCCOL_A 1
#endif

#define MIN(X,Y) (X) < (Y) ? (X) : (Y)

double A[DIM_M*DIM_K];
double A_buffer[DGEMM_MC*DGEMM_KC];

int
main()
{
    initGeMatrix(DIM_M, DIM_K, A, INCROW_A, INCCOL_A);

    printf("A=\n");
    printGeMatrix(DIM_M, DIM_K, A, INCROW_A, INCCOL_A);

    printf("Nach packen von Block links oben\n");
    dpack_A(MIN(DIM_M, DGEMM_MC), MIN(DIM_K, DGEMM_KC),
            A, INCROW_A, INCCOL_A, A_buffer);

    printf("A_buffer=\n");
    printGeMatrix(1, DGEMM_MC*DGEMM_KC, A_buffer, 0, 1);
    printGeMatrix(DGEMM_MR, DGEMM_MC*DGEMM_KC/DGEMM_MR, A_buffer, 1, DGEMM_MR);

    printf("Nach packen von Block rechts oben\n");
    dpack_A(MIN(DIM_M, DGEMM_MC), MIN(DIM_K-DGEMM_KC, DGEMM_KC),
            &A[DGEMM_KC*INCCOL_A], INCROW_A, INCCOL_A, A_buffer);

    printf("A_buffer=\n");
    printGeMatrix(1, DGEMM_MC*DGEMM_KC, A_buffer, 0, 1);
    printGeMatrix(DGEMM_MR, DGEMM_MC*DGEMM_KC/DGEMM_MR, A_buffer, 1, DGEMM_MR);

    printf("Nach packen von Block links unten\n");
    dpack_A(MIN(DIM_M-DGEMM_MC, DGEMM_MC), MIN(DIM_K, DGEMM_KC),
            &A[DGEMM_MC*INCROW_A], INCROW_A, INCCOL_A, A_buffer);

    printf("A_buffer=\n");
    printGeMatrix(1, DGEMM_MC*DGEMM_KC, A_buffer, 0, 1);
    printGeMatrix(DGEMM_MR, DGEMM_MC*DGEMM_KC/DGEMM_MR, A_buffer, 1, DGEMM_MR);

    printf("Nach packen von Block rechts unten\n");
    dpack_A(MIN(DIM_M-DGEMM_MC, DGEMM_MC), MIN(DIM_K-DGEMM_KC, DGEMM_KC),
            &A[DGEMM_MC*INCROW_A+DGEMM_KC*INCCOL_A],
            INCROW_A, INCCOL_A, A_buffer);

    printf("A_buffer=\n");
    printGeMatrix(1, DGEMM_MC*DGEMM_KC, A_buffer, 0, 1);
    printGeMatrix(DGEMM_MR, DGEMM_MC*DGEMM_KC/DGEMM_MR, A_buffer, 1, DGEMM_MR);

    return 0;
}
$shell> gcc -Wall pack_a_sol.c
$shell> ./a.out
A=
    1.0000     2.0000     3.0000     4.0000     5.0000     6.0000     7.0000     8.0000     9.0000    10.0000    11.0000    12.0000 
   13.0000    14.0000    15.0000    16.0000    17.0000    18.0000    19.0000    20.0000    21.0000    22.0000    23.0000    24.0000 
   25.0000    26.0000    27.0000    28.0000    29.0000    30.0000    31.0000    32.0000    33.0000    34.0000    35.0000    36.0000 
   37.0000    38.0000    39.0000    40.0000    41.0000    42.0000    43.0000    44.0000    45.0000    46.0000    47.0000    48.0000 
   49.0000    50.0000    51.0000    52.0000    53.0000    54.0000    55.0000    56.0000    57.0000    58.0000    59.0000    60.0000 
   61.0000    62.0000    63.0000    64.0000    65.0000    66.0000    67.0000    68.0000    69.0000    70.0000    71.0000    72.0000 
   73.0000    74.0000    75.0000    76.0000    77.0000    78.0000    79.0000    80.0000    81.0000    82.0000    83.0000    84.0000 
   85.0000    86.0000    87.0000    88.0000    89.0000    90.0000    91.0000    92.0000    93.0000    94.0000    95.0000    96.0000 
   97.0000    98.0000    99.0000   100.0000   101.0000   102.0000   103.0000   104.0000   105.0000   106.0000   107.0000   108.0000 
  109.0000   110.0000   111.0000   112.0000   113.0000   114.0000   115.0000   116.0000   117.0000   118.0000   119.0000   120.0000 


Nach packen von Block links oben
A_buffer=
    1.0000    13.0000    25.0000    37.0000     2.0000    14.0000    26.0000    38.0000     3.0000    15.0000    27.0000    39.0000     4.0000    16.0000    28.0000    40.0000     5.0000    17.0000    29.0000    41.0000     6.0000    18.0000    30.0000    42.0000     7.0000    19.0000    31.0000    43.0000     8.0000    20.0000    32.0000    44.0000     9.0000    21.0000    33.0000    45.0000    10.0000    22.0000    34.0000    46.0000    49.0000    61.0000    73.0000    85.0000    50.0000    62.0000    74.0000    86.0000    51.0000    63.0000    75.0000    87.0000    52.0000    64.0000    76.0000    88.0000    53.0000    65.0000    77.0000    89.0000    54.0000    66.0000    78.0000    90.0000    55.0000    67.0000    79.0000    91.0000    56.0000    68.0000    80.0000    92.0000    57.0000    69.0000    81.0000    93.0000    58.0000    70.0000    82.0000    94.0000 


    1.0000     2.0000     3.0000     4.0000     5.0000     6.0000     7.0000     8.0000     9.0000    10.0000    49.0000    50.0000    51.0000    52.0000    53.0000    54.0000    55.0000    56.0000    57.0000    58.0000 
   13.0000    14.0000    15.0000    16.0000    17.0000    18.0000    19.0000    20.0000    21.0000    22.0000    61.0000    62.0000    63.0000    64.0000    65.0000    66.0000    67.0000    68.0000    69.0000    70.0000 
   25.0000    26.0000    27.0000    28.0000    29.0000    30.0000    31.0000    32.0000    33.0000    34.0000    73.0000    74.0000    75.0000    76.0000    77.0000    78.0000    79.0000    80.0000    81.0000    82.0000 
   37.0000    38.0000    39.0000    40.0000    41.0000    42.0000    43.0000    44.0000    45.0000    46.0000    85.0000    86.0000    87.0000    88.0000    89.0000    90.0000    91.0000    92.0000    93.0000    94.0000 


Nach packen von Block rechts oben
A_buffer=
   11.0000    23.0000    35.0000    47.0000    12.0000    24.0000    36.0000    48.0000    59.0000    71.0000    83.0000    95.0000    60.0000    72.0000    84.0000    96.0000     5.0000    17.0000    29.0000    41.0000     6.0000    18.0000    30.0000    42.0000     7.0000    19.0000    31.0000    43.0000     8.0000    20.0000    32.0000    44.0000     9.0000    21.0000    33.0000    45.0000    10.0000    22.0000    34.0000    46.0000    49.0000    61.0000    73.0000    85.0000    50.0000    62.0000    74.0000    86.0000    51.0000    63.0000    75.0000    87.0000    52.0000    64.0000    76.0000    88.0000    53.0000    65.0000    77.0000    89.0000    54.0000    66.0000    78.0000    90.0000    55.0000    67.0000    79.0000    91.0000    56.0000    68.0000    80.0000    92.0000    57.0000    69.0000    81.0000    93.0000    58.0000    70.0000    82.0000    94.0000 


   11.0000    12.0000    59.0000    60.0000     5.0000     6.0000     7.0000     8.0000     9.0000    10.0000    49.0000    50.0000    51.0000    52.0000    53.0000    54.0000    55.0000    56.0000    57.0000    58.0000 
   23.0000    24.0000    71.0000    72.0000    17.0000    18.0000    19.0000    20.0000    21.0000    22.0000    61.0000    62.0000    63.0000    64.0000    65.0000    66.0000    67.0000    68.0000    69.0000    70.0000 
   35.0000    36.0000    83.0000    84.0000    29.0000    30.0000    31.0000    32.0000    33.0000    34.0000    73.0000    74.0000    75.0000    76.0000    77.0000    78.0000    79.0000    80.0000    81.0000    82.0000 
   47.0000    48.0000    95.0000    96.0000    41.0000    42.0000    43.0000    44.0000    45.0000    46.0000    85.0000    86.0000    87.0000    88.0000    89.0000    90.0000    91.0000    92.0000    93.0000    94.0000 


Nach packen von Block links unten
A_buffer=
   97.0000   109.0000     0.0000     0.0000    98.0000   110.0000     0.0000     0.0000    99.0000   111.0000     0.0000     0.0000   100.0000   112.0000     0.0000     0.0000   101.0000   113.0000     0.0000     0.0000   102.0000   114.0000     0.0000     0.0000   103.0000   115.0000     0.0000     0.0000   104.0000   116.0000     0.0000     0.0000   105.0000   117.0000     0.0000     0.0000   106.0000   118.0000     0.0000     0.0000    49.0000    61.0000    73.0000    85.0000    50.0000    62.0000    74.0000    86.0000    51.0000    63.0000    75.0000    87.0000    52.0000    64.0000    76.0000    88.0000    53.0000    65.0000    77.0000    89.0000    54.0000    66.0000    78.0000    90.0000    55.0000    67.0000    79.0000    91.0000    56.0000    68.0000    80.0000    92.0000    57.0000    69.0000    81.0000    93.0000    58.0000    70.0000    82.0000    94.0000 


   97.0000    98.0000    99.0000   100.0000   101.0000   102.0000   103.0000   104.0000   105.0000   106.0000    49.0000    50.0000    51.0000    52.0000    53.0000    54.0000    55.0000    56.0000    57.0000    58.0000 
  109.0000   110.0000   111.0000   112.0000   113.0000   114.0000   115.0000   116.0000   117.0000   118.0000    61.0000    62.0000    63.0000    64.0000    65.0000    66.0000    67.0000    68.0000    69.0000    70.0000 
    0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000    73.0000    74.0000    75.0000    76.0000    77.0000    78.0000    79.0000    80.0000    81.0000    82.0000 
    0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000    85.0000    86.0000    87.0000    88.0000    89.0000    90.0000    91.0000    92.0000    93.0000    94.0000 


Nach packen von Block rechts unten
A_buffer=
  107.0000   119.0000     0.0000     0.0000   108.0000   120.0000     0.0000     0.0000    99.0000   111.0000     0.0000     0.0000   100.0000   112.0000     0.0000     0.0000   101.0000   113.0000     0.0000     0.0000   102.0000   114.0000     0.0000     0.0000   103.0000   115.0000     0.0000     0.0000   104.0000   116.0000     0.0000     0.0000   105.0000   117.0000     0.0000     0.0000   106.0000   118.0000     0.0000     0.0000    49.0000    61.0000    73.0000    85.0000    50.0000    62.0000    74.0000    86.0000    51.0000    63.0000    75.0000    87.0000    52.0000    64.0000    76.0000    88.0000    53.0000    65.0000    77.0000    89.0000    54.0000    66.0000    78.0000    90.0000    55.0000    67.0000    79.0000    91.0000    56.0000    68.0000    80.0000    92.0000    57.0000    69.0000    81.0000    93.0000    58.0000    70.0000    82.0000    94.0000 


  107.0000   108.0000    99.0000   100.0000   101.0000   102.0000   103.0000   104.0000   105.0000   106.0000    49.0000    50.0000    51.0000    52.0000    53.0000    54.0000    55.0000    56.0000    57.0000    58.0000 
  119.0000   120.0000   111.0000   112.0000   113.0000   114.0000   115.0000   116.0000   117.0000   118.0000    61.0000    62.0000    63.0000    64.0000    65.0000    66.0000    67.0000    68.0000    69.0000    70.0000 
    0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000    73.0000    74.0000    75.0000    76.0000    77.0000    78.0000    79.0000    80.0000    81.0000    82.0000 
    0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000     0.0000    85.0000    86.0000    87.0000    88.0000    89.0000    90.0000    91.0000    92.0000    93.0000    94.0000 
$shell> 

Packen von Blöcken in Matrix \(B\)

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <sys/times.h>
#include <unistd.h>

//-- setup and print matrices --------------------------------------------------

void
initGeMatrix(int m, int n, double *A, int incRowA, int incColA)
{
    int i, j;

    for (i=0; i<m; ++i) {
        for (j=0; j<n; ++j) {
            A[i*incRowA+j*incColA] = i*n + j + 1;
        }
    }
}

void
printGeMatrix(int m, int n, const double *A, int incRowA, int incColA)
{
    int i, j;

    for (i=0; i<m; ++i) {
        for (j=0; j<n; ++j) {
            printf("%10.4lf ", A[i*incRowA+j*incColA]);
        }
        printf("\n");
    }
    printf("\n\n");
}

//------------------------------------------------------------------------------

#ifndef DGEMM_MC
#define DGEMM_MC 8
#endif

#ifndef DGEMM_NC
#define DGEMM_NC 9
#endif

#ifndef DGEMM_KC
#define DGEMM_KC 10
#endif

#ifndef DGEMM_MR
#define DGEMM_MR 4
#endif

#ifndef DGEMM_NR
#define DGEMM_NR 3
#endif



//------------------------------------------------------------------------------

void
dpack_A(int m, int k, const double *A, int incRowA, int incColA, double *p)
{
    int i, i0, j, l, nu;
    int mp = (m+DGEMM_MR-1) / DGEMM_MR;

    for (j=0; j<k; ++j) {
        for (l=0; l<mp; ++l) {
            for (i0=0; i0<DGEMM_MR; ++i0) {
                i     = l*DGEMM_MR + i0;
                nu    = l*DGEMM_MR*k + j*DGEMM_MR + i0;
                p[nu] = (i<m) ? A[i*incRowA+j*incColA]
                              : 0;
            }
        }
    }
}

void
dpack_B(int k, int n, const double *B, int incRowB, int incColB, double *p)
{
    int i, j, j0, l, nu;
    int np = (n+DGEMM_NR-1) / DGEMM_NR;

    for (l=0; l<np; ++l) {
        for (j0=0; j0<DGEMM_NR; ++j0) {
            j = l*DGEMM_NR + j0;
            for (i=0; i<k; ++i) {
                nu    = l*DGEMM_NR*k + i*DGEMM_NR + j0;
                p[nu] = (j<n) ? B[i*incRowB+j*incColB]
                              : 0;
            }
        }
    }
}

//------------------------------------------------------------------------------

#ifndef DIM_M
#define DIM_M 10
#endif

#ifndef DIM_K
#define DIM_K 12
#endif

#ifndef DIM_N
#define DIM_N 10
#endif


#ifndef ROWMAJOR
#define INCROW_A 1
#define INCCOL_A DIM_M
#else
#define INCROW_A DIM_K
#define INCCOL_A 1
#endif

#ifndef ROWMAJOR
#define INCROW_B 1
#define INCCOL_B DIM_K
#else
#define INCROW_B DIM_N
#define INCCOL_B 1
#endif


#define MIN(X,Y) (X) < (Y) ? (X) : (Y)

double B[DIM_K*DIM_N];
double B_buffer[DGEMM_KC*DGEMM_NC];

int
main()
{
    initGeMatrix(DIM_K, DIM_N, B, INCROW_B, INCCOL_B);

    printf("B=\n");
    printGeMatrix(DIM_K, DIM_N, B, INCROW_B, INCCOL_B);

    printf("Nach packen von Block links oben\n");
    dpack_B(MIN(DIM_K, DGEMM_KC), MIN(DIM_N, DGEMM_NC),
            B, INCROW_B, INCCOL_B, B_buffer);

    printf("B_buffer=\n");
    printGeMatrix(1, DGEMM_KC*DGEMM_NC, B_buffer, 0, 1);
    printGeMatrix(DGEMM_KC*DGEMM_NC/DGEMM_NR, DGEMM_NR, B_buffer, DGEMM_NR, 1);

    printf("Nach packen von Block rechts oben\n");
    dpack_B(MIN(DIM_K, DGEMM_KC), MIN(DIM_N-DGEMM_NC, DGEMM_NC),
            &B[DGEMM_NC*INCCOL_B], INCROW_B, INCCOL_B, B_buffer);

    printf("B_buffer=\n");
    printGeMatrix(1, DGEMM_KC*DGEMM_NC, B_buffer, 0, 1);
    printGeMatrix(DGEMM_KC*DGEMM_NC/DGEMM_NR, DGEMM_NR, B_buffer, DGEMM_NR, 1);

    printf("Nach packen von Block links unten\n");
    dpack_B(MIN(DIM_K-DGEMM_KC, DGEMM_KC), MIN(DIM_N, DGEMM_NC),
            &B[DGEMM_KC*INCROW_B],
            INCROW_B, INCCOL_B, B_buffer);

    printf("B_buffer=\n");
    printGeMatrix(1, DGEMM_KC*DGEMM_NC, B_buffer, 0, 1);
    printGeMatrix(DGEMM_KC*DGEMM_NC/DGEMM_NR, DGEMM_NR, B_buffer, DGEMM_NR, 1);

    printf("Nach packen von Block rechts unten\n");
    dpack_B(MIN(DIM_K-DGEMM_KC, DGEMM_KC), MIN(DIM_N-DGEMM_NC, DGEMM_NC),
            &B[DGEMM_KC*INCROW_B+DGEMM_NC*INCCOL_B],
            INCROW_B, INCCOL_B, B_buffer);

    printf("B_buffer=\n");
    printGeMatrix(1, DGEMM_KC*DGEMM_NC, B_buffer, 0, 1);
    printGeMatrix(DGEMM_KC*DGEMM_NC/DGEMM_NR, DGEMM_NR, B_buffer, DGEMM_NR, 1);

    return 0;
}
$shell> gcc -Wall pack_b_sol.c
$shell> ./a.out
B=
    1.0000     2.0000     3.0000     4.0000     5.0000     6.0000     7.0000     8.0000     9.0000    10.0000 
   11.0000    12.0000    13.0000    14.0000    15.0000    16.0000    17.0000    18.0000    19.0000    20.0000 
   21.0000    22.0000    23.0000    24.0000    25.0000    26.0000    27.0000    28.0000    29.0000    30.0000 
   31.0000    32.0000    33.0000    34.0000    35.0000    36.0000    37.0000    38.0000    39.0000    40.0000 
   41.0000    42.0000    43.0000    44.0000    45.0000    46.0000    47.0000    48.0000    49.0000    50.0000 
   51.0000    52.0000    53.0000    54.0000    55.0000    56.0000    57.0000    58.0000    59.0000    60.0000 
   61.0000    62.0000    63.0000    64.0000    65.0000    66.0000    67.0000    68.0000    69.0000    70.0000 
   71.0000    72.0000    73.0000    74.0000    75.0000    76.0000    77.0000    78.0000    79.0000    80.0000 
   81.0000    82.0000    83.0000    84.0000    85.0000    86.0000    87.0000    88.0000    89.0000    90.0000 
   91.0000    92.0000    93.0000    94.0000    95.0000    96.0000    97.0000    98.0000    99.0000   100.0000 
  101.0000   102.0000   103.0000   104.0000   105.0000   106.0000   107.0000   108.0000   109.0000   110.0000 
  111.0000   112.0000   113.0000   114.0000   115.0000   116.0000   117.0000   118.0000   119.0000   120.0000 


Nach packen von Block links oben
B_buffer=
    1.0000     2.0000     3.0000    11.0000    12.0000    13.0000    21.0000    22.0000    23.0000    31.0000    32.0000    33.0000    41.0000    42.0000    43.0000    51.0000    52.0000    53.0000    61.0000    62.0000    63.0000    71.0000    72.0000    73.0000    81.0000    82.0000    83.0000    91.0000    92.0000    93.0000     4.0000     5.0000     6.0000    14.0000    15.0000    16.0000    24.0000    25.0000    26.0000    34.0000    35.0000    36.0000    44.0000    45.0000    46.0000    54.0000    55.0000    56.0000    64.0000    65.0000    66.0000    74.0000    75.0000    76.0000    84.0000    85.0000    86.0000    94.0000    95.0000    96.0000     7.0000     8.0000     9.0000    17.0000    18.0000    19.0000    27.0000    28.0000    29.0000    37.0000    38.0000    39.0000    47.0000    48.0000    49.0000    57.0000    58.0000    59.0000    67.0000    68.0000    69.0000    77.0000    78.0000    79.0000    87.0000    88.0000    89.0000    97.0000    98.0000    99.0000 


    1.0000     2.0000     3.0000 
   11.0000    12.0000    13.0000 
   21.0000    22.0000    23.0000 
   31.0000    32.0000    33.0000 
   41.0000    42.0000    43.0000 
   51.0000    52.0000    53.0000 
   61.0000    62.0000    63.0000 
   71.0000    72.0000    73.0000 
   81.0000    82.0000    83.0000 
   91.0000    92.0000    93.0000 
    4.0000     5.0000     6.0000 
   14.0000    15.0000    16.0000 
   24.0000    25.0000    26.0000 
   34.0000    35.0000    36.0000 
   44.0000    45.0000    46.0000 
   54.0000    55.0000    56.0000 
   64.0000    65.0000    66.0000 
   74.0000    75.0000    76.0000 
   84.0000    85.0000    86.0000 
   94.0000    95.0000    96.0000 
    7.0000     8.0000     9.0000 
   17.0000    18.0000    19.0000 
   27.0000    28.0000    29.0000 
   37.0000    38.0000    39.0000 
   47.0000    48.0000    49.0000 
   57.0000    58.0000    59.0000 
   67.0000    68.0000    69.0000 
   77.0000    78.0000    79.0000 
   87.0000    88.0000    89.0000 
   97.0000    98.0000    99.0000 


Nach packen von Block rechts oben
B_buffer=
   10.0000     0.0000     0.0000    20.0000     0.0000     0.0000    30.0000     0.0000     0.0000    40.0000     0.0000     0.0000    50.0000     0.0000     0.0000    60.0000     0.0000     0.0000    70.0000     0.0000     0.0000    80.0000     0.0000     0.0000    90.0000     0.0000     0.0000   100.0000     0.0000     0.0000     4.0000     5.0000     6.0000    14.0000    15.0000    16.0000    24.0000    25.0000    26.0000    34.0000    35.0000    36.0000    44.0000    45.0000    46.0000    54.0000    55.0000    56.0000    64.0000    65.0000    66.0000    74.0000    75.0000    76.0000    84.0000    85.0000    86.0000    94.0000    95.0000    96.0000     7.0000     8.0000     9.0000    17.0000    18.0000    19.0000    27.0000    28.0000    29.0000    37.0000    38.0000    39.0000    47.0000    48.0000    49.0000    57.0000    58.0000    59.0000    67.0000    68.0000    69.0000    77.0000    78.0000    79.0000    87.0000    88.0000    89.0000    97.0000    98.0000    99.0000 


   10.0000     0.0000     0.0000 
   20.0000     0.0000     0.0000 
   30.0000     0.0000     0.0000 
   40.0000     0.0000     0.0000 
   50.0000     0.0000     0.0000 
   60.0000     0.0000     0.0000 
   70.0000     0.0000     0.0000 
   80.0000     0.0000     0.0000 
   90.0000     0.0000     0.0000 
  100.0000     0.0000     0.0000 
    4.0000     5.0000     6.0000 
   14.0000    15.0000    16.0000 
   24.0000    25.0000    26.0000 
   34.0000    35.0000    36.0000 
   44.0000    45.0000    46.0000 
   54.0000    55.0000    56.0000 
   64.0000    65.0000    66.0000 
   74.0000    75.0000    76.0000 
   84.0000    85.0000    86.0000 
   94.0000    95.0000    96.0000 
    7.0000     8.0000     9.0000 
   17.0000    18.0000    19.0000 
   27.0000    28.0000    29.0000 
   37.0000    38.0000    39.0000 
   47.0000    48.0000    49.0000 
   57.0000    58.0000    59.0000 
   67.0000    68.0000    69.0000 
   77.0000    78.0000    79.0000 
   87.0000    88.0000    89.0000 
   97.0000    98.0000    99.0000 


Nach packen von Block links unten
B_buffer=
  101.0000   102.0000   103.0000   111.0000   112.0000   113.0000   104.0000   105.0000   106.0000   114.0000   115.0000   116.0000   107.0000   108.0000   109.0000   117.0000   118.0000   119.0000    70.0000     0.0000     0.0000    80.0000     0.0000     0.0000    90.0000     0.0000     0.0000   100.0000     0.0000     0.0000     4.0000     5.0000     6.0000    14.0000    15.0000    16.0000    24.0000    25.0000    26.0000    34.0000    35.0000    36.0000    44.0000    45.0000    46.0000    54.0000    55.0000    56.0000    64.0000    65.0000    66.0000    74.0000    75.0000    76.0000    84.0000    85.0000    86.0000    94.0000    95.0000    96.0000     7.0000     8.0000     9.0000    17.0000    18.0000    19.0000    27.0000    28.0000    29.0000    37.0000    38.0000    39.0000    47.0000    48.0000    49.0000    57.0000    58.0000    59.0000    67.0000    68.0000    69.0000    77.0000    78.0000    79.0000    87.0000    88.0000    89.0000    97.0000    98.0000    99.0000 


  101.0000   102.0000   103.0000 
  111.0000   112.0000   113.0000 
  104.0000   105.0000   106.0000 
  114.0000   115.0000   116.0000 
  107.0000   108.0000   109.0000 
  117.0000   118.0000   119.0000 
   70.0000     0.0000     0.0000 
   80.0000     0.0000     0.0000 
   90.0000     0.0000     0.0000 
  100.0000     0.0000     0.0000 
    4.0000     5.0000     6.0000 
   14.0000    15.0000    16.0000 
   24.0000    25.0000    26.0000 
   34.0000    35.0000    36.0000 
   44.0000    45.0000    46.0000 
   54.0000    55.0000    56.0000 
   64.0000    65.0000    66.0000 
   74.0000    75.0000    76.0000 
   84.0000    85.0000    86.0000 
   94.0000    95.0000    96.0000 
    7.0000     8.0000     9.0000 
   17.0000    18.0000    19.0000 
   27.0000    28.0000    29.0000 
   37.0000    38.0000    39.0000 
   47.0000    48.0000    49.0000 
   57.0000    58.0000    59.0000 
   67.0000    68.0000    69.0000 
   77.0000    78.0000    79.0000 
   87.0000    88.0000    89.0000 
   97.0000    98.0000    99.0000 


Nach packen von Block rechts unten
B_buffer=
  110.0000     0.0000     0.0000   120.0000     0.0000     0.0000   104.0000   105.0000   106.0000   114.0000   115.0000   116.0000   107.0000   108.0000   109.0000   117.0000   118.0000   119.0000    70.0000     0.0000     0.0000    80.0000     0.0000     0.0000    90.0000     0.0000     0.0000   100.0000     0.0000     0.0000     4.0000     5.0000     6.0000    14.0000    15.0000    16.0000    24.0000    25.0000    26.0000    34.0000    35.0000    36.0000    44.0000    45.0000    46.0000    54.0000    55.0000    56.0000    64.0000    65.0000    66.0000    74.0000    75.0000    76.0000    84.0000    85.0000    86.0000    94.0000    95.0000    96.0000     7.0000     8.0000     9.0000    17.0000    18.0000    19.0000    27.0000    28.0000    29.0000    37.0000    38.0000    39.0000    47.0000    48.0000    49.0000    57.0000    58.0000    59.0000    67.0000    68.0000    69.0000    77.0000    78.0000    79.0000    87.0000    88.0000    89.0000    97.0000    98.0000    99.0000 


  110.0000     0.0000     0.0000 
  120.0000     0.0000     0.0000 
  104.0000   105.0000   106.0000 
  114.0000   115.0000   116.0000 
  107.0000   108.0000   109.0000 
  117.0000   118.0000   119.0000 
   70.0000     0.0000     0.0000 
   80.0000     0.0000     0.0000 
   90.0000     0.0000     0.0000 
  100.0000     0.0000     0.0000 
    4.0000     5.0000     6.0000 
   14.0000    15.0000    16.0000 
   24.0000    25.0000    26.0000 
   34.0000    35.0000    36.0000 
   44.0000    45.0000    46.0000 
   54.0000    55.0000    56.0000 
   64.0000    65.0000    66.0000 
   74.0000    75.0000    76.0000 
   84.0000    85.0000    86.0000 
   94.0000    95.0000    96.0000 
    7.0000     8.0000     9.0000 
   17.0000    18.0000    19.0000 
   27.0000    28.0000    29.0000 
   37.0000    38.0000    39.0000 
   47.0000    48.0000    49.0000 
   57.0000    58.0000    59.0000 
   67.0000    68.0000    69.0000 
   77.0000    78.0000    79.0000 
   87.0000    88.0000    89.0000 
   97.0000    98.0000    99.0000 
$shell>