ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
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 { |
---|
| 20 | WidenMode( bool widenFirst, bool widenSecond ): widenFirst( widenFirst ), widenSecond( widenSecond ) {} |
---|
| 21 | WidenMode &operator|=( const WidenMode &other ) { widenFirst |= other.widenFirst; widenSecond |= other.widenSecond; return *this; } |
---|
| 22 | WidenMode &operator&=( const WidenMode &other ) { widenFirst &= other.widenFirst; widenSecond &= other.widenSecond; return *this; } |
---|
| 23 | WidenMode operator|( const WidenMode &other ) { WidenMode newWM( *this ); newWM |= other; return newWM; } |
---|
| 24 | WidenMode operator&( const WidenMode &other ) { WidenMode newWM( *this ); newWM &= other; return newWM; } |
---|
| 25 | operator bool() { return widenFirst && widenSecond; } |
---|
| 26 | |
---|
| 27 | bool widenFirst : 1, widenSecond : 1; |
---|
| 28 | }; |
---|
| 29 | } // namespace ResolvExpr |
---|
| 30 | |
---|
| 31 | // Local Variables: // |
---|
| 32 | // tab-width: 4 // |
---|
| 33 | // mode: c++ // |
---|
| 34 | // compile-command: "make install" // |
---|
| 35 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.