|
kusano |
2b45e8 |
/*********************************************************************/
|
|
kusano |
2b45e8 |
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
|
kusano |
2b45e8 |
/* All rights reserved. */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* Redistribution and use in source and binary forms, with or */
|
|
kusano |
2b45e8 |
/* without modification, are permitted provided that the following */
|
|
kusano |
2b45e8 |
/* conditions are met: */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* 1. Redistributions of source code must retain the above */
|
|
kusano |
2b45e8 |
/* copyright notice, this list of conditions and the following */
|
|
kusano |
2b45e8 |
/* disclaimer. */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* 2. Redistributions in binary form must reproduce the above */
|
|
kusano |
2b45e8 |
/* copyright notice, this list of conditions and the following */
|
|
kusano |
2b45e8 |
/* disclaimer in the documentation and/or other materials */
|
|
kusano |
2b45e8 |
/* provided with the distribution. */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
|
|
kusano |
2b45e8 |
/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
|
|
kusano |
2b45e8 |
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
|
|
kusano |
2b45e8 |
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
|
|
kusano |
2b45e8 |
/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
|
|
kusano |
2b45e8 |
/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
|
|
kusano |
2b45e8 |
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
|
|
kusano |
2b45e8 |
/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
|
|
kusano |
2b45e8 |
/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
|
|
kusano |
2b45e8 |
/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
|
|
kusano |
2b45e8 |
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
|
|
kusano |
2b45e8 |
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
|
|
kusano |
2b45e8 |
/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
|
|
kusano |
2b45e8 |
/* POSSIBILITY OF SUCH DAMAGE. */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* The views and conclusions contained in the software and */
|
|
kusano |
2b45e8 |
/* documentation are those of the authors and should not be */
|
|
kusano |
2b45e8 |
/* interpreted as representing official policies, either expressed */
|
|
kusano |
2b45e8 |
/* or implied, of The University of Texas at Austin. */
|
|
kusano |
2b45e8 |
/*********************************************************************/
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#include <stdio.h></stdio.h>
|
|
kusano |
2b45e8 |
#include "common.h"
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLONG posY, FLOAT *b){
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
BLASLONG i, js;
|
|
kusano |
2b45e8 |
BLASLONG X, ii;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLOAT *a01, *a02, *a03 ,*a04, *a05, *a06, *a07, *a08;
|
|
kusano |
2b45e8 |
FLOAT *a09, *a10, *a11, *a12, *a13, *a14, *a15, *a16;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
js = (n >> 4);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (js > 0){
|
|
kusano |
2b45e8 |
do {
|
|
kusano |
2b45e8 |
X = posX;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (posX <= posY) {
|
|
kusano |
2b45e8 |
a01 = a + posX + (posY + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posX + (posY + 1) * lda;
|
|
kusano |
2b45e8 |
a03 = a + posX + (posY + 2) * lda;
|
|
kusano |
2b45e8 |
a04 = a + posX + (posY + 3) * lda;
|
|
kusano |
2b45e8 |
a05 = a + posX + (posY + 4) * lda;
|
|
kusano |
2b45e8 |
a06 = a + posX + (posY + 5) * lda;
|
|
kusano |
2b45e8 |
a07 = a + posX + (posY + 6) * lda;
|
|
kusano |
2b45e8 |
a08 = a + posX + (posY + 7) * lda;
|
|
kusano |
2b45e8 |
a09 = a + posX + (posY + 8) * lda;
|
|
kusano |
2b45e8 |
a10 = a + posX + (posY + 9) * lda;
|
|
kusano |
2b45e8 |
a11 = a + posX + (posY + 10) * lda;
|
|
kusano |
2b45e8 |
a12 = a + posX + (posY + 11) * lda;
|
|
kusano |
2b45e8 |
a13 = a + posX + (posY + 12) * lda;
|
|
kusano |
2b45e8 |
a14 = a + posX + (posY + 13) * lda;
|
|
kusano |
2b45e8 |
a15 = a + posX + (posY + 14) * lda;
|
|
kusano |
2b45e8 |
a16 = a + posX + (posY + 15) * lda;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
a01 = a + posY + (posX + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posY + (posX + 1) * lda;
|
|
kusano |
2b45e8 |
a03 = a + posY + (posX + 2) * lda;
|
|
kusano |
2b45e8 |
a04 = a + posY + (posX + 3) * lda;
|
|
kusano |
2b45e8 |
a05 = a + posY + (posX + 4) * lda;
|
|
kusano |
2b45e8 |
a06 = a + posY + (posX + 5) * lda;
|
|
kusano |
2b45e8 |
a07 = a + posY + (posX + 6) * lda;
|
|
kusano |
2b45e8 |
a08 = a + posY + (posX + 7) * lda;
|
|
kusano |
2b45e8 |
a09 = a + posY + (posX + 8) * lda;
|
|
kusano |
2b45e8 |
a10 = a + posY + (posX + 9) * lda;
|
|
kusano |
2b45e8 |
a11 = a + posY + (posX + 10) * lda;
|
|
kusano |
2b45e8 |
a12 = a + posY + (posX + 11) * lda;
|
|
kusano |
2b45e8 |
a13 = a + posY + (posX + 12) * lda;
|
|
kusano |
2b45e8 |
a14 = a + posY + (posX + 13) * lda;
|
|
kusano |
2b45e8 |
a15 = a + posY + (posX + 14) * lda;
|
|
kusano |
2b45e8 |
a16 = a + posY + (posX + 15) * lda;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 4);
|
|
kusano |
2b45e8 |
if (i > 0) {
|
|
kusano |
2b45e8 |
do {
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
for (ii = 0; ii < 16; ii++){
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 0);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 0);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 0);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 0);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 0);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 0);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 0);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 0);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 0);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 0);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 ++;
|
|
kusano |
2b45e8 |
a02 ++;
|
|
kusano |
2b45e8 |
a03 ++;
|
|
kusano |
2b45e8 |
a04 ++;
|
|
kusano |
2b45e8 |
a05 ++;
|
|
kusano |
2b45e8 |
a06 ++;
|
|
kusano |
2b45e8 |
a07 ++;
|
|
kusano |
2b45e8 |
a08 ++;
|
|
kusano |
2b45e8 |
a09 ++;
|
|
kusano |
2b45e8 |
a10 ++;
|
|
kusano |
2b45e8 |
a11 ++;
|
|
kusano |
2b45e8 |
a12 ++;
|
|
kusano |
2b45e8 |
a13 ++;
|
|
kusano |
2b45e8 |
a14 ++;
|
|
kusano |
2b45e8 |
a15 ++;
|
|
kusano |
2b45e8 |
a16 ++;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += 16 * lda;
|
|
kusano |
2b45e8 |
a02 += 16 * lda;
|
|
kusano |
2b45e8 |
a03 += 16 * lda;
|
|
kusano |
2b45e8 |
a04 += 16 * lda;
|
|
kusano |
2b45e8 |
a05 += 16 * lda;
|
|
kusano |
2b45e8 |
a06 += 16 * lda;
|
|
kusano |
2b45e8 |
a07 += 16 * lda;
|
|
kusano |
2b45e8 |
a08 += 16 * lda;
|
|
kusano |
2b45e8 |
a09 += 16 * lda;
|
|
kusano |
2b45e8 |
a10 += 16 * lda;
|
|
kusano |
2b45e8 |
a11 += 16 * lda;
|
|
kusano |
2b45e8 |
a12 += 16 * lda;
|
|
kusano |
2b45e8 |
a13 += 16 * lda;
|
|
kusano |
2b45e8 |
a14 += 16 * lda;
|
|
kusano |
2b45e8 |
a15 += 16 * lda;
|
|
kusano |
2b45e8 |
a16 += 16 * lda;
|
|
kusano |
2b45e8 |
b += 256;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 0);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 0);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 0);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 0);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 0);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 0);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 0);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 0);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 0);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 0);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 0);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 16] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 17] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 17] = *(a02 + 1);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 18] = *(a03 + 1);
|
|
kusano |
2b45e8 |
b[ 19] = *(a04 + 1);
|
|
kusano |
2b45e8 |
b[ 20] = *(a05 + 1);
|
|
kusano |
2b45e8 |
b[ 21] = *(a06 + 1);
|
|
kusano |
2b45e8 |
b[ 22] = *(a07 + 1);
|
|
kusano |
2b45e8 |
b[ 23] = *(a08 + 1);
|
|
kusano |
2b45e8 |
b[ 24] = *(a09 + 1);
|
|
kusano |
2b45e8 |
b[ 25] = *(a10 + 1);
|
|
kusano |
2b45e8 |
b[ 26] = *(a11 + 1);
|
|
kusano |
2b45e8 |
b[ 27] = *(a12 + 1);
|
|
kusano |
2b45e8 |
b[ 28] = *(a13 + 1);
|
|
kusano |
2b45e8 |
b[ 29] = *(a14 + 1);
|
|
kusano |
2b45e8 |
b[ 30] = *(a15 + 1);
|
|
kusano |
2b45e8 |
b[ 31] = *(a16 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 32] = ZERO;
|
|
kusano |
2b45e8 |
b[ 33] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 34] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 34] = *(a03 + 2);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 35] = *(a04 + 2);
|
|
kusano |
2b45e8 |
b[ 36] = *(a05 + 2);
|
|
kusano |
2b45e8 |
b[ 37] = *(a06 + 2);
|
|
kusano |
2b45e8 |
b[ 38] = *(a07 + 2);
|
|
kusano |
2b45e8 |
b[ 39] = *(a08 + 2);
|
|
kusano |
2b45e8 |
b[ 40] = *(a09 + 2);
|
|
kusano |
2b45e8 |
b[ 41] = *(a10 + 2);
|
|
kusano |
2b45e8 |
b[ 42] = *(a11 + 2);
|
|
kusano |
2b45e8 |
b[ 43] = *(a12 + 2);
|
|
kusano |
2b45e8 |
b[ 44] = *(a13 + 2);
|
|
kusano |
2b45e8 |
b[ 45] = *(a14 + 2);
|
|
kusano |
2b45e8 |
b[ 46] = *(a15 + 2);
|
|
kusano |
2b45e8 |
b[ 47] = *(a16 + 2);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 48] = ZERO;
|
|
kusano |
2b45e8 |
b[ 49] = ZERO;
|
|
kusano |
2b45e8 |
b[ 50] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 51] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 51] = *(a04 + 3);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 52] = *(a05 + 3);
|
|
kusano |
2b45e8 |
b[ 53] = *(a06 + 3);
|
|
kusano |
2b45e8 |
b[ 54] = *(a07 + 3);
|
|
kusano |
2b45e8 |
b[ 55] = *(a08 + 3);
|
|
kusano |
2b45e8 |
b[ 56] = *(a09 + 3);
|
|
kusano |
2b45e8 |
b[ 57] = *(a10 + 3);
|
|
kusano |
2b45e8 |
b[ 58] = *(a11 + 3);
|
|
kusano |
2b45e8 |
b[ 59] = *(a12 + 3);
|
|
kusano |
2b45e8 |
b[ 60] = *(a13 + 3);
|
|
kusano |
2b45e8 |
b[ 61] = *(a14 + 3);
|
|
kusano |
2b45e8 |
b[ 62] = *(a15 + 3);
|
|
kusano |
2b45e8 |
b[ 63] = *(a16 + 3);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 64] = ZERO;
|
|
kusano |
2b45e8 |
b[ 65] = ZERO;
|
|
kusano |
2b45e8 |
b[ 66] = ZERO;
|
|
kusano |
2b45e8 |
b[ 67] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 68] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 68] = *(a05 + 4);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 69] = *(a06 + 4);
|
|
kusano |
2b45e8 |
b[ 70] = *(a07 + 4);
|
|
kusano |
2b45e8 |
b[ 71] = *(a08 + 4);
|
|
kusano |
2b45e8 |
b[ 72] = *(a09 + 4);
|
|
kusano |
2b45e8 |
b[ 73] = *(a10 + 4);
|
|
kusano |
2b45e8 |
b[ 74] = *(a11 + 4);
|
|
kusano |
2b45e8 |
b[ 75] = *(a12 + 4);
|
|
kusano |
2b45e8 |
b[ 76] = *(a13 + 4);
|
|
kusano |
2b45e8 |
b[ 77] = *(a14 + 4);
|
|
kusano |
2b45e8 |
b[ 78] = *(a15 + 4);
|
|
kusano |
2b45e8 |
b[ 79] = *(a16 + 4);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 80] = ZERO;
|
|
kusano |
2b45e8 |
b[ 81] = ZERO;
|
|
kusano |
2b45e8 |
b[ 82] = ZERO;
|
|
kusano |
2b45e8 |
b[ 83] = ZERO;
|
|
kusano |
2b45e8 |
b[ 84] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 85] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 85] = *(a06 + 5);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 86] = *(a07 + 5);
|
|
kusano |
2b45e8 |
b[ 87] = *(a08 + 5);
|
|
kusano |
2b45e8 |
b[ 88] = *(a09 + 5);
|
|
kusano |
2b45e8 |
b[ 89] = *(a10 + 5);
|
|
kusano |
2b45e8 |
b[ 90] = *(a11 + 5);
|
|
kusano |
2b45e8 |
b[ 91] = *(a12 + 5);
|
|
kusano |
2b45e8 |
b[ 92] = *(a13 + 5);
|
|
kusano |
2b45e8 |
b[ 93] = *(a14 + 5);
|
|
kusano |
2b45e8 |
b[ 94] = *(a15 + 5);
|
|
kusano |
2b45e8 |
b[ 95] = *(a16 + 5);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 96] = ZERO;
|
|
kusano |
2b45e8 |
b[ 97] = ZERO;
|
|
kusano |
2b45e8 |
b[ 98] = ZERO;
|
|
kusano |
2b45e8 |
b[ 99] = ZERO;
|
|
kusano |
2b45e8 |
b[100] = ZERO;
|
|
kusano |
2b45e8 |
b[101] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[102] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[102] = *(a07 + 6);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[103] = *(a08 + 6);
|
|
kusano |
2b45e8 |
b[104] = *(a09 + 6);
|
|
kusano |
2b45e8 |
b[105] = *(a10 + 6);
|
|
kusano |
2b45e8 |
b[106] = *(a11 + 6);
|
|
kusano |
2b45e8 |
b[107] = *(a12 + 6);
|
|
kusano |
2b45e8 |
b[108] = *(a13 + 6);
|
|
kusano |
2b45e8 |
b[109] = *(a14 + 6);
|
|
kusano |
2b45e8 |
b[110] = *(a15 + 6);
|
|
kusano |
2b45e8 |
b[111] = *(a16 + 6);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[112] = ZERO;
|
|
kusano |
2b45e8 |
b[113] = ZERO;
|
|
kusano |
2b45e8 |
b[114] = ZERO;
|
|
kusano |
2b45e8 |
b[115] = ZERO;
|
|
kusano |
2b45e8 |
b[116] = ZERO;
|
|
kusano |
2b45e8 |
b[117] = ZERO;
|
|
kusano |
2b45e8 |
b[118] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[119] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[119] = *(a08 + 7);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[120] = *(a09 + 7);
|
|
kusano |
2b45e8 |
b[121] = *(a10 + 7);
|
|
kusano |
2b45e8 |
b[122] = *(a11 + 7);
|
|
kusano |
2b45e8 |
b[123] = *(a12 + 7);
|
|
kusano |
2b45e8 |
b[124] = *(a13 + 7);
|
|
kusano |
2b45e8 |
b[125] = *(a14 + 7);
|
|
kusano |
2b45e8 |
b[126] = *(a15 + 7);
|
|
kusano |
2b45e8 |
b[127] = *(a16 + 7);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[128] = ZERO;
|
|
kusano |
2b45e8 |
b[129] = ZERO;
|
|
kusano |
2b45e8 |
b[130] = ZERO;
|
|
kusano |
2b45e8 |
b[131] = ZERO;
|
|
kusano |
2b45e8 |
b[132] = ZERO;
|
|
kusano |
2b45e8 |
b[133] = ZERO;
|
|
kusano |
2b45e8 |
b[134] = ZERO;
|
|
kusano |
2b45e8 |
b[135] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[136] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[136] = *(a09 + 8);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[137] = *(a10 + 8);
|
|
kusano |
2b45e8 |
b[138] = *(a11 + 8);
|
|
kusano |
2b45e8 |
b[139] = *(a12 + 8);
|
|
kusano |
2b45e8 |
b[140] = *(a13 + 8);
|
|
kusano |
2b45e8 |
b[141] = *(a14 + 8);
|
|
kusano |
2b45e8 |
b[142] = *(a15 + 8);
|
|
kusano |
2b45e8 |
b[143] = *(a16 + 8);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[144] = ZERO;
|
|
kusano |
2b45e8 |
b[145] = ZERO;
|
|
kusano |
2b45e8 |
b[146] = ZERO;
|
|
kusano |
2b45e8 |
b[147] = ZERO;
|
|
kusano |
2b45e8 |
b[148] = ZERO;
|
|
kusano |
2b45e8 |
b[149] = ZERO;
|
|
kusano |
2b45e8 |
b[150] = ZERO;
|
|
kusano |
2b45e8 |
b[151] = ZERO;
|
|
kusano |
2b45e8 |
b[152] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[153] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[153] = *(a10 + 9);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[154] = *(a11 + 9);
|
|
kusano |
2b45e8 |
b[155] = *(a12 + 9);
|
|
kusano |
2b45e8 |
b[156] = *(a13 + 9);
|
|
kusano |
2b45e8 |
b[157] = *(a14 + 9);
|
|
kusano |
2b45e8 |
b[158] = *(a15 + 9);
|
|
kusano |
2b45e8 |
b[159] = *(a16 + 9);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[160] = ZERO;
|
|
kusano |
2b45e8 |
b[161] = ZERO;
|
|
kusano |
2b45e8 |
b[162] = ZERO;
|
|
kusano |
2b45e8 |
b[163] = ZERO;
|
|
kusano |
2b45e8 |
b[164] = ZERO;
|
|
kusano |
2b45e8 |
b[165] = ZERO;
|
|
kusano |
2b45e8 |
b[166] = ZERO;
|
|
kusano |
2b45e8 |
b[167] = ZERO;
|
|
kusano |
2b45e8 |
b[168] = ZERO;
|
|
kusano |
2b45e8 |
b[169] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[170] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[170] = *(a11 + 10);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[171] = *(a12 + 10);
|
|
kusano |
2b45e8 |
b[172] = *(a13 + 10);
|
|
kusano |
2b45e8 |
b[173] = *(a14 + 10);
|
|
kusano |
2b45e8 |
b[174] = *(a15 + 10);
|
|
kusano |
2b45e8 |
b[175] = *(a16 + 10);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[176] = ZERO;
|
|
kusano |
2b45e8 |
b[177] = ZERO;
|
|
kusano |
2b45e8 |
b[178] = ZERO;
|
|
kusano |
2b45e8 |
b[179] = ZERO;
|
|
kusano |
2b45e8 |
b[180] = ZERO;
|
|
kusano |
2b45e8 |
b[181] = ZERO;
|
|
kusano |
2b45e8 |
b[182] = ZERO;
|
|
kusano |
2b45e8 |
b[183] = ZERO;
|
|
kusano |
2b45e8 |
b[184] = ZERO;
|
|
kusano |
2b45e8 |
b[185] = ZERO;
|
|
kusano |
2b45e8 |
b[186] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[187] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[187] = *(a12 + 11);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[188] = *(a13 + 11);
|
|
kusano |
2b45e8 |
b[189] = *(a14 + 11);
|
|
kusano |
2b45e8 |
b[190] = *(a15 + 11);
|
|
kusano |
2b45e8 |
b[191] = *(a16 + 11);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[192] = ZERO;
|
|
kusano |
2b45e8 |
b[193] = ZERO;
|
|
kusano |
2b45e8 |
b[194] = ZERO;
|
|
kusano |
2b45e8 |
b[195] = ZERO;
|
|
kusano |
2b45e8 |
b[196] = ZERO;
|
|
kusano |
2b45e8 |
b[197] = ZERO;
|
|
kusano |
2b45e8 |
b[198] = ZERO;
|
|
kusano |
2b45e8 |
b[199] = ZERO;
|
|
kusano |
2b45e8 |
b[200] = ZERO;
|
|
kusano |
2b45e8 |
b[201] = ZERO;
|
|
kusano |
2b45e8 |
b[202] = ZERO;
|
|
kusano |
2b45e8 |
b[203] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[204] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[204] = *(a13 + 12);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[205] = *(a14 + 12);
|
|
kusano |
2b45e8 |
b[206] = *(a15 + 12);
|
|
kusano |
2b45e8 |
b[207] = *(a16 + 12);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[208] = ZERO;
|
|
kusano |
2b45e8 |
b[209] = ZERO;
|
|
kusano |
2b45e8 |
b[210] = ZERO;
|
|
kusano |
2b45e8 |
b[211] = ZERO;
|
|
kusano |
2b45e8 |
b[212] = ZERO;
|
|
kusano |
2b45e8 |
b[213] = ZERO;
|
|
kusano |
2b45e8 |
b[214] = ZERO;
|
|
kusano |
2b45e8 |
b[215] = ZERO;
|
|
kusano |
2b45e8 |
b[216] = ZERO;
|
|
kusano |
2b45e8 |
b[217] = ZERO;
|
|
kusano |
2b45e8 |
b[218] = ZERO;
|
|
kusano |
2b45e8 |
b[219] = ZERO;
|
|
kusano |
2b45e8 |
b[220] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[221] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[221] = *(a14 + 13);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[222] = *(a15 + 13);
|
|
kusano |
2b45e8 |
b[223] = *(a16 + 13);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[224] = ZERO;
|
|
kusano |
2b45e8 |
b[225] = ZERO;
|
|
kusano |
2b45e8 |
b[226] = ZERO;
|
|
kusano |
2b45e8 |
b[227] = ZERO;
|
|
kusano |
2b45e8 |
b[228] = ZERO;
|
|
kusano |
2b45e8 |
b[229] = ZERO;
|
|
kusano |
2b45e8 |
b[230] = ZERO;
|
|
kusano |
2b45e8 |
b[231] = ZERO;
|
|
kusano |
2b45e8 |
b[232] = ZERO;
|
|
kusano |
2b45e8 |
b[233] = ZERO;
|
|
kusano |
2b45e8 |
b[234] = ZERO;
|
|
kusano |
2b45e8 |
b[235] = ZERO;
|
|
kusano |
2b45e8 |
b[236] = ZERO;
|
|
kusano |
2b45e8 |
b[237] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[238] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[238] = *(a15 + 14);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[239] = *(a16 + 14);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[240] = ZERO;
|
|
kusano |
2b45e8 |
b[241] = ZERO;
|
|
kusano |
2b45e8 |
b[242] = ZERO;
|
|
kusano |
2b45e8 |
b[243] = ZERO;
|
|
kusano |
2b45e8 |
b[244] = ZERO;
|
|
kusano |
2b45e8 |
b[245] = ZERO;
|
|
kusano |
2b45e8 |
b[246] = ZERO;
|
|
kusano |
2b45e8 |
b[247] = ZERO;
|
|
kusano |
2b45e8 |
b[248] = ZERO;
|
|
kusano |
2b45e8 |
b[249] = ZERO;
|
|
kusano |
2b45e8 |
b[250] = ZERO;
|
|
kusano |
2b45e8 |
b[251] = ZERO;
|
|
kusano |
2b45e8 |
b[252] = ZERO;
|
|
kusano |
2b45e8 |
b[253] = ZERO;
|
|
kusano |
2b45e8 |
b[254] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[255] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[255] = *(a16 + 15);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 += 16 * lda;
|
|
kusano |
2b45e8 |
a02 += 16 * lda;
|
|
kusano |
2b45e8 |
a03 += 16 * lda;
|
|
kusano |
2b45e8 |
a04 += 16 * lda;
|
|
kusano |
2b45e8 |
a05 += 16 * lda;
|
|
kusano |
2b45e8 |
a06 += 16 * lda;
|
|
kusano |
2b45e8 |
a07 += 16 * lda;
|
|
kusano |
2b45e8 |
a08 += 16 * lda;
|
|
kusano |
2b45e8 |
a09 += 16 * lda;
|
|
kusano |
2b45e8 |
a10 += 16 * lda;
|
|
kusano |
2b45e8 |
a11 += 16 * lda;
|
|
kusano |
2b45e8 |
a12 += 16 * lda;
|
|
kusano |
2b45e8 |
a13 += 16 * lda;
|
|
kusano |
2b45e8 |
a14 += 16 * lda;
|
|
kusano |
2b45e8 |
a15 += 16 * lda;
|
|
kusano |
2b45e8 |
a16 += 16 * lda;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b += 256;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
X += 16;
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
} while (i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m & 15);
|
|
kusano |
2b45e8 |
if (i) {
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
for (ii = 0; ii < i; ii++){
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 0);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 0);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 0);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 0);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 0);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 0);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 0);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 0);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 0);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 0);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 ++;
|
|
kusano |
2b45e8 |
a02 ++;
|
|
kusano |
2b45e8 |
a03 ++;
|
|
kusano |
2b45e8 |
a04 ++;
|
|
kusano |
2b45e8 |
a05 ++;
|
|
kusano |
2b45e8 |
a06 ++;
|
|
kusano |
2b45e8 |
a07 ++;
|
|
kusano |
2b45e8 |
a08 ++;
|
|
kusano |
2b45e8 |
a09 ++;
|
|
kusano |
2b45e8 |
a10 ++;
|
|
kusano |
2b45e8 |
a11 ++;
|
|
kusano |
2b45e8 |
a12 ++;
|
|
kusano |
2b45e8 |
a13 ++;
|
|
kusano |
2b45e8 |
a14 ++;
|
|
kusano |
2b45e8 |
a15 ++;
|
|
kusano |
2b45e8 |
a16 ++;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += i * lda;
|
|
kusano |
2b45e8 |
a02 += i * lda;
|
|
kusano |
2b45e8 |
a03 += i * lda;
|
|
kusano |
2b45e8 |
a04 += i * lda;
|
|
kusano |
2b45e8 |
a05 += i * lda;
|
|
kusano |
2b45e8 |
a06 += i * lda;
|
|
kusano |
2b45e8 |
a07 += i * lda;
|
|
kusano |
2b45e8 |
a08 += i * lda;
|
|
kusano |
2b45e8 |
a09 += i * lda;
|
|
kusano |
2b45e8 |
a10 += i * lda;
|
|
kusano |
2b45e8 |
a11 += i * lda;
|
|
kusano |
2b45e8 |
a12 += i * lda;
|
|
kusano |
2b45e8 |
a13 += i * lda;
|
|
kusano |
2b45e8 |
a14 += i * lda;
|
|
kusano |
2b45e8 |
a15 += i * lda;
|
|
kusano |
2b45e8 |
a16 += i * lda;
|
|
kusano |
2b45e8 |
b += 16 * i;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 0);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 0);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 0);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 0);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 0);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 0);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 0);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 0);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 0);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 0);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 0);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 0);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 2) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 1] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 1);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 1);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 1);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 1);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 1);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 1);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 1);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 1);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 1);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 1);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 1);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 1);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 1);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 1);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 1);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 3) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 2] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 2);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 2);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 2);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 2);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 2);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 2);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 2);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 2);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 2);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 2);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 2);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 2);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 2);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 2);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 4) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 3] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 3);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 3);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 3);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 3);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 3);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 3);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 3);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 3);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 3);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 3);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 3);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 3);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 3);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 5) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 4] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 4);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 4);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 4);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 4);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 4);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 4);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 4);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 4);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 4);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 4);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 4);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 4);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 6) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 5] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 5);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 5);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 5);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 5);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 5);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 5);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 5);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 5);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 5);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 5);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 5);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 7) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 6] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 6);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 6);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 6);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 6);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 6);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 6);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 6);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 6);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 6);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 6);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 8) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 7] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 7);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 7);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 7);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 7);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 7);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 7);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 7);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 7);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 7);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 9) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 8] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 8);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 8);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 8);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 8);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 8);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 8);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 8);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 8);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 10) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b[ 8] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 9] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 9);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 9);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 9);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 9);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 9);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 9);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 9);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 11) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b[ 8] = ZERO;
|
|
kusano |
2b45e8 |
b[ 9] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 10] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 10);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 10);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 10);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 10);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 10);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 10);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 12) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b[ 8] = ZERO;
|
|
kusano |
2b45e8 |
b[ 9] = ZERO;
|
|
kusano |
2b45e8 |
b[ 10] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 11] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 11);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 11);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 11);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 11);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 11);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 13) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b[ 8] = ZERO;
|
|
kusano |
2b45e8 |
b[ 9] = ZERO;
|
|
kusano |
2b45e8 |
b[ 10] = ZERO;
|
|
kusano |
2b45e8 |
b[ 11] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 12] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 12);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 12);
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 12);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 12);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 14) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b[ 8] = ZERO;
|
|
kusano |
2b45e8 |
b[ 9] = ZERO;
|
|
kusano |
2b45e8 |
b[ 10] = ZERO;
|
|
kusano |
2b45e8 |
b[ 11] = ZERO;
|
|
kusano |
2b45e8 |
b[ 12] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 13] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 13);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 13);
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 13);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 15) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b[ 8] = ZERO;
|
|
kusano |
2b45e8 |
b[ 9] = ZERO;
|
|
kusano |
2b45e8 |
b[ 10] = ZERO;
|
|
kusano |
2b45e8 |
b[ 11] = ZERO;
|
|
kusano |
2b45e8 |
b[ 12] = ZERO;
|
|
kusano |
2b45e8 |
b[ 13] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 14] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 14] = *(a15 + 14);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 15] = *(a16 + 14);
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
posY += 16;
|
|
kusano |
2b45e8 |
js --;
|
|
kusano |
2b45e8 |
} while (js > 0);
|
|
kusano |
2b45e8 |
} /* End of main loop */
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 8){
|
|
kusano |
2b45e8 |
X = posX;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (posX <= posY) {
|
|
kusano |
2b45e8 |
a01 = a + posX + (posY + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posX + (posY + 1) * lda;
|
|
kusano |
2b45e8 |
a03 = a + posX + (posY + 2) * lda;
|
|
kusano |
2b45e8 |
a04 = a + posX + (posY + 3) * lda;
|
|
kusano |
2b45e8 |
a05 = a + posX + (posY + 4) * lda;
|
|
kusano |
2b45e8 |
a06 = a + posX + (posY + 5) * lda;
|
|
kusano |
2b45e8 |
a07 = a + posX + (posY + 6) * lda;
|
|
kusano |
2b45e8 |
a08 = a + posX + (posY + 7) * lda;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
a01 = a + posY + (posX + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posY + (posX + 1) * lda;
|
|
kusano |
2b45e8 |
a03 = a + posY + (posX + 2) * lda;
|
|
kusano |
2b45e8 |
a04 = a + posY + (posX + 3) * lda;
|
|
kusano |
2b45e8 |
a05 = a + posY + (posX + 4) * lda;
|
|
kusano |
2b45e8 |
a06 = a + posY + (posX + 5) * lda;
|
|
kusano |
2b45e8 |
a07 = a + posY + (posX + 6) * lda;
|
|
kusano |
2b45e8 |
a08 = a + posY + (posX + 7) * lda;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 3);
|
|
kusano |
2b45e8 |
if (i > 0) {
|
|
kusano |
2b45e8 |
do {
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
for (ii = 0; ii < 8; ii++){
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 0);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 0);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 0);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 ++;
|
|
kusano |
2b45e8 |
a02 ++;
|
|
kusano |
2b45e8 |
a03 ++;
|
|
kusano |
2b45e8 |
a04 ++;
|
|
kusano |
2b45e8 |
a05 ++;
|
|
kusano |
2b45e8 |
a06 ++;
|
|
kusano |
2b45e8 |
a07 ++;
|
|
kusano |
2b45e8 |
a08 ++;
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += 8 * lda;
|
|
kusano |
2b45e8 |
a02 += 8 * lda;
|
|
kusano |
2b45e8 |
a03 += 8 * lda;
|
|
kusano |
2b45e8 |
a04 += 8 * lda;
|
|
kusano |
2b45e8 |
a05 += 8 * lda;
|
|
kusano |
2b45e8 |
a06 += 8 * lda;
|
|
kusano |
2b45e8 |
a07 += 8 * lda;
|
|
kusano |
2b45e8 |
a08 += 8 * lda;
|
|
kusano |
2b45e8 |
b += 64;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 0);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 0);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 0);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 8] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 9] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 9] = *(a02 + 1);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 10] = *(a03 + 1);
|
|
kusano |
2b45e8 |
b[ 11] = *(a04 + 1);
|
|
kusano |
2b45e8 |
b[ 12] = *(a05 + 1);
|
|
kusano |
2b45e8 |
b[ 13] = *(a06 + 1);
|
|
kusano |
2b45e8 |
b[ 14] = *(a07 + 1);
|
|
kusano |
2b45e8 |
b[ 15] = *(a08 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 16] = ZERO;
|
|
kusano |
2b45e8 |
b[ 17] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 18] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 18] = *(a03 + 2);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 19] = *(a04 + 2);
|
|
kusano |
2b45e8 |
b[ 20] = *(a05 + 2);
|
|
kusano |
2b45e8 |
b[ 21] = *(a06 + 2);
|
|
kusano |
2b45e8 |
b[ 22] = *(a07 + 2);
|
|
kusano |
2b45e8 |
b[ 23] = *(a08 + 2);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 24] = ZERO;
|
|
kusano |
2b45e8 |
b[ 25] = ZERO;
|
|
kusano |
2b45e8 |
b[ 26] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 27] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 27] = *(a04 + 3);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 28] = *(a05 + 3);
|
|
kusano |
2b45e8 |
b[ 29] = *(a06 + 3);
|
|
kusano |
2b45e8 |
b[ 30] = *(a07 + 3);
|
|
kusano |
2b45e8 |
b[ 31] = *(a08 + 3);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 32] = ZERO;
|
|
kusano |
2b45e8 |
b[ 33] = ZERO;
|
|
kusano |
2b45e8 |
b[ 34] = ZERO;
|
|
kusano |
2b45e8 |
b[ 35] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 36] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 36] = *(a05 + 4);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 37] = *(a06 + 4);
|
|
kusano |
2b45e8 |
b[ 38] = *(a07 + 4);
|
|
kusano |
2b45e8 |
b[ 39] = *(a08 + 4);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 40] = ZERO;
|
|
kusano |
2b45e8 |
b[ 41] = ZERO;
|
|
kusano |
2b45e8 |
b[ 42] = ZERO;
|
|
kusano |
2b45e8 |
b[ 43] = ZERO;
|
|
kusano |
2b45e8 |
b[ 44] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 45] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 45] = *(a06 + 5);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 46] = *(a07 + 5);
|
|
kusano |
2b45e8 |
b[ 47] = *(a08 + 5);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 48] = ZERO;
|
|
kusano |
2b45e8 |
b[ 49] = ZERO;
|
|
kusano |
2b45e8 |
b[ 50] = ZERO;
|
|
kusano |
2b45e8 |
b[ 51] = ZERO;
|
|
kusano |
2b45e8 |
b[ 52] = ZERO;
|
|
kusano |
2b45e8 |
b[ 53] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 54] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 54] = *(a07 + 6);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 55] = *(a08 + 6);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 56] = ZERO;
|
|
kusano |
2b45e8 |
b[ 57] = ZERO;
|
|
kusano |
2b45e8 |
b[ 58] = ZERO;
|
|
kusano |
2b45e8 |
b[ 59] = ZERO;
|
|
kusano |
2b45e8 |
b[ 60] = ZERO;
|
|
kusano |
2b45e8 |
b[ 61] = ZERO;
|
|
kusano |
2b45e8 |
b[ 62] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 63] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 63] = *(a08 + 7);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 += 8 * lda;
|
|
kusano |
2b45e8 |
a02 += 8 * lda;
|
|
kusano |
2b45e8 |
a03 += 8 * lda;
|
|
kusano |
2b45e8 |
a04 += 8 * lda;
|
|
kusano |
2b45e8 |
a05 += 8 * lda;
|
|
kusano |
2b45e8 |
a06 += 8 * lda;
|
|
kusano |
2b45e8 |
a07 += 8 * lda;
|
|
kusano |
2b45e8 |
a08 += 8 * lda;
|
|
kusano |
2b45e8 |
b += 64;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
X += 8;
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
} while (i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m & 7);
|
|
kusano |
2b45e8 |
if (i) {
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
for (ii = 0; ii < i; ii++){
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 0);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 0);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 0);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 ++;
|
|
kusano |
2b45e8 |
a02 ++;
|
|
kusano |
2b45e8 |
a03 ++;
|
|
kusano |
2b45e8 |
a04 ++;
|
|
kusano |
2b45e8 |
a05 ++;
|
|
kusano |
2b45e8 |
a06 ++;
|
|
kusano |
2b45e8 |
a07 ++;
|
|
kusano |
2b45e8 |
a08 ++;
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += i * lda;
|
|
kusano |
2b45e8 |
a02 += i * lda;
|
|
kusano |
2b45e8 |
a03 += i * lda;
|
|
kusano |
2b45e8 |
a04 += i * lda;
|
|
kusano |
2b45e8 |
a05 += i * lda;
|
|
kusano |
2b45e8 |
a06 += i * lda;
|
|
kusano |
2b45e8 |
a07 += i * lda;
|
|
kusano |
2b45e8 |
a08 += i * lda;
|
|
kusano |
2b45e8 |
b += 8 * i;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 0);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 0);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 0);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 0);
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 2) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 1] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 1);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 1);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 1);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 1);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 1);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 1);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 1);
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 3) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 2] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 2);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 2);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 2);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 2);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 2);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 2);
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 4) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 3] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 3);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 3);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 3);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 3);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 3);
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 5) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 4] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 4);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 4);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 4);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 4);
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 6) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 5] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 5);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 5);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 5);
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 7) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 6] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 6);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 6);
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
posY += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 4){
|
|
kusano |
2b45e8 |
X = posX;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (posX <= posY) {
|
|
kusano |
2b45e8 |
a01 = a + posX + (posY + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posX + (posY + 1) * lda;
|
|
kusano |
2b45e8 |
a03 = a + posX + (posY + 2) * lda;
|
|
kusano |
2b45e8 |
a04 = a + posX + (posY + 3) * lda;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
a01 = a + posY + (posX + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posY + (posX + 1) * lda;
|
|
kusano |
2b45e8 |
a03 = a + posY + (posX + 2) * lda;
|
|
kusano |
2b45e8 |
a04 = a + posY + (posX + 3) * lda;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 2);
|
|
kusano |
2b45e8 |
if (i > 0) {
|
|
kusano |
2b45e8 |
do {
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
for (ii = 0; ii < 4; ii++){
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 ++;
|
|
kusano |
2b45e8 |
a02 ++;
|
|
kusano |
2b45e8 |
a03 ++;
|
|
kusano |
2b45e8 |
a04 ++;
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += 4 * lda;
|
|
kusano |
2b45e8 |
a02 += 4 * lda;
|
|
kusano |
2b45e8 |
a03 += 4 * lda;
|
|
kusano |
2b45e8 |
a04 += 4 * lda;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 4] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 5] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 5] = *(a02 + 1);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 6] = *(a03 + 1);
|
|
kusano |
2b45e8 |
b[ 7] = *(a04 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 8] = ZERO;
|
|
kusano |
2b45e8 |
b[ 9] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 10] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 10] = *(a03 + 2);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 11] = *(a04 + 2);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 12] = ZERO;
|
|
kusano |
2b45e8 |
b[ 13] = ZERO;
|
|
kusano |
2b45e8 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 15] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 15] = *(a04 + 3);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 += 4 * lda;
|
|
kusano |
2b45e8 |
a02 += 4 * lda;
|
|
kusano |
2b45e8 |
a03 += 4 * lda;
|
|
kusano |
2b45e8 |
a04 += 4 * lda;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
X += 4;
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
} while (i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m & 3);
|
|
kusano |
2b45e8 |
if (i) {
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
for (ii = 0; ii < i; ii++){
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 ++;
|
|
kusano |
2b45e8 |
a02 ++;
|
|
kusano |
2b45e8 |
a03 ++;
|
|
kusano |
2b45e8 |
a04 ++;
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += i * lda;
|
|
kusano |
2b45e8 |
a02 += i * lda;
|
|
kusano |
2b45e8 |
a03 += i * lda;
|
|
kusano |
2b45e8 |
a04 += i * lda;
|
|
kusano |
2b45e8 |
b += 4 * i;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 0);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 0);
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 2) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 1] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 1);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 1);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 1);
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 3) {
|
|
kusano |
2b45e8 |
b[ 0] = ZERO;
|
|
kusano |
2b45e8 |
b[ 1] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 2] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 2);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 2);
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
posY += 4;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 2){
|
|
kusano |
2b45e8 |
X = posX;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (posX <= posY) {
|
|
kusano |
2b45e8 |
a01 = a + posX + (posY + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posX + (posY + 1) * lda;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
a01 = a + posY + (posX + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posY + (posX + 1) * lda;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 1);
|
|
kusano |
2b45e8 |
if (i > 0) {
|
|
kusano |
2b45e8 |
do {
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b[ 2] = *(a01 + 1);
|
|
kusano |
2b45e8 |
b[ 3] = *(a02 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 += 2;
|
|
kusano |
2b45e8 |
a02 += 2;
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += 2 * lda;
|
|
kusano |
2b45e8 |
a02 += 2 * lda;
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 3] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 3] = *(a02 + 1);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 += 2 * lda;
|
|
kusano |
2b45e8 |
a02 += 2 * lda;
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
X += 2;
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
} while (i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (m & 1) {
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
a01 ++;
|
|
kusano |
2b45e8 |
a02 ++;
|
|
kusano |
2b45e8 |
b += 2;
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += lda;
|
|
kusano |
2b45e8 |
a02 += lda;
|
|
kusano |
2b45e8 |
b += 2;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 0);
|
|
kusano |
2b45e8 |
b += 2;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
posY += 2;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 1){
|
|
kusano |
2b45e8 |
X = posX;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (posX <= posY) {
|
|
kusano |
2b45e8 |
a01 = a + posX + (posY + 0) * lda;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
a01 = a + posY + (posX + 0) * lda;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = m;
|
|
kusano |
2b45e8 |
if (m > 0) {
|
|
kusano |
2b45e8 |
do {
|
|
kusano |
2b45e8 |
if (X < posY) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
a01 += 1;
|
|
kusano |
2b45e8 |
b += 1;
|
|
kusano |
2b45e8 |
} else
|
|
kusano |
2b45e8 |
if (X > posY) {
|
|
kusano |
2b45e8 |
a01 += lda;
|
|
kusano |
2b45e8 |
b += 1;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
#ifdef UNIT
|
|
kusano |
2b45e8 |
b[ 0] = ONE;
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 0);
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
b += 1;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
X += 1;
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
} while (i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
return 0;
|
|
kusano |
2b45e8 |
}
|