source: icGREP/icgrep-devel/icgrep/pablo/pe_scanthru.h @ 4899

Last change on this file since 4899 was 4717, checked in by cameron, 4 years ago

Mod64Advance, Mod64MatchStar, Mod64ScanThru ops; -mod64-approximate command-line option

File size: 1.7 KB
RevLine 
[3961]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
[3955]7#ifndef PS_SCANTHRU_H
8#define PS_SCANTHRU_H
9
[4244]10#include <pablo/pabloAST.h>
[3955]11
[4199]12namespace pablo {
13
[4410]14class ScanThru : public Statement {
[4227]15    friend class PabloBlock;
[3955]16public:
[4244]17    static inline bool classof(const PabloAST * e) {
[4200]18        return e->getClassTypeId() == ClassTypeId::ScanThru;
19    }
20    static inline bool classof(const void *) {
21        return false;
22    }
[4199]23    virtual ~ScanThru() {
24    }
[4244]25    PabloAST * getScanFrom() const {
[4432]26        return getOperand(0);
[4199]27    }
[4244]28    PabloAST * getScanThru() const {
[4432]29        return getOperand(1);
[4199]30    }
[4540]31    inline void setLocalCarryIndex(const unsigned idx) {
32        localCarryIndex = idx;
33    }
34    inline unsigned getLocalCarryIndex() const {
35        return localCarryIndex;
36    }
[4432]37protected:
[4650]38    ScanThru(PabloAST * from, PabloAST * thru, String * name)
39    : Statement(ClassTypeId::ScanThru, {from, thru}, name)
[4280]40    {
[4414]41
[4280]42    }
[4540]43private:
44    unsigned localCarryIndex;
[3955]45};
46
[4717]47class Mod64ScanThru : public Statement {
48    friend class PabloBlock;
49public:
50    static inline bool classof(const PabloAST * e) {
51        return e->getClassTypeId() == ClassTypeId::Mod64ScanThru;
52    }
53    static inline bool classof(const void *) {
54        return false;
55    }
56    virtual ~Mod64ScanThru() {
57    }
58    PabloAST * getScanFrom() const {
59        return getOperand(0);
60    }
61    PabloAST * getScanThru() const {
62        return getOperand(1);
63    }
64protected:
65    Mod64ScanThru(PabloAST * from, PabloAST * thru, String * name)
66    : Statement(ClassTypeId::Mod64ScanThru, {from, thru}, name)
67    {
68
69    }
70};
71
[4199]72}
73
[3955]74#endif // PS_SCANTHRU_H
75
76
77
Note: See TracBrowser for help on using the repository browser.