Changeset fafb80 in git
- Timestamp:
- Oct 17, 2019, 12:18:50 PM (5 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- ceddead1eb12221030b1cd0d0ab3119014bd54c2
- Parents:
- eac8bc42b876bf2245703a2512bd05e9985dc1bf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/Makefile.am
reac8bc4 rfafb80 1 1 ACLOCAL_AMFLAGS = -I ../m4 2 2 3 SUBDIRS=staticdemo bigintm subsets syzextra pyobject customstd gfanlib python gitfan polymake singmathic Order interval cohomo freealgebra partialgb systhreads 3 SUBDIRS=staticdemo bigintm subsets syzextra pyobject customstd gfanlib python gitfan polymake singmathic Order interval cohomo freealgebra partialgb systhreads loctriv -
Singular/dyn_modules/loctriv/loctriv.cc
reac8bc4 rfafb80 1 %{2 1 /* 3 2 * … … 7 6 * 8 7 */ 9 #include <kernel/ideals.h> 10 #include <kernel/ring.h> 11 #include <kernel/GBEngine/kstd1.h> 12 #include <kernel/prCopy.h> 13 %} 8 #include "kernel/ideals.h" 9 #include "libpolys/polys/monomials/ring.h" 10 #include "kernel/GBEngine/kstd1.h" 11 #include "libpolys/polys/prCopy.h" 12 #include "Singular/tok.h" 13 #include "Singular/ipshell.h" 14 #include "Singular/mod_lib.h" 15 #include "Singular/ipid.h" 14 16 15 //#package="loctriv"; 16 package="kstd"; 17 version="$Id $"; 18 info="LIBRARY: partstd.lib EXTERNALLY CONTROLLED GROEBNER\\n\\n kstd(module i1, int i2); externally controlled std.\\n"; 19 20 %procedures 21 22 module kstd ( 23 module h1, 24 int k 25 ) 17 static BOOLEAN kstd(leftv res, leftv args) 26 18 { 27 %declaration; 28 29 ideal s_h1; 30 ideal s_h3; 31 int j; 32 ring orig_ring; 33 ring syz_ring; 34 intvec *w=NULL; 35 36 %typecheck; 37 38 assume(currRing != NULL); 39 orig_ring=currRing; 40 syz_ring=rCurrRingAssure_SyzComp(); 41 42 rSetSyzComp(k); 43 44 if (orig_ring != syz_ring) 19 const short t1[]={2,MODUL_CMD,INT_CMD}; 20 if (iiCheckTypes(args,t1,1)) 45 21 { 46 s_h1=idrCopyR_NoSort(h1,orig_ring); 22 ideal h1=(ideal)args->CopyD(); 23 int k=(int)(long)args->next->Data(); 24 ideal s_h1; 25 ideal s_h3; 26 int j; 27 ring orig_ring; 28 ring syz_ring; 29 intvec *w=NULL; 30 31 assume(currRing != NULL); 32 orig_ring=currRing; 33 syz_ring=rAssure_SyzComp(orig_ring); 34 rSetSyzComp(k,syz_ring); 35 rChangeCurrRing(syz_ring); 36 37 if (orig_ring != syz_ring) 38 { 39 s_h1=idrCopyR_NoSort(h1,orig_ring,syz_ring); 40 } 41 else 42 { 43 s_h1 = h1; 44 } 45 46 s_h3=kStd(s_h1,NULL,testHomog,&w,NULL,k); 47 48 if (orig_ring != syz_ring) 49 { 50 idDelete(&s_h1); 51 idSkipZeroes(s_h3); 52 rChangeCurrRing(orig_ring); 53 s_h3 = idrMoveR_NoSort(s_h3, syz_ring, orig_ring); 54 rKill(syz_ring); 55 } 56 else 57 { 58 idSkipZeroes(s_h3); 59 } 60 res->data=(void *)s_h3; 61 res->rtyp=MODUL_CMD; 62 return FALSE; 47 63 } 48 64 else 49 { 50 s_h1 = h1; 51 } 52 53 s_h3=kStd(s_h1,NULL,testHomog,&w,NULL,k); 54 55 if (s_h3==NULL) 56 { 57 %return = (void *)(idFreeModule(IDELEMS(h1))); 58 } 59 60 if (orig_ring != syz_ring) 61 { 62 idDelete(&s_h1); 63 idSkipZeroes(s_h3); 64 rChangeCurrRing(orig_ring); 65 s_h3 = idrMoveR_NoSort(s_h3, syz_ring); 66 rKill(syz_ring); 67 } 68 else 69 { 70 idSkipZeroes(s_h3); 71 } 72 %return = (void *)s_h3; 65 return TRUE; 73 66 } 74 67 75 %C 68 //------------------------------------------------------------------------ 69 // initialisation of the module 70 extern "C" int SI_MOD_INIT(loctriv)(SModulFunctions* p) 71 { 72 p->iiAddCproc("loctriv.so","kstd",FALSE,kstd); 73 return (MAX_TOK); 74 } 75 -
configure.ac
reac8bc4 rfafb80 295 295 AC_CONFIG_FILES([Singular/dyn_modules/cohomo/Makefile]) 296 296 AC_CONFIG_FILES([Singular/dyn_modules/systhreads/Makefile]) 297 AC_CONFIG_FILES([Singular/dyn_modules/loctriv/Makefile]) 297 298 298 299 AC_CONFIG_FILES([Singular/Makefile]) -
m4/options.m4
reac8bc4 rfafb80 335 335 bi_interval=false 336 336 bi_systhreads=false 337 bi_loctriv=false 337 338 338 339 … … 373 374 interval ) bi_interval=true ;; 374 375 systhreads ) bi_systhreads=true;; 376 loctriv ) bi_loctriv=true;; 375 377 esac 376 378 … … 415 417 AM_CONDITIONAL([SI_BUILTIN_INTERVAL], [test x$bi_interval = xtrue]) 416 418 AM_CONDITIONAL([SI_BUILTIN_SYSTHREADS], [test x$bi_systhreads = xtrue]) 419 AM_CONDITIONAL([SI_BUILTIN_LOCTRIV], [test x$bi_loctriv = xtrue]) 417 420 418 421 AC_MSG_CHECKING([BUILTIN_LIBS...])
Note: See TracChangeset
for help on using the changeset viewer.