Changeset 636c28 in git
- Timestamp:
- Mar 24, 2011, 6:36:10 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- de4e64a426712523b3ba44188f1f75f4bb4aad7d
- Parents:
- e5a4ba6cad9681dda18e8cc54544efb5003d053b
- Location:
- dyn_modules
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
dyn_modules/bigintm/SConstruct
re5a4ba r636c28 1 1 # Emacs edit mode for this file is -*- python -*- 2 3 MODNAME = 'bigintm' 4 SRCS = ["bigintm.cc", "mod_main.cc"] 5 2 6 env = Environment() 3 7 … … 9 13 10 14 11 sing_psico_int_if = env.SharedLibrary('bigintm', 12 ["bigintm.cc", "mod_main.cc"], 13 SHLIBPREFIX="", LDMODULESUFFIX=".so", 14 CPPPATH = SING_INCLUDES, 15 LIBS=[]) 15 #env.SharedObject(target = 'mod_main.o', source = 'mod_main.cc') 16 16 17 Default(sing_psico_int_if) 17 CXXTEMPLFLAGS = "-fno-implicit-templates --no-exceptions" 18 18 19 20 21 22 ### for the use with "scons debug=1" 23 if ARGUMENTS.get('debug', 0): 24 ### Works with Singularg only! 25 syzextra_debug_if = env.LoadableModule( MODNAME + '_g', 26 SRCS, 27 SHLIBPREFIX="", 28 LDMODULESUFFIX=".sog", 29 SHLIBSUFFIX = ".sog", 30 CPPPATH = SING_INCLUDES, 31 CXXFLAGS = "-g -Wextra -Wall -pedantic -Wno-long-long " + CXXTEMPLFLAGS, 32 LIBS=[]) 33 Default(syzextra_debug_if) 34 else: 35 ### Works with any Singular 36 syzextra_if = env.SharedLibrary(MODNAME, 37 SRCS, 38 SHLIBPREFIX="", 39 LDMODULESUFFIX=".so", 40 SHLIBSUFFIX = ".so", 41 CPPPATH = SING_INCLUDES, 42 CPPDEFINES = ["NDEBUG", "OM_NDEBUG"], 43 CXXFLAGS = "-O3 -fomit-frame-pointer --no-rtti " + CXXTEMPLFLAGS, 44 CCFLAGS="-O3 -fomit-frame-pointer ", 45 LIBS=[]) 46 Default(syzextra_if) 47 48 49 50 ### clean with "scons -c ." -
dyn_modules/bigintm/bigintm.tst
re5a4ba r636c28 1 1 echo = 2; 2 2 3 LIB("./bigintm.so"); 3 "ndebug?: ", system("with", "ndebug"); 4 "om_ndebug?: ", system("with", "om_ndebug"); 4 5 5 bigintm_print_load_counter(); 6 printBlackboxTypes(); 7 8 9 LIB("./bigintm.so"); 10 11 bigintm_print_load_counter(); 12 printBlackboxTypes(); 13 14 LIB("./bigintm.so"); 15 16 bigintm_print_load_counter(); 17 printBlackboxTypes(); 18 6 if( system("with", "ndebug") ) 7 { 8 "Loading the Release version!"; 9 LIB("./bigintm.so"); 10 } 11 else 12 { 13 "Loading the Debug version!"; 14 LIB("./bigintm_g.sog"); 15 } 19 16 20 17 printBlackboxTypes(); 21 22 18 bigintm_setup(); 23 24 19 printBlackboxTypes(); 25 26 20 bigintm_setup(); 27 28 21 printBlackboxTypes(); 29 22 -
dyn_modules/bigintm/mod_main.cc
re5a4ba r636c28 26 26 27 27 /// listing all blackbox types (debug stuff) 28 static BOOLEAN printBlackboxTypes0(leftv __res, leftv __v)28 static BOOLEAN printBlackboxTypes0(leftv __res, leftv /*__v*/) 29 29 { 30 30 NoReturn(__res); … … 34 34 35 35 /// init the bigintm (a sample blackbox) type 36 static BOOLEAN bigintm_setup0(leftv __res, leftv __v)36 static BOOLEAN bigintm_setup0(leftv __res, leftv /*__v*/) 37 37 { 38 38 NoReturn(__res); … … 40 40 } 41 41 42 static long int load_counter = -1;43 44 /// init the bigintm (a sample blackbox) type45 static BOOLEAN print_load_counter(leftv __res, leftv __v)46 {47 Print("print_load_counter: load counter: %ld", load_counter);48 Print(", printBlackboxTypes: %p", (void*)(printBlackboxTypes0));49 Print(", bigintm_setup: %p", (void*)(bigintm_setup0));50 PrintLn();51 52 NoReturn(__res);53 return FALSE;54 42 } 55 56 };57 43 58 44 … … 61 47 int mod_init(SModulFunctions* psModulFunctions) 62 48 { 63 load_counter++; 64 65 if( !load_counter) 66 { 67 68 psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0); 69 psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0); 70 psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_print_load_counter",FALSE, print_load_counter); 49 psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0); 50 psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0); 71 51 72 // Q: should we call 'bigintm_setup' here??!?!? 73 return 0; 74 } 75 else 76 { 77 PrintS("ERROR: Sorry this dynamic module was already loaded...!!!"); 78 PrintLn(); 79 // Q: what about loading this module multipple times...? 80 return 0; // -1? - No difference!!! 81 82 } 83 52 // Q: should we call 'bigintm_setup' here??!?!? 53 return 0; 84 54 } 85 55 } -
dyn_modules/syzextra/SConstruct
re5a4ba r636c28 1 1 # Emacs edit mode for this file is -*- python -*- 2 3 MODNAME = 'syzextra' 4 SRCS = ["mod_main.cc", "DebugPrint.cc", "myNF.cc"] 5 2 6 env = Environment() 3 7 … … 11 15 #env.SharedObject(target = 'mod_main.o', source = 'mod_main.cc') 12 16 17 CXXTEMPLFLAGS = "-fno-implicit-templates --no-exceptions" 13 18 14 ### Works with any Singular15 #syzextra_if = env.SharedLibrary('syzextra',16 # ["mod_main.cc", "DebugPrint.cc", "myNF.cc"],17 # SHLIBPREFIX="", LDMODULESUFFIX=".so", CPPDEFINES = 'NDEBUG', SHLIBSUFFIX = ".so",18 # CPPPATH = SING_INCLUDES,19 # LIBS=[])20 19 21 ### Works with Singularg only!22 syzextra_debug_if = env.LoadableModule('syzextra_g',23 ["mod_main.cc", "DebugPrint.cc", "myNF.cc"],24 SHLIBPREFIX="", LDMODULESUFFIX=".sog", SHLIBSUFFIX = ".sog",25 CPPPATH = SING_INCLUDES,26 LIBS=[])27 20 28 # Default(syzextra_if)29 # Default(syzextra_debug_if)30 21 22 ### for the use with "scons debug=1" 23 if ARGUMENTS.get('debug', 0): 24 ### Works with Singularg only! 25 syzextra_debug_if = env.LoadableModule( MODNAME + '_g', 26 SRCS, 27 SHLIBPREFIX="", 28 LDMODULESUFFIX=".sog", 29 SHLIBSUFFIX = ".sog", 30 CPPPATH = SING_INCLUDES, 31 CXXFLAGS = "-g -Wextra -Wall -pedantic -Wno-long-long " + CXXTEMPLFLAGS, 32 LIBS=[]) 33 Default(syzextra_debug_if) 34 else: 35 ### Works with any Singular 36 syzextra_if = env.SharedLibrary(MODNAME, 37 SRCS, 38 SHLIBPREFIX="", 39 LDMODULESUFFIX=".so", 40 SHLIBSUFFIX = ".so", 41 CPPPATH = SING_INCLUDES, 42 CPPDEFINES = ["NDEBUG", "OM_NDEBUG"], 43 CXXFLAGS = "-O3 -fomit-frame-pointer --no-rtti " + CXXTEMPLFLAGS, 44 CCFLAGS="-O3 -fomit-frame-pointer ", 45 LIBS=[]) 46 Default(syzextra_if) 47 48 49 50 ### clean with "scons -c ." -
dyn_modules/syzextra/mod_main.cc
re5a4ba r636c28 54 54 } 55 55 56 BOOLEAN noop(leftv __res, leftv __v)56 BOOLEAN noop(leftv __res, leftv /*__v*/) 57 57 { 58 58 NoReturn(__res); … … 149 149 if( h->Typ() == RESOLUTION_CMD ) 150 150 { 151 const syStrategy syzstr = reinterpret_cast< syStrategy>(h->Data());151 const syStrategy syzstr = reinterpret_cast<const syStrategy>(h->Data()); 152 152 153 153 h = h->Next(); … … 156 156 157 157 158 Print("RESOLUTION_CMD(%p): ", reinterpret_cast< void*>(syzstr)); PrintLn();158 Print("RESOLUTION_CMD(%p): ", reinterpret_cast<const void*>(syzstr)); PrintLn(); 159 159 160 160 const ring save = currRing; … … 171 171 172 172 173 #define PRINT_pINTVECTOR(s, v) Print("intvec '%10s'(%p)", #v, (s)->v); \173 #define PRINT_pINTVECTOR(s, v) Print("intvec '%10s'(%p)", #v, reinterpret_cast<const void*>((s)->v)); \ 174 174 if( (s)->v != NULL ){ PrintS(": "); view((s)->v); }; \ 175 175 PrintLn(); … … 199 199 200 200 const SRes rP = syzstr->resPairs; 201 Print("SRes 'resPairs': %p", r P); PrintLn();201 Print("SRes 'resPairs': %p", reinterpret_cast<const void*>(rP)); PrintLn(); 202 202 203 203 if (rP != NULL) … … 216 216 217 217 // const ring rrr = (iLevel > 0) ? rr : save; ? 218 #define PRINT_RESOLUTION(s, v) Print("resolution '%12s': %p", #v, (s)->v); PrintLn(); \218 #define PRINT_RESOLUTION(s, v) Print("resolution '%12s': %p", #v, reinterpret_cast<const void*>((s)->v)); PrintLn(); \ 219 219 if ((s)->v != NULL) \ 220 220 for (int iLevel = 0; (iLevel < iLength) && ( ((s)->v)[iLevel] != NULL ); iLevel++) \ 221 221 { \ 222 const ring rrr = (iLevel > 0) ? save : save;\223 Print("id '%10s'[%d]: (%p) ncols = %d / size: %d; nrows = %d, rank = %ld / rk: %ld", #v, iLevel, ((s)->v)[iLevel], ((s)->v)[iLevel]->ncols, idSize(((s)->v)[iLevel]), ((s)->v)[iLevel]->nrows, ((s)->v)[iLevel]->rank, -1L/*idRankFreeModule(((s)->v)[iLevel], rrr)*/ ); \222 /* const ring rrr = (iLevel > 0) ? save : save; */ \ 223 Print("id '%10s'[%d]: (%p) ncols = %d / size: %d; nrows = %d, rank = %ld / rk: %ld", #v, iLevel, reinterpret_cast<const void*>(((s)->v)[iLevel]), ((s)->v)[iLevel]->ncols, idSize(((s)->v)[iLevel]), ((s)->v)[iLevel]->nrows, ((s)->v)[iLevel]->rank, -1L/*idRankFreeModule(((s)->v)[iLevel], rrr)*/ ); \ 224 224 PrintLn(); \ 225 225 } \ … … 236 236 #undef PRINT_RESOLUTION 237 237 238 #define PRINT_POINTER(s, v) Print("pointer '%17s': %p", #v, (s)->v); PrintLn();238 #define PRINT_POINTER(s, v) Print("pointer '%17s': %p", #v, reinterpret_cast<const void*>((s)->v)); PrintLn(); 239 239 // 2d arrays: 240 240 PRINT_POINTER(syzstr, truecomponents); … … 258 258 } else 259 259 { 260 Print("resolution 'fullres': (%p) => resolution seems to be computed already", syzstr->fullres);260 Print("resolution 'fullres': (%p) => resolution seems to be computed already", reinterpret_cast<const void*>(syzstr->fullres)); 261 261 PrintLn(); 262 262 dPrint(*syzstr->fullres, save, save, nTerms); … … 272 272 } else 273 273 { 274 Print("resolution 'minres': (%p) => resolution seems to be minimized already", syzstr->minres);274 Print("resolution 'minres': (%p) => resolution seems to be minimized already", reinterpret_cast<const void*>(syzstr->minres)); 275 275 PrintLn(); 276 276 dPrint(*syzstr->minres, save, save, nTerms); … … 396 396 const int iExpSize = r->ExpL_Size; 397 397 398 intvec *iv = new intvec(iExpSize);398 // intvec *iv = new intvec(iExpSize); 399 399 400 400 lists l=(lists)omAllocBin(slists_bin); … … 418 418 419 419 /// Endowe the current ring with additional (leading) Syz-component ordering 420 static BOOLEAN MakeSyzCompOrdering(leftv res, leftv h)420 static BOOLEAN MakeSyzCompOrdering(leftv res, leftv /*h*/) 421 421 { 422 422 -
dyn_modules/syzextra/singularxx_defs.h
re5a4ba r636c28 27 27 28 28 #define BEGIN_NAMESPACE(a) namespace a { 29 #define END_NAMESPACE } ;29 #define END_NAMESPACE } 30 30 #define USING_NAMESPACE(a) using namespace a; 31 31 -
dyn_modules/syzextra/syzextra.tst
re5a4ba r636c28 12 12 { 13 13 "Loading the Debug version!"; 14 LIB("./syzextra .sog");14 LIB("./syzextra_g.sog"); 15 15 } 16 16
Note: See TracChangeset
for help on using the changeset viewer.