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

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

Multi-threading support for PabloAST / PabloCompiler?. Requires unique LLVM Context / Module for each thread.

File size: 722 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    virtual ~Integer(){
20
21    }
22    inline IntTy value() const {
23        return mValue;
24    }
25protected:
26    Integer(const IntTy value, Type * type, Allocator & allocator) noexcept
27    : PabloAST(ClassTypeId::Integer, type, nullptr, allocator)
28    , mValue(value)
29    {
30
31    }
32private:
33    IntTy mValue;
34};
35
36}
37
38#endif // PE_INTEGER_H
Note: See TracBrowser for help on using the repository browser.