summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-10-13 18:07:49 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-10-13 18:07:49 +0000
commit4a909d77bb17007cfdd69ad7b991cbbd85555d9f (patch)
tree744767ab6d9fa891f33b8c78fa2e9c8df88321fe
parent456924d5fd062dcc075121903fa0edf604cfc73d (diff)
Introduce the new Cactus variable type CCTK_INT1.
Extend routines to handle the new type. git-svn-id: http://svn.cactuscode.org/flesh/trunk@3431 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/make/cctk_Config.h.in4
-rw-r--r--lib/make/configure.in6
-rw-r--r--lib/make/force-rebuild3
-rw-r--r--lib/sbin/GridFuncStuff.pl8
-rw-r--r--lib/sbin/create_c_stuff.pl4
-rw-r--r--lib/sbin/interface_parser.pl2
-rw-r--r--src/include/cctk_Constants.h45
-rw-r--r--src/include/cctk_Types.h5
-rw-r--r--src/include/util_Table.h16
-rw-r--r--src/main/Groups.c22
-rw-r--r--src/util/Table.c117
11 files changed, 197 insertions, 35 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in
index b983999b..c2947bba 100644
--- a/lib/make/cctk_Config.h.in
+++ b/lib/make/cctk_Config.h.in
@@ -45,6 +45,7 @@
#undef CCTK_INTEGER_PRECISION_8
#undef CCTK_INTEGER_PRECISION_4
#undef CCTK_INTEGER_PRECISION_2
+#undef CCTK_INTEGER_PRECISION_1
/* Modifier for Fortran function definitions. */
@@ -146,6 +147,9 @@
/* Define the type of a 2 byte integer */
#undef CCTK_INT2
+/* Define the type of a 1 byte integer */
+#undef CCTK_INT1
+
/* Float sizes */
/* Define the type of a 16 byte float */
diff --git a/lib/make/configure.in b/lib/make/configure.in
index 40deb26e..7c650159 100644
--- a/lib/make/configure.in
+++ b/lib/make/configure.in
@@ -572,6 +572,8 @@ case "x$ac_cv_sizeof_short_int" in
CCTK_INT2="short int" ;;
esac
+CCTK_INT1="signed char"
+
if test -n "$CCTK_INT8" ; then
AC_DEFINE_UNQUOTED(CCTK_INT8, $CCTK_INT8)
fi
@@ -584,6 +586,10 @@ if test -n "$CCTK_INT2" ; then
AC_DEFINE_UNQUOTED(CCTK_INT2, $CCTK_INT2)
fi
+if test -n "$CCTK_INT1" ; then
+ AC_DEFINE_UNQUOTED(CCTK_INT1, $CCTK_INT1)
+fi
+
# Float types
case "x$ac_cv_sizeof_long_double" in
diff --git a/lib/make/force-rebuild b/lib/make/force-rebuild
index 81d69185..422b3c83 100644
--- a/lib/make/force-rebuild
+++ b/lib/make/force-rebuild
@@ -5,7 +5,7 @@
# @desc
# Timestamp file for forcing rebuilds of configurations
# @enddesc
-# @version $Id: force-rebuild,v 1.4 2003-09-04 16:16:29 tradke Exp $
+# @version $Id: force-rebuild,v 1.5 2003-10-13 18:07:49 schnetter Exp $
# @@*/
6 March 2003: minor changes to CreateFunctionBindings.pl
@@ -13,3 +13,4 @@
CCTK_IsFunctionAliased against C++.
(Changes from Ian).
4 September 2003: Parse information in thorns' configuration.ccl files
+13 October 2003: Add support for CCTK_INT1.
diff --git a/lib/sbin/GridFuncStuff.pl b/lib/sbin/GridFuncStuff.pl
index 6a1b387b..e83985ad 100644
--- a/lib/sbin/GridFuncStuff.pl
+++ b/lib/sbin/GridFuncStuff.pl
@@ -478,7 +478,7 @@ sub CreateFortranArgumentDeclarations
$argument .= '_p';
}
- if($type =~ /^(CHAR|BYTE|INT|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)$/)
+ if($type =~ /^(CHAR|BYTE|INT|INT1|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)$/)
{
# DEPRECATED IN BETA 10
if($type eq 'CHAR')
@@ -533,7 +533,7 @@ sub CreateCArgumentDeclarations
$varname .= '_p';
}
- if($type =~ /^(CHAR|BYTE|INT|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)$/)
+ if($type =~ /^(CHAR|BYTE|INT|INT1|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)$/)
{
# DEPRECATED IN BETA 10 */
if($type eq 'CHAR')
@@ -747,7 +747,7 @@ sub CreateCArgumentPrototype
push(@prototype, "CCTK_$type *");
}
- if($type !~ /^(CHAR|BYTE|INT|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)$/)
+ if($type !~ /^(CHAR|BYTE|INT|INT1|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)$/)
{
&CST_error(0,"Unknown argument type $type","",__LINE__,__FILE__);
}
@@ -804,7 +804,7 @@ sub CreateCArgumentList
push(@arglist, "PASS_REFERENCE($argument, $level)");
}
- if($type =~ /^(CHAR|BYTE|INT|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)$/)
+ if($type =~ /^(CHAR|BYTE|INT|INT1|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)$/)
{
# DEPRECATED IN BETA 10
if($type eq 'CHAR')
diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl
index 046a3e23..499f8767 100644
--- a/lib/sbin/create_c_stuff.pl
+++ b/lib/sbin/create_c_stuff.pl
@@ -99,6 +99,10 @@ sub get_c_type_string
{
$type_string = 'CCTK_INT';
}
+ elsif($type eq 'INT1')
+ {
+ $type_string = 'CCTK_INT1';
+ }
elsif($type eq 'INT2')
{
$type_string = 'CCTK_INT2';
diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl
index c5c2c721..29df5c22 100644
--- a/lib/sbin/interface_parser.pl
+++ b/lib/sbin/interface_parser.pl
@@ -786,7 +786,7 @@ sub parse_interface_ccl
$interface_db{"\U$thorn FUNCTION\E $funcname ARGS"} .= "${funcargs} ";
$interface_db{"\U$thorn FUNCTION\E $funcname RET"} .= "${rettype} ";
}
- elsif ($line =~ m/^\s*(CCTK_)?(CHAR|BYTE|INT|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)\s*(([a-zA-Z]+[a-zA-Z_0-9]*)(\[([^]]+)\])?)\s*(.*)\s*$/i)
+ elsif ($line =~ m/^\s*(CCTK_)?(CHAR|BYTE|INT|INT1|INT2|INT4|INT8|REAL|REAL4|REAL8|REAL16|COMPLEX|COMPLEX8|COMPLEX16|COMPLEX32)\s*(([a-zA-Z]+[a-zA-Z_0-9]*)(\[([^]]+)\])?)\s*(.*)\s*$/i)
{
# for($i = 1; $i < 10; $i++)
# {
diff --git a/src/include/cctk_Constants.h b/src/include/cctk_Constants.h
index 7e18c548..99c44d35 100644
--- a/src/include/cctk_Constants.h
+++ b/src/include/cctk_Constants.h
@@ -11,35 +11,36 @@
#ifndef _CCTK_CONSTANTS_H_
#define _CCTK_CONSTANTS_H_
-#define CCTK_VARIABLE_VOID 0
-#define CCTK_VARIABLE_BYTE 1
-#define CCTK_VARIABLE_INT 2
-#define CCTK_VARIABLE_INT2 3
-#define CCTK_VARIABLE_INT4 4
-#define CCTK_VARIABLE_INT8 5
-#define CCTK_VARIABLE_REAL 6
-#define CCTK_VARIABLE_REAL4 7
-#define CCTK_VARIABLE_REAL8 8
-#define CCTK_VARIABLE_REAL16 9
-#define CCTK_VARIABLE_COMPLEX 10
-#define CCTK_VARIABLE_COMPLEX8 11
-#define CCTK_VARIABLE_COMPLEX16 12
-#define CCTK_VARIABLE_COMPLEX32 13
-#define CCTK_VARIABLE_STRING 14
-#define CCTK_VARIABLE_POINTER 15
-#define CCTK_VARIABLE_FPOINTER 16
+#define CCTK_VARIABLE_VOID 100
+#define CCTK_VARIABLE_BYTE 101
+#define CCTK_VARIABLE_INT 102
+#define CCTK_VARIABLE_INT1 103
+#define CCTK_VARIABLE_INT2 104
+#define CCTK_VARIABLE_INT4 105
+#define CCTK_VARIABLE_INT8 106
+#define CCTK_VARIABLE_REAL 107
+#define CCTK_VARIABLE_REAL4 108
+#define CCTK_VARIABLE_REAL8 109
+#define CCTK_VARIABLE_REAL16 110
+#define CCTK_VARIABLE_COMPLEX 111
+#define CCTK_VARIABLE_COMPLEX8 112
+#define CCTK_VARIABLE_COMPLEX16 113
+#define CCTK_VARIABLE_COMPLEX32 114
+#define CCTK_VARIABLE_STRING 115
+#define CCTK_VARIABLE_POINTER 116
+#define CCTK_VARIABLE_FPOINTER 117
/* DEPRECATED IN BETA 12 */
-#define CCTK_VARIABLE_FN_POINTER 16
+#define CCTK_VARIABLE_FN_POINTER CCTK_VARIABLE_FPOINTER
/* DEPRECATED IN BETA 10 */
-#define CCTK_VARIABLE_CHAR 1
+#define CCTK_VARIABLE_CHAR CCTK_VARIABLE_BYTE
/* steerable status of parameters */
-#define CCTK_STEERABLE_NEVER 0
-#define CCTK_STEERABLE_ALWAYS 1
-#define CCTK_STEERABLE_RECOVER 2
+#define CCTK_STEERABLE_NEVER 200
+#define CCTK_STEERABLE_ALWAYS 201
+#define CCTK_STEERABLE_RECOVER 202
/* number of staggerings */
#define CCTK_NSTAGGER 3
diff --git a/src/include/cctk_Types.h b/src/include/cctk_Types.h
index b6e2cabe..12f3976e 100644
--- a/src/include/cctk_Types.h
+++ b/src/include/cctk_Types.h
@@ -75,6 +75,7 @@ typedef unsigned char CCTK_BYTE;
#define CCTK_INT8 INTEGER*8
#define CCTK_INT4 INTEGER*4
#define CCTK_INT2 INTEGER*2
+#define CCTK_INT1 INTEGER*1
#define CCTK_COMPLEX32 COMPLEX*32
#define CCTK_COMPLEX16 COMPLEX*16
@@ -116,6 +117,10 @@ typedef unsigned char CCTK_BYTE;
#define CCTK_INT CCTK_INT2
#endif
+#ifdef CCTK_INTEGER_PRECISION_1
+#define CCTK_INT CCTK_INT1
+#endif
+
/* Complex precision */
#ifdef CCTK_REAL_PRECISION_16
#define CCTK_COMPLEX CCTK_COMPLEX32
diff --git a/src/include/util_Table.h b/src/include/util_Table.h
index 6209c3e8..6148a8a4 100644
--- a/src/include/util_Table.h
+++ b/src/include/util_Table.h
@@ -183,6 +183,9 @@ int Util_TableSetChar(int handle, CCTK_CHAR value, const char *key);
/* integers */
int Util_TableSetInt(int handle, CCTK_INT value, const char *key);
+#ifdef CCTK_INTEGER_PRECISION_1
+int Util_TableSetInt1(int handle, CCTK_INT1 value, const char *key);
+#endif
#ifdef CCTK_INTEGER_PRECISION_2
int Util_TableSetInt2(int handle, CCTK_INT2 value, const char *key);
#endif
@@ -244,6 +247,11 @@ int Util_TableSetCharArray(int handle,
int Util_TableSetIntArray(int handle,
int N_elements, const CCTK_INT array[],
const char *key);
+#ifdef CCTK_INTEGER_PRECISION_1
+int Util_TableSetInt1Array(int handle,
+ int N_elements, const CCTK_INT1 array[],
+ const char *key);
+#endif
#ifdef CCTK_INTEGER_PRECISION_2
int Util_TableSetInt2Array(int handle,
int N_elements, const CCTK_INT2 array[],
@@ -320,6 +328,9 @@ int Util_TableGetChar(int handle, CCTK_CHAR *value, const char *key);
/* integers */
int Util_TableGetInt(int handle, CCTK_INT *value, const char *key);
+#ifdef CCTK_INTEGER_PRECISION_1
+int Util_TableGetInt1(int handle, CCTK_INT1 *value, const char *key);
+#endif
#ifdef CCTK_INTEGER_PRECISION_2
int Util_TableGetInt2(int handle, CCTK_INT2 *value, const char *key);
#endif
@@ -381,6 +392,11 @@ int Util_TableGetCharArray(int handle,
int Util_TableGetIntArray(int handle,
int N_elements, CCTK_INT array[],
const char *key);
+#ifdef CCTK_INTEGER_PRECISION_1
+int Util_TableGetInt1Array(int handle,
+ int N_elements, CCTK_INT1 array[],
+ const char *key);
+#endif
#ifdef CCTK_INTEGER_PRECISION_2
int Util_TableGetInt2Array(int handle,
int N_elements, CCTK_INT2 array[],
diff --git a/src/main/Groups.c b/src/main/Groups.c
index 74264f7c..603a3e7d 100644
--- a/src/main/Groups.c
+++ b/src/main/Groups.c
@@ -8,6 +8,7 @@
@version $Id$
@@*/
+#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -717,6 +718,10 @@ int CCTK_VarTypeNumber (const char *type)
{
retval = CCTK_VARIABLE_INT;
}
+ else if (! strcmp (type, "INT1"))
+ {
+ retval = CCTK_VARIABLE_INT1;
+ }
else if (! strcmp (type, "INT2"))
{
retval = CCTK_VARIABLE_INT2;
@@ -812,6 +817,10 @@ const char *CCTK_VarTypeName (int vtype)
retval = "CCTK_VARIABLE_INT";
break;
+ case CCTK_VARIABLE_INT1:
+ retval = "CCTK_VARIABLE_INT1";
+ break;
+
case CCTK_VARIABLE_INT2:
retval = "CCTK_VARIABLE_INT2";
break;
@@ -852,9 +861,16 @@ const char *CCTK_VarTypeName (int vtype)
retval = "CCTK_VARIABLE_COMPLEX32";
break;
+ case CCTK_VARIABLE_BYTE:
+ retval = "CCTK_VARIABLE_BYTE";
+ break;
+
+#if 0
+ /* DEPRECATED IN BETA 10 */
case CCTK_VARIABLE_CHAR:
retval = "CCTK_VARIABLE_CHAR";
break;
+#endif
case CCTK_VARIABLE_STRING:
retval = "CCTK_VARIABLE_STRING";
@@ -1744,6 +1760,12 @@ int CCTK_VarTypeSize (int vtype)
var_size = sizeof (CCTK_COMPLEX);
break;
+#ifdef CCTK_INT1
+ case CCTK_VARIABLE_INT1:
+ var_size = sizeof (CCTK_INT1);
+ break;
+#endif
+
#ifdef CCTK_INT2
case CCTK_VARIABLE_INT2:
var_size = sizeof (CCTK_INT2);
diff --git a/src/util/Table.c b/src/util/Table.c
index 535dbea9..1b9ab309 100644
--- a/src/util/Table.c
+++ b/src/util/Table.c
@@ -1994,7 +1994,7 @@ void CCTK_FCALL CCTK_FNAME (Util_TableGetGenericArray)
@vtype one of
CCTK_POINTER, CCTK_FPOINTER,
CCTK_CHAR,
- CCTK_INT, CCTK_INT2, CCTK_INT4, CCTK_INT8,
+ CCTK_INT, CCTK_INT1, CCTK_INT2, CCTK_INT4, CCTK_INT8,
CCTK_REAL, CCTK_REAL4, CCTK_REAL8, CCTK_REAL16,
CCTK_COMPLEX, CCTK_COMPLEX8, CCTK_COMPLEX16, CCTK_COMPLEX32
(not all of these may be supported on any given system)
@@ -2142,6 +2142,25 @@ void CCTK_FCALL CCTK_FNAME (Util_TableSetInt)
}
#endif /* !UTIL_TABLE_TEST */
+#ifdef CCTK_INTEGER_PRECISION_1
+int Util_TableSetInt1(int handle, CCTK_INT1 value, const char *key)
+{
+ return Util_TableSetInt1Array(handle, 1, &value, key);
+}
+
+void CCTK_FCALL CCTK_FNAME (Util_TableSetInt1)
+ (int *retval, const int *handle,
+ const CCTK_INT1 *value, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (Util_TableSetInt1)
+ (int *retval, const int *handle,
+ const CCTK_INT1 *value, ONE_FORTSTRING_ARG)
+{
+ ONE_FORTSTRING_CREATE (key)
+ *retval = Util_TableSetInt1 (*handle, *value, key);
+ free (key);
+}
+#endif
+
#ifdef CCTK_INTEGER_PRECISION_2
int Util_TableSetInt2(int handle, CCTK_INT2 value, const char *key)
{
@@ -2407,7 +2426,7 @@ void CCTK_FCALL CCTK_FNAME (Util_TableSetComplex32)
@vtype const T[], where T is one of
CCTK_POINTER, CCTK_FPOINTER,
CCTK_CHAR,
- CCTK_INT, CCTK_INT2, CCTK_INT4, CCTK_INT8,
+ CCTK_INT, CCTK_INT1, CCTK_INT2, CCTK_INT4, CCTK_INT8,
CCTK_REAL, CCTK_REAL4, CCTK_REAL8, CCTK_REAL16,
CCTK_COMPLEX, CCTK_COMPLEX8, CCTK_COMPLEX16, CCTK_COMPLEX32
(not all of these may be supported on any given system)
@@ -2589,6 +2608,31 @@ void CCTK_FCALL CCTK_FNAME (Util_TableSetIntArray)
}
#endif /* !UTIL_TABLE_TEST */
+#ifdef CCTK_INTEGER_PRECISION_1
+int Util_TableSetInt1Array(int handle,
+ int N_elements, const CCTK_INT1 array[],
+ const char *key)
+{
+ return internal_set(handle,
+ CCTK_VARIABLE_INT1, N_elements, (const void *) array,
+ key);
+}
+
+void CCTK_FCALL CCTK_FNAME (Util_TableSetInt1Array)
+ (int *retval, const int *handle,
+ const int *N_elements,
+ const CCTK_INT1 array[], ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (Util_TableSetInt1Array)
+ (int *retval, const int *handle,
+ const int *N_elements,
+ const CCTK_INT1 array[], ONE_FORTSTRING_ARG)
+{
+ ONE_FORTSTRING_CREATE (key)
+ *retval = Util_TableSetInt1Array (*handle, *N_elements, array, key);
+ free (key);
+}
+#endif
+
#ifdef CCTK_INTEGER_PRECISION_2
int Util_TableSetInt2Array(int handle,
int N_elements, const CCTK_INT2 array[],
@@ -2915,7 +2959,7 @@ void CCTK_FCALL CCTK_FNAME (Util_TableSetComplex32Array)
@vtype T *, where T is one of
CCTK_POINTER, CCTK_FPOINTER,
CCTK_CHAR,
- CCTK_INT, CCTK_INT2, CCTK_INT4, CCTK_INT8,
+ CCTK_INT, CCTK_INT1, CCTK_INT2, CCTK_INT4, CCTK_INT8,
CCTK_REAL, CCTK_REAL4, CCTK_REAL8, CCTK_REAL16,
CCTK_COMPLEX, CCTK_COMPLEX8, CCTK_COMPLEX16, CCTK_COMPLEX32
(not all of these may be supported on any given system)
@@ -3085,6 +3129,28 @@ void CCTK_FCALL CCTK_FNAME (Util_TableGetInt)
}
#endif /* !UTIL_TABLE_TEST */
+#ifdef CCTK_INTEGER_PRECISION_1
+int Util_TableGetInt1(int handle, CCTK_INT1 *value, const char *key)
+{
+ const int status = Util_TableGetInt1Array(handle, 1, value, key);
+ return (status == 0)
+ ? UTIL_ERROR_TABLE_VALUE_IS_EMPTY
+ : status;
+}
+
+void CCTK_FCALL CCTK_FNAME (Util_TableGetInt1)
+ (int *retval, const int *handle,
+ CCTK_INT1 *value, ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (Util_TableGetInt1)
+ (int *retval, const int *handle,
+ CCTK_INT1 *value, ONE_FORTSTRING_ARG)
+{
+ ONE_FORTSTRING_CREATE (key)
+ *retval = Util_TableGetInt1 (*handle, value, key);
+ free (key);
+}
+#endif
+
#ifdef CCTK_INTEGER_PRECISION_2
int Util_TableGetInt2(int handle, CCTK_INT2 *value, const char *key)
{
@@ -3376,7 +3442,7 @@ void CCTK_FCALL CCTK_FNAME (Util_TableGetComplex32)
@vtype T[], where T is one of
CCTK_POINTER, CCTK_FPOINTER,
CCTK_CHAR,
- CCTK_INT, CCTK_INT2, CCTK_INT4, CCTK_INT8,
+ CCTK_INT, CCTK_INT1, CCTK_INT2, CCTK_INT4, CCTK_INT8,
CCTK_REAL, CCTK_REAL4, CCTK_REAL8, CCTK_REAL16,
CCTK_COMPLEX, CCTK_COMPLEX8, CCTK_COMPLEX16, CCTK_COMPLEX32
(not all of these may be supported on any given system)
@@ -3566,6 +3632,31 @@ void CCTK_FCALL CCTK_FNAME (Util_TableGetIntArray)
}
#endif /* !UTIL_TABLE_TEST */
+#ifdef CCTK_INTEGER_PRECISION_1
+int Util_TableGetInt1Array(int handle,
+ int N_elements, CCTK_INT1 array[],
+ const char *key)
+{
+ return internal_get(handle,
+ CCTK_VARIABLE_INT1, N_elements, (void *) array,
+ key);
+}
+
+void CCTK_FCALL CCTK_FNAME (Util_TableGetInt1Array)
+ (int *retval, const int *handle,
+ const int *N_elements, CCTK_INT1 array[],
+ ONE_FORTSTRING_ARG);
+void CCTK_FCALL CCTK_FNAME (Util_TableGetInt1Array)
+ (int *retval, const int *handle,
+ const int *N_elements, CCTK_INT1 array[],
+ ONE_FORTSTRING_ARG)
+{
+ ONE_FORTSTRING_CREATE (key)
+ *retval = Util_TableGetInt1Array (*handle, *N_elements, array, key);
+ free (key);
+}
+#endif
+
#ifdef CCTK_INTEGER_PRECISION_2
int Util_TableGetInt2Array(int handle,
int N_elements, CCTK_INT2 array[],
@@ -4513,7 +4604,7 @@ int Util_TableItSetToKey(int ihandle, const char *key)
@vtype const T[], where T is one of
CCTK_POINTER, CCTK_FPOINTER,
CCTK_CHAR,
- CCTK_INT, CCTK_INT2, CCTK_INT4, CCTK_INT8,
+ CCTK_INT, CCTK_INT1, CCTK_INT2, CCTK_INT4, CCTK_INT8,
CCTK_REAL, CCTK_REAL4, CCTK_REAL8, CCTK_REAL16,
CCTK_COMPLEX, CCTK_COMPLEX8, CCTK_COMPLEX16, CCTK_COMPLEX32
(not all of these may be supported on any given system)
@@ -4628,7 +4719,7 @@ static
@vtype T[], where T is one of
CCTK_POINTER, CCTK_FPOINTER,
CCTK_CHAR,
- CCTK_INT, CCTK_INT2, CCTK_INT4, CCTK_INT8,
+ CCTK_INT, CCTK_INT1, CCTK_INT2, CCTK_INT4, CCTK_INT8,
CCTK_REAL, CCTK_REAL4, CCTK_REAL8, CCTK_REAL16,
CCTK_COMPLEX, CCTK_COMPLEX8, CCTK_COMPLEX16, CCTK_COMPLEX32
(not all of these may be supported on any given system)
@@ -4853,7 +4944,7 @@ static
@vtype const T[], where T is one of
CCTK_POINTER, CCTK_FPOINTER,
CCTK_CHAR,
- CCTK_INT, CCTK_INT2, CCTK_INT4, CCTK_INT8,
+ CCTK_INT, CCTK_INT1, CCTK_INT2, CCTK_INT4, CCTK_INT8,
CCTK_REAL, CCTK_REAL4, CCTK_REAL8, CCTK_REAL16,
CCTK_COMPLEX, CCTK_COMPLEX8, CCTK_COMPLEX16, CCTK_COMPLEX32
(not all of these may be supported on any given system)
@@ -5607,6 +5698,10 @@ static
/* integers */
CHECK_SET_GET_INT(handle, CCTK_INT, 0, case_insensitive,
Util_TableSetInt, Util_TableGetInt);
+ #ifdef CCTK_INTEGER_PRECISION_1
+ CHECK_SET_GET_INT(handle, CCTK_INT1, 1, case_insensitive,
+ Util_TableSetInt1, Util_TableGetInt1);
+ #endif
#ifdef CCTK_INTEGER_PRECISION_2
CHECK_SET_GET_INT(handle, CCTK_INT2, 1, case_insensitive,
Util_TableSetInt2, Util_TableGetInt2);
@@ -5627,6 +5722,10 @@ static
/* generic scalars which are actually integers */
CHECK_SET_GET_GENERIC_INT(handle, CCTK_VARIABLE_INT, CCTK_INT,
0, case_insensitive);
+ #ifdef CCTK_INTEGER_PRECISION_1
+ CHECK_SET_GET_GENERIC_INT(handle, CCTK_VARIABLE_INT1, CCTK_INT1,
+ 1, case_insensitive);
+ #endif
#ifdef CCTK_INTEGER_PRECISION_2
CHECK_SET_GET_GENERIC_INT(handle, CCTK_VARIABLE_INT2, CCTK_INT2,
1, case_insensitive);
@@ -5726,6 +5825,10 @@ static
Util_TableSetCharArray, Util_TableGetCharArray);
CHECK_SET_GET_INT_ARRAY(handle, CCTK_INT, 1,
Util_TableSetIntArray, Util_TableGetIntArray);
+ #ifdef CCTK_INTEGER_PRECISION_1
+ CHECK_SET_GET_INT_ARRAY(handle, CCTK_INT1, 1,
+ Util_TableSetInt1Array, Util_TableGetInt1Array);
+ #endif
#ifdef CCTK_INTEGER_PRECISION_2
CHECK_SET_GET_INT_ARRAY(handle, CCTK_INT2, 1,
Util_TableSetInt2Array, Util_TableGetInt2Array);