summaryrefslogtreecommitdiff
path: root/lib/sbin/CreateParameterBindings.pl
Commit message (Collapse)AuthorAge
* 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
* Changes for ticket #768sbrandt2012-06-18
| | | | | | | | Change per thorn -DTHORN_IS_xxx to a per thorn -I bindings/include/xxx git-svn-id: http://svn.cactuscode.org/flesh/trunk@4839 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Properly check for errors when parsing parameter STEERABLE valueseschnett2011-12-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@4775 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
* Use correct perl interpreter when running c_file_processor from the CSTgoodale2004-03-27
| | | | | | | | | to generate the parameter structure names. In the future we should be able to do this without forking off another interpreter, but this is necessary for now. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3609 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add more empty lines to [CF]Parameters.h (but less than before).schnetter2003-11-19
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3460 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use fewer empty lines in [CF]Parameters.h.schnetter2003-11-19
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@3459 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Traverse all hashes alphabetically, so that all output files of theschnetter2003-10-07
| | | | | | | | CST stage will be identical. This is necessary at least since perl 5.8.1 to avoid redundant recompilation. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3425 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Correcting initialisation of shared array parameters. Fix for PR/1445.goodale2003-03-17
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@3174 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Moved definitions of structures for restricted and private parameters fortradke2003-01-25
| | | | | | | | | each thorn from CST generated source files "${thorn}_private.c" and "${implementation}_restricted.c" into "${thorn}_Parameters.c". Configurations should be cleandep'ed and rebuilt after this update. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3103 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
* Fix for when extending a parameter shared AS.goodale2002-05-20
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2833 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
* 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
* Undo my last commit which broke CST configuration on architectures excepttradke2001-06-27
| | | | | | | Windows :-(. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2254 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use $PERL instead of perl in a command. This fixes a CST problem under Windows.tradke2001-06-26
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2252 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
* Escape all backslashes in parameter ranges so that they aren't treatedtradke2001-04-17
| | | | | | | | as the beginning of an escape sequence in C strings. This closes PR Cactus-606. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2118 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Include "cctk_Types.h" at top of generated include files cctk_Parameters.htradke2001-03-14
| | | | | | | | | and cctk_Arguments.h. Now these can be included in source files without depending on cctk.h. This closes PR Cactus/542. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2078 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding function prototypesallen2001-02-25
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2062 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding prototypes to remove compiler warningsallen2001-02-24
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2052 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Parameter range descriptions weren't passed correctly.tradke2000-08-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1801 17b73243-c579-4c4c-a9d2-2d5706c11dac
* FORTRAN_NAME -> CCTK_FNAMEallen2000-05-10
| | | | | | | | | FMODIFIER -> CCTK_FCALL Old names will work until beta 9 git-svn-id: http://svn.cactuscode.org/flesh/trunk@1633 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added specification for steerable parameters in param.cclallen2000-02-01
| | | | | | | | | | | | | | | | | | | | | | | Notation REAL paramname "Description" [STEERABLE = never|always|recover] { .... } ",,," Default value is never The constants CCTK_STEERABLE_NEVER CCTK_STEERABLE_ALWAYS CCTK_STEERABLE_RECOVER are now there to use to check the type of steering available for a parameter. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1329 17b73243-c579-4c4c-a9d2-2d5706c11dac
* CCTK function name changesallen2000-01-25
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1292 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changing include file namesallen2000-01-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1264 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
* Change script to remove last pointer warning on originallen2000-01-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1239 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 stuff to remove warningsallen2000-01-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1230 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Need some new lines at the end of created files for the originallen2000-01-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1227 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding USE_CCTK_PARAMETERS which will eventually remove warnings on originallen2000-01-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1223 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixing various things pointed out by compiling with -Wall.goodale1999-11-03
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1130 17b73243-c579-4c4c-a9d2-2d5706c11dac
* The parameter creation routines are declared as returning an int, sogoodale1999-10-26
| | | | | | | | | now return an int. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1110 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
* Creating all files with WriteFile, and changing filenames ofallen1999-10-24
| | | | | | | required packages git-svn-id: http://svn.cactuscode.org/flesh/trunk@1090 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Now all files created by the CST are compared with those alreadyallen1999-10-21
| | | | | | | | on disk, and only written if different. This means that recompilation times should now be a lot quicker. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1076 17b73243-c579-4c4c-a9d2-2d5706c11dac
* CST only writes files which have changed (still a couple more writesallen1999-10-20
| | | | | | | | | | to replace). Also a bug fix for Build Headers for when the file to be included is in the include directory of the thorn. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1068 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