|
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, FLOAT *b){
|
|
kusano |
2b45e8 |
BLASLONG i, j;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLOAT *aoffset;
|
|
kusano |
2b45e8 |
FLOAT *aoffset1, *aoffset2, *aoffset3, *aoffset4;
|
|
kusano |
2b45e8 |
FLOAT *aoffset5, *aoffset6, *aoffset7, *aoffset8;
|
|
kusano |
2b45e8 |
FLOAT *aoffset9, *aoffset10, *aoffset11, *aoffset12;
|
|
kusano |
2b45e8 |
FLOAT *aoffset13, *aoffset14, *aoffset15, *aoffset16;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLOAT *boffset;
|
|
kusano |
2b45e8 |
FLOAT ctemp01, ctemp02, ctemp03, ctemp04;
|
|
kusano |
2b45e8 |
FLOAT ctemp05, ctemp06, ctemp07, ctemp08;
|
|
kusano |
2b45e8 |
FLOAT ctemp09, ctemp10, ctemp11, ctemp12;
|
|
kusano |
2b45e8 |
FLOAT ctemp13, ctemp14, ctemp15, ctemp16;
|
|
kusano |
2b45e8 |
FLOAT ctemp17, ctemp18, ctemp19, ctemp20;
|
|
kusano |
2b45e8 |
FLOAT ctemp21, ctemp22, ctemp23, ctemp24;
|
|
kusano |
2b45e8 |
FLOAT ctemp25, ctemp26, ctemp27, ctemp28;
|
|
kusano |
2b45e8 |
FLOAT ctemp29, ctemp30, ctemp31, ctemp32;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
aoffset = a;
|
|
kusano |
2b45e8 |
boffset = b;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
j = (n >> 4);
|
|
kusano |
2b45e8 |
if (j > 0){
|
|
kusano |
2b45e8 |
do{
|
|
kusano |
2b45e8 |
aoffset1 = aoffset;
|
|
kusano |
2b45e8 |
aoffset2 = aoffset1 + lda;
|
|
kusano |
2b45e8 |
aoffset3 = aoffset2 + lda;
|
|
kusano |
2b45e8 |
aoffset4 = aoffset3 + lda;
|
|
kusano |
2b45e8 |
aoffset5 = aoffset4 + lda;
|
|
kusano |
2b45e8 |
aoffset6 = aoffset5 + lda;
|
|
kusano |
2b45e8 |
aoffset7 = aoffset6 + lda;
|
|
kusano |
2b45e8 |
aoffset8 = aoffset7 + lda;
|
|
kusano |
2b45e8 |
aoffset9 = aoffset8 + lda;
|
|
kusano |
2b45e8 |
aoffset10 = aoffset9 + lda;
|
|
kusano |
2b45e8 |
aoffset11 = aoffset10 + lda;
|
|
kusano |
2b45e8 |
aoffset12 = aoffset11 + lda;
|
|
kusano |
2b45e8 |
aoffset13 = aoffset12 + lda;
|
|
kusano |
2b45e8 |
aoffset14 = aoffset13 + lda;
|
|
kusano |
2b45e8 |
aoffset15 = aoffset14 + lda;
|
|
kusano |
2b45e8 |
aoffset16 = aoffset15 + lda;
|
|
kusano |
2b45e8 |
aoffset += 16 * lda;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 1);
|
|
kusano |
2b45e8 |
if (i > 0){
|
|
kusano |
2b45e8 |
do{
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp02 = *(aoffset1 + 1);
|
|
kusano |
2b45e8 |
ctemp03 = *(aoffset2 + 0);
|
|
kusano |
2b45e8 |
ctemp04 = *(aoffset2 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp05 = *(aoffset3 + 0);
|
|
kusano |
2b45e8 |
ctemp06 = *(aoffset3 + 1);
|
|
kusano |
2b45e8 |
ctemp07 = *(aoffset4 + 0);
|
|
kusano |
2b45e8 |
ctemp08 = *(aoffset4 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp09 = *(aoffset5 + 0);
|
|
kusano |
2b45e8 |
ctemp10 = *(aoffset5 + 1);
|
|
kusano |
2b45e8 |
ctemp11 = *(aoffset6 + 0);
|
|
kusano |
2b45e8 |
ctemp12 = *(aoffset6 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp13 = *(aoffset7 + 0);
|
|
kusano |
2b45e8 |
ctemp14 = *(aoffset7 + 1);
|
|
kusano |
2b45e8 |
ctemp15 = *(aoffset8 + 0);
|
|
kusano |
2b45e8 |
ctemp16 = *(aoffset8 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp17 = *(aoffset9 + 0);
|
|
kusano |
2b45e8 |
ctemp18 = *(aoffset9 + 1);
|
|
kusano |
2b45e8 |
ctemp19 = *(aoffset10 + 0);
|
|
kusano |
2b45e8 |
ctemp20 = *(aoffset10 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp21 = *(aoffset11 + 0);
|
|
kusano |
2b45e8 |
ctemp22 = *(aoffset11 + 1);
|
|
kusano |
2b45e8 |
ctemp23 = *(aoffset12 + 0);
|
|
kusano |
2b45e8 |
ctemp24 = *(aoffset12 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp25 = *(aoffset13 + 0);
|
|
kusano |
2b45e8 |
ctemp26 = *(aoffset13 + 1);
|
|
kusano |
2b45e8 |
ctemp27 = *(aoffset14 + 0);
|
|
kusano |
2b45e8 |
ctemp28 = *(aoffset14 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp29 = *(aoffset15 + 0);
|
|
kusano |
2b45e8 |
ctemp30 = *(aoffset15 + 1);
|
|
kusano |
2b45e8 |
ctemp31 = *(aoffset16 + 0);
|
|
kusano |
2b45e8 |
ctemp32 = *(aoffset16 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp03;
|
|
kusano |
2b45e8 |
*(boffset + 2) = ctemp05;
|
|
kusano |
2b45e8 |
*(boffset + 3) = ctemp07;
|
|
kusano |
2b45e8 |
*(boffset + 4) = ctemp09;
|
|
kusano |
2b45e8 |
*(boffset + 5) = ctemp11;
|
|
kusano |
2b45e8 |
*(boffset + 6) = ctemp13;
|
|
kusano |
2b45e8 |
*(boffset + 7) = ctemp15;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 8) = ctemp17;
|
|
kusano |
2b45e8 |
*(boffset + 9) = ctemp19;
|
|
kusano |
2b45e8 |
*(boffset + 10) = ctemp21;
|
|
kusano |
2b45e8 |
*(boffset + 11) = ctemp23;
|
|
kusano |
2b45e8 |
*(boffset + 12) = ctemp25;
|
|
kusano |
2b45e8 |
*(boffset + 13) = ctemp27;
|
|
kusano |
2b45e8 |
*(boffset + 14) = ctemp29;
|
|
kusano |
2b45e8 |
*(boffset + 15) = ctemp31;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 16) = ctemp02;
|
|
kusano |
2b45e8 |
*(boffset + 17) = ctemp04;
|
|
kusano |
2b45e8 |
*(boffset + 18) = ctemp06;
|
|
kusano |
2b45e8 |
*(boffset + 19) = ctemp08;
|
|
kusano |
2b45e8 |
*(boffset + 20) = ctemp10;
|
|
kusano |
2b45e8 |
*(boffset + 21) = ctemp12;
|
|
kusano |
2b45e8 |
*(boffset + 22) = ctemp14;
|
|
kusano |
2b45e8 |
*(boffset + 23) = ctemp16;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 24) = ctemp18;
|
|
kusano |
2b45e8 |
*(boffset + 25) = ctemp20;
|
|
kusano |
2b45e8 |
*(boffset + 26) = ctemp22;
|
|
kusano |
2b45e8 |
*(boffset + 27) = ctemp24;
|
|
kusano |
2b45e8 |
*(boffset + 28) = ctemp26;
|
|
kusano |
2b45e8 |
*(boffset + 29) = ctemp28;
|
|
kusano |
2b45e8 |
*(boffset + 30) = ctemp30;
|
|
kusano |
2b45e8 |
*(boffset + 31) = ctemp32;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
aoffset1 += 2;
|
|
kusano |
2b45e8 |
aoffset2 += 2;
|
|
kusano |
2b45e8 |
aoffset3 += 2;
|
|
kusano |
2b45e8 |
aoffset4 += 2;
|
|
kusano |
2b45e8 |
aoffset5 += 2;
|
|
kusano |
2b45e8 |
aoffset6 += 2;
|
|
kusano |
2b45e8 |
aoffset7 += 2;
|
|
kusano |
2b45e8 |
aoffset8 += 2;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
aoffset9 += 2;
|
|
kusano |
2b45e8 |
aoffset10 += 2;
|
|
kusano |
2b45e8 |
aoffset11 += 2;
|
|
kusano |
2b45e8 |
aoffset12 += 2;
|
|
kusano |
2b45e8 |
aoffset13 += 2;
|
|
kusano |
2b45e8 |
aoffset14 += 2;
|
|
kusano |
2b45e8 |
aoffset15 += 2;
|
|
kusano |
2b45e8 |
aoffset16 += 2;
|
|
kusano |
2b45e8 |
boffset += 32;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
}while(i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (m & 1){
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp03 = *(aoffset2 + 0);
|
|
kusano |
2b45e8 |
ctemp05 = *(aoffset3 + 0);
|
|
kusano |
2b45e8 |
ctemp07 = *(aoffset4 + 0);
|
|
kusano |
2b45e8 |
ctemp09 = *(aoffset5 + 0);
|
|
kusano |
2b45e8 |
ctemp11 = *(aoffset6 + 0);
|
|
kusano |
2b45e8 |
ctemp13 = *(aoffset7 + 0);
|
|
kusano |
2b45e8 |
ctemp15 = *(aoffset8 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp17 = *(aoffset9 + 0);
|
|
kusano |
2b45e8 |
ctemp19 = *(aoffset10 + 0);
|
|
kusano |
2b45e8 |
ctemp21 = *(aoffset11 + 0);
|
|
kusano |
2b45e8 |
ctemp23 = *(aoffset12 + 0);
|
|
kusano |
2b45e8 |
ctemp25 = *(aoffset13 + 0);
|
|
kusano |
2b45e8 |
ctemp27 = *(aoffset14 + 0);
|
|
kusano |
2b45e8 |
ctemp29 = *(aoffset15 + 0);
|
|
kusano |
2b45e8 |
ctemp31 = *(aoffset16 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp03;
|
|
kusano |
2b45e8 |
*(boffset + 2) = ctemp05;
|
|
kusano |
2b45e8 |
*(boffset + 3) = ctemp07;
|
|
kusano |
2b45e8 |
*(boffset + 4) = ctemp09;
|
|
kusano |
2b45e8 |
*(boffset + 5) = ctemp11;
|
|
kusano |
2b45e8 |
*(boffset + 6) = ctemp13;
|
|
kusano |
2b45e8 |
*(boffset + 7) = ctemp15;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 8) = ctemp17;
|
|
kusano |
2b45e8 |
*(boffset + 9) = ctemp19;
|
|
kusano |
2b45e8 |
*(boffset + 10) = ctemp21;
|
|
kusano |
2b45e8 |
*(boffset + 11) = ctemp23;
|
|
kusano |
2b45e8 |
*(boffset + 12) = ctemp25;
|
|
kusano |
2b45e8 |
*(boffset + 13) = ctemp27;
|
|
kusano |
2b45e8 |
*(boffset + 14) = ctemp29;
|
|
kusano |
2b45e8 |
*(boffset + 15) = ctemp31;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
boffset += 16;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
j--;
|
|
kusano |
2b45e8 |
}while(j > 0);
|
|
kusano |
2b45e8 |
} /* end of if(j > 0) */
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 8){
|
|
kusano |
2b45e8 |
aoffset1 = aoffset;
|
|
kusano |
2b45e8 |
aoffset2 = aoffset1 + lda;
|
|
kusano |
2b45e8 |
aoffset3 = aoffset2 + lda;
|
|
kusano |
2b45e8 |
aoffset4 = aoffset3 + lda;
|
|
kusano |
2b45e8 |
aoffset5 = aoffset4 + lda;
|
|
kusano |
2b45e8 |
aoffset6 = aoffset5 + lda;
|
|
kusano |
2b45e8 |
aoffset7 = aoffset6 + lda;
|
|
kusano |
2b45e8 |
aoffset8 = aoffset7 + lda;
|
|
kusano |
2b45e8 |
aoffset += 8 * lda;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 1);
|
|
kusano |
2b45e8 |
if (i > 0){
|
|
kusano |
2b45e8 |
do{
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp02 = *(aoffset1 + 1);
|
|
kusano |
2b45e8 |
ctemp03 = *(aoffset2 + 0);
|
|
kusano |
2b45e8 |
ctemp04 = *(aoffset2 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp05 = *(aoffset3 + 0);
|
|
kusano |
2b45e8 |
ctemp06 = *(aoffset3 + 1);
|
|
kusano |
2b45e8 |
ctemp07 = *(aoffset4 + 0);
|
|
kusano |
2b45e8 |
ctemp08 = *(aoffset4 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp09 = *(aoffset5 + 0);
|
|
kusano |
2b45e8 |
ctemp10 = *(aoffset5 + 1);
|
|
kusano |
2b45e8 |
ctemp11 = *(aoffset6 + 0);
|
|
kusano |
2b45e8 |
ctemp12 = *(aoffset6 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp13 = *(aoffset7 + 0);
|
|
kusano |
2b45e8 |
ctemp14 = *(aoffset7 + 1);
|
|
kusano |
2b45e8 |
ctemp15 = *(aoffset8 + 0);
|
|
kusano |
2b45e8 |
ctemp16 = *(aoffset8 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp03;
|
|
kusano |
2b45e8 |
*(boffset + 2) = ctemp05;
|
|
kusano |
2b45e8 |
*(boffset + 3) = ctemp07;
|
|
kusano |
2b45e8 |
*(boffset + 4) = ctemp09;
|
|
kusano |
2b45e8 |
*(boffset + 5) = ctemp11;
|
|
kusano |
2b45e8 |
*(boffset + 6) = ctemp13;
|
|
kusano |
2b45e8 |
*(boffset + 7) = ctemp15;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 8) = ctemp02;
|
|
kusano |
2b45e8 |
*(boffset + 9) = ctemp04;
|
|
kusano |
2b45e8 |
*(boffset + 10) = ctemp06;
|
|
kusano |
2b45e8 |
*(boffset + 11) = ctemp08;
|
|
kusano |
2b45e8 |
*(boffset + 12) = ctemp10;
|
|
kusano |
2b45e8 |
*(boffset + 13) = ctemp12;
|
|
kusano |
2b45e8 |
*(boffset + 14) = ctemp14;
|
|
kusano |
2b45e8 |
*(boffset + 15) = ctemp16;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
aoffset1 += 2;
|
|
kusano |
2b45e8 |
aoffset2 += 2;
|
|
kusano |
2b45e8 |
aoffset3 += 2;
|
|
kusano |
2b45e8 |
aoffset4 += 2;
|
|
kusano |
2b45e8 |
aoffset5 += 2;
|
|
kusano |
2b45e8 |
aoffset6 += 2;
|
|
kusano |
2b45e8 |
aoffset7 += 2;
|
|
kusano |
2b45e8 |
aoffset8 += 2;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
boffset += 16;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
}while(i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (m & 1){
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp03 = *(aoffset2 + 0);
|
|
kusano |
2b45e8 |
ctemp05 = *(aoffset3 + 0);
|
|
kusano |
2b45e8 |
ctemp07 = *(aoffset4 + 0);
|
|
kusano |
2b45e8 |
ctemp09 = *(aoffset5 + 0);
|
|
kusano |
2b45e8 |
ctemp11 = *(aoffset6 + 0);
|
|
kusano |
2b45e8 |
ctemp13 = *(aoffset7 + 0);
|
|
kusano |
2b45e8 |
ctemp15 = *(aoffset8 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp03;
|
|
kusano |
2b45e8 |
*(boffset + 2) = ctemp05;
|
|
kusano |
2b45e8 |
*(boffset + 3) = ctemp07;
|
|
kusano |
2b45e8 |
*(boffset + 4) = ctemp09;
|
|
kusano |
2b45e8 |
*(boffset + 5) = ctemp11;
|
|
kusano |
2b45e8 |
*(boffset + 6) = ctemp13;
|
|
kusano |
2b45e8 |
*(boffset + 7) = ctemp15;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
boffset += 8;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 4){
|
|
kusano |
2b45e8 |
aoffset1 = aoffset;
|
|
kusano |
2b45e8 |
aoffset2 = aoffset1 + lda;
|
|
kusano |
2b45e8 |
aoffset3 = aoffset2 + lda;
|
|
kusano |
2b45e8 |
aoffset4 = aoffset3 + lda;
|
|
kusano |
2b45e8 |
aoffset += 4 * lda;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 1);
|
|
kusano |
2b45e8 |
if (i > 0){
|
|
kusano |
2b45e8 |
do{
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp02 = *(aoffset1 + 1);
|
|
kusano |
2b45e8 |
ctemp03 = *(aoffset2 + 0);
|
|
kusano |
2b45e8 |
ctemp04 = *(aoffset2 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ctemp05 = *(aoffset3 + 0);
|
|
kusano |
2b45e8 |
ctemp06 = *(aoffset3 + 1);
|
|
kusano |
2b45e8 |
ctemp07 = *(aoffset4 + 0);
|
|
kusano |
2b45e8 |
ctemp08 = *(aoffset4 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp03;
|
|
kusano |
2b45e8 |
*(boffset + 2) = ctemp05;
|
|
kusano |
2b45e8 |
*(boffset + 3) = ctemp07;
|
|
kusano |
2b45e8 |
*(boffset + 4) = ctemp02;
|
|
kusano |
2b45e8 |
*(boffset + 5) = ctemp04;
|
|
kusano |
2b45e8 |
*(boffset + 6) = ctemp06;
|
|
kusano |
2b45e8 |
*(boffset + 7) = ctemp08;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
aoffset1 += 2;
|
|
kusano |
2b45e8 |
aoffset2 += 2;
|
|
kusano |
2b45e8 |
aoffset3 += 2;
|
|
kusano |
2b45e8 |
aoffset4 += 2;
|
|
kusano |
2b45e8 |
boffset += 8;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
}while(i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (m & 1){
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp03 = *(aoffset2 + 0);
|
|
kusano |
2b45e8 |
ctemp05 = *(aoffset3 + 0);
|
|
kusano |
2b45e8 |
ctemp07 = *(aoffset4 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp03;
|
|
kusano |
2b45e8 |
*(boffset + 2) = ctemp05;
|
|
kusano |
2b45e8 |
*(boffset + 3) = ctemp07;
|
|
kusano |
2b45e8 |
boffset += 4;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 2){
|
|
kusano |
2b45e8 |
aoffset1 = aoffset;
|
|
kusano |
2b45e8 |
aoffset2 = aoffset1 + lda;
|
|
kusano |
2b45e8 |
aoffset += 2 * lda;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 1);
|
|
kusano |
2b45e8 |
if (i > 0){
|
|
kusano |
2b45e8 |
do{
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp02 = *(aoffset1 + 1);
|
|
kusano |
2b45e8 |
ctemp03 = *(aoffset2 + 0);
|
|
kusano |
2b45e8 |
ctemp04 = *(aoffset2 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp03;
|
|
kusano |
2b45e8 |
*(boffset + 2) = ctemp02;
|
|
kusano |
2b45e8 |
*(boffset + 3) = ctemp04;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
aoffset1 += 2;
|
|
kusano |
2b45e8 |
aoffset2 += 2;
|
|
kusano |
2b45e8 |
boffset += 4;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
}while(i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (m & 1){
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp03 = *(aoffset2 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp03;
|
|
kusano |
2b45e8 |
boffset += 2;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (n & 1){
|
|
kusano |
2b45e8 |
aoffset1 = aoffset;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i = (m >> 1);
|
|
kusano |
2b45e8 |
if (i > 0){
|
|
kusano |
2b45e8 |
do{
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
ctemp02 = *(aoffset1 + 1);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
*(boffset + 1) = ctemp02;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
aoffset1 += 2;
|
|
kusano |
2b45e8 |
boffset += 2;
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
i --;
|
|
kusano |
2b45e8 |
}while(i > 0);
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
if (m & 1){
|
|
kusano |
2b45e8 |
ctemp01 = *(aoffset1 + 0);
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*(boffset + 0) = ctemp01;
|
|
kusano |
2b45e8 |
boffset += 1;
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
}
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
return 0;
|
|
kusano |
2b45e8 |
}
|