From 02c6d99801406c542ed1cc0ff747e54a2ef3015a Mon Sep 17 00:00:00 2001 From: yye00 Date: Sun, 29 Aug 2004 09:26:09 +0000 Subject: removing unused routine git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalReduce/trunk@33 7daa882c-dc44-4453-834e-278d26b18e6a --- src/Reduction.c | 183 -------------------------------------------------------- 1 file changed, 183 deletions(-) (limited to 'src') diff --git a/src/Reduction.c b/src/Reduction.c index 118e74d..7333884 100644 --- a/src/Reduction.c +++ b/src/Reduction.c @@ -16,16 +16,6 @@ static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CCTDevelopment_LocalReduce_Reduction_c); -/******************************************************************** - ********************* Local Routine Prototypes ********************* - ********************************************************************/ - -static int copy_real_to_outtype (int num_elems, - CCTK_REAL inarray [/* num_elems */], - int outtype, - void *const outarray /* [num_elems] */); - - /******************************************************************** ********************* External Routines ********************** ********************************************************************/ @@ -113,176 +103,3 @@ int LocalReduce_Reduce (int N_dims, int operator_handle, return (retval); } - /*@@ - @routine copy_real_to_outtype - @author Thomas Radke - @date 19 Aug 1999 - @desc - Does the type conversion from CCTK_REAL into the requested - datatype. - @enddesc - @calls CCTK_VarTypeSize - CCTK_GroupTypeFromVarI - ReductionGA - ReductionScalar - copy_real_to_outtype - - @var num_elems - @vdesc number of elements to convert - @vtype int - @vio in - @endvar - @var inarray - @vdesc input array with results of reductions - @vtype CCTK_REAL * - @vio in - @endvar - @var outtype - @vdesc requested output datatype - @vtype int - @vio in - @endvar - @var outarray - @vdesc pointer to output buffer to store the converted results - @vtype void * - @vio out - @endvar - - @returntype int - @returndesc - 0 for success, or
- -1 if conversion into target datatype is not supported. - @endreturndesc -@@*/ -static int copy_real_to_outtype (int num_elems, - CCTK_REAL inarray[/* num_elems */], - int outtype, - void *outarray /* [num_elems] */) -{ - int i, retval; - - - retval = 0; - - if (outtype == CCTK_VARIABLE_CHAR) - { - CCTK_BYTE *_outarray = (CCTK_CHAR *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_BYTE) inarray[i]; - } - } - else if (outtype == CCTK_VARIABLE_INT) - { - CCTK_INT *_outarray = (CCTK_INT *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_INT) inarray[i]; - } - } -#ifdef CCTK_INT1 - else if (outtype == CCTK_VARIABLE_INT1) - { - CCTK_INT1 *_outarray = (CCTK_INT1 *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_INT1) inarray[i]; - } - } -#endif -#ifdef CCTK_INT2 - else if (outtype == CCTK_VARIABLE_INT2) - { - CCTK_INT2 *_outarray = (CCTK_INT2 *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_INT2) inarray[i]; - } - } -#endif -#ifdef CCTK_INT4 - else if (outtype == CCTK_VARIABLE_INT4) - { - CCTK_INT4 *_outarray = (CCTK_INT4 *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_INT4) inarray[i]; - } - } -#endif -#ifdef CCTK_INT8 - else if (outtype == CCTK_VARIABLE_INT8) - { - CCTK_INT8 *_outarray = (CCTK_INT8 *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_INT8) inarray[i]; - } - } -#endif - else if (outtype == CCTK_VARIABLE_REAL) - { - CCTK_REAL *_outarray = (CCTK_REAL *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_REAL) inarray[i]; - } - } -#ifdef CCTK_REAL4 - else if (outtype == CCTK_VARIABLE_REAL4) - { - CCTK_REAL4 *_outarray = (CCTK_REAL4 *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_REAL4) inarray[i]; - } - } -#endif -#ifdef CCTK_REAL8 - else if (outtype == CCTK_VARIABLE_REAL8) - { - CCTK_REAL8 *_outarray = (CCTK_REAL8 *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_REAL8) inarray[i]; - } - } -#endif -#ifdef CCTK_REAL16 - else if (outtype == CCTK_VARIABLE_REAL16) - { - CCTK_REAL16 *_outarray = (CCTK_REAL16 *) outarray; - - - for (i = 0; i < num_elems; i++) - { - _outarray[i] = (CCTK_REAL16) inarray[i]; - } - } -#endif - else - { - CCTK_WARN (1, "copy_real_to_outtype: Unsupported output type"); - retval = -1; - } - - return (retval); -} -- cgit v1.2.3