source: icGREP/icgrep-devel/icgrep/kernels/u8u32_kernel.h

Last change on this file was 5549, checked in by xuedongx, 22 months ago

add u8u32 kernel

File size: 1.0 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#ifndef U8U32_KERNEL_H
6#define U8U32_KERNEL_H
7
8#include <pablo/pablo_kernel.h>  // for PabloKernel
9#include "kernel.h"              // for KernelBuilder
10#include <string>                // for string
11#include <kernels/kernel_builder.h>
12
13namespace kernel {
14
15class U8U32KernelBuilder final: public pablo::PabloKernel {
16public:
17
18    U8U32KernelBuilder (const std::unique_ptr<kernel::KernelBuilder> & iBuilder, std::string u8u32)
19    : PabloKernel(iBuilder, u8u32 +"_kernel", {Binding{iBuilder->getStreamSetTy(8, 1), "u8bit"}},
20                       {Binding{iBuilder->getStreamSetTy(24, 1), "u32bit"},
21                        Binding{iBuilder->getStreamSetTy(1, 1), "delMask"},
22                        Binding{iBuilder->getStreamSetTy(1, 1), "errMask"}}, {}) {
23
24    }
25    bool isCachable() const override { return true; }
26    bool hasSignature() const override { return false; }
27    void generatePabloMethod() override;
28
29};
30
31}
32#endif
Note: See TracBrowser for help on using the repository browser.