source: icGREP/icgrep-devel/icgrep/pablo/pe_advance.h @ 4713

Last change on this file since 4713 was 4699, checked in by nmedfort, 4 years ago

Temporary check in.

File size: 1.3 KB
RevLine 
[3850]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 PE_ADVANCE_H
8#define PE_ADVANCE_H
9
[4683]10#include <pablo/pabloAST.h>
[4410]11#include <pablo/symbol_generator.h>
[4432]12#include <pablo/pe_integer.h>
[3850]13
[4199]14namespace pablo {
15
[4410]16class Advance : public Statement {
[4227]17    friend class PabloBlock;
[3850]18public:
[4244]19    static inline bool classof(const PabloAST * e) {
[4200]20        return e->getClassTypeId() == ClassTypeId::Advance;
[4199]21    }
[4200]22    static inline bool classof(const void *) {
23        return false;
24    }
[4199]25    virtual ~Advance() {
26    }
[4244]27    inline PabloAST * getExpr() const {
[4432]28        return getOperand(0);
[4199]29    }
[4699]30    inline Integer::Type getAdvanceAmount() const {
[4432]31        return cast<Integer>(getOperand(1))->value();
[4260]32    }
[4540]33    inline void setLocalAdvanceIndex(const unsigned idx) {
34        localAdvanceIndex = idx;
35    }
36    inline unsigned getLocalAdvanceIndex() const {
37        return localAdvanceIndex;
38    }
[4200]39protected:
[4650]40    Advance(PabloAST * expr, PabloAST * shiftAmount, String * name)
41    : Statement(ClassTypeId::Advance, {expr, shiftAmount}, name)
[4432]42    {
43        assert(isa<Integer>(shiftAmount));
[4200]44    }
[4540]45private:
46    unsigned localAdvanceIndex;
[3850]47};
[4540]48   
[4199]49}
50
[3850]51#endif // PE_ADVANCE_H
52
53
54
Note: See TracBrowser for help on using the repository browser.