aboutsummaryrefslogtreecommitdiff
path: root/src/list_tmp.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-03-06 14:46:13 +0100
committerThomas White <taw@physics.org>2012-03-06 14:46:13 +0100
commit3710defb709b7ab33ae7849873c4fb62de96e138 (patch)
tree0c50ad73099324891826efb2bbfc33a8ec03d8a3 /src/list_tmp.h
parent95f05d7d455c9bfd28af83b72dfeb47b77fca621 (diff)
Rename old array functions to get them out of the way of API consistency
Diffstat (limited to 'src/list_tmp.h')
-rw-r--r--src/list_tmp.h32
1 files changed, 3 insertions, 29 deletions
diff --git a/src/list_tmp.h b/src/list_tmp.h
index 63d4ef20..064efc8d 100644
--- a/src/list_tmp.h
+++ b/src/list_tmp.h
@@ -42,28 +42,8 @@
#define ERROR_T(...) fprintf(stderr, __VA_ARGS__)
-static inline void LABEL(integrate)(TYPE *ref, signed int h,
- signed int k, signed int l,
- TYPE i)
-{
- int idx;
-
- if ( (abs(h) > INDMAX) || (abs(k) > INDMAX) || (abs(l) > INDMAX) ) {
- ERROR_T("\nReflection %i %i %i is out of range!\n", h, k, l);
- ERROR_T("You need to re-configure INDMAX and re-run.\n");
- exit(1);
- }
-
- if ( h < 0 ) h += IDIM;
- if ( k < 0 ) k += IDIM;
- if ( l < 0 ) l += IDIM;
-
- idx = h + (IDIM*k) + (IDIM*IDIM*l);
- ref[idx] += i;
-}
-
-static inline void LABEL(set)(TYPE *ref, signed int h,
+static inline void LABEL(set_arr)(TYPE *ref, signed int h,
signed int k, signed int l,
TYPE i)
{
@@ -84,7 +64,7 @@ static inline void LABEL(set)(TYPE *ref, signed int h,
}
-static inline TYPE LABEL(lookup)(const TYPE *ref, signed int h,
+static inline TYPE LABEL(lookup_arr)(const TYPE *ref, signed int h,
signed int k, signed int l)
{
int idx;
@@ -104,7 +84,7 @@ static inline TYPE LABEL(lookup)(const TYPE *ref, signed int h,
}
-static inline TYPE *LABEL(new_list)(void)
+static inline TYPE *LABEL(new_arr)(void)
{
TYPE *r;
size_t r_size;
@@ -115,12 +95,6 @@ static inline TYPE *LABEL(new_list)(void)
}
-static inline void LABEL(zero_list)(TYPE *ref)
-{
- memset(ref, 0, IDIM*IDIM*IDIM*sizeof(TYPE));
-}
-
-
#undef LABEL
#undef TYPE
#undef ERROR_T