diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-06-22 10:56:49 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-06-22 10:56:49 +0000 |
commit | f30148238a6a149fe9da8650f190e77c921baaf3 (patch) | |
tree | 6380e712fce67dfeb7568606193a27394753b977 | |
parent | 37f6f53e4c01e46235d68c84ac4f91632246be45 (diff) |
Added comment that C++ routines should be defined as 'external "C"'
and scheduled as 'LANG: C'.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2246 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | doc/UsersGuide/ThornWriters.tex | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/UsersGuide/ThornWriters.tex b/doc/UsersGuide/ThornWriters.tex index 944d6da6..9196814e 100644 --- a/doc/UsersGuide/ThornWriters.tex +++ b/doc/UsersGuide/ThornWriters.tex @@ -499,6 +499,11 @@ alias name by using {\tt AS <alias\_name>}. \end{Lentry} +The {\tt LANG} keyword specifies the linkage of the scheduled routine +which determines how to call it from the scheduler. +C and Fortran linkage are possible here. C++ routines should be defined as +{\tt extern "C"} and registered as {\tt LANG: C}. + As well as schedule blocks it's possible to embed C style {\tt if/else} statements in the schedule.ccl. These can be used to schedule things based upon the value of a parameter. @@ -524,7 +529,7 @@ if(CCTK_Equals(evolve_hydro,''yes'')) \vskip .5cm {\bf Example II:} -The thorns {\tt WaveToy77} and {\tt WaveToyC} each provide an +The thorns {\tt WaveToy77} and {\tt WaveToyC} each provide a routine to evolve the 3D wave equation: {\tt WaveToyF77\_Evolution} and {\tt WaveToyC\_Evolution}. The routine names have to be different, so that both thorns can be compiled at the same time, their functionlity @@ -539,16 +544,15 @@ change depending on the activation in the parameter file). In both cases the group of variables {\tt scalarfield} are synchronised across processes when the routine is exited. -{\tt + +\begin{verbatim} schedule WaveToyF77\_Evolution AS WaveToy\_Evolution AT evol \\ { \\ LANG: Fortran \\ STORAGE: scalartmps \\ SYNC: scalarfield \\ } "Evolution of 3D wave equation" \\ -} -\begin{verbatim} schedule WaveToyC_Evolution AS WaveToy_Evolution AT evol { LANG: C |