Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
x_prop.h
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 /* ====================================================================
00037  * ====================================================================
00038  *
00039  *
00040  *  Revision history:
00041  *   13-Dec-91 - Original Version
00042  *
00043  *  Synopsis:
00044  *
00045  *      This module is a template for lightweight sets that support
00046  *      the operations: add-member, delete-member, is-member, and
00047  *      destructive union.  (More could be added.)  A new set type is
00048  *      created from a base type by defining some perameter macros and
00049  *      including the template files.  The sets are static in the
00050  *      sense that their universe is fixed at the time of their
00051  *      creation.  (This is part of the source of their lightweight.)
00052  *
00053  *  Instructions for use:
00054  *
00055  *      This file is only a template.  See MTP_ROOT/bin/gen_x_prop for
00056  *      instructions on how to create instantiations based on specific
00057  *      types.
00058  *  
00059  *  Interface:  Given a base_type_name XT and a prefix X:
00060  *
00061  *      Prefixes: X_PROP -   for X properties
00062  *
00063  *      Exported types:
00064  *
00065  *          typedef UINT32/UINT64 X_PROP
00066  *
00067  *              Only accessable through the functions defined below.
00068  *
00069  *      Exported functions:
00070  *
00071  *          X_PROP *X_PROP_Create(
00072  *              INT32     universe_size,
00073  *              MEM_POOL *pool
00074  *          )
00075  *
00076  *              Creates a new PREFIX_PROP which is initially FALSE of
00077  *              all (currently existing) elements.
00078  *
00079  *          void X_PROP_Set(
00080  *              X_PROP *prop,
00081  *              XT      x
00082  *          )
00083  *
00084  *              Makes 'prop' true of 'x'.
00085  *
00086  *          void X_PROP_Reset(
00087  *              X_PROP *prop,
00088  *              XT      x
00089  *          )
00090  *
00091  *            Makes 'prop' false of 'x'.
00092  *
00093  *        BOOL X_PROP_Get(
00094  *            X_PROP *prop,
00095  *            XT      x
00096  *        )
00097  *
00098  *            Returns TRUE or FALSE as the 'prop' applies to 'x'.
00099  *
00100  *        void X_PROP_UnionD(
00101  *            x_PROP *prop0,
00102  *            x_PROP *prop1
00103  *        )
00104  *
00105  *            Destructively adds the elements of 'prop1' into 'prop0'.
00106  *
00107  *        BOOL X_PROP_Intersection_Is_NonEmpty(
00108  *            x_PROP *prop0,
00109  *            x_PROP *prop1
00110  *        )
00111  *
00112  *            Returns TRUE iff 'prop0', 'prop1' have an element in
00113  *            common. 
00114  *
00115  * ====================================================================
00116  * ====================================================================
00117  */
00118 
00119 
00120 
00121 
00122 #ifdef __cplusplus
00123 extern "C" {
00124 #endif
00125 
00126 
00127 
00128 
00129 #if defined(_MIPS_ISA) && _MIPS_ISA >= 3
00130 typedef UINT64 _X_PROP_TYPE_;
00131 #define _X_PROP_TYPE_SIZE_LOG2_ 6
00132 #else
00133 typedef UINT32 _X_PROP_TYPE_;
00134 #define _X_PROP_TYPE_SIZE_LOG2_ 5
00135 #endif
00136 #define _X_PROP_TYPE_SIZE_ (sizeof(_X_PROP_TYPE_) * 8)
00137 
00138 typedef _X_BASE_TYPE_ _X_PROP_LOCAL_BASE_TYPE_;
00139 
00140 extern _X_PROP_TYPE_ *
00141 _X_PROP_CREATE_(
00142   INT32     universe_size,
00143   MEM_POOL *pool
00144 );
00145 
00146 extern void
00147 _X_PROP_SET_(
00148   _X_PROP_TYPE_            *prop,
00149   _X_PROP_LOCAL_BASE_TYPE_  x
00150 );
00151 
00152 extern void
00153 _X_PROP_RESET_(
00154   _X_PROP_TYPE_            *prop,
00155   _X_PROP_LOCAL_BASE_TYPE_  x
00156 );
00157 
00158 extern BOOL
00159 _X_PROP_GET_(
00160   _X_PROP_TYPE_            *prop,
00161   _X_PROP_LOCAL_BASE_TYPE_  x
00162 );
00163 
00164 extern void
00165 _X_PROP_UNIOND_(
00166   _X_PROP_TYPE_ *prop0,
00167   _X_PROP_TYPE_ *prop1
00168 );
00169 
00170 extern BOOL
00171 _X_PROP_INTERSECTION_IS_NONEMPTY_(
00172   _X_PROP_TYPE_ *prop0,
00173   _X_PROP_TYPE_ *prop1
00174 );
00175 
00176 #ifdef __cplusplus
00177 }
00178 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines