|
7 | 7 | import sympy |
8 | 8 | from sympy import Expr, Function, Number, Tuple, cacheit, sympify |
9 | 9 | from sympy.core.decorators import call_highest_priority |
| 10 | +from sympy.logic.boolalg import BooleanFunction |
10 | 11 |
|
11 | 12 | from devito.finite_differences.elementary import Min, Max |
12 | 13 | from devito.tools import (Pickable, Bunch, as_tuple, is_integer, float2, # noqa |
|
16 | 17 | from devito.types import Symbol |
17 | 18 | from devito.types.basic import Basic |
18 | 19 |
|
19 | | -__all__ = ['CondEq', 'CondNe', 'IntDiv', 'CallFromPointer', # noqa |
20 | | - 'CallFromComposite', 'FieldFromPointer', 'FieldFromComposite', |
21 | | - 'ListInitializer', 'Byref', 'IndexedPointer', 'Cast', 'DefFunction', |
22 | | - 'MathFunction', 'InlineIf', 'ReservedWord', 'Keyword', 'String', |
23 | | - 'Macro', 'Class', 'MacroArgument', 'Deref', 'Namespace', |
24 | | - 'Rvalue', 'Null', 'SizeOf', 'rfunc', 'BasicWrapperMixin', 'ValueLimit', |
25 | | - 'VectorAccess'] |
| 20 | +__all__ = ['CondEq', 'CondNe', 'BitwiseNot', 'BitwiseXor', 'IntDiv', # noqa |
| 21 | + 'CallFromPointer', 'CallFromComposite', 'FieldFromPointer', |
| 22 | + 'FieldFromComposite', 'ListInitializer', 'Byref', 'IndexedPointer', |
| 23 | + 'Cast', 'DefFunction', 'MathFunction', 'InlineIf', 'ReservedWord', |
| 24 | + 'Keyword', 'String', 'Macro', 'Class', 'MacroArgument', 'Deref', |
| 25 | + 'Namespace', 'Rvalue', 'Null', 'SizeOf', 'rfunc', 'BasicWrapperMixin', |
| 26 | + 'ValueLimit', 'VectorAccess'] |
26 | 27 |
|
27 | 28 |
|
28 | 29 | class CondEq(sympy.Eq): |
@@ -63,6 +64,17 @@ def negated(self): |
63 | 64 | return CondEq(*self.args, evaluate=False) |
64 | 65 |
|
65 | 66 |
|
| 67 | +class BitwiseNot(BooleanFunction): |
| 68 | + pass |
| 69 | + |
| 70 | + |
| 71 | +class BitwiseXor(BooleanFunction): |
| 72 | + |
| 73 | + # Enforce two args |
| 74 | + def __new__(cls, arg0, arg1, **kwargs): |
| 75 | + return super().__new__(cls, arg0, arg1, **kwargs) |
| 76 | + |
| 77 | + |
66 | 78 | class IntDiv(sympy.Expr): |
67 | 79 |
|
68 | 80 | """ |
|
0 commit comments