00001 /* 00002 // @HEADER 00003 // *********************************************************************** 00004 // 00005 // Sacado Package 00006 // Copyright (2007) Sandia Corporation 00007 // 00008 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00009 // the U.S. Government retains certain rights in this software. 00010 // 00011 // This library is free software; you can redistribute it and/or modify 00012 // it under the terms of the GNU Lesser General Public License as 00013 // published by the Free Software Foundation; either version 2.1 of the 00014 // License, or (at your option) any later version. 00015 // 00016 // This library is distributed in the hope that it will be useful, but 00017 // WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 // Lesser General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Lesser General Public 00022 // License along with this library; if not, write to the Free Software 00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00024 // USA 00025 // Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps 00026 // (etphipp@sandia.gov). 00027 // 00028 // *********************************************************************** 00029 // @HEADER 00030 */ 00031 00032 #include <stdio.h> 00033 00034 int RAD_Const_Warn_warned = 0, RAD_Const_Warn_warnlim = 10; 00035 00036 typedef struct 00037 ADvari_head { 00038 void *var; /* address of the offending variable */ 00039 struct ADvari_head *next; 00040 int gcgen; 00041 int opno; 00042 /* Double Val; */ 00043 /* mutable Double aval; */ 00044 } ADvari_head; 00045 00046 int 00047 RAD_Const_Warn(void *v) 00048 { 00049 ADvari_head *V = (ADvari_head*)v; 00050 00051 if (++RAD_Const_Warn_warned <= RAD_Const_Warn_warnlim) 00052 fprintf(stderr, "RAD_Const_Warn var #%lx had gcgen = %d, opno = %d\n", 00053 (unsigned long)V->var, V->gcgen, -1 - V->opno); 00054 return 1; 00055 }
1.4.7