source: icGREP/icgrep-devel/icgrep/pablo/pablo_kernel.h @ 5202

Last change on this file since 5202 was 5202, checked in by nmedfort, 2 years ago

Initial work on adding types to PabloAST and mutable Var objects.

File size: 1.3 KB
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5
6#ifndef PABLO_KERNEL_H
7#define PABLO_KERNEL_H
8
9#include <kernels/kernel.h>
10#include <IDISA/idisa_builder.h>
11#include <pablo/function.h>
12
13namespace pablo {
14   
15class PabloCompiler; class CarryManager;
16
17
18class PabloKernel : public kernel::KernelBuilder {
19public:
20    PabloKernel(IDISA::IDISA_Builder * builder, std::string kernelName, PabloFunction * function);
21    // At present only population count accumulator are supported,
22    // using the pablo.Count operation.
23   
24    ~PabloKernel();
25
26protected:
27    // A custom method for preparing kernel declarations is needed,
28    // so that the carry data requirements may be accommodated before
29    // finalizing the KernelStateType.
30    void prepareKernel() override;
31
32    void generateDoBlockMethod() override;
33   
34    // The default method for Pablo final block processing sets the
35    // EOFmark bit and then calls the standard DoBlock function.
36    // This may be overridden for specialized processing.
37    virtual void generateFinalBlockMethod() override;
38   
39    PabloFunction * mPabloFunction;
40   
41    PabloCompiler * mPabloCompiler;
42
43    friend class PabloCompiler;
44    friend class CarryManager;
45};
46}
47#endif // PABLO_KERNEL_H
Note: See TracBrowser for help on using the repository browser.