ADT
        ast-experimental
        pthread-emulation
      
      
      
| Rev | Line |  | 
|---|
| [d286cf68] | 1 | // | 
|---|
|  | 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo | 
|---|
|  | 3 | // | 
|---|
|  | 4 | // The contents of this file are covered under the licence agreement in the | 
|---|
|  | 5 | // file "LICENCE" distributed with Cforall. | 
|---|
|  | 6 | // | 
|---|
|  | 7 | // WidenMode.h -- | 
|---|
|  | 8 | // | 
|---|
|  | 9 | // Author           : Aaron B. Moss | 
|---|
|  | 10 | // Created On       : Mon Jun 18 11:58:00 2018 | 
|---|
|  | 11 | // Last Modified By : Aaron B. Moss | 
|---|
|  | 12 | // Last Modified On : Mon Jun 18 11:58:00 2018 | 
|---|
|  | 13 | // Update Count     : 1 | 
|---|
|  | 14 | // | 
|---|
|  | 15 |  | 
|---|
|  | 16 | #pragma once | 
|---|
|  | 17 |  | 
|---|
|  | 18 | namespace ResolvExpr { | 
|---|
|  | 19 | struct WidenMode { | 
|---|
| [f474e91] | 20 | WidenMode( bool first, bool second ): first( first ), second( second ) {} | 
|---|
|  | 21 |  | 
|---|
|  | 22 | WidenMode &operator|=( const WidenMode &other ) { | 
|---|
|  | 23 | first |= other.first; second |= other.second; return *this; | 
|---|
|  | 24 | } | 
|---|
| [d286cf68] | 25 |  | 
|---|
| [f474e91] | 26 | WidenMode &operator&=( const WidenMode &other ) { | 
|---|
|  | 27 | first &= other.first; second &= other.second; return *this; | 
|---|
|  | 28 | } | 
|---|
|  | 29 |  | 
|---|
|  | 30 | WidenMode operator|( const WidenMode &other ) { | 
|---|
|  | 31 | WidenMode newWM( *this ); newWM |= other; return newWM; | 
|---|
|  | 32 | } | 
|---|
|  | 33 |  | 
|---|
|  | 34 | WidenMode operator&( const WidenMode &other ) { | 
|---|
|  | 35 | WidenMode newWM( *this ); newWM &= other; return newWM; | 
|---|
|  | 36 | } | 
|---|
|  | 37 |  | 
|---|
|  | 38 | operator bool() { return first && second; } | 
|---|
|  | 39 |  | 
|---|
|  | 40 | bool first : 1, second : 1; | 
|---|
| [d286cf68] | 41 | }; | 
|---|
| [ee574a2] | 42 |  | 
|---|
|  | 43 | static inline WidenMode noWiden() { return { false, false }; } | 
|---|
| [d286cf68] | 44 | } // namespace ResolvExpr | 
|---|
|  | 45 |  | 
|---|
|  | 46 | // Local Variables: // | 
|---|
|  | 47 | // tab-width: 4 // | 
|---|
|  | 48 | // mode: c++ // | 
|---|
|  | 49 | // compile-command: "make install" // | 
|---|
|  | 50 | // End: // | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.