aboutsummaryrefslogtreecommitdiff
path: root/src/list_tmp.h
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-11-26 23:55:15 +0100
committerThomas White <taw@bitwiz.org.uk>2009-11-26 23:55:15 +0100
commit7b8844a5087da3fb227c3f7b7c8ce6c13cf54a4e (patch)
tree594e029cce9350a299ed83bf5dc9a4190852acd7 /src/list_tmp.h
parente18b925fd3384413f7cfb977dffbe1f8421cbf32 (diff)
Tidy up list template
Diffstat (limited to 'src/list_tmp.h')
-rw-r--r--src/list_tmp.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/list_tmp.h b/src/list_tmp.h
index ffb5f393..84c16ab9 100644
--- a/src/list_tmp.h
+++ b/src/list_tmp.h
@@ -1,3 +1,24 @@
+/*
+ * Template for creating indexed 3D lists of a given type, usually indexed
+ * as signed h,k,l values where -INDMAX<={h,k,l}<=+INDMAX.
+ *
+ * These are used, for example, for:
+ * - a list of 'double complex' values for storing structure factors,
+ * - a list of 'double' values for storing reflection intensities,
+ * - a list of 'unsigned int' values for counts of some sort.
+ *
+ * When LABEL and TYPE are #defined appropriately, including this header
+ * defines functions such as:
+ * - new_list_<LABEL>(), for creating a new list of the given type,
+ * - set_<LABEL>(), for setting a value in a list,
+ * - lookup_<LABEL>(), for retrieving values from a list,
+ * ..and so on.
+ *
+ * See src/utils.h for more information.
+ *
+ */
+
+
static inline void LABEL(integrate)(TYPE *ref, signed int h,
signed int k, signed int l,
TYPE i)
@@ -72,3 +93,7 @@ static inline TYPE *LABEL(new_list)(void)
memset(r, 0, r_size);
return r;
}
+
+
+#undef LABEL
+#undef TYPE