Changeset 44fac1 in git
 Timestamp:
 Feb 5, 2013, 2:54:42 PM (11 years ago)
 Branches:
 (u'fiekerDuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c1c65551e4b3a0de0b13ddf30446f6e9569681b5')
 Children:
 07df916e240f5e814e41624e08e7dac0bc26fcb5
 Parents:
 8436eb4f6569b8028c52e48106505001a3771c6b
 Location:
 kernel
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

kernel/tgb.cc
r8436eb4 r44fac1 912 912 { 913 913 now_t_rep (i, j, c); 914 om free (i_con);914 omFree (i_con); 915 915 return TRUE; 916 916 } … … 1120 1120 { 1121 1121 ideal I = c>S; 1122 int *cans = (int *) om alloc (c>n * sizeof (int));1123 int *connected = (int *) om alloc (c>n * sizeof (int));1122 int *cans = (int *) omAlloc (c>n * sizeof (int)); 1123 int *connected = (int *) omAlloc (c>n * sizeof (int)); 1124 1124 cans[0] = to; 1125 1125 int cans_length = 1; … … 1158 1158 connected[connected_length] = 1; 1159 1159 } 1160 om free (cans);1160 omFree (cans); 1161 1161 return connected; 1162 1162 } … … 1204 1204 connected[connected_length] = 1; 1205 1205 } 1206 om free (cans);1206 omFree (cans); 1207 1207 return connected; 1208 1208 } … … 1249 1249 { 1250 1250 now_t_rep (i, j, c); 1251 om free (i_con);1251 omFree (i_con); 1252 1252 p_Delete (&lm, c>r); 1253 1253 return; … … 1513 1513 c>tmp_pair_lm[i] = pOne_Special (c>r); 1514 1514 1515 c>tmp_spn[i] = (sorted_pair_node *) om alloc (sizeof (sorted_pair_node));1515 c>tmp_spn[i] = (sorted_pair_node *) omAlloc (sizeof (sorted_pair_node)); 1516 1516 1517 1517 c>lengths[i] = pLength (h); … … 1540 1540 #else 1541 1541 if(i > 0) 1542 c>states[i] = (char *) om alloc (i * sizeof (char));1542 c>states[i] = (char *) omAlloc (i * sizeof (char)); 1543 1543 else 1544 1544 c>states[i] = NULL; … … 1749 1749 __p_GetComp (c>S>m[nodes[lower]>j], c>r)); 1750 1750 nodes_final[spc_final] = 1751 (sorted_pair_node *) om alloc (sizeof (sorted_pair_node));1751 (sorted_pair_node *) omAlloc (sizeof (sorted_pair_node)); 1752 1752 1753 1753 *(nodes_final[spc_final++]) = *(nodes[lower]); … … 1768 1768 1769 1769 assume (spc_final <= spc); 1770 om free (nodes);1770 omFree (nodes); 1771 1771 nodes = NULL; 1772 1772 … … 1823 1823 c>introduceDelayedPairs (array_arg, j); 1824 1824 1825 om free (array_arg); // !!!1825 omFree (array_arg); // !!! 1826 1826 } 1827 1827 // PrintS("Saturation  done!!!\n"); … … 1840 1840 c>pair_top += spc_final; 1841 1841 clean_top_of_pair_list (c); 1842 om free (nodes_final);1842 omFree (nodes_final); 1843 1843 return NULL; 1844 1844 } … … 2215 2215 memmove (big_sbuf + partsum, sbuf[j], 2216 2216 ibuf[j] * sizeof (sorted_pair_node *)); 2217 om free (sbuf[j]);2217 omFree (sbuf[j]); 2218 2218 partsum += ibuf[j]; 2219 2219 } … … 2223 2223 c>pair_top += sum; 2224 2224 clean_top_of_pair_list (c); 2225 om free (big_sbuf);2225 omFree (big_sbuf); 2226 2226 omfree (sbuf); 2227 2227 omfree (ibuf); … … 2243 2243 //after that can evaluate placeholders 2244 2244 int i; 2245 buffer = (number *) om alloc (nIrreducibleMonomials * sizeof (number));2245 buffer = (number *) omAlloc (nIrreducibleMonomials * sizeof (number)); 2246 2246 for(i = 0; i < root.branches_len; i++) 2247 2247 { 2248 2248 evaluateRows (1, root.branches[i]); 2249 2249 } 2250 om free (buffer);2250 omFree (buffer); 2251 2251 buffer = NULL; 2252 2252 } 
kernel/tgb_internal.h
r8436eb4 r44fac1 540 540 { 541 541 len=n; 542 idx_array=(int*) om alloc(n*sizeof(int));543 coef_array=(number_type*) om alloc(n*sizeof(number_type));542 idx_array=(int*) omAlloc(n*sizeof(int)); 543 coef_array=(number_type*) omAlloc(n*sizeof(number_type)); 544 544 } 545 545 SparseRow<number_type>(int n, const number_type* source) … … 547 547 len=n; 548 548 idx_array=NULL; 549 coef_array=(number_type*) om alloc(n*sizeof(number_type));549 coef_array=(number_type*) omAlloc(n*sizeof(number_type)); 550 550 memcpy(coef_array,source,n*sizeof(number_type)); 551 551 } … … 686 686 { 687 687 tempBufferSize=2*size; 688 om free(tempBuffer);688 omFree(tempBuffer); 689 689 tempBuffer=omAlloc(tempBufferSize); 690 690 } … … 714 714 omfree(recursionPolyBuffer); 715 715 #endif 716 om free(tempBuffer);716 omFree(tempBuffer); 717 717 } 718 718 … … 1648 1648 lastReducibleIndices=(int*) omalloc(nrows*sizeof(int)); 1649 1649 nonZeroUntil=0; 1650 while(nonZeroUntil<nrows){ 1651 if (startIndices[nonZeroUntil]<ncols){ 1652 1650 while(nonZeroUntil<nrows) 1651 { 1652 if (startIndices[nonZeroUntil]<ncols) 1653 { 1653 1654 nonZeroUntil++; 1654 1655 } … … 1759 1760 //Print("Input rows %d\n",pn); 1760 1761 int j; 1761 if (TEST_OPT_PROT){ 1762 if (TEST_OPT_PROT) 1763 { 1762 1764 Print("Input rows %d\n",pn); 1763 1765 } … … 1765 1767 NoroCache<number_type> cache; 1766 1768 1767 SparseRow<number_type> ** srows=(SparseRow<number_type>**) om alloc(pn*sizeof(SparseRow<number_type>*));1769 SparseRow<number_type> ** srows=(SparseRow<number_type>**) omAlloc(pn*sizeof(SparseRow<number_type>*)); 1768 1770 int non_zeros=0; 1769 for(j=0;j<pn;j++) {1770 1771 for(j=0;j<pn;j++) 1772 { 1771 1773 poly h=p[j]; 1772 1774 int h_len=pLength(h); 1773 1774 1775 //number coef; 1775 1776 1777 1776 srows[non_zeros]=noro_red_to_non_poly_t<number_type>(h,h_len,&cache,c); 1778 1777 if (srows[non_zeros]!=NULL) non_zeros++; … … 1784 1783 int n=irr_nodes.size();//cache.countIrreducibleMonomials(); 1785 1784 cache.nIrreducibleMonomials=n; 1786 if (TEST_OPT_PROT){ 1785 if (TEST_OPT_PROT) 1786 { 1787 1787 Print("Irred Mon:%d\n",n); 1788 1788 Print("red Mon:%d\n",cache.nReducibleMonomials); … … 1790 1790 TermNoroDataNode<number_type>* term_nodes=(TermNoroDataNode<number_type>*) omalloc(n*sizeof(TermNoroDataNode<number_type>)); 1791 1791 1792 for(j=0;j<n;j++){ 1792 for(j=0;j<n;j++) 1793 { 1793 1794 assume(irr_nodes[j]!=NULL); 1794 1795 assume(irr_nodes[j]>value_len==NoroCache<number_type>::backLinkCode); … … 1798 1799 } 1799 1800 1800 1801 1801 qsort(term_nodes,n,sizeof(TermNoroDataNode<number_type>),term_nodes_sort_crit<number_type>); 1802 1802 poly* terms=(poly*) omalloc(n*sizeof(poly)); … … 1813 1813 // Print("Evaluate Rows \n"); 1814 1814 pn=non_zeros; 1815 number_type* number_array=(number_type*) omalloc(n*pn*sizeof(number_type)); 1816 memset(number_array,0,sizeof(number_type)*n*pn); 1815 number_type* number_array=(number_type*) omalloc0(n*pn*sizeof(number_type)); 1817 1816 1818 1817 for(j=0;j<pn;j++) 
kernel/tgbgauss.cc
r8436eb4 r44fac1 128 128 { 129 129 int col, row; 130 int* row_cache=(int*) om alloc(mat>get_rows()*sizeof(int));130 int* row_cache=(int*) omAlloc(mat>get_rows()*sizeof(int)); 131 131 col=0; 132 132 row=0; … … 134 134 int pn=mat>get_rows(); 135 135 int matcol=mat>get_columns(); 136 int* area=(int*) om alloc(sizeof(int)*((matcol1)/bundle_size+1));136 int* area=(int*) omAlloc(sizeof(int)*((matcol1)/bundle_size+1)); 137 137 const int max_area_index=(matcol1)/bundle_size; 138 138 //rows are divided in areas … … 359 359 row++; 360 360 } 361 om free(area);362 om free(row_cache);361 omFree(area); 362 omFree(row_cache); 363 363 } 364 364 … … 458 458 tgb_matrix::tgb_matrix(int i, int j) 459 459 { 460 n=(number**) om alloc(i*sizeof (number*));;460 n=(number**) omAlloc(i*sizeof (number*));; 461 461 int z; 462 462 int z2; 463 463 for(z=0;z<i;z++) 464 464 { 465 n[z]=(number*)om alloc(j*sizeof(number));465 n[z]=(number*)omAlloc(j*sizeof(number)); 466 466 for(z2=0;z2<j;z2++) 467 467 { … … 489 489 } 490 490 } 491 om free(n[z]);491 omFree(n[z]); 492 492 } 493 493 } … … 507 507 StringSetS(""); 508 508 n_Write(n[i][j],currRing); 509 char *s=StringEndS(); PrintS(s); omFree(s); 509 char *s=StringEndS(); 510 PrintS(s); 511 omFree(s); 510 512 PrintS("\t"); 511 513 } … … 636 638 if((free_non_zeros)(!(nIsZero(n[row][i])))) 637 639 nDelete(&(n[row][i])); 638 om free(n[row]);640 omFree(n[row]); 639 641 n[row]=NULL; 640 642 } … … 642 644 tgb_sparse_matrix::tgb_sparse_matrix(int i, int j, ring rarg) 643 645 { 644 mp=(mac_poly*) om alloc(i*sizeof (mac_poly));;646 mp=(mac_poly*) omAlloc(i*sizeof (mac_poly));; 645 647 int z; 646 648 for(z=0;z<i;z++) … … 706 708 number n=get(i,j); 707 709 n_Write(n,currRing); 708 char *s=StringEndS(); PrintS(s); omFree(s); 710 char *s=StringEndS(); 711 PrintS(s); 712 omFree(s); 709 713 PrintS("\t"); 710 714 }
Note: See TracChangeset
for help on using the changeset viewer.