diff options
author | jthorn <jthorn@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-07-12 12:10:22 +0000 |
---|---|---|
committer | jthorn <jthorn@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-07-12 12:10:22 +0000 |
commit | e01fde77513187c71b8229eff7fad32b38bde7c6 (patch) | |
tree | 14ae8f47b350c462bfa0c55da5d3dff2925fd6e8 | |
parent | f241131d36e73492a9e7a3d339adbaa270cc648c (diff) |
Util_TableSet*Array() and Util_TableSetGenericArray()
+= warning about the inefficiency of storing large arrays in a table
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4088 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | doc/ReferenceManual/UtilReference.tex | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/ReferenceManual/UtilReference.tex b/doc/ReferenceManual/UtilReference.tex index 76ca4678..435d64b3 100644 --- a/doc/ReferenceManual/UtilReference.tex +++ b/doc/ReferenceManual/UtilReference.tex @@ -3831,6 +3831,13 @@ Note that empty (0-element) arrays are ok. This function invalidates any iterators for the table which are not in the ``null-pointer'' state. + +Note that the table makes (stores) a \emph{copy} of the array +you pass in, so it's somewhat inefficient to store a large array +(e.g.~a grid function) this way. If this is a problem, consider +storing a \verb|CCTK_POINTER| (pointing to the array) in the table +instead. (Of course, this requires that you ensure that the pointed-to +data is still valid whenever that \verb|CCTK_POINTER| is used.) \end{Discussion} \begin{SeeAlsoSection} @@ -4313,6 +4320,13 @@ The value is stored as a 1-element array. This function invalidates any iterators for the table which are not in the ``null-pointer'' state. + +Note that the table makes (stores) a \emph{copy} of the array +you pass in, so it's somewhat inefficient to store a large array +(e.g.~a grid function) this way. If this is a problem, consider +storing a \verb|CCTK_POINTER| (pointing to the array) in the table +instead. (Of course, this requires that you ensure that the pointed-to +data is still valid whenever that \verb|CCTK_POINTER| is used.) \end{Discussion} \begin{SeeAlsoSection} |