source: icGREP/icgrep-devel/icgrep/pablo/pe_xor.h @ 4656

Last change on this file since 4656 was 4650, checked in by nmedfort, 4 years ago

Partial roll back of Trie structure. Seemed to introduce the potential of generating a cycle in the AST. More analysis is needed here before mixing together multiple Advance DAG traversals.

File size: 880 bytes
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef XOR_H
8#define XOR_H
9
10#include <pablo/pabloAST.h>
11#include <array>
12
13namespace pablo {
14
15class Xor : public Statement {
16    friend class PabloBlock;
17public:
18    static inline bool classof(const PabloAST * e) {
19        return e->getClassTypeId() == ClassTypeId::Xor;
20    }
21    static inline bool classof(const void *) {
22        return false;
23    }
24    virtual ~Xor() {
25    }
26    PabloAST * getExpr1() const {
27        return getOperand(0);
28    }
29    PabloAST * getExpr2() const {
30        return getOperand(1);
31    }
32protected:
33    Xor(PabloAST * expr1, PabloAST * expr2, String * name)
34    : Statement(ClassTypeId::Xor, {expr1, expr2}, name)
35    {
36
37    }
38};
39
40}
41
42#endif // XOR_H
43
44
45
Note: See TracBrowser for help on using the repository browser.