Ignore:
Timestamp:
Jun 30, 2017, 2:07:34 PM (2 years ago)
Author:
cameron
Message:

Integrated AVX deletion kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/deletion.h

    r5464 r5540  
    2222
    2323namespace kernel {
     24
     25/*
     26Input: a set of bitstreams
     27Output: swizzles containing the input bitstreams with the specified bits deleted
     28*/
     29class SwizzledDeleteByPEXTkernel final : public BlockOrientedKernel {
     30public:
     31    SwizzledDeleteByPEXTkernel(const std::unique_ptr<kernel::KernelBuilder> & iBuilder, unsigned fw, unsigned streamCount, unsigned PEXT_width = 64);
     32    bool isCachable() const override { return true; }
     33    bool hasSignature() const override { return false; }
     34protected:
     35    void generateDoBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder) override;
     36    void generateFinalBlockMethod(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * remainingBytes) override;
     37    std::vector<llvm::Value *> get_PEXT_masks(const std::unique_ptr<KernelBuilder> & iBuilder, llvm::Value * del_mask);
     38    void generateProcessingLoop(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks,
     39                                llvm::Value * delMask);
     40    void generatePEXTAndSwizzleLoop(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks, std::vector<llvm::Value *> counts);
     41    std::vector<llvm::Value *> apply_PEXT_deletion_with_swizzle(const std::unique_ptr<KernelBuilder> & iBuilder,
     42                                                                const std::vector<llvm::Value *> & masks, std::vector<llvm::Value *> strms);
     43    llvm::Value * apply_PEXT_deletion(const std::unique_ptr<KernelBuilder> & iBuilder, const std::vector<llvm::Value *> & masks,
     44                                      llvm::Value * strm);
     45private:
     46    const unsigned mDelCountFieldWidth;
     47    const unsigned mStreamCount;
     48    const unsigned mSwizzleFactor;
     49    const unsigned mSwizzleSetCount;
     50    const unsigned mPEXTWidth;
     51    static constexpr const char* mOutputSwizzleNameBase = "outputStreamSet";
     52};
    2453
    2554class DeletionKernel final : public BlockOrientedKernel {
Note: See TracChangeset for help on using the changeset viewer.