source: icGREP/icgrep-devel/icgrep/pablo/pe_integer.h @ 5652

Last change on this file since 5652 was 5283, checked in by nmedfort, 3 years ago

Optimized Symbol Generation (and fixed potential bug that could allow duplicate names being constructed); made PabloKernel? extend PabloAST (temporarily removed PabloAST::getName() to avoid diamond problem); added an internal scalar to PabloKernel? struct for each Count to avoid InOut? output scalar variable problem; allowed CodeMotionPass? to move code within the same scope but across a branch statement. Began work on separating Kernels into either Block-Oriented or Segment-Oriented kernels.

File size: 718 bytes
Line 
1#ifndef PE_INTEGER_H
2#define PE_INTEGER_H
3
4#include <pablo/pabloAST.h>
5
6namespace pablo {
7
8class Integer : public PabloAST {
9    friend class SymbolGenerator;
10public:
11    using IntTy = int64_t;
12
13    static inline bool classof(const PabloAST * e) {
14        return e->getClassTypeId() == ClassTypeId::Integer;
15    }
16    static inline bool classof(const void *) {
17        return false;
18    }   
19    inline IntTy value() const {
20        return mValue;
21    }
22    virtual ~Integer(){ }
23protected:
24    Integer(const IntTy value, llvm::Type * type, Allocator & allocator) noexcept
25    : PabloAST(ClassTypeId::Integer, type, allocator)
26    , mValue(value)
27    {
28
29    }
30private:
31    IntTy mValue;
32};
33
34}
35
36#endif // PE_INTEGER_H
Note: See TracBrowser for help on using the repository browser.