From 2562670b0a10dd49cf641fbcc33036442b9302b3 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt <Ansgar.Burchardt@tu-dresden.de> Date: Fri, 17 Mar 2017 19:38:04 +0100 Subject: [PATCH] Remove unused macros and static variables --- np/algebra/ugblas.cc | 125 ------------------------------------------- 1 file changed, 125 deletions(-) diff --git a/np/algebra/ugblas.cc b/np/algebra/ugblas.cc index 29a713c7e..23de80e3b 100644 --- a/np/algebra/ugblas.cc +++ b/np/algebra/ugblas.cc @@ -70,139 +70,14 @@ USING_UG_NAMESPACES using namespace PPIF; -/****************************************************************************/ -/* */ -/* defines in the following order */ -/* */ -/* compile time constants defining static data size (i.e. arrays) */ -/* other constants */ -/* macros */ -/* */ -/****************************************************************************/ - -#undef _XXL_SKIPFLAGS_ - -#define VERBOSE_BLAS 10 - -#define MATARRAYSIZE 512 - -/** @name Macros to define VEC_SCALAR, VECDATA_DESC and MATDATA_DESC components */ -/*@{ */ -#define DEFINE_VS_CMPS(a) DOUBLE a ## 0,a ## 1,a ## 2 -#define DEFINE_VD_CMPS(x) INT x ## 0,x ## 1,x ## 2 -#define DEFINE_MD_CMPS(m) INT m ## 00,m ## 01,m ## 02,m ## 10,m ## 11,m ## 12,m ## 20,m ## 21,m ## 22 -/*@}*/ - -/** @name Macros to set VEC_SCALAR components */ -/*@{ */ -#define SET_VS_CMP_1(a,A,off,tp) {a ## 0 = (A)[(off)[tp]];} -#define SET_VS_CMP_2(a,A,off,tp) {a ## 0 = (A)[(off)[tp]]; a ## 1 = (A)[(off)[tp]+1];} -#define SET_VS_CMP_3(a,A,off,tp) {a ## 0 = (A)[(off)[tp]]; a ## 1 = (A)[(off)[tp]+1]; a ## 2 = (A)[(off)[tp]+2];} -/*@}*/ - -/** @name Macros to set VECDATA_DESC components */ -/*@{ */ -#define SET_VD_CMP_1(x,v,tp) {x ## 0 = VD_CMP_OF_TYPE(v,tp,0);} -#define SET_VD_CMP_2(x,v,tp) {x ## 0 = VD_CMP_OF_TYPE(v,tp,0); x ## 1 = VD_CMP_OF_TYPE(v,tp,1);} -#define SET_VD_CMP_3(x,v,tp) {x ## 0 = VD_CMP_OF_TYPE(v,tp,0); x ## 1 = VD_CMP_OF_TYPE(v,tp,1); x ## 2 = VD_CMP_OF_TYPE(v,tp,2);} - -#define SET_VD_CMP_N(x,v,tp) switch (VD_NCMPS_IN_TYPE(v,tp)) {case 1 : SET_VD_CMP_1(x,v,tp); break; \ - case 2 : SET_VD_CMP_2(x,v,tp); break; \ - case 3 : SET_VD_CMP_3(x,v,tp); break;} -/*@}*/ - -/** @name Macros to set MATDATA_DESC components */ -/*@{ */ -#define SET_MD_CMP_11(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0);} -#define SET_MD_CMP_12(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0); m ## 01 = MD_MCMP_OF_RT_CT(M,rt,ct,1);} -#define SET_MD_CMP_13(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0); m ## 01 = MD_MCMP_OF_RT_CT(M,rt,ct,1); m ## 02 = MD_MCMP_OF_RT_CT(M,rt,ct,2);} -#define SET_MD_CMP_21(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0); m ## 10 = MD_MCMP_OF_RT_CT(M,rt,ct,1);} -#define SET_MD_CMP_22(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0); m ## 01 = MD_MCMP_OF_RT_CT(M,rt,ct,1); \ - m ## 10 = MD_MCMP_OF_RT_CT(M,rt,ct,2); m ## 11 = MD_MCMP_OF_RT_CT(M,rt,ct,3);} -#define SET_MD_CMP_23(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0); m ## 01 = MD_MCMP_OF_RT_CT(M,rt,ct,1); m ## 02 = MD_MCMP_OF_RT_CT(M,rt,ct,2); \ - m ## 10 = MD_MCMP_OF_RT_CT(M,rt,ct,3); m ## 11 = MD_MCMP_OF_RT_CT(M,rt,ct,4); m ## 12 = MD_MCMP_OF_RT_CT(M,rt,ct,5);} -#define SET_MD_CMP_31(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0); \ - m ## 10 = MD_MCMP_OF_RT_CT(M,rt,ct,1); \ - m ## 20 = MD_MCMP_OF_RT_CT(M,rt,ct,2);} -#define SET_MD_CMP_32(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0); m ## 01 = MD_MCMP_OF_RT_CT(M,rt,ct,1); \ - m ## 10 = MD_MCMP_OF_RT_CT(M,rt,ct,2); m ## 11 = MD_MCMP_OF_RT_CT(M,rt,ct,3); \ - m ## 20 = MD_MCMP_OF_RT_CT(M,rt,ct,4); m ## 21 = MD_MCMP_OF_RT_CT(M,rt,ct,5);} -#define SET_MD_CMP_33(m,M,rt,ct) {m ## 00 = MD_MCMP_OF_RT_CT(M,rt,ct,0); m ## 01 = MD_MCMP_OF_RT_CT(M,rt,ct,1); m ## 02 = MD_MCMP_OF_RT_CT(M,rt,ct,2); \ - m ## 10 = MD_MCMP_OF_RT_CT(M,rt,ct,3); m ## 11 = MD_MCMP_OF_RT_CT(M,rt,ct,4); m ## 12 = MD_MCMP_OF_RT_CT(M,rt,ct,5); \ - m ## 20 = MD_MCMP_OF_RT_CT(M,rt,ct,6); m ## 21 = MD_MCMP_OF_RT_CT(M,rt,ct,7); m ## 22 = MD_MCMP_OF_RT_CT(M,rt,ct,8);} - -#ifdef Debug -#define PRINTVEC(x) {PrintDebug("contents of " STR(x) ":\n");PrintVectorX(GRID_ON_LEVEL(mg,tl),x,3,3,PrintDebug);} -#else -#define PRINTVEC(x) {PrintDebug("contents of " STR(x) ":\n");PrintVectorX(GRID_ON_LEVEL(mg,tl),x,3,3,printf);} -#endif -/*@}*/ - -#define CEIL(n) ((n)+((ALIGNMENT-((n)&(ALIGNMENT-1)))&(ALIGNMENT-1))) - - -/****************************************************************************/ -/* */ -/* data structures used in this source file (exported data structures are */ -/* in the corresponding include file!) */ -/* */ -/****************************************************************************/ - -/****************************************************************************/ -/* */ -/* definition of exported global variables */ -/* */ -/****************************************************************************/ - /****************************************************************************/ /* */ /* definition of variables global to this source file only (static!) */ /* */ /****************************************************************************/ -#ifdef ModelP -static VECDATA_DESC *ConsVector; -static MATDATA_DESC *ConsMatrix; -static GRID *ConsGrid; -static INT MaximumInconsMatrices; -static MATRIX *MatArrayLocal[MATARRAYSIZE]; -static MATRIX *MatArrayRemote[MATARRAYSIZE]; -static INT MaxBlockSize; -static size_t DataSizePerVector; -static size_t DataSizePerMatrix; - -#ifdef __TWODIM__ -static INT max_vectors_of_type[NVECTYPES] = -{ MAX_CORNERS_OF_ELEM, MAX_EDGES_OF_ELEM, 1}; -#endif - -#ifdef __THREEDIM__ -static INT max_vectors_of_type[NVECTYPES] = -{ MAX_CORNERS_OF_ELEM, MAX_EDGES_OF_ELEM, 1, MAX_SIDES_OF_ELEM}; -#endif - -#ifdef __BLOCK_VECTOR_DESC__ -static const BV_DESC *ConsBvd; -static const BV_DESC_FORMAT *ConsBvdf; -static INT ConsComp; -#endif - -#ifndef _XXL_SKIPFLAGS_ -#define SKIP_CONT(skip,i) ((skip) & (1 << (i))) -#define SET_SKIP_CONT(v,i) (VECSKIP(v) |= (1 << (i))) -#else -#define SKIP_CONT(skip,i) ((i < sizeof (INT) * 8) ? \ - (skip) & (1 << (i)) \ - : (skip) & (1 << (sizeof (INT) * 8 - 1))) -#define SET_SKIP_CONT(v,i) (VECSKIP(v) |= ((i) < sizeof(INT) * 8) ? 1 << (i) \ - : 1 << (sizeof (INT) * 8 - 1)) -#endif - -#endif - static INT trace_ugblas=0; - REP_ERR_FILE /****************************************************************************/ -- GitLab