Changeset a9c298 in git for kernel/mod2.h


Ignore:
Timestamp:
Nov 20, 2013, 4:54:25 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
0de0509972719531e2a4b51ec9fd0e44a66fd2fd
Parents:
e4014563a82388c4b39dfa37db24cbe159b24a35
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-11-20 16:54:25+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-11-20 16:54:42+01:00
Message:
format stuff
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/mod2.h

    re40145 ra9c298  
    6666/* procedures to compute groebner bases with the f5 implementation */
    6767/* still testing */
    68 #undef HAVE_F5 
     68#undef HAVE_F5
    6969
    7070/* procedures to compute groebner bases with the f5c implementation */
     
    186186       ...
    187187
    188        makes sure that all poly operations in your file are done with 
     188       makes sure that all poly operations in your file are done with
    189189       PDEBUG == 2
    190190 To break after an error occured, set a debugger breakpoint on
    191  dErrorBreak. 
     191 dErrorBreak.
    192192*/
    193193#ifndef PDEBUG
     
    223223     1     : addresses are only marked as free and not really freed.
    224224
    225    OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis 
     225   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis
    226226   (as can OM_NDEBUG),  e.g.:
    227227     #define OM_CHECK 3
     
    230230     #include "mod2.h"
    231231     #include <omalloc/omalloc.h>
    232    ensures that all memory allocs/free in this file are done with 
    233    OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed 
     232   ensures that all memory allocs/free in this file are done with
     233   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed
    234234   in this file are only marked as free and never really freed.
    235  
    236    To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set 
    237    om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and 
    238    om_Opts.Keep to the number of addresses which are kept before they are 
     235
     236   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set
     237   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and
     238   om_Opts.Keep to the number of addresses which are kept before they are
    239239   actually freed. E.g.:
    240240     int check=om_Opts.MinCheck, track=om_Opts.MinTrack, keep= m_OPts.Keep;
     
    243243     om_Opts.MinCheck = check; omOpts.MinTrack = track; omOpts.Keep = keep;
    244244   ensures that all calls omDebug routines  occuring during the computation of
    245    ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and 
     245   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and
    246246   calls to omFree only mark addresses as free and not really free them.
    247247
    248    Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies 
    249    how many addresses are kept before they are actually freed, independently 
     248   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies
     249   how many addresses are kept before they are actually freed, independently
    250250   of the value of OM_KEEP.
    251251
     
    260260     Under dynamic scope, do (e.g., from within the debugger):
    261261       om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
    262    + to find out where "memory corruption" occured, increase value of 
    263      OM_CHECK - the higher this value is, the more consistency checks are 
    264      done (However a value > 3 checks the entire memory each time an omalloc 
     262   + to find out where "memory corruption" occured, increase value of
     263     OM_CHECK - the higher this value is, the more consistency checks are
     264     done (However a value > 3 checks the entire memory each time an omalloc
    265265     routine is used!)
    266    
     266
    267267   Some more tips on the usage of omalloc:
    268    + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines 
     268   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines
    269269     assume that sizes are > 0 and pointers are != NULL
    270270   + omalloc*, omrealloc*, omfree* omcheck*, omdebug* omtest* routines allow
    271271     NULL pointers and sizes == 0
    272    + You can safely use any free/realloc routine in combination with any alloc 
     272   + You can safely use any free/realloc routine in combination with any alloc
    273273     routine (including the debug versions): E.g., an address allocated with
    274      omAllocBin can be freed with omfree, or an adress allocated with 
     274     omAllocBin can be freed with omfree, or an adress allocated with
    275275     om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc.
    276      However, keep in mind that the efficiency decreases from 
     276     However, keep in mind that the efficiency decreases from
    277277     Bin over Size to General routines (i.e., omFreeBin is more efficient than
    278278     omFreeSize which is more efficient than omFree, likewise with the alloc
    279279     routines).
    280280   + if OM_CHECK is undefined or 0, then all omCheck routines do nothing
    281    + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is 
    282      defined, then the "real" alloc/realloc/free macros are used, and all 
     281   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is
     282     defined, then the "real" alloc/realloc/free macros are used, and all
    283283     omTest, omDebug and omCheck routines are undefined
    284    + to break after an omError occured within a debugger, 
     284   + to break after an omError occured within a debugger,
    285285     set a breakpoint on dErrorBreak
    286    + to do checks from within the debugger, or to do checks with explicit 
     286   + to do checks from within the debugger, or to do checks with explicit
    287287     check level, use omTest routines.
    288288*/
     
    296296#define OM_CHECK 1
    297297#endif
    298 /* Do actually free memory: 
    299    (be careful: if this is set, memory is never really freed, 
     298/* Do actually free memory:
     299   (be careful: if this is set, memory is never really freed,
    300300    but only marked as free) */
    301301#ifndef OM_KEEP
    302302#define OM_KEEP 0
    303303#endif
    304 /* but only after you have freed 1000 more addresses 
     304/* but only after you have freed 1000 more addresses
    305305   (this is actually independent of the value of OM_KEEP and used
    306306   to initialize om_Opts.Keep) */
     
    312312
    313313
    314 /* undef KDEBUG for check of data during std computations 
     314/* undef KDEBUG for check of data during std computations
    315315 *
    316316 * define KDEBUG to
    317317 * 0 for basic tests
    318  * 1 for tests in kSpoly 
    319  * NOTE: You can locally enable tests in kspoly by setting the 
     318 * 1 for tests in kSpoly
     319 * NOTE: You can locally enable tests in kspoly by setting the
    320320 *       define at the beginning of kspoly.cc
    321321 */
     
    433433#ifdef HAVE_ASSUME
    434434#ifndef RDEBUG
    435 #define RDEBUG 
     435#define RDEBUG
    436436#endif
    437437#endif
Note: See TracChangeset for help on using the changeset viewer.