summaryrefslogtreecommitdiff
path: root/lib/sbin/create_c_stuff.pl
Commit message (Collapse)AuthorAge
* Ensure auto-generated parameter declaration file ends with newlineeschnett2013-06-13
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@5026 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Allow setting parameter values at build timeeschnett2013-03-25
| | | | | | | | | | | | | | | Allow setting parameter values at build time, enabling additional compiler optimisations. I measured that e.g. ML_BSSN runs 5% to 10% faster if its parameters are chosen at build time. This introduces macros CCTK_PARAMETER${thorn}${parameter}. If unset, the parameter value is taken from the parameter file (default). If set at compile time, e.g. via a -D option in CPPFLAGS, this overrides the parameter database, and DECLARE_CCTK_PARAMETERS will always use this value. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4989 17b73243-c579-4c4c-a9d2-2d5706c11dac
* support __unused__ where known. This let's e.g. gcc know that especially the ↵knarf2010-11-23
| | | | | | Cactus variables might be unused and should not be reported as such. This closes ET ticket #1 git-svn-id: http://svn.cactuscode.org/flesh/trunk@4651 17b73243-c579-4c4c-a9d2-2d5706c11dac
* This is the application of the patch reported in Patches and Developsrsswhite2006-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fri 20 Oct 06 "g++ warning: operation on *bla* may be undefined" and PR 2070 http://www.cactuscode.org/cactus_cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&data base=cactus&pr=2070 Preprocessing arrangements/Carpet/Carpet/src/Timing.cc Compiling arrangements/Carpet/Carpet/src/Timing.cc configs/chain_gcc_carpet/build/Carpet/Timing.cc: In function ‘void Carpet::InitTimingVariables(const cGH*)’: configs/chain_gcc_carpet/build/Carpet/Timing.cc:120: warning: operation on ‘cctki_use’ may be undefined The culprit was in generated bindings code meant to get rid of warnings about unused variables corresponding to Cactus parameters included in code by the DECLARE_CCTK_PARAMETERS macro. This replaces the offending code with enums initialised by sizeof calls; the nature of all the entities involved is much clearer, both to compilers and to me. Like the existing solution, this permits the user to proceed to make more declarations after the DECLARE_CCTK_PARAMETERS macro (simply putting a list of variable assignments after the declaration would not have that property). git-svn-id: http://svn.cactuscode.org/flesh/trunk@4381 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undo changes that prevent more unwanted warnings about unused variables.schnetter2005-09-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4155 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Introduce macros CCTK_DECLARE and CCTK_DECLARE_INIT which declare orschnetter2005-09-26
| | | | | | | | | | | | | | declare and initialise local variables. They also add the necessary magic to prevent compiler warnings about unused variables. If the compiler supports __attribute__((unused)), then use this. Otherwise, use the existing fallback of taking the variable's address. In Fortran, use the variable's kind as fallback. Use these macros in autogenerated code and in "cctk.h". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4146 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Slightly more informative error message for an internal error condition;goodale2004-08-18
| | | | | | | | correct fix would be to remove thorn from thornlist, and imp from implist when missing ancestors found, so we never get to this point. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3842 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed CCTK_DECLARE_ARGUMENTS and CCTK_DECLARE_PARAMETERS macros so thattradke2004-04-24
| | | | | | | | | | local variables/parameters are now used in their declarations block without requiring separate USE_CCTK_* macros). This closes PR Cactus/1657: CST doesn't ignore braces "{" instring literals. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3677 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Introduce the new Cactus variable type CCTK_INT1.schnetter2003-10-13
| | | | | | | Extend routines to handle the new type. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3431 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed CreateParameterBindingFile() to include header files only if needed.tradke2003-01-25
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3101 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Erik Schnetter's patch to declare string parameters in a thorn's parametertradke2003-01-07
| | | | | | | struct as constant. Completes the fix for Cactus-1350. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3079 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Get rid of superfluous typecasts in DECLARE_CCTK_PARAMETERS.tradke2003-01-07
| | | | | | | | Declare (C pointers to) string parameters as 'const char *const' pointers. This closes Cactus-1350. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3074 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Do an explicit cast when assigning value of structure member to a localgoodale2002-12-17
| | | | | | | | | | variable for a parameter. This solves the 'cannot cast from char ** to const char **' problem for c++ under gcc 3.2, plus probably other compilers. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@3049 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added AS for parameters. You can now have one name for a parameter as seengoodale2002-05-20
| | | | | | | | | | | | | | | | by the user, and another name for the vaiable in your code. This will be particularly useful for avoiding conflicts when sharing parameters from other implementations. Syntax: [uses|extends] <type> <name> ["<description>"] AS <newname> Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2832 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added array parameters.goodale2002-05-20
| | | | | | | | | | | Added accumulator parameters - needs a bit more error checking. Preliminary support for aliasing parameters - disabled until it works properly. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2829 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Reworked treatment of CCTK_DECLARE macros. Now the C file preprocessortradke2002-03-27
| | | | | | | | | | | | | | | | | | | will put everything up to the closing bracket for a routine into a new block. Also, the USE_CCTK macro is now appended directly to the CCTK_DECLARE macro. There is no need anymore to use CCTK_NO_AUTOUSE_MACRO. Also changed the way how parameters and arguments are used within the USE_CCTK macros: now it's done by "(void) (parameter = 0);" which is better than assigning the address of it to some dummy pointer. This fixes problems where one had to parse for a possible return statement at the end of the routine. This fix closes PR Cactus/949. Also did some perl code optimization and added grdoc headers for files generated by the CST. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2676 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Untabified.goodale2001-10-14
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2408 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding a "help" argument to the CST_error call to start adding suggested ↵allen2001-08-19
| | | | | | | | | causes for the errors. At the moment the help message is always shown, since I've only added a couple so far. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2307 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed the USE_CCTK_PARAMETERS and CCTK_USE_ARGUMENTS macros to use atradke2001-06-12
| | | | | | | | 'const void *' dummy pointer for assignments. This should also fix PR Cactus-715. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2227 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Parameters should be decalred as constant.goodale2001-05-19
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2195 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changing CCTK function nameallen2000-01-25
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1284 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Some changes for USE_CCTK_PARAMETERS and capitalising include filesallen2000-01-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1263 17b73243-c579-4c4c-a9d2-2d5706c11dac
* config.h -> cctk_config.hallen2000-01-13
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1247 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Final code for supportingallen2000-01-12
| | | | | | | | | | | USE_CCTK_PARAMETERS USE_CCTK_CARGUMENTS which can be used to remove all the warnings about unused variables (seen on the origin or if you compile with all warnings) git-svn-id: http://svn.cactuscode.org/flesh/trunk@1231 17b73243-c579-4c4c-a9d2-2d5706c11dac
* More details to remove warningsallen2000-01-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1229 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Filling out CCTK_USE_PARAMETERSallen2000-01-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1228 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding macros for using parameters and arguments to remove compiler warningsallen2000-01-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1225 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed some things noticed by perl -w .goodale1999-10-25
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1102 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed to use Perl5 stuff...goodale1999-10-24
| | | | | | | | | | | | | local -> my used perl 5 references for passing databases around in the CST. CST is now about a factor of 16 faster ! Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1101 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Put an extern "C" around the parameter structure in header files.goodale1999-10-24
| | | | | | | | | Some tidying up. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1100 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Runtest now:allen1999-09-21
| | | | | | | | | | Tells you which parameter files failed Gives you a command line before the test is run that you can copy and paste to run the test interactively, without editing as before. git-svn-id: http://svn.cactuscode.org/flesh/trunk@976 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Commented out some old unused parameter stuff.goodale1999-09-13
| | | | | | | | | | | Hopefully fixed the space at end of line after the closing " problem - the parameter database now stores the default value after stripping the quotes from it. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@901 17b73243-c579-4c4c-a9d2-2d5706c11dac
* New parameter stuff.goodale1999-08-26
| | | | | | | | | | | Now a non-active thorn's extensions to parameters shouldn't be valid, range checking is now done, even for strings, which must conform to a regular expression. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@859 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Include file name changesallen1999-07-30
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@830 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Option -O now gives at least some dummy output.tradke1999-07-29
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@816 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Errors with CST_error instead of dieallen1999-07-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@717 17b73243-c579-4c4c-a9d2-2d5706c11dac
* String valued parameters should be char * not CCTK_CHAR * asgoodale1999-07-07
| | | | | | | | | things like strcmp expect char * s. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@685 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed logical and keywords to use CCTK types.goodale1999-07-06
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@681 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added all datatypes to parsers (but they don't work with pugh yet).allen1999-07-01
| | | | | | | | | | | | | | | NOTE THAT INTEGER -> INT in param.ccl and interface.ccl In the param.ccl and interface.ccl you can have one optional cctk_ in front of each datatype. I'll be checking in changes for all thorns now ... you will have to go the realclean thing I would guess after updating git-svn-id: http://svn.cactuscode.org/flesh/trunk@610 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Merging in of things from Joan's NT version...goodale1999-06-25
| | | | | | | | | | Mainly missing header files, plus making names of files in the Bindings dir unique to help debugging. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@576 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Double -> CCTK_REALallen1999-06-15
| | | | | | | | | | | | | REAL -> CCTK_REAL POINTER -> CCTK_POINTER VARIABLE_REAL -> CCTK_VARIABLE_REAL (etc) GH->iteration is now an int (not an unsigned long int) git-svn-id: http://svn.cactuscode.org/flesh/trunk@551 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix (hopefully) for problem with parameters having different ordersallen1999-04-02
| | | | | | | | | in common blocks and structures. Tom, have a check of this, I've added a sort on the parameter keys before they are used but I might have gone overboard. git-svn-id: http://svn.cactuscode.org/flesh/trunk@430 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Put & in front of some subroutine calls to be compatable with perl 4goodale1999-04-01
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@424 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removed some speech marks which seem to be surplus to requirements ...allen1999-03-02
| | | | | | | Gab git-svn-id: http://svn.cactuscode.org/flesh/trunk@373 17b73243-c579-4c4c-a9d2-2d5706c11dac
* BEFORE and AFTER should now work. This is probably still not verygoodale1999-02-24
| | | | | | | | | | robust for case issues, and you can only schedule the same routine once, but is a start. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@342 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Strip off spaces at the start and end of the default string, otherwiseallen1999-02-19
| | | | | | | | | CCTK_Equals will fail if the default is "no"_ . Gab git-svn-id: http://svn.cactuscode.org/flesh/trunk@310 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Order all parameters in common blocks and structures as real, pointer, int .goodale1999-02-16
| | | | | | | | | | | | Note this may cause problems with single precision runs on T3Es or alphas. Possibly we should have seperate blocks/structures for each type of parameter. Made sure public parameters are initialised. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@286 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Sets the dfault for a logical properly.goodale1999-02-09
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@229 17b73243-c579-4c4c-a9d2-2d5706c11dac
* iallen1999-02-02
| | | | | | | | | | Change for Tom to add an include line > $line = "\#include \"CParameterStructNames.h\""; > push(@data, $line); git-svn-id: http://svn.cactuscode.org/flesh/trunk@175 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added a dummy variable to a structure if it would otherwise be empty.goodale1999-01-29
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@148 17b73243-c579-4c4c-a9d2-2d5706c11dac