Changeset 64968f in git for libpolys


Ignore:
Timestamp:
Mar 3, 2022, 10:18:31 AM (2 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b21a664aa22dc6e196223af8a74ad4885e83547c')
Children:
63ad20b824d8e8065f545d4b6fe5e0b55e703aee
Parents:
9b8070091a4e1d875250d32943f6fc38457cb7c4
Message:
opt: InpAdd, InpMult for ntupel.cc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/ntupel.cc

    r9b8070 r64968f  
    7070    i++;
    7171    if (d[i]==NULL) return (number)C;
     72  }
     73}
     74
     75static void nnInpMult (number &a,number b, const coeffs r)
     76{
     77  number_array A=(number_array)a;
     78  number_array B=(number_array)b;
     79  coeffs_array d=(coeffs_array)r->data;
     80  int i=0;
     81  loop
     82  {
     83    d[i]->cfInpMult(A[i],B[i],d[i]);
     84    i++;
     85    if (d[i]==NULL) return;
    7286  }
    7387}
     
    167181    i++;
    168182    if (d[i]==NULL) return (number)C;
     183  }
     184}
     185
     186static void nnInpAdd (number &a, number b, const coeffs r)
     187{
     188  number_array A=(number_array)a;
     189  number_array B=(number_array)b;
     190  coeffs_array d=(coeffs_array)r->data;
     191  int i=0;
     192  loop
     193  {
     194    d[i]->cfInpAdd(A[i],B[i],d[i]);
     195    i++;
     196    if (d[i]==NULL) return;
    169197  }
    170198}
     
    601629  n->cfInt  = nnInt;
    602630  n->cfAdd  = nnAdd;
     631  n->cfInpAdd  = nnInpAdd;
    603632  n->cfSub  = nnSub;
    604633  n->cfMult = nnMult;
     634  n->cfInpMult = nnInpMult;
    605635  n->cfDiv  = nnDiv;
    606636  n->cfExactDiv= nnDiv;
Note: See TracChangeset for help on using the changeset viewer.