|
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 + 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 |
} else {
|
|
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 |
}
|
|
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] = 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 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 16] = *(a01 + 1);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 19] = ZERO;
|
|
kusano |
2b45e8 |
b[ 20] = ZERO;
|
|
kusano |
2b45e8 |
b[ 21] = ZERO;
|
|
kusano |
2b45e8 |
b[ 22] = ZERO;
|
|
kusano |
2b45e8 |
b[ 23] = ZERO;
|
|
kusano |
2b45e8 |
b[ 24] = ZERO;
|
|
kusano |
2b45e8 |
b[ 25] = ZERO;
|
|
kusano |
2b45e8 |
b[ 26] = ZERO;
|
|
kusano |
2b45e8 |
b[ 27] = ZERO;
|
|
kusano |
2b45e8 |
b[ 28] = ZERO;
|
|
kusano |
2b45e8 |
b[ 29] = ZERO;
|
|
kusano |
2b45e8 |
b[ 30] = ZERO;
|
|
kusano |
2b45e8 |
b[ 31] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 32] = *(a01 + 2);
|
|
kusano |
2b45e8 |
b[ 33] = *(a02 + 2);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 36] = ZERO;
|
|
kusano |
2b45e8 |
b[ 37] = ZERO;
|
|
kusano |
2b45e8 |
b[ 38] = ZERO;
|
|
kusano |
2b45e8 |
b[ 39] = ZERO;
|
|
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 |
b[ 45] = ZERO;
|
|
kusano |
2b45e8 |
b[ 46] = ZERO;
|
|
kusano |
2b45e8 |
b[ 47] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 48] = *(a01 + 3);
|
|
kusano |
2b45e8 |
b[ 49] = *(a02 + 3);
|
|
kusano |
2b45e8 |
b[ 50] = *(a03 + 3);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 53] = ZERO;
|
|
kusano |
2b45e8 |
b[ 54] = ZERO;
|
|
kusano |
2b45e8 |
b[ 55] = ZERO;
|
|
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 |
b[ 63] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 64] = *(a01 + 4);
|
|
kusano |
2b45e8 |
b[ 65] = *(a02 + 4);
|
|
kusano |
2b45e8 |
b[ 66] = *(a03 + 4);
|
|
kusano |
2b45e8 |
b[ 67] = *(a04 + 4);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 70] = ZERO;
|
|
kusano |
2b45e8 |
b[ 71] = ZERO;
|
|
kusano |
2b45e8 |
b[ 72] = ZERO;
|
|
kusano |
2b45e8 |
b[ 73] = ZERO;
|
|
kusano |
2b45e8 |
b[ 74] = ZERO;
|
|
kusano |
2b45e8 |
b[ 75] = ZERO;
|
|
kusano |
2b45e8 |
b[ 76] = ZERO;
|
|
kusano |
2b45e8 |
b[ 77] = ZERO;
|
|
kusano |
2b45e8 |
b[ 78] = ZERO;
|
|
kusano |
2b45e8 |
b[ 79] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 80] = *(a01 + 5);
|
|
kusano |
2b45e8 |
b[ 81] = *(a02 + 5);
|
|
kusano |
2b45e8 |
b[ 82] = *(a03 + 5);
|
|
kusano |
2b45e8 |
b[ 83] = *(a04 + 5);
|
|
kusano |
2b45e8 |
b[ 84] = *(a05 + 5);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 87] = ZERO;
|
|
kusano |
2b45e8 |
b[ 88] = ZERO;
|
|
kusano |
2b45e8 |
b[ 89] = ZERO;
|
|
kusano |
2b45e8 |
b[ 90] = ZERO;
|
|
kusano |
2b45e8 |
b[ 91] = ZERO;
|
|
kusano |
2b45e8 |
b[ 92] = ZERO;
|
|
kusano |
2b45e8 |
b[ 93] = ZERO;
|
|
kusano |
2b45e8 |
b[ 94] = ZERO;
|
|
kusano |
2b45e8 |
b[ 95] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 96] = *(a01 + 6);
|
|
kusano |
2b45e8 |
b[ 97] = *(a02 + 6);
|
|
kusano |
2b45e8 |
b[ 98] = *(a03 + 6);
|
|
kusano |
2b45e8 |
b[ 99] = *(a04 + 6);
|
|
kusano |
2b45e8 |
b[100] = *(a05 + 6);
|
|
kusano |
2b45e8 |
b[101] = *(a06 + 6);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[104] = ZERO;
|
|
kusano |
2b45e8 |
b[105] = ZERO;
|
|
kusano |
2b45e8 |
b[106] = ZERO;
|
|
kusano |
2b45e8 |
b[107] = ZERO;
|
|
kusano |
2b45e8 |
b[108] = ZERO;
|
|
kusano |
2b45e8 |
b[109] = ZERO;
|
|
kusano |
2b45e8 |
b[110] = ZERO;
|
|
kusano |
2b45e8 |
b[111] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[112] = *(a01 + 7);
|
|
kusano |
2b45e8 |
b[113] = *(a02 + 7);
|
|
kusano |
2b45e8 |
b[114] = *(a03 + 7);
|
|
kusano |
2b45e8 |
b[115] = *(a04 + 7);
|
|
kusano |
2b45e8 |
b[116] = *(a05 + 7);
|
|
kusano |
2b45e8 |
b[117] = *(a06 + 7);
|
|
kusano |
2b45e8 |
b[118] = *(a07 + 7);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[121] = ZERO;
|
|
kusano |
2b45e8 |
b[122] = ZERO;
|
|
kusano |
2b45e8 |
b[123] = ZERO;
|
|
kusano |
2b45e8 |
b[124] = ZERO;
|
|
kusano |
2b45e8 |
b[125] = ZERO;
|
|
kusano |
2b45e8 |
b[126] = ZERO;
|
|
kusano |
2b45e8 |
b[127] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[128] = *(a01 + 8);
|
|
kusano |
2b45e8 |
b[129] = *(a02 + 8);
|
|
kusano |
2b45e8 |
b[130] = *(a03 + 8);
|
|
kusano |
2b45e8 |
b[131] = *(a04 + 8);
|
|
kusano |
2b45e8 |
b[132] = *(a05 + 8);
|
|
kusano |
2b45e8 |
b[133] = *(a06 + 8);
|
|
kusano |
2b45e8 |
b[134] = *(a07 + 8);
|
|
kusano |
2b45e8 |
b[135] = *(a08 + 8);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[138] = ZERO;
|
|
kusano |
2b45e8 |
b[139] = ZERO;
|
|
kusano |
2b45e8 |
b[140] = ZERO;
|
|
kusano |
2b45e8 |
b[141] = ZERO;
|
|
kusano |
2b45e8 |
b[142] = ZERO;
|
|
kusano |
2b45e8 |
b[143] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[144] = *(a01 + 9);
|
|
kusano |
2b45e8 |
b[145] = *(a02 + 9);
|
|
kusano |
2b45e8 |
b[146] = *(a03 + 9);
|
|
kusano |
2b45e8 |
b[147] = *(a04 + 9);
|
|
kusano |
2b45e8 |
b[148] = *(a05 + 9);
|
|
kusano |
2b45e8 |
b[149] = *(a06 + 9);
|
|
kusano |
2b45e8 |
b[150] = *(a07 + 9);
|
|
kusano |
2b45e8 |
b[151] = *(a08 + 9);
|
|
kusano |
2b45e8 |
b[152] = *(a09 + 9);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[155] = ZERO;
|
|
kusano |
2b45e8 |
b[156] = ZERO;
|
|
kusano |
2b45e8 |
b[157] = ZERO;
|
|
kusano |
2b45e8 |
b[158] = ZERO;
|
|
kusano |
2b45e8 |
b[159] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[160] = *(a01 + 10);
|
|
kusano |
2b45e8 |
b[161] = *(a02 + 10);
|
|
kusano |
2b45e8 |
b[162] = *(a03 + 10);
|
|
kusano |
2b45e8 |
b[163] = *(a04 + 10);
|
|
kusano |
2b45e8 |
b[164] = *(a05 + 10);
|
|
kusano |
2b45e8 |
b[165] = *(a06 + 10);
|
|
kusano |
2b45e8 |
b[166] = *(a07 + 10);
|
|
kusano |
2b45e8 |
b[167] = *(a08 + 10);
|
|
kusano |
2b45e8 |
b[168] = *(a09 + 10);
|
|
kusano |
2b45e8 |
b[169] = *(a10 + 10);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[172] = ZERO;
|
|
kusano |
2b45e8 |
b[173] = ZERO;
|
|
kusano |
2b45e8 |
b[174] = ZERO;
|
|
kusano |
2b45e8 |
b[175] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[176] = *(a01 + 11);
|
|
kusano |
2b45e8 |
b[177] = *(a02 + 11);
|
|
kusano |
2b45e8 |
b[178] = *(a03 + 11);
|
|
kusano |
2b45e8 |
b[179] = *(a04 + 11);
|
|
kusano |
2b45e8 |
b[180] = *(a05 + 11);
|
|
kusano |
2b45e8 |
b[181] = *(a06 + 11);
|
|
kusano |
2b45e8 |
b[182] = *(a07 + 11);
|
|
kusano |
2b45e8 |
b[183] = *(a08 + 11);
|
|
kusano |
2b45e8 |
b[184] = *(a09 + 11);
|
|
kusano |
2b45e8 |
b[185] = *(a10 + 11);
|
|
kusano |
2b45e8 |
b[186] = *(a11 + 11);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[189] = ZERO;
|
|
kusano |
2b45e8 |
b[190] = ZERO;
|
|
kusano |
2b45e8 |
b[191] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[192] = *(a01 + 12);
|
|
kusano |
2b45e8 |
b[193] = *(a02 + 12);
|
|
kusano |
2b45e8 |
b[194] = *(a03 + 12);
|
|
kusano |
2b45e8 |
b[195] = *(a04 + 12);
|
|
kusano |
2b45e8 |
b[196] = *(a05 + 12);
|
|
kusano |
2b45e8 |
b[197] = *(a06 + 12);
|
|
kusano |
2b45e8 |
b[198] = *(a07 + 12);
|
|
kusano |
2b45e8 |
b[199] = *(a08 + 12);
|
|
kusano |
2b45e8 |
b[200] = *(a09 + 12);
|
|
kusano |
2b45e8 |
b[201] = *(a10 + 12);
|
|
kusano |
2b45e8 |
b[202] = *(a11 + 12);
|
|
kusano |
2b45e8 |
b[203] = *(a12 + 12);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[206] = ZERO;
|
|
kusano |
2b45e8 |
b[207] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[208] = *(a01 + 13);
|
|
kusano |
2b45e8 |
b[209] = *(a02 + 13);
|
|
kusano |
2b45e8 |
b[210] = *(a03 + 13);
|
|
kusano |
2b45e8 |
b[211] = *(a04 + 13);
|
|
kusano |
2b45e8 |
b[212] = *(a05 + 13);
|
|
kusano |
2b45e8 |
b[213] = *(a06 + 13);
|
|
kusano |
2b45e8 |
b[214] = *(a07 + 13);
|
|
kusano |
2b45e8 |
b[215] = *(a08 + 13);
|
|
kusano |
2b45e8 |
b[216] = *(a09 + 13);
|
|
kusano |
2b45e8 |
b[217] = *(a10 + 13);
|
|
kusano |
2b45e8 |
b[218] = *(a11 + 13);
|
|
kusano |
2b45e8 |
b[219] = *(a12 + 13);
|
|
kusano |
2b45e8 |
b[220] = *(a13 + 13);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[223] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[224] = *(a01 + 14);
|
|
kusano |
2b45e8 |
b[225] = *(a02 + 14);
|
|
kusano |
2b45e8 |
b[226] = *(a03 + 14);
|
|
kusano |
2b45e8 |
b[227] = *(a04 + 14);
|
|
kusano |
2b45e8 |
b[228] = *(a05 + 14);
|
|
kusano |
2b45e8 |
b[229] = *(a06 + 14);
|
|
kusano |
2b45e8 |
b[230] = *(a07 + 14);
|
|
kusano |
2b45e8 |
b[231] = *(a08 + 14);
|
|
kusano |
2b45e8 |
b[232] = *(a09 + 14);
|
|
kusano |
2b45e8 |
b[233] = *(a10 + 14);
|
|
kusano |
2b45e8 |
b[234] = *(a11 + 14);
|
|
kusano |
2b45e8 |
b[235] = *(a12 + 14);
|
|
kusano |
2b45e8 |
b[236] = *(a13 + 14);
|
|
kusano |
2b45e8 |
b[237] = *(a14 + 14);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[240] = *(a01 + 15);
|
|
kusano |
2b45e8 |
b[241] = *(a02 + 15);
|
|
kusano |
2b45e8 |
b[242] = *(a03 + 15);
|
|
kusano |
2b45e8 |
b[243] = *(a04 + 15);
|
|
kusano |
2b45e8 |
b[244] = *(a05 + 15);
|
|
kusano |
2b45e8 |
b[245] = *(a06 + 15);
|
|
kusano |
2b45e8 |
b[246] = *(a07 + 15);
|
|
kusano |
2b45e8 |
b[247] = *(a08 + 15);
|
|
kusano |
2b45e8 |
b[248] = *(a09 + 15);
|
|
kusano |
2b45e8 |
b[249] = *(a10 + 15);
|
|
kusano |
2b45e8 |
b[250] = *(a11 + 15);
|
|
kusano |
2b45e8 |
b[251] = *(a12 + 15);
|
|
kusano |
2b45e8 |
b[252] = *(a13 + 15);
|
|
kusano |
2b45e8 |
b[253] = *(a14 + 15);
|
|
kusano |
2b45e8 |
b[254] = *(a15 + 15);
|
|
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;
|
|
kusano |
2b45e8 |
a02 += 16;
|
|
kusano |
2b45e8 |
a03 += 16;
|
|
kusano |
2b45e8 |
a04 += 16;
|
|
kusano |
2b45e8 |
a05 += 16;
|
|
kusano |
2b45e8 |
a06 += 16;
|
|
kusano |
2b45e8 |
a07 += 16;
|
|
kusano |
2b45e8 |
a08 += 16;
|
|
kusano |
2b45e8 |
a09 += 16;
|
|
kusano |
2b45e8 |
a10 += 16;
|
|
kusano |
2b45e8 |
a11 += 16;
|
|
kusano |
2b45e8 |
a12 += 16;
|
|
kusano |
2b45e8 |
a13 += 16;
|
|
kusano |
2b45e8 |
a14 += 16;
|
|
kusano |
2b45e8 |
a15 += 16;
|
|
kusano |
2b45e8 |
a16 += 16;
|
|
kusano |
2b45e8 |
b += 256;
|
|
kusano |
2b45e8 |
|
|
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] = 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 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 2) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 1);
|
|
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] = 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 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 3) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 2);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 2);
|
|
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] = 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 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 4) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 3);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 3);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 3);
|
|
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] = 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[ 11] = ZERO;
|
|
kusano |
2b45e8 |
b[ 13] = ZERO;
|
|
kusano |
2b45e8 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 5) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 4);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 4);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 4);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 4);
|
|
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] = 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 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 6) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 5);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 5);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 5);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 5);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 5);
|
|
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] = 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 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 7) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 6);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 6);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 6);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 6);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 6);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 6);
|
|
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] = 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 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 8) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 7);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 7);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 7);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 7);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 7);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 7);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 7);
|
|
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] = 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 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 9) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 8);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 8);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 8);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 8);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 8);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 8);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 8);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 8);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 10] = ZERO;
|
|
kusano |
2b45e8 |
b[ 11] = ZERO;
|
|
kusano |
2b45e8 |
b[ 12] = ZERO;
|
|
kusano |
2b45e8 |
b[ 13] = ZERO;
|
|
kusano |
2b45e8 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 10) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 9);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 9);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 9);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 9);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 9);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 9);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 9);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 9);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 9);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 11] = ZERO;
|
|
kusano |
2b45e8 |
b[ 12] = ZERO;
|
|
kusano |
2b45e8 |
b[ 13] = ZERO;
|
|
kusano |
2b45e8 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 11) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 10);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 10);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 10);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 10);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 10);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 10);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 10);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 10);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 10);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 10);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 12] = ZERO;
|
|
kusano |
2b45e8 |
b[ 13] = ZERO;
|
|
kusano |
2b45e8 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 12) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 11);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 11);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 11);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 11);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 11);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 11);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 11);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 11);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 11);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 11);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 11);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 13] = ZERO;
|
|
kusano |
2b45e8 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 13) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 12);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 12);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 12);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 12);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 12);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 12);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 12);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 12);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 12);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 12);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 12);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 12);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 14) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 13);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 13);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 13);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 13);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 13);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 13);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 13);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 13);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 13);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 13);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 13);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 13);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 13);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
b += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 15) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 14);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 14);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 14);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 14);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 14);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 14);
|
|
kusano |
2b45e8 |
b[ 6] = *(a07 + 14);
|
|
kusano |
2b45e8 |
b[ 7] = *(a08 + 14);
|
|
kusano |
2b45e8 |
b[ 8] = *(a09 + 14);
|
|
kusano |
2b45e8 |
b[ 9] = *(a10 + 14);
|
|
kusano |
2b45e8 |
b[ 10] = *(a11 + 14);
|
|
kusano |
2b45e8 |
b[ 11] = *(a12 + 14);
|
|
kusano |
2b45e8 |
b[ 12] = *(a13 + 14);
|
|
kusano |
2b45e8 |
b[ 13] = *(a14 + 14);
|
|
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] = ZERO;
|
|
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 + 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 |
} else {
|
|
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 |
}
|
|
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] = 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 |
|
|
kusano |
2b45e8 |
b[ 8] = *(a01 + 1);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 11] = ZERO;
|
|
kusano |
2b45e8 |
b[ 12] = ZERO;
|
|
kusano |
2b45e8 |
b[ 13] = ZERO;
|
|
kusano |
2b45e8 |
b[ 14] = ZERO;
|
|
kusano |
2b45e8 |
b[ 15] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 16] = *(a01 + 2);
|
|
kusano |
2b45e8 |
b[ 17] = *(a02 + 2);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 20] = ZERO;
|
|
kusano |
2b45e8 |
b[ 21] = ZERO;
|
|
kusano |
2b45e8 |
b[ 22] = ZERO;
|
|
kusano |
2b45e8 |
b[ 23] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 24] = *(a01 + 3);
|
|
kusano |
2b45e8 |
b[ 25] = *(a02 + 3);
|
|
kusano |
2b45e8 |
b[ 26] = *(a03 + 3);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 29] = ZERO;
|
|
kusano |
2b45e8 |
b[ 30] = ZERO;
|
|
kusano |
2b45e8 |
b[ 31] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 32] = *(a01 + 4);
|
|
kusano |
2b45e8 |
b[ 33] = *(a02 + 4);
|
|
kusano |
2b45e8 |
b[ 34] = *(a03 + 4);
|
|
kusano |
2b45e8 |
b[ 35] = *(a04 + 4);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 38] = ZERO;
|
|
kusano |
2b45e8 |
b[ 39] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 40] = *(a01 + 5);
|
|
kusano |
2b45e8 |
b[ 41] = *(a02 + 5);
|
|
kusano |
2b45e8 |
b[ 42] = *(a03 + 5);
|
|
kusano |
2b45e8 |
b[ 43] = *(a04 + 5);
|
|
kusano |
2b45e8 |
b[ 44] = *(a05 + 5);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 47] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 48] = *(a01 + 6);
|
|
kusano |
2b45e8 |
b[ 49] = *(a02 + 6);
|
|
kusano |
2b45e8 |
b[ 50] = *(a03 + 6);
|
|
kusano |
2b45e8 |
b[ 51] = *(a04 + 6);
|
|
kusano |
2b45e8 |
b[ 52] = *(a05 + 6);
|
|
kusano |
2b45e8 |
b[ 53] = *(a06 + 6);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 56] = *(a01 + 7);
|
|
kusano |
2b45e8 |
b[ 57] = *(a02 + 7);
|
|
kusano |
2b45e8 |
b[ 58] = *(a03 + 7);
|
|
kusano |
2b45e8 |
b[ 59] = *(a04 + 7);
|
|
kusano |
2b45e8 |
b[ 60] = *(a05 + 7);
|
|
kusano |
2b45e8 |
b[ 61] = *(a06 + 7);
|
|
kusano |
2b45e8 |
b[ 62] = *(a07 + 7);
|
|
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;
|
|
kusano |
2b45e8 |
a02 += 8;
|
|
kusano |
2b45e8 |
a03 += 8;
|
|
kusano |
2b45e8 |
a04 += 8;
|
|
kusano |
2b45e8 |
a05 += 8;
|
|
kusano |
2b45e8 |
a06 += 8;
|
|
kusano |
2b45e8 |
a07 += 8;
|
|
kusano |
2b45e8 |
a08 += 8;
|
|
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] = 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;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 2) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 1);
|
|
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] = 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;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 3) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 2);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 2);
|
|
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] = 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;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 4) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 3);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 3);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 3);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 5] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 5) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 4);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 4);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 4);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 4);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 6] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 6) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 5);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 5);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 5);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 5);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 5);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 7) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 6);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 6);
|
|
kusano |
2b45e8 |
b[ 2] = *(a03 + 6);
|
|
kusano |
2b45e8 |
b[ 3] = *(a04 + 6);
|
|
kusano |
2b45e8 |
b[ 4] = *(a05 + 6);
|
|
kusano |
2b45e8 |
b[ 5] = *(a06 + 6);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
posY += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 4){
|
|
kusano |
2b45e8 |
X = posX;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (posX <= posY) {
|
|
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 |
} else {
|
|
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 |
}
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 4] = *(a01 + 1);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 7] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 8] = *(a01 + 2);
|
|
kusano |
2b45e8 |
b[ 9] = *(a02 + 2);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 12] = *(a01 + 3);
|
|
kusano |
2b45e8 |
b[ 13] = *(a02 + 3);
|
|
kusano |
2b45e8 |
b[ 14] = *(a03 + 3);
|
|
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;
|
|
kusano |
2b45e8 |
a02 += 4;
|
|
kusano |
2b45e8 |
a03 += 4;
|
|
kusano |
2b45e8 |
a04 += 4;
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 2] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 2) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 1);
|
|
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] = ZERO;
|
|
kusano |
2b45e8 |
b[ 3] = ZERO;
|
|
kusano |
2b45e8 |
b += 4;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (i >= 3) {
|
|
kusano |
2b45e8 |
b[ 0] = *(a01 + 2);
|
|
kusano |
2b45e8 |
b[ 1] = *(a02 + 2);
|
|
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] = ZERO;
|
|
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 + posY + (posX + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posY + (posX + 1) * lda;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
a01 = a + posX + (posY + 0) * lda;
|
|
kusano |
2b45e8 |
a02 = a + posX + (posY + 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 |
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] = ZERO;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
b[ 2] = *(a01 + 1);
|
|
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;
|
|
kusano |
2b45e8 |
a02 += 2;
|
|
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] = ZERO;
|
|
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 + posY + (posX + 0) * lda;
|
|
kusano |
2b45e8 |
} else {
|
|
kusano |
2b45e8 |
a01 = a + posX + (posY + 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 |
}
|