[BACK]Return to mattran.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / builtin

Diff for /OpenXM_contrib2/asir2018/builtin/mattran.c between version 1.1 and 1.2

version 1.1, 2018/09/19 05:45:06 version 1.2, 2018/09/28 08:20:27
Line 1 
Line 1 
 /*  /*
  * $OpenXM$   * $OpenXM: OpenXM_contrib2/asir2018/builtin/mattran.c,v 1.1 2018/09/19 05:45:06 noro Exp $
  */   */
   
 #include "ca.h"  #include "ca.h"
Line 39  Obj *rp;
Line 39  Obj *rp;
   pointer *coe;    pointer *coe;
   Q rowq, row2q, colq, col2q;    Q rowq, row2q, colq, col2q;
   int sw, row, row2, col, col2;    int sw, row, row2, col, col2;
   sw = QTOS( (Q)ARG0(arg) );    sw = ZTOS( (Q)ARG0(arg) );
   mat = (MAT)ARG1(arg);    mat = (MAT)ARG1(arg);
   switch (sw) {    switch (sw) {
     case 1:      case 1:
       rowq = (Q)ARG2(arg);        rowq = (Q)ARG2(arg);
       row = QTOS( rowq );        row = ZTOS( rowq );
       coe = (pointer)ARG3(arg);        coe = (pointer)ARG3(arg);
       BodyRowMul( mat, row, coe );        BodyRowMul( mat, row, coe );
       *rp = (Obj)mat;        *rp = (Obj)mat;
       return;        return;
     case 2:      case 2:
       rowq = (Q)ARG2(arg);        rowq = (Q)ARG2(arg);
       row = QTOS( rowq );        row = ZTOS( rowq );
       row2q = (Q)ARG3(arg);        row2q = (Q)ARG3(arg);
       row2 = QTOS( row2q );        row2 = ZTOS( row2q );
       BodyRowExh( mat, row, row2 );        BodyRowExh( mat, row, row2 );
       *rp = (Obj)mat;        *rp = (Obj)mat;
       return;        return;
     case 3:      case 3:
       rowq = (Q)ARG2(arg);        rowq = (Q)ARG2(arg);
       row = QTOS( rowq );        row = ZTOS( rowq );
       row2q = (Q)ARG3(arg);        row2q = (Q)ARG3(arg);
       row2 = QTOS( row2q );        row2 = ZTOS( row2q );
       coe = (pointer)ARG3(arg);        coe = (pointer)ARG3(arg);
       BodyRowMulAdd( mat, row, row2, coe );        BodyRowMulAdd( mat, row, row2, coe );
       *rp = (Obj)mat;        *rp = (Obj)mat;
       return;        return;
     case 4:      case 4:
       colq = (Q)ARG2(arg);        colq = (Q)ARG2(arg);
       col = QTOS( colq );        col = ZTOS( colq );
       coe = (pointer)ARG3(arg);        coe = (pointer)ARG3(arg);
       BodyColMul( mat, col, coe );        BodyColMul( mat, col, coe );
       *rp = (Obj)mat;        *rp = (Obj)mat;
       return;        return;
     case 5:      case 5:
       colq = (Q)ARG2(arg);        colq = (Q)ARG2(arg);
       col = QTOS( colq );        col = ZTOS( colq );
       col2q = (Q)ARG3(arg);        col2q = (Q)ARG3(arg);
       col2 = QTOS( col2q );        col2 = ZTOS( col2q );
       BodyColExh( mat, col, col2 );        BodyColExh( mat, col, col2 );
       *rp = (Obj)mat;        *rp = (Obj)mat;
       return;        return;
     case 6:      case 6:
       colq = (Q)ARG2(arg);        colq = (Q)ARG2(arg);
       col = QTOS( colq );        col = ZTOS( colq );
       col2q = (Q)ARG3(arg);        col2q = (Q)ARG3(arg);
       col2 = QTOS( col2q );        col2 = ZTOS( col2q );
       coe = (pointer)ARG3(arg);        coe = (pointer)ARG3(arg);
       BodyColMulAdd( mat, col, col2, coe );        BodyColMulAdd( mat, col, col2, coe );
       *rp = (Obj)mat;        *rp = (Obj)mat;
Line 107  Obj *rp;
Line 107  Obj *rp;
   
   mat = (MAT)ARG0(arg);    mat = (MAT)ARG0(arg);
   rowq = (Q)ARG1(arg);    rowq = (Q)ARG1(arg);
   row = QTOS( rowq );    row = ZTOS( rowq );
   coe = (pointer)ARG2(arg);    coe = (pointer)ARG2(arg);
   BodyRowMul( mat, row , coe );    BodyRowMul( mat, row , coe );
   *rp = (Obj)mat;    *rp = (Obj)mat;
Line 125  Obj *rp;
Line 125  Obj *rp;
   mat = (MAT)ARG0(arg);    mat = (MAT)ARG0(arg);
   QIndexA = (Q)ARG1(arg);    QIndexA = (Q)ARG1(arg);
   QIndexB = (Q)ARG2(arg);    QIndexB = (Q)ARG2(arg);
   IndexA = QTOS( QIndexA );    IndexA = ZTOS( QIndexA );
   IndexB = QTOS( QIndexB );    IndexB = ZTOS( QIndexB );
   BodyRowExh( mat, IndexA, IndexB );    BodyRowExh( mat, IndexA, IndexB );
   *rp = (Obj)mat;    *rp = (Obj)mat;
 }  }
Line 145  Obj *rp;
Line 145  Obj *rp;
   QIndexA = (Q)ARG1(arg);    QIndexA = (Q)ARG1(arg);
   QIndexB = (Q)ARG2(arg);    QIndexB = (Q)ARG2(arg);
   coe = (pointer)ARG3(arg);    coe = (pointer)ARG3(arg);
   IndexA = QTOS( QIndexA );    IndexA = ZTOS( QIndexA );
   IndexB = QTOS( QIndexB );    IndexB = ZTOS( QIndexB );
   BodyRowMulAdd( mat, IndexA, IndexB, coe );    BodyRowMulAdd( mat, IndexA, IndexB, coe );
   *rp = (Obj)mat;    *rp = (Obj)mat;
 }  }
Line 163  Obj *rp;
Line 163  Obj *rp;
   
   mat = (MAT)ARG0(arg);    mat = (MAT)ARG0(arg);
   QIndex = (Q)ARG1(arg);    QIndex = (Q)ARG1(arg);
   Index = QTOS( QIndex );    Index = ZTOS( QIndex );
   coe = (pointer)ARG2(arg);    coe = (pointer)ARG2(arg);
   BodyColMul( mat, Index , coe );    BodyColMul( mat, Index , coe );
   *rp = (Obj)mat;    *rp = (Obj)mat;
Line 181  Obj *rp;
Line 181  Obj *rp;
   mat = (MAT)ARG0(arg);    mat = (MAT)ARG0(arg);
   QIndexA = (Q)ARG1(arg);    QIndexA = (Q)ARG1(arg);
   QIndexB = (Q)ARG2(arg);    QIndexB = (Q)ARG2(arg);
   IndexA = QTOS( QIndexA );    IndexA = ZTOS( QIndexA );
   IndexB = QTOS( QIndexB );    IndexB = ZTOS( QIndexB );
   BodyColExh( mat, IndexA, IndexB );    BodyColExh( mat, IndexA, IndexB );
   *rp = (Obj)mat;    *rp = (Obj)mat;
 }  }
Line 201  Obj *rp;
Line 201  Obj *rp;
   QIndexA = (Q)ARG1(arg);    QIndexA = (Q)ARG1(arg);
   QIndexB = (Q)ARG2(arg);    QIndexB = (Q)ARG2(arg);
   coe = (pointer)ARG3(arg);    coe = (pointer)ARG3(arg);
   IndexA = QTOS( QIndexA );    IndexA = ZTOS( QIndexA );
   IndexB = QTOS( QIndexB );    IndexB = ZTOS( QIndexB );
   BodyColMulAdd( mat, IndexA, IndexB, coe );    BodyColMulAdd( mat, IndexA, IndexB, coe );
   *rp = (Obj)mat;    *rp = (Obj)mat;
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>