/* PARALPLUS234

TESTING parallel CLAUSE
arrA3[*][BLOCK][BLOCK]
or arrA3[BLOCK][*][BLOCK]
or arrA4[BLOCK][*][*][BLOCK]
or arrA4[*][BLOCK][*][BLOCK]  etc. */

#include <math.h>
#include <stdlib.h>
#include <stdio.h>

#define Min(a, b) (((a) < (b)) ? (a) : (b))

static void parallel31();
static void parallel32();
static void parallel33();
static void parallel34();
static void parallel35();
static void parallel36();
static void parallel37();
static void parallel38();
static void parallel39();
static void parallel310();
static void parallel311();
static void parallel312();

static void parallel41();
static void parallel42();
static void parallel43();
static void parallel44();
static void parallel45();
static void parallel46();

static void ansyes(const char tname[]);
static void ansno(const char tname[]);

static int NL = 10000;
static int ER = 100000;
static int PN = 2;
static int erri, NNL, i, j, n, m, ia, ja, na, ma, ib, jb, nb, mb, Avalue, Bvalue, s, cs;

int main(int an, char **as)
{
    printf("===START OF paralplus234========================\n");
/* PARALLEL ON  arrA[i][2* j][k] stretching */
    parallel31();
/* PARALLEL ON  arrA[i+2][ j][k]  shift */
    parallel32();
/* PARALLEL ON  arrA[i][ j][-k+8]  reverse */
//    parallel33();
/* PARALLEL ON  arrA[i][ j][2]
                                              compression             !! */
    parallel34();
/* PARALLEL ON  arrA[][ j][ k]
                                                replication */
    parallel35();
/* PARALLEL ON  arrA[1][i][3]
                                               compression and replication */
    parallel36();
/* PARALLEL ON  arrA[i][2* j][k] stretching */
    parallel37();
/* PARALLEL ON  arrA[i+2][ j][k]  shift */
    parallel38();
/* PARALLEL ON  arrA[i][ j][-k+8]  reverse */
//    parallel39();
/* PARALLEL ON  arrA[i][ j][2]
                                              compression             !! */
    parallel310();
/* PARALLEL ON  arrA[][ j][ k]
                                                replication */
    parallel311();
/* PARALLEL ON  arrA[1][i][3]
                                               compression and replication */
    parallel312();

/* PARALLEL ON  arrA[i][2* j][k][3*l] stretching */
    parallel41();
/* PARALLEL ON  arrA[i+2][ j][k][ l+3] */
    parallel42();
/* PARALLEL ON  arrA[i][ j][-k+8][- l+8]  reverse */
//    parallel43();
/* PARALLEL ON  arrA[i][ j][2][ l]
                                              compression             !! */
    parallel44();
/* PARALLEL ON  arrA[i][ j][ ][ k]
                                                replication */
    parallel45();
/* PARALLEL ON  arrA[i][ j][ ][3]
                                               compression and replication */
    parallel46();

    printf("=== END OF paralplus234 =========================\n");
    return 0;
}
/* ---------------------------------------------parallel31 */
/* arrA[*][BLOCK] [BLOCK]
        PARALLEL ON  arrA[i][2* j][k] stretching */
void parallel31()
{
    #define AN1 6
    #define AN2 6
    #define AN3 4
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define li 0
    #define k1j 0
    #define k2j 2
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 1
    #define ln 0

    #pragma dvm array distribute[*][block][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));

    char tname[] = "paral+31 ";
    erri = ER;
    NNL = NL;

    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(A3)
    #pragma dvm parallel([i][j][n] on  A3[k1i * i + li][k2j * j + lj][k3n * n + ln]) reduction(min(erri)), private(ia, ja, na)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++) {
                ia = k1i * i + li;
                ja = k2j * j + lj;
                na = k3n * n + ln;
                if (A3[ia][ja][na] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
            }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel32 */
/* PARALLEL ON  arrA[i+2][ j][k]  shift */
void parallel32()
{
    #define AN1 5
    #define AN2 5
    #define AN3 5
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define li 2
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 1
    #define ln 0

    #pragma dvm array distribute[*][block][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));

    char tname[] = "paral+32 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(A3)
    #pragma dvm parallel([i][j][n] on  A3[k1i * i + li][k2j * j + lj][k3n * n + ln]) reduction(min(erri)), private(ia, ja, na)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++) {
                ia = k1i * i + li;
                ja = k2j * j + lj;
                na = k3n * n + ln;
                if (A3[ia][ja][na] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
            }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel33 */
/* PARALLEL ON  arrA[i][ j][-k+8]  reverse */
void parallel33()
{
    #define AN1 5
    #define AN2 5
    #define AN3 5
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n -1
    #define ln 6

    #pragma dvm array distribute[*][block][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));

    char tname[] = "paral+33 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(A3)
    //#pragma dvm parallel([i][j][n] on  A3[k1i * i + li][k2j * j + lj][k3n * n + ln]) reduction(min(erri)), private(ia, ja, na)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++) {
                ia = k1i * i + li;
                ja = k2j * j + lj;
                na = k3n * n + ln;
                if (A3[ia][ja][na] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
            }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel34 */
/* PARALLEL ON  arrA[i][ j][2] */
void parallel34()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define BN1 3
    #define BN2 3
    #define BN3 3
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][ln] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 0
    #define ln 2

    #pragma dvm array distribute[*][block][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));
    #pragma dvm array
    int (*B3)[BN2][BN3];
    B3 = (int (*)[BN2][BN3])malloc(BN1 * sizeof(int[BN2][BN3]));
    #pragma dvm realign(B3[i][j][n] with A3[k1i*i+li][k2j*j+lj][ln])

    char tname[] = "paral+34 ";
    erri = ER;
    NNL = NL;

    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on B3[i][j][n])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                B3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;

    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(B3)
    #pragma dvm parallel([i][j][n] on  A3[k1i * i + li][k2j * j + lj][ln]) reduction(min(erri)), private(n)
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                if (B3[i][j][n] != i * NL / 10 + j * NL / 100 + n * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B3);
    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef BN1
    #undef BN2
    #undef BN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel35 */
/* PARALLEL ON  arrA[][ j][ k] */
void parallel35()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define BN1 6
    #define BN2 6
    #define BN3 6
    /*  parameters for PARALLEL ON  arrA[*][k2j*j+lj][k3n*n+ln] */
    #define k1i 0
    #define k2i 0
    #define k3i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 1
    #define ln 0

    #pragma dvm array distribute[*][block][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));
    #pragma dvm array
    int (*B3)[BN2][BN3];
    B3 = (int (*)[BN2][BN3])malloc(BN1 * sizeof(int[BN2][BN3]));
    #pragma dvm realign(B3[][j][n] with A3[][k2j*j+lj][k3n*n+ln])

    char tname[] = "paral+35 ";
    erri = ER;
    NNL = NL;
    #pragma dvm region out(A3, B3)
    {
    #pragma dvm parallel([i][j][n] on B3[i][j][n])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                B3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(A3, B3)
    for (i = 0; i < BN1; i++) {
        #pragma dvm parallel([j][n] on  A3[][k2j * j + lj][k3n * n + ln]) reduction(min(erri))
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                if (B3[i][j][n] != i * NL / 10 + j * NL / 100 + n * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
    }

    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B3);
    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef BN1
    #undef BN2
    #undef BN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel36 */
/* PARALLEL ON  arrA[1][i][3] */
void parallel36()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define BN1 3
    #define BN2 3
    #define BN3 3
    /*  parameters for PARALLEL ON  arrA[li][k2j*j+lj][ln] */
    #define k1i 0
    #define k2i 0
    #define k3i 0
    #define li 1
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 0
    #define ln 3

    #pragma dvm array distribute[*][block][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));
    #pragma dvm array
    int (*B3)[BN2][BN3];
    B3 = (int (*)[BN2][BN3])malloc(BN1 * sizeof(int[BN2][BN3]));
    #pragma dvm realign(B3[i][j][n] with A3[li][k2j*j+lj][ln])

    char tname[] = "paral+36 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on B3[i][j][n])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                B3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(B3)
    #pragma dvm parallel([i][j][n] on  A3[li][k2j * j + lj][ln]) reduction(min(erri))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                if (B3[i][j][n] != i * NL / 10 + j * NL / 100 + n * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
    #pragma dvm get_actual(erri)

    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B3);
    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef BN1
    #undef BN2
    #undef BN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel37 */
/* arrA[BLOCK][*] [BLOCK]
        PARALLEL ON  arrA[i][2* j][k] stretching */
void parallel37()
{
    #define AN1 6
    #define AN2 6
    #define AN3 4
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define li 0
    #define k1j 0
    #define k2j 2
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 1
    #define ln 0

    #pragma dvm array distribute[block][*][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));

    char tname[] = "paral+37 ";
    erri = ER;
    NNL = NL;

    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(A3)
    #pragma dvm parallel([i][j][n] on  A3[k1i * i + li][k2j * j + lj][k3n * n + ln]) reduction(min(erri)), private(ia, ja, na)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++) {
                ia = k1i * i + li;
                ja = k2j * j + lj;
                na = k3n * n + ln;
                if (A3[ia][ja][na] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
            }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel38 */
/* PARALLEL ON  arrA[i+2][ j][k]  shift */
void parallel38()
{
    #define AN1 5
    #define AN2 5
    #define AN3 5
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define li 2
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 1
    #define ln 0

    #pragma dvm array distribute[block][*][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));

    char tname[] = "paral+38 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(A3)
    #pragma dvm parallel([i][j][n] on  A3[k1i * i + li][k2j * j + lj][k3n * n + ln]) reduction(min(erri)), private(ia, ja, na)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++) {
                ia = k1i * i + li;
                ja = k2j * j + lj;
                na = k3n * n + ln;
                if (A3[ia][ja][na] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
            }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel39 */
/* PARALLEL ON  arrA[i][ j][-k+8]  reverse */
void parallel39()
{
    #define AN1 5
    #define AN2 5
    #define AN3 5
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n -1
    #define ln 6

    #pragma dvm array distribute[block][*][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));

    char tname[] = "paral+39 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(A3)
    //#pragma dvm parallel([i][j][n] on  A3[k1i * i + li][k2j * j + lj][k3n * n + ln]) reduction(min(erri)), private(ia, ja, na)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++) {
                ia = k1i * i + li;
                ja = k2j * j + lj;
                na = k3n * n + ln;
                if (A3[ia][ja][na] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
            }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel310 */
/* PARALLEL ON  arrA[i][ j][2] */
void parallel310()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define BN1 3
    #define BN2 3
    #define BN3 3
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][ln] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 0
    #define ln 2

    #pragma dvm array distribute[block][*][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));
    #pragma dvm array
    int (*B3)[BN2][BN3];
    B3 = (int (*)[BN2][BN3])malloc(BN1 * sizeof(int[BN2][BN3]));
    #pragma dvm realign(B3[i][j][n] with A3[k1i*i+li][k2j*j+lj][ln])

    char tname[] = "paral+310 ";
    erri = ER;
    NNL = NL;

    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on B3[i][j][n])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                B3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;

    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(B3)
    #pragma dvm parallel([i][j][n] on  A3[k1i * i + li][k2j * j + lj][ln]) reduction(min(erri)), private(n)
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                if (B3[i][j][n] != i * NL / 10 + j * NL / 100 + n * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B3);
    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef BN1
    #undef BN2
    #undef BN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel311 */
/* PARALLEL ON  arrA[][ j][ k] */
void parallel311()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define BN1 6
    #define BN2 6
    #define BN3 6
    /*  parameters for PARALLEL ON  arrA[*][k2j*j+lj][k3n*n+ln] */
    #define k1i 0
    #define k2i 0
    #define k3i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 1
    #define ln 0

    #pragma dvm array distribute[block][*][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));
    #pragma dvm array
    int (*B3)[BN2][BN3];
    B3 = (int (*)[BN2][BN3])malloc(BN1 * sizeof(int[BN2][BN3]));
    #pragma dvm realign(B3[][j][n] with A3[][k2j*j+lj][k3n*n+ln])

    char tname[] = "paral+311 ";
    erri = ER;
    NNL = NL;
    #pragma dvm region out(A3, B3)
    {
    #pragma dvm parallel([i][j][n] on B3[i][j][n])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                B3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(A3, B3)
    for (i = 0; i < BN1; i++) {
        #pragma dvm parallel([j][n] on  A3[][k2j * j + lj][k3n * n + ln]) reduction(min(erri))
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                if (B3[i][j][n] != i * NL / 10 + j * NL / 100 + n * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
    }

    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B3);
    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef BN1
    #undef BN2
    #undef BN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel312 */
/* PARALLEL ON  arrA[1][i][3] */
void parallel312()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define BN1 3
    #define BN2 3
    #define BN3 3
    /*  parameters for PARALLEL ON  arrA[li][k2j*j+lj][ln] */
    #define k1i 0
    #define k2i 0
    #define k3i 0
    #define li 1
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 0
    #define ln 3

    #pragma dvm array distribute[block][*][block]
    int (*A3)[AN2][AN3];
    A3 = (int (*)[AN2][AN3])malloc(AN1 * sizeof(int[AN2][AN3]));
    #pragma dvm array
    int (*B3)[BN2][BN3];
    B3 = (int (*)[BN2][BN3])malloc(BN1 * sizeof(int[BN2][BN3]));
    #pragma dvm realign(B3[i][j][n] with A3[li][k2j*j+lj][ln])

    char tname[] = "paral+312 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n] on B3[i][j][n])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                B3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    #pragma dvm parallel([i][j][n] on A3[i][j][n])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                A3[i][j][n] = i * NL / 10 + j * NL / 100 + n * NL / 1000;
    } /*end region*/
    #pragma dvm get_actual(B3)
    #pragma dvm parallel([i][j][n] on  A3[li][k2j * j + lj][ln]) reduction(min(erri))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                if (B3[i][j][n] != i * NL / 10 + j * NL / 100 + n * NL / 1000)
                    erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000);
    #pragma dvm get_actual(erri)

    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B3);
    free(A3);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef BN1
    #undef BN2
    #undef BN3
    #undef k1i
    #undef k2i
    #undef k3i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef ln
}
/* ---------------------------------------------parallel41 */
/* arrA4[*][*] [BLOCK] [BLOCK]
        PARALLEL ON  arrA[i][2* j][k][3*l] stretching */
void parallel41()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define AN4 6
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define k4i 0
    #define li 0
    #define k1j 0
    #define k2j 2
    #define k3j 0
    #define k4j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 1
    #define k4n 0
    #define ln 0
    #define k1m 0
    #define k2m 0
    #define k3m 0
    #define k4m 3
    #define lm 0

    #pragma dvm array distribute[*][*][block][block]
    int (*A4)[AN2][AN3][AN4];
    A4 = (int (*)[AN2][AN3][AN4])malloc(AN1 * sizeof(int[AN2][AN3][AN4]));

    char tname[] = "paral+41 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    } /*end region*/
    #pragma dvm get_actual(A4)
    #pragma dvm parallel([i][j][n][m] on  A4[k1i * i + li][k2j * j + lj][k3n * n + ln][k4m * m + lm]) reduction(min(erri)), private(ia, ja, na, ma)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++)
                for (m = 0; m < ((AN4 - lm) / k4m); m++) {
                    ia = k1i * i + li;
                    ja = k2j * j + lj;
                    na = k3n * n + ln;
                    ma = k4m * m + lm;
                    if (A4[ia][ja][na][ma] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000 + ma)
                        erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000 + m);
                }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A4);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef k1i
    #undef k2i
    #undef k3i
    #undef k4i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef k4j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef k4n
    #undef ln
    #undef k1m
    #undef k2m
    #undef k3m
    #undef k4m
    #undef lm
}
/* ---------------------------------------------parallel42 */
/* PARALLEL ON  arrA[i+2][ j][k][ l+3]  shift */
void parallel42()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define AN4 6
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define k4i 0
    #define li 2
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define k4j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 1
    #define k4n 0
    #define ln 0
    #define k1m 0
    #define k2m 0
    #define k3m 0
    #define k4m 1
    #define lm 3

    #pragma dvm array distribute[*][block][*][block]
    int (*A4)[AN2][AN3][AN4];
    A4 = (int (*)[AN2][AN3][AN4])malloc(AN1 * sizeof(int[AN2][AN3][AN4]));

    char tname[] = "paral+42 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    } /*end region*/
    #pragma dvm get_actual(A4)
    #pragma dvm parallel([i][j][n][m] on  A4[k1i * i + li][k2j * j + lj][k3n * n + ln][k4m * m + lm]) reduction(min(erri)), private(ia, ja, na, ma)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++)
                for (m = 0; m < ((AN4 - lm) / k4m); m++) {
                    ia = k1i * i + li;
                    ja = k2j * j + lj;
                    na = k3n * n + ln;
                    ma = k4m * m + lm;
                    if (A4[ia][ja][na][ma] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000 + ma)
                        erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000 + m);
                }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A4);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef k1i
    #undef k2i
    #undef k3i
    #undef k4i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef k4j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef k4n
    #undef ln
    #undef k1m
    #undef k2m
    #undef k3m
    #undef k4m
    #undef lm
}
/* ---------------------------------------------parallel43 */
/* PARALLEL ON  arrA[i][ j][-k+8][- l+8]  reverse */
void parallel43()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define AN4 6
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define k4i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define k4j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n -1
    #define k4n 0
    #define ln 8
    #define k1m 0
    #define k2m 0
    #define k3m 0
    #define k4m -1
    #define lm 8

    #pragma dvm array distribute[block][block][*][*]
    int (*A4)[AN2][AN3][AN4];
    A4 = (int (*)[AN2][AN3][AN4])malloc(AN1 * sizeof(int[AN2][AN3][AN4]));

    char tname[] = "paral+43 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    } /*end region*/
    #pragma dvm get_actual(A4)
    //#pragma dvm parallel([i][j][n][m] on  A4[k1i * i + li][k2j * j + lj][k3n * n + ln][k4m * m + lm]) reduction(min(erri)), private(ia, ja, na, ma)
    for (i = 0; i < ((AN1 - li) / k1i); i++)
        for (j = 0; j < ((AN2 - lj) / k2j); j++)
            for (n = 0; n < ((AN3 - ln) / k3n); n++)
                for (m = 0; m < ((AN4 - lm) / k4m); m++) {
                    ia = k1i * i + li;
                    ja = k2j * j + lj;
                    na = k3n * n + ln;
                    ma = k4m * m + lm;
                    if (A4[ia][ja][na][ma] != ia * NL / 10 + ja * NL / 100 + na * NL / 1000 + ma)
                        erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000 + m);
                }
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(A4);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef k1i
    #undef k2i
    #undef k3i
    #undef k4i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef k4j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef k4n
    #undef ln
    #undef k1m
    #undef k2m
    #undef k3m
    #undef k4m
    #undef lm
}
/* ---------------------------------------------parallel44 */
/* PARALLEL ON  arrA[i][ j][2][ l] */
void parallel44()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define AN4 6
    #define BN1 3
    #define BN2 3
    #define BN3 3
    #define BN4 3
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define k4i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define k4j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 0
    #define k4n 0
    #define ln 2
    #define k1m 0
    #define k2m 0
    #define k3m 0
    #define k4m 1
    #define lm 0

    #pragma dvm array distribute[block][*][*][block]
    int (*A4)[AN2][AN3][AN4];
    A4 = (int (*)[AN2][AN3][AN4])malloc(AN1 * sizeof(int[AN2][AN3][AN4]));
    #pragma dvm array
    int (*B4)[BN2][BN3][BN4];
    B4 = (int (*)[BN2][BN3][BN4])malloc(BN1 * sizeof(int[BN2][BN3][BN4]));
    #pragma dvm realign(B4[i][j][n][m] with A4[k1i*i+li][k2j*j+lj][ln][k4m*m+lm])


    char tname[] = "paral+44 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    } /*end region*/
    #pragma dvm get_actual(B4)
    #pragma dvm parallel([i][j][n][m] on  A4[k1i * i + li][k2j * j + lj][ln][k4m * m + lm]) reduction(min(erri))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    if (B4[i][j][n][m] != i * NL / 10 + j * NL / 100 + n * NL / 1000 + m)
                        erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000 + m);
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B4);
    free(A4);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
    #undef k1i
    #undef k2i
    #undef k3i
    #undef k4i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef k4j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef k4n
    #undef ln
    #undef k1m
    #undef k2m
    #undef k3m
    #undef k4m
    #undef lm
}
/* ---------------------------------------------parallel45 */
/* PARALLEL ON  arrA[i][ j][ ][ k] */
void parallel45()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define AN4 6
    #define BN1 3
    #define BN2 3
    #define BN3 3
    #define BN4 3
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define k4i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define k4j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 0
    #define k4n 0
    #define ln 0
    #define k1m 0
    #define k2m 0
    #define k3m 0
    #define k4m 1
    #define lm 0

    #pragma dvm array distribute[*][block][block][*]
    int (*A4)[AN2][AN3][AN4];
    A4 = (int (*)[AN2][AN3][AN4])malloc(AN1 * sizeof(int[AN2][AN3][AN4]));
    #pragma dvm array
    int (*B4)[BN2][BN3][BN4];
    B4 = (int (*)[BN2][BN3][BN4])malloc(BN1 * sizeof(int[BN2][BN3][BN4]));
    #pragma dvm realign(B4[i][j][n][m] with A4[k1i*i+li][k2j*j+lj][][k4m*m+lm])

    char tname[] = "paral+45 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    } /*end region*/
    #pragma dvm get_actual(B4)
    #pragma dvm parallel([i][j][n][m] on  A4[k1i * i + li][k2j * j + lj][][k4m * m + lm]) reduction(min(erri))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    if (B4[i][j][n][m] != i * NL / 10 + j * NL / 100 + n * NL / 1000 + m)
                        erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000 + m);
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B4);
    free(A4);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
    #undef k1i
    #undef k2i
    #undef k3i
    #undef k4i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef k4j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef k4n
    #undef ln
    #undef k1m
    #undef k2m
    #undef k3m
    #undef k4m
    #undef lm
}
/* ---------------------------------------------parallel46 */
/* PARALLEL ON  arrA[i][ j][ ][3] */
void parallel46()
{
    #define AN1 6
    #define AN2 6
    #define AN3 6
    #define AN4 6
    #define BN1 3
    #define BN2 3
    #define BN3 3
    #define BN4 3
    /*  parameters for PARALLEL ON  arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm] */
    #define k1i 1
    #define k2i 0
    #define k3i 0
    #define k4i 0
    #define li 0
    #define k1j 0
    #define k2j 1
    #define k3j 0
    #define k4j 0
    #define lj 0
    #define k1n 0
    #define k2n 0
    #define k3n 0
    #define k4n 0
    #define ln 0
    #define k1m 0
    #define k2m 0
    #define k3m 0
    #define k4m 0
    #define lm 3

    #pragma dvm array distribute[*][*][block][block]
    int (*A4)[AN2][AN3][AN4];
    A4 = (int (*)[AN2][AN3][AN4])malloc(AN1 * sizeof(int[AN2][AN3][AN4]));
    #pragma dvm array
    int (*B4)[BN2][BN3][BN4];
    B4 = (int (*)[BN2][BN3][BN4])malloc(BN1 * sizeof(int[BN2][BN3][BN4]));
    #pragma dvm realign(B4[i][j][n][m] with A4[k1i*i+li][k2j*j+lj][][lm])

    char tname[] = "paral+46 ";
    erri = ER;
    NNL = NL;
    #pragma dvm actual(erri)
    #pragma dvm region
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m])
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    } /*end region*/
    #pragma dvm get_actual(B4)
    #pragma dvm parallel([i][j][n][m] on  A4[k1i * i + li][k2j * j + lj][][lm]) reduction(min(erri))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    if (B4[i][j][n][m] != i * NL / 10 + j * NL / 100 + n * NL / 1000 + m)
                        erri = Min(erri, i * NL / 10 + j * NL / 100 + n * NL / 1000 + m);
    #pragma dvm get_actual(erri)
    s = 0;
    cs = 0;
    if (erri == ER && s == cs)
        ansyes(tname);
    else
        ansno(tname);

    free(B4);
    free(A4);

    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
    #undef k1i
    #undef k2i
    #undef k3i
    #undef k4i
    #undef li
    #undef k1j
    #undef k2j
    #undef k3j
    #undef k4j
    #undef lj
    #undef k1n
    #undef k2n
    #undef k3n
    #undef k4n
    #undef ln
    #undef k1m
    #undef k2m
    #undef k3m
    #undef k4m
    #undef lm
}
/*-------------------------------------------------------*/
void ansyes(const char name[])
{
    printf("%s  -  complete\n", name);
}

void ansno(const char name[])
{
    printf("%s  -  ***error\n", name);
}
