aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/CodeGen.m
Commit message (Collapse)AuthorAge
* Improved common subexpression elimination support.Barry Wardell2011-03-16
|
* Fix bugs in ReplacePowers which broke vectorised codeIan Hinder2011-01-24
| | | Both vectorised and unvectorised versions now pass the ML_BSSN_Test testsuites
* Only vectorise FD variables and macros when UseVectors is setIan Hinder2011-01-22
|
* Use correct LoopControl macros when UseVectors is unsetIan Hinder2011-01-22
|
* Only vectorise when converting local variables if UseVectors is setIan Hinder2011-01-22
|
* Use DataType function for CCTK_REAL / CCTK_REAL_VECIan Hinder2011-01-22
|
* Only vectorise in ReplacePowers if UseVectors is setIan Hinder2011-01-22
|
* Use ptrdiff_t instead of int for indices; this avoids many 32-to-64-bit ↵Erik Schnetter2010-12-23
| | | | | | conversions and thus generates faster code. Correct code generation for static functions that evaluate the derivative operators.
* Use C++ for all source files.Erik Schnetter2010-12-06
| | | | Add extern "C" to scheduled functions.
* Rewrite vectorisation infrastructure:Erik Schnetter2010-12-06
| | | | | | | | Use "k" prefix more consistently in arithmetic macros. Improve vector code generation patterns. Move all vectorisation run-time out of Kranc and into a new thorn LSUThorns/Vectors, so that non-Kranc thorns can also use it.
* Implement vectorisationIan Hinder2010-11-23
| | | | This is Erik's vectorisation working tree from 13-Oct-2010
* Add support for vectorisation of generated code.Ian Hinder2010-11-23
| | | | Vectorisation needs to be explicitly enabled by setting -DKRANC_VECTORS at build time.
* CodeGen.m: Add Quote function for conveniently adding double quotesIan Hinder2010-06-04
|
* Revert "Revert "Merge branch 'master' of github.com:ianhinder/Kranc""Roland Haas2010-05-06
| | | | | | | | | | | Merge was correct after all. This reverts commit 04dfdcd32eec91978ba050a472aae2a6e7091c05. Conflicts: Tools/CodeGen/CalculationFunction.m Tools/CodeGen/Thorn.m
* Revert "Add support for vectorisation of generated code."Erik Schnetter2010-05-03
| | | | This reverts commit 8e006230f24be02831d390eaad9b90b7a7c77d2c.
* Revert "Merge branch 'master' of github.com:ianhinder/Kranc"Erik Schnetter2010-05-02
| | | | | This reverts commit 815307e624fdb8c0ee2eefc644c9bbd8244ad7f2, reversing changes made to 8e006230f24be02831d390eaad9b90b7a7c77d2c.
* Merge branch 'master' of github.com:ianhinder/KrancErik Schnetter2010-05-02
|\ | | | | | | | | | | Conflicts: Tools/CodeGen/CalculationFunction.m Tools/CodeGen/Thorn.m
| * Replace sym context with Kranc context in Kranc.m. Also move interface ↵Ian Hinder2010-04-03
| | | | | | | | functions into Interface.m.
* | Add support for vectorisation of generated code.Erik Schnetter2010-05-02
|/ | | | Vectorisation needs to be explicitly enabled by setting -DKRANC_VECTORS at build time.
* Fix typo in licence at top of every fileIan Hinder2010-03-17
|
* Remove support for sub-block grid functionsIan Hinder2010-03-17
| | | | | | | | The idea of sub-block grid functions was to allow a calculation to operate differently on different sub-blocks of the domain. This was never used, and is now achieved by calling the calculation with arguments which specify the region of the domain to loop over. Hence, the old sub-block code is being removed.
* Declare variables only when they are first usedIan Hinder2010-03-10
| | | | | | | This allows simultaneous declaration and assignment as per Erik's previous commit, which seems to give a noticeable performance increase, at least with the PGI compiler on Kraken, and also allows multiple assignments to the same variable in a single calculation.
* Remove const statements where possibleIan Hinder2010-03-08
|
* Obtain UseLoopControl directly using OptionValueIan Hinder2010-03-02
|
* Declare and assign to variables at the same time.Erik Schnetter2010-02-13
| | | | | | | | | | Introduce new Kranc functions DeclareAssignVariable, DeclareAssignVariableInLoop, MaybeAssignVariableInLoop, DeclareMaybeAssignVariableInLoop. Comment out all code that only declares variables. Change all assignments to declare variables as well. Declare all variables as constant. Access TmunuBase grid functions only if they have storage; otherwise, assume that they are zero.
* Introduce a new grid function iterator InteriorNoSync. This has the same ↵Erik Schnetter2010-01-09
| | | | | | effect as Interior, but does not synchronise the variables. This can be used e.g. to calculate the RHS terms. Introduce a way to access grid function that may or may not have storage. If a local variable name matches the pattern "eT*L", then it is read from the corresponding grid function only if the parameter useMatter is true; otherwise it is set to zero. This is obviously intended for the TmunuBase variables. This is implemented via a new Kranc function maybeAssignVariableInLoop.
* Provide capability GenericFDErik Schnetter2009-11-13
| | | | | | | | Use cctk_lssh instead of cctk_lsh to loop over grid functions Rename schedule item "apply boundary conditions" to "select boundary conditions" Introduce parameter for number of timelevels for RHS grid functions
* Add debug statements to CSE routineErik Schnetter2009-04-28
|
* Declare DeclareVariablesInLoopVectorised and AssignVariablesInLoopVectorised.Erik Schnetter2009-04-27
|
* Add CSE (Common Subexpression Elimination)Erik Schnetter2009-04-27
|
* Add semisolons after DECLARE_CCTK_* macrosErik Schnetter2009-04-27
|
* Use cctk_lssh instead of cctk_lsh when calculating grid function extents. ↵Erik Schnetter2009-04-27
| | | | | | | | | | | | This will allow future optimisations with cache-aligned memory allocations. Correct an error in declaring local variables for partial derivatives. Don't register constrained variables, which is in general not necessary but which can use much memory. Register symmetries in the schedule group SymmetryRegister instad of at basegrid.
* Declare function arguments in auto-generated calculation functions as const.Erik Schnetter2009-04-27
| | | | | | | | | | | Generate code with 80 characters per line. Introduce new function AssignVariableInLoop, which differs from AssignVariable in that it is meant to handle grid point values, and never integers. Introduce new function TestForNaN, which explicitly tests grid point values for nan.
* Implement functionality to loop over all boundary points, including ghostErik Schnetter2008-02-19
| | | | points, and without synchronising afterwards.
* Made use of LoopControl optional.Ian Hinder2008-02-02
| | | | If you want to use it, pass UseLoopControl -> True to CreateKrancThorn.
* Erik: minor cosmetic changesIan Hinder2008-02-02
|
* Erik: added mandatory support for LoopControl.Ian Hinder2008-02-02
| | | | A subsequent patch will make this optional.
* Finite differencing expressions optimized by precalculating multiplesianhin2006-11-14
| | | | | | | | | | | | | | | | | | | | | | | and divisions of grid spacing. CreateDifferencingHeader returns a list of 'pre-definitions' which are then computed outside the equation loop by CalculationFunction. AKA "why can't my compiler do such a simple optimization?" Partial derivatives are now assumed to commute, so occurrences of PD[f,2,1] are replaced in the equations by PD[f,1,2]. The unused ones are automatically not computed, as before. I wish that this had made a noticeable speed improvement (would have been big), but the compiler must have been intelligent enough to see these. Added khalf, kthird, ktwothird, kfourthird, keightthird computed outside the loop. What compiler on earth would not see these optimizations?? Factor out common expressions i.e. xx_ y_ + xx_ z_ -> xx(y+z). Intel, I have lost all respect for you. Remove RegularExpression from schedule matching, as it is not supported in Mathematica 4. Replaced with a simple StringMatchQ.
* Adding fmax and fmin as symbols in the sym contextianhin2006-11-09
|
* Added 'includeSystemFile'ianhin2006-09-07
| | | | Support for new calculation convention
* imin and imax only need 3 entries, not 6ianhin2006-06-19
| | | | | | | | Fixed bug whereby physical boundary conditions could be called in symmetry zones, and in some cases this could lead to accessing unallocated memory and segfaults. This would never have generated incorrect output, as these points would be overwritten by the symmetry thorn anyway.
* Get boundary information using the Cactus boundary functions, and onlyianhin2006-02-23
| | | | | loop over the physical boundaries. Use InfoMessage to output text to allow user to control verbosity.
* Added preliminary support for boundary conditionsianhin2006-02-01
|
* do not use SQR, CUB, QAD macros for Fortran anymore, since they are notshusa2005-11-15
| | | | | necessary, and apparently confuse some preprocessors under certain circumstances.
* added functions DeclarePointer and DeclarePointersshusa2005-11-11
|
* add AddToFile function, required in the bamification processshusa2005-11-10
|
* Added Errors packageianhin2005-08-26
| | | | | | | Added error checking to SpaceSeparated Fixed CommaInitSeparated as it was buggy; it didn't initialise the last variable!
* remove debugging codeshusa2005-02-02
|
* added a feature to fold up variable declarations into fewer lines, droppedshusa2005-01-31
| | | | | explicit initialisation of variables in Fortran to avoid implicit assignment of SAVE attribute.
* changed detail about how stencil widths in grid loops are computed in Cshusa2004-10-27
|